[release]What is it?
PCMod 2 is an addon for Garry’s Mod 10. It adds to GMod a selection of tools and entities that can be used to form an in-game computer network. You can choose between a range of hardware and software components, and wire the various components together using the different ports the entities have. Example entities include: computer towers, monitors, printers, speakers, network routers, backbone routers and much more!

How is it different (and better) than PCMod 1?
The code base has been completely rewritten from scratch – both client, and server. This makes development of your own PCMod based addons and plugins a lot easier to create and manage. Everything is ordered neatly into libraries and corresponding files with version/revision numbers.

The monitors feature a fully interactive 3D 2D interface. No derma interfaces like from PCMod 1, everything is done on the screen. The monitors are synced near perfectly across the server with data transfer optimisation, meaning there is very little lag per monitor. The screens are fully controlled from the server, which is also a handy fact for developers.

The engine is flexible, meaning PCMod 2 is an excellent base with which you could write your own addon using PCMod 2 that utilises every aspect of it – including the automatically synced 3D 2D interfaces, the beaming library and the many extra functions provided (such as helpful string, table and derma functions).

Why should I use it on my server?
Role-Play Server
PCMod 2 is perfect for a Role-Play situation. What’s more, it is completely fitted out for role-play – the addon includes a Role Play Buy menu that – with a little configuration on your behalf, takes money from your in-game wallet and spawns the entity. Bear in mind though, the player must have access to the tool gun and the two wiring tool modes in order to be able to actually wire the entities together.

Build Server
There is a selection of STools available for use that allows you to spawn the entities. You can use the entities in combination with WireMod in order to build your contraptions through use of the I/O device.

Other Servers
PCMod 2 will work on any game mode that is sandbox derived, but the players will need access to the tool gun and the wiring tool modes in order to wire together the entities. For the spawning, the role-play menu can be utilised.

What sort of connections/wire types are there?
All connections are two-way and are self to self connections – so USB is just the standard USB port type to itself (ie, no PS2 -> USB without an adapter entity).

VGA Connection
Connects a PC Tower to a monitor. Used primarily to send the screen data to the monitor, but also to send input from the monitor to the tower (all screens in PCMod 2 are touch screens!)

PS2 Connection
Connects a Keyboard to a monitor. The keyboard doesn’t actually send data to the tower, it just tells the client to open the on-screen keyboard when you lock on a monitor.

Network Connection
Connects a PC Tower to a router. Transfers data packets both ways between the entities.

Optical Connection
Connects a router to a back-bone router or another router. Transfers data packets both ways between the entities.

Mini-Jack Connection
Connects a speaker to a PC Tower. Used to play sounds. Note that the sound isn’t actually streamed down the wire, so the PC can safely be turned off and the sounds should continue.

USB Connection
Connects a miscellaneous device to a PC Tower. Devices include printers and I/O devices.

What ‘programs’ are there?
There are many programs to choose from and install with the Install Disk. The major highlight between PCMod 1 and PCMod 2 is ‘Notepad’. In PCMod 1, you only had printer-soft that limited you to 255 characters and you could not save your stuff. Notepad, however, allows you to create, save, print, and open documents of unlimited size. What’s more, the documents are saved to the tower’s hard-drive, so that you can use the Hard Disk Copier (see below) to save all your work!

Also included in PCMod 2 (that wasn’t in PCMod 1) is a Firewall program, where you can dynamically block/unblock incoming traffic to certain ports and a Net-Tools program (similar to ‘Pinger’) that allows you to run trace-routes across the virtual network.

Do you get Operating Systems?
Yes. When you spawn a PC tower, there are 2 operating systems to choose from: ‘Personal’ OS, and ‘Server’ OS. They correspond to the ‘PC’ and ‘Server’ entities in PCMod 1. What’s more, the system is coded in such a way so that if you have enough experience with Lua, you can even create your own operating systems! Perhaps you could recreate Mac or Linux.

Can I customise PCMod 2?
Yes. There is a handy configuration file which enables you to change the core settings of PCMod. If you want to change something such as the cost of a keyboard from the RP menu, it’s all changeable in that configuration file. It is also easy to create your own themes and programs for PCMod 2, using existing programs as a reference. As explained above, it is even possible to create your own operating systems. In fact, you can even go as far as creating your own drivers for the towers! (Current drivers include: display drivers, network drivers, USB drivers etc).

What else is there to know?
There is a very handy Swep you can spawn/buy called the ‘Hard Disk Copier’. This has 4 slots, and allows you to copy the hard-drive of any computer tower and save it to the server for later use. You can disconnect and reconnect and all your hard-drives are still saved. When you want to, you can select the slot and paste the hard-drive right over the old one.

The entities are advanced duplicator compatible also – to a point. The only thing saved by the duper is the hard-drive. Thankfully, all the settings on the PC (such as the theme) are saved on the hard-drive.[/release]
[release]Server
IP: No Official Server
Website: http://www.fortfn.co.uk/forum

The server only has 10 slots, is on gm_construct and is sandbox. Feel free to join anytime and try it out.

BUG REPORTING
There WILL be bugs, even though it has been tested in every aspect. If you find one, post it either here or on the FortFN forums. Provide as much information as you can, including how to reproduce the problem, any Lua errors you get etc.

Extra Info
There are 2 chat commands: !pcbuy, and !pcsettings.

!pcbuy opens the RolePlay Buy Menu - which I enabled so you can see what it's like.
!pcsettings opens the options menu - you can enable debug mode here.

There is a manual included with the download.

Media
Please post any videos/screenshots you make!

Some crappy low-res images of PCMod 2 about 6 days before beta release:

As I said on the old thread: You truly are the best of the best! Well Done! Just told the super-admin of an Rp server I play on and he wants to be the first rp server to host it! Well done and brilliant!

As I said on the old thread: You truly are the best of the best! Well Done! Just told the super-admin of an Rp server I play on and he wants to be the first rp server to host it! Well done and brilliant!

Server IP: 92.48.112.53:27019

Tell me if he has any problems setting up.

---

There are no laptops in this release, simply because I havn't got a laptop model I can rig with the 3d 2d stuff. If anyone can get to me a decent laptop model (not some crappy one straight from gmod.org), I'll work on rigging it for PCMod 2.

Uno problemo Sir. Seem to be unable to use the toolgun. Computer Technician or not, still can't use it.
Something I've done wrong ?

All I've changed is the colours of the job, to: 128, 0 , 128.

Hold on, problem seems to be solving itself.

Or not..

Well, first I put only the pcmod2 folder in addons. But then people started to whine about their scoreboards being fucked, and not being able to use their toolguns.
Then I took the whole .zip folder in addons (extracted, of course), but that didn't seem to work too good either, 'cause then I couldn't choose the job, it just said "/comptech" in chat, but nothing else.
I put the darkrp_235 file from the extra plugins folder, and put it in pcmod2 > lua > pcmod > plugins, even though it was already there, so I just replaced it.

I'll give it some more attempts. But some help right now, would be great.

Does the scoreboard/toolgun/everything else fix itself if you remove the plugin from the plugins folder completely?

Edit:
You see, this is all down to DarkRP's bad coding. If it supported adding extra jobs properly, ie when done NOT in the shared.lua file, then there would be no problems. If you still can't get it to work, I'll invent a work-around.

It'd be great if we could just type and not have to use the on-screen keyboard.

Gmod limitation. There is no way to capture input without an invisible derma textbox, which I tried and couldn't get working. The only other way is a binary module but I don't want to package that in an addon...

---

I will keep investigating into the darkrp plugin, chances are I will have to strip out the job stuff and give instructions on how you can add the jon yourself in the gamemode files.

---

Yes, you have to save files before printing. If I had the print button send the save command just before sending the print command, the print command would still get there before the save one because all the data the save command holds.

---

Thomaaaaaaaas! I has bug! When i try to save a notepad file, i get a lua error:

ULib/server/hook.lua:139: attempt to index local 'gm' (a nil value)

It says Ulib, so i'm guessing it's to do with ULX. And yes, i do have ULX.

I have not tested with ulx at all, but there is no obvious reason why it should break. The message suggests a hook problem, and since it happens when saving notepad file, it could be a datastream thing. I'll ask LuaBanana about it.

The web browser was only possible in PCMod 1 due to the (albeit buggy) HTML derma control. In PCMod 2, 3d 2d screens are used which use no derma or vgui at all. The work required to make a web browser in PCMod 2 would be similiar to rewriting IE or Firefox in Lua without using any external binary modules at all (converting HTML and CSS into a bunch of lines, boxes and text).

I have not tested with ulx at all, but there is no obvious reason why it should break. The message suggests a hook problem, and since it happens when saving notepad file, it could be a datastream thing. I'll ask LuaBanana about it.

This might matter, the last GMod update broke ULib so you need the SVN version of it to make it work. Might be related?

Gmod limitation. There is no way to capture input without an invisible derma textbox, which I tried and couldn't get working. The only other way is a binary module but I don't want to package that in an addon...

1) I have never ever (and I have tried quite alot of times) got that to work.
2) It asks for a number, and due to the nature, it means I would need to cycle through every possible key (once I figure out all the numbers...) and check if they are down in a think hook.
3) If people have low FPS, then it is near impossible to type.
4) If people have high FPS, then the text speeds out so fast its also impossible to type.
5) Any sort of flagging which is used to delay time between character entries is very complicated for just 1 key, let alone 50.
6) The flagging (mentioned above) would make the lag (especially in a think hook) unbearable.
7) Binds would continue to run, screwing up alot of stuff (even with the player locked).
8) There was another reason, but I can't remember.

The only way I could add in input (without binary module) is if garry added some sort of hook like this: