1. Post #1
    Gold Member
    thomasfn's Avatar
    July 2008
    2,965 Posts
    [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:





    Up to date image:


    Credits
    thomasfn - Project leader, Developer
    Gmt2001 - Developer
    Chipstik - Modeller
    WireMod Team - Code Source
    Nighteagle - Code Source
    LuaBanana - Datastream Module
    Kogistune - Keyboard Input Module
    GamePlayr - Logo Designer
    [/release]
    [release]Download:

    Latest stable download (v2.0.3):


    SVN:
    http://pcmod.googlecode.com/svn/pcmod2/
    [/release]
    [release]Extra Links:

    Tutorials: http://www.fortfn.co.uk/homepage/ind...d=41&Itemid=69
    Forum: http://www.fortfn.co.uk/forum[/release]

    Enjoy!
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Lua King x 14Agree x 12Winner x 3Useful x 2Dumb x 2Artistic x 2Disagree x 1Informative x 1Funny x 1Zing x 1Optimistic x 1 (list)

  2. Post #2
    Gold Member
    wootmonster's Avatar
    June 2007
    2,453 Posts
    You just made RP a little better.
    Reply With Quote Edit / Delete Reply Sweden Show Events Agree Agree x 26Winner Winner x 2Zing Zing x 1 (list)

  3. Post #3
    Gold Member
    AGMadsAG's Avatar
    December 2006
    1,051 Posts
    Holy dancing cow! RELEASED!

    I owe you a cake.
    Reply With Quote Edit / Delete Reply Denmark Show Events Agree Agree x 10 (list)

  4. Post #4
    metromod.net
    ChewGum's Avatar
    October 2007
    1,138 Posts
    Cool. -d2k5 are jerks-
    Reply With Quote Edit / Delete Reply Sweden Show Events Funny Funny x 5Dumb Dumb x 3Disagree Disagree x 2 (list)

  5. Post #5
    Choppie's Avatar
    January 2007
    81 Posts
    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
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Agree Agree x 2Useful Useful x 1 (list)

  6. Post #6
    Gold Member
    thomasfn's Avatar
    July 2008
    2,965 Posts
    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.
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Friendly Friendly x 1 (list)

  7. Post #7
    Johnny Serva's Avatar
    October 2007
    1,043 Posts
    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.

  8. Post #8
    Choppie's Avatar
    January 2007
    81 Posts
    Tell me if he has any problems setting up.
    Big problems. When he puts the v.2.0.0 folder in his addons: 1. Servers Bronze Members or higher loose toolguns, 2. Scoreboard screws up for some people...

  9. Post #9
    Gold Member
    thomasfn's Avatar
    July 2008
    2,965 Posts
    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.
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Dumb Dumb x 1 (list)

  10. Post #10
    Choppie's Avatar
    January 2007
    81 Posts
    Does the scoreboard/toolgun/everything else fix itself if you remove the plugin from the plugins folder completely?
    Yes, it does

    ...If you still can't get it to work, I'll invent a work-around.
    Will this fix be tonight?

    Edit:
    Wow from this
    http://www.garrysmod.org/downloads/?a=view&id=46241
    to this
    http://www.garrysmod.org/downloads/?a=view&id=62746
    in less than 6 months!

  11. Post #11
    leader1337's Avatar
    February 2008
    134 Posts
    Ur a beast Thomas!
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 3Bad Spelling Bad Spelling x 1 (list)

  12. Post #12
    GMan-2's Avatar
    October 2007
    526 Posts
    How do I exactly get into internet with this?
    Reply With Quote Edit / Delete Reply Spain Show Events Dumb Dumb x 1 (list)

  13. Post #13
    Is it possible for me to make a game for PCMod? (Specifically "Pong")
    Reply With Quote Edit / Delete Reply United States Show Events Friendly Friendly x 1 (list)

  14. Post #14
    Unrealomega's Avatar
    January 2009
    262 Posts
    -snip-

  15. Post #15

    August 2007
    152 Posts
    How do I exactly get into internet with this?
    you dont

    Is it possible for me to make a game for PCMod? (Specifically "Pong")
    it is possible, but we are not sure if it will be laggy
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 1Friendly Friendly x 1 (list)

  16. Post #16
    FLUTTERSHY <3 (also hats suck)
    Unib5's Avatar
    May 2008
    1,706 Posts
    Imma try this now!
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Zing Zing x 2 (list)

  17. Post #17
    Fatfro.'s Avatar
    January 2009
    6 Posts
    Cool, I like the DarkRP integration. I can't say I like the interface or that typing is way harder than it should be. Nonetheless, good job.

  18. Post #18
    It'd be great if we could just type and not have to use the on-screen keyboard.
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 1Dumb Dumb x 1 (list)

  19. Post #19
    Valeour's Avatar
    October 2007
    176 Posts
    Then use quicktype. You'd know if you read the read me. :3
    I think the command is !pctype

    Probably help if i told you to say it in chat, not console.


    Thomaaaaaaaas! I has bug! When i try to save a notepad file, i get a lua error:
    Code:
    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.

    Also, when you try to print unsaved files, you get a blank paper.

  20. Post #20
    Gold Member
    thomasfn's Avatar
    July 2008
    2,965 Posts
    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.

  21. Post #21
    GMan-2's Avatar
    October 2007
    526 Posts
    you dont
    But what about the web browser?

  22. Post #22
    Gold Member
    thomasfn's Avatar
    July 2008
    2,965 Posts
    But what about the web browser?
    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).

  23. Post #23
    Gold Member
    implaying8's Avatar
    May 2005
    263 Posts
    This reminds me of that I386 "pcmoddish" addon that was the "next generation of computing" in the early days of garrysmod 10. I've been waiting ages for this type of thing! THANKS!

  24. Post #24

    June 2008
    10 Posts

    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?

  25. Post #25
    Gold Member
    thomasfn's Avatar
    July 2008
    2,965 Posts
    Ok I have a fix ready for all the DarkRP problems. I'll upload the patch soon, as well as instructions on how to get it working.

  26. Post #26
    SotosTHEGrek's Avatar
    January 2008
    14 Posts
    FINALLY pcmod 2 ;P

  27. Post #27
    Gold Member
    thomasfn's Avatar
    July 2008
    2,965 Posts
    Ok, to patch PCMod 2 to work with DarkRP properly, download this below and follow instructions:



    You will need to have downloaded PCMod 2.0.0 first, this is overwrites a few files. Add this to the bottom of the DarkRP gamemode shared.lua file:

    PLUGIN = {}
    include( "pcmod/plugins/darkrp_235.lua" )
    PLUGIN.JobColour = Color( 100, 100, 0, 255 ) -- OPTIONAL
    PLUGIN.JobSalary = 80 -- OPTIONAL
    TEAM_COMPTECH = PLUGIN:SetupJob()
    PLUGIN = nil

  28. Post #28
    jiggu2's Avatar
    March 2008
    153 Posts
    My rp server got this, IP : 85.190.39.164:27015


    Edit:

    Oh damn, taking some time to upload...

  29. Post #29
    Gold Member
    Kogitsune's Avatar
    September 2005
    2,859 Posts
    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...
    Input.IsKeyDown
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 2 (list)

  30. Post #30
    jiggu2's Avatar
    March 2008
    153 Posts
    Ok, how do you start the computer?
    Reply With Quote Edit / Delete Reply Sweden Show Events Dumb Dumb x 1 (list)

  31. Post #31
    Ok, how do you start the computer?
    Press E on the case.

  32. Post #32
    Gold Member
    thomasfn's Avatar
    July 2008
    2,965 Posts
    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:

    gui.CaptureInput( true ) -- Starts input capture
    gui.GetTextBuffer() -- Gets what has been typed (I think theres a windows-level hook that does this, not sure how Source does it)
    gui.ClearTextBuffer() -- Clears the buffer
    
    hook.Add( "TextBufferChanged", "blah", function( newbuffer ) print( "newbuffer = gui.GetTextBuffer!" ) end )
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Informative Informative x 1 (list)

  33. Post #33
    jiggu2's Avatar
    March 2008
    153 Posts
    Press E on the case.
    Doesnt do anything D:
    Reply With Quote Edit / Delete Reply Sweden Show Events Dumb Dumb x 1 (list)

  34. Post #34
    Gold Member
    thomasfn's Avatar
    July 2008
    2,965 Posts
    Doesnt do anything D:
    Have you wired them together correctly?

  35. Post #35
    -Pimpeh-'s Avatar
    October 2005
    3 Posts
    Question: Where did WeBrowse, Pong, and Alarmz go? Those were the best programs..
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 1 (list)

  36. Post #36
    soldat7's Avatar
    June 2008
    4 Posts
    is it already possible to create/manage playlists for the mediaplayer and if so how? (is it in a similair manner as with pcmod 1.0 by editing a lua file?)

  37. Post #37
    Gold Member
    thomasfn's Avatar
    July 2008
    2,965 Posts
    is it already possible to create/manage playlists for the mediaplayer and if so how? (is it in a similair manner as with pcmod 1.0 by editing a lua file?)
    Defintely. Goto sh_config.lua (pcmod/lua/pcmod/). Browse through it, there are 2 places to add custom songs. (The top one will add to the custom tab, the bottom one will add to whatever tab you like).

  38. Post #38
    FLUTTERSHY <3 (also hats suck)
    Unib5's Avatar
    May 2008
    1,706 Posts
    Nice work! Perhaps add a USB Hub, A Memory Stick, and External HD.

  39. Post #39
    jonney934's Avatar
    December 2007
    238 Posts
    I made a quick video, I might redo it sometime.


  40. Post #40
    Gold Member
    Achilles123's Avatar
    July 2006
    2,661 Posts
    Quick thing, and I know I'm retarded, but what are the advantages to a server? Or better put, what does it do? And every computer needs its own router, right?