Howto add Empires content to Garry's Mod 10 (the clever way)

Discussion in 'Support' started by eth0, May 10, 2008.

  1. eth0

    eth0 Member

    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    0
    Update [20090605]: Theowingone's found exactly what i was originally looking for, a way to properly mount Empires content is if it where Counter Shite, etc.
    I'd certainly suggest giving this a go first as is requires the minimal amount of fuss and understanding. Not personally tried this but had a few confirmations that it works fine.

    Option #1: Mounting Empires content via Lua Download: gm_mount.rar

    Option #2: Just copy your existing Empires directory to garrysmod/addons and your done. (Yes you only really need "resources" and "maps" but equally they are the bulk of the data in Empires.)

    Option #3: Is to read and understand all the shit below on how "mount" content by NTFS symbol links. (Kinda interesting to know some of the tools and tricks you can do with your NTFS filesystem that's commonplace on UNIX machines)

    Warning: Remember kids, no all maps can be loaded without a crash in GMod so please refer to the safe list below.

    = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

    Welcome to Option #3 you mad bastard

    Update: Nearly a year on and reviving a public Gmod Empires server on a Windows server this time(!) realised that while this howto is accurate, it's far from an easy read to if i can be arsed i'll re-write it. Probably sometime next year.

    Just to clarify: These instructions are for adding Empires content to Garry's Mod on the Client-side.

    What are we try to do and avoid:
    • Add Empires content to Garry Mod (duh)
    • Do it with out duplicating and wasting a ton of disk space
    • Having to recopy Empire content to GMod when a new patch comes out.

    How we're gonna achieve this:

    For you Linux peeps out there the natural answer would be "symbolic link".
    The curious thing is while Windows'es XP and Vista do support symbolic links via the NTFS filesystem, only Vista can actually make a symbolic link out-of-the-box, i.e XP lacks a GUI or cmd line tool.

    PS: A "shortcut" will not work because they're the poor cousin to sym links. Yes they go to the directory when gayly clicked on in your file browser thing, but they are *not* part of the filesystem and thus GMod will not see them as a proper directory.

    The magic we're gonna use:

    If you've got Vista you can use the command "mklink" but naturally this has the usual fucked up DOS syntax. So instead, we'll grab a copy of this superb bunch of tools: The SysInternals Suite.

    Direct: http://download.sysinternals.com/Files/SysinternalsSuite.zip

    Once you've grabbed this .zip file you can either:
    • Extract just the junction.exe
    • Or the whole lot. Highly recommended, they're dammed useful tools!
    Your best bet if you unzip this whole lot in a PATHed directory, say C:\Windows\Systems32 would be fine. (I like to keep my System32 virgin, so i made a C:\BIN and added a path)

    Let's do this!!!

    Right now you've got your shit in the right place and opened up a command dos box thing, type "junction" (without the quotes, stupid) and hit enter to verify your install. If you get "junction is not regonized blah blah....", congrats, your dumb.

    If you got it right you may get a popup license window, guess what button you now press? :)
    Now the junction is "primed" we can start to play...

    Firstly you need to work out where your Garry's Mod addons dir is and your Empires directory. On my system they are:

    Code:
    C:\Program Files\Steam\steamapps\<mysteamid>\garrysmod\garrysmod\addons
    C:\Program Files\Steam\steamapps\SourceMods\Empires
    To make life easier for me, i'd do this to:
    Code:
    cd C:\Program Files\Steam\steamapps\
    Then this to make the symlink/junction:
    Code:
    junction <mysteamid>\garrysmod\garrysmod\addons\Empires SourceMods\Empires

    If you worked out that <mysteamid> is thing you needed to replace and your install paths are the same as mine then you most likely got:

    Code:
    Copyright (C) 2000-2007 Mark Russinovich
    Systems Internals - [url]http://www.sysinternals.com[/url]
    
    Created: C:\Program Files\Steam\steamapps\<mysteamid>\garrysmod\garrysmod\addons\Empires
    Targetted at: C:\Program Files\Steam\steamapps\SourceMods\Empires
    If you did, give yourself a yay! But it's not over yet, verify your Empires dir is actually in your addons dir. You may notice under Vista it tags the directory with a "shortcut" icon.

    Now you need one last thing for GMod to actually recognise this crap: An info.txt

    So make a file inside either:
    • garrysmod\garrysmod\addons\Empires
    • SourceMods\Empires
    ... they are now the *same* directory, make (or delete) a file in one place and it will appear/disappear in the other!


    Paste the following in "info.txt"


    Code:
    "AddonInfo"
    {
    	"name"				"Empires 2"
    	"version"			"2.xx"
    	"up_date"			""
    	"author_name"			"eth0"
    	"author_email"			"eth0@eth0.uk.net"
    	"author_url"			"N/A"
    	"info"				"Empires 2 Mod Contents"
    	"override"			"0"
    }


    A few notes before you fire up GMod:
    • Empires Maps: A WARNING
      Empires content was never designed to be run from anything else other than Empires and thusly not all maps can be loaded in to GMod with it crashing. This cause of this crash is the lack of an info_player_start entity in the map.

      Does work:
      emp_cyclopean.bsp
      emp_district402.bsp
      emp_escort.bsp
      emp_mvalley.bsp
      emp_streetsoffire.bsp​


      Is ghey:
      emp_canyon.bsp
      emp_crossroads.bsp
      emp_duststorm.bsp
      emp_glycencity.bsp
      emp_isle.bsp
      emp_money.bsp
      emp_slaughtered.bsp
      emp_urbanchaos.bsp​


      Yes, it sucks so please bitch to the empires mappers to add the "info_player_start" to the remainder of the maps. There is a ticket in mantis regarding this.

      EDIT: I've now modified the "ghey" list to include the missing entity, the ~100MB rar of modified maps can be found here: http://eth0.uk.net/downloads/official_emp_maps_fixed_gmod10.rar

      You can safely place these maps in your Empires/maps folder.

      Little note about this modified maps; Inside the BSP is some "checksum" information that server uses when checking your map is the same as the servers. I've used the "preserve checksum" option when saving these maps so you should be able to overwrite these maps, however i've saved these maps with a different name e.g. emp_duststorm_gm.bsp so when you load up GMod be careful to pick the map *without* the colour map and *with* the _gm in the name.

      The tool i used for this is called "EntSpy" which will allow you to add in an entity to a map. this tool is for advanced users and so i'm not giving any support.

    • Empires models can be found by hitting "Q" > Browse > Empires
      You may get a fairly chunky delay in generating the spawn icons, be patient.
    • Buildings have deep foundations
      Because Empires models have alot of "foundation" you'll definatly need the "No collide world" to sink the foundation in the map geometry:
      http://www.garrysmod.org/downloads/?a=view&id=22835

    Right now go run GMod!


    Any comments and shit welcome but just to preempt a few:
    • No, i've no idea if or how you could do a "proper" mount of this content using the new'ish mount thing in GMod 10. I think it only works with Valve games and not mods. See beginning post for mounting content via Lua.
    • Yes i know you can simply copy your Empires folder to the addon directory and bung an info.txt file there but you end up duplicating over 2GB of content and you have to recopy it everytime a new patch comes out or map downloaded
    • No, i'm not going to make a custom spawn category for Empires. I find the "Browse" tab fine, but if somebody wants to make one and upload, go ahead!

    For the doubters, here's a raep screeny:
    [​IMG]
     
    Last edited: Jun 6, 2009
  2. LordDz

    LordDz Capitan Rainbow Flowers

    Messages:
    5,221
    Likes Received:
    0
    Trophy Points:
    0
    A really dumb question, but would this work for Gmod9? So I doesn't do useless work to get it to work.
     
  3. Mr. Weedy

    Mr. Weedy I will report bugs on the bug tracker

    Messages:
    2,291
    Likes Received:
    0
    Trophy Points:
    0
    I haven't played Gmod9 in ages and I haven't touched Gmod 10 even with a long stick BUT I think those two use quite different methods to implement stuff in them so it may not work BUT I have NO IDEA about this thing so don't trust me.
     
  4. eth0

    eth0 Member

    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    0
    No idea, all i can say is give it a try and report the results :)
     
  5. Jcw87

    Jcw87 Member

    Messages:
    1,676
    Likes Received:
    0
    Trophy Points:
    0
    That seems overcomplicated. In gmod 9, you could simply have the addon txt file point to the empires directory like this "..\Empires". Due to gmod 10 being in a different location, it will probably look more like "..\..\..\sourcemods\Empires"
     
  6. daruck

    daruck Member

    Messages:
    140
    Likes Received:
    0
    Trophy Points:
    0
    Thanks eth0 :)
    [​IMG]
    [​IMG]
    [​IMG]
     
  7. eth0

    eth0 Member

    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    0
    Well as i said, i'm all open to simpler/better suggestions that work. If you or somebody could substantiate the method you suggest i'd be *more* than happy to amend my post :)

    I was hoping that the method GMod10 mounts CS and HL2 etc could be done for Empires stuff, but couldn't find any docs for that either.

    EDIT: Just bothered to look up the docs for the "info.txt" file and there doesn't appear to be anything? Still look forward to suggestions!
     
    Last edited: May 14, 2008
  8. Jcw87

    Jcw87 Member

    Messages:
    1,676
    Likes Received:
    0
    Trophy Points:
    0
    I could make an "info.txt" that would mount empires properly without any symlinks, but I do not have gmod 10. And I never release something without being able to test it. BTW the ".." thing is something that exists in every filesystem I know of. It represents the "parent directory"
     
  9. Chahk

    Chahk Member

    Messages:
    1,390
    Likes Received:
    0
    Trophy Points:
    0

    Is that NF guy smiling?
     
  10. Lord_Doku

    Lord_Doku Member

    Messages:
    371
    Likes Received:
    0
    Trophy Points:
    0
    no he isnt.
     
  11. angry hillbilly

    angry hillbilly Member

    Messages:
    1,092
    Likes Received:
    0
    Trophy Points:
    0
    is it possible to add other mods object with the same method aka: Iron Grip HL2 with the bad guys and enemy tanks AI. And also are the tanks and stuff customiseable and drivealbe from empires and also can i use the weapons from empires :D:D
     
  12. Solokiller

    Solokiller Member

    Messages:
    4,861
    Likes Received:
    7
    Trophy Points:
    0
    You can add other objects, but you can't use the AI from the other mods. Empires vehicles would probably not work, at the most you'd get tank chassises driving around, but no weapons.
     
  13. Cassini

    Cassini Member

    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    Eth0 you are my hero. But now I will waste much more time with GMod.
    Here my first attempt :
    [​IMG]
     
  14. eth0

    eth0 Member

    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    0
    nice one Cassini :)

    BTW: Little pre-annoucement; i'm currently working on a *public* Empires/GMod server. It's currently what i'd call "alpha" grade as as i've not fully configured it, put on the nessessary admin mods and got the Ep1+2 content integrated.

    The plan is to have WireMod, LifeSupport (current borked, no idea why), PHX and various STOOLs like Stacker.

    For the geekly-minded, GMod is actually running on a Linux server via Wine and the performance appears pretty good, the only lag appears to be client-side when spawning crap.

    eth0.uk.net:27015

    PPS: I'm thinking of also running a few little competitions to get people interested in this Empires + GMod stuff.
    A few ideas are:
    * A Empires art gallery; people could vote on the best screeny from GMod - Possible prize being inclusion of your screenshot in the next interation of Empires? :D
    * Get some of the Empires tech working. e.g. Turrets, Tanks.
    * Mega bonus points if you can make the BE Dropshop (yes, it's really in there already!) work with full wired gyro-stabilisation etc. (btw, flying the dropship around MValley is fucking awesome!)
    * And more!
     
    Last edited: May 19, 2008
  15. Theowningone

    Theowningone Noone likes me :'(

    Messages:
    704
    Likes Received:
    0
    Trophy Points:
    0
    I know this is quite a necro, but i just got into playing gmod again and have found a much easier way of doing this.

    Download: http://www.facepunch.com/showthread.php?t=637181

    Install it.

    Edit addons/mount/lua/includes/additonalcontent.lua

    under
    Code:
    {title="MINERVA: Metastasis", path="metastasis", ismod=true },
    add
    Code:
    {title="Empires", path="empires", ismod=true },
    Then start the game, click on the cloud and check empires. Empires content will then be mounted for gmod.
     
  16. eth0

    eth0 Member

    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    0
    Oh this is idea and the sort of thing i was hoping to find before going down this "symbolic-link" workaround.

    If you could confirm this works i'd be happy to edit this thread's first post to point here instead!
     
  17. blizzerd

    blizzerd Member

    Messages:
    10,552
    Likes Received:
    60
    Trophy Points:
    0
    i just copy pasted the resource and map folders etc in garrys mod and added the info file, works just as well
     
  18. Theowningone

    Theowningone Noone likes me :'(

    Messages:
    704
    Likes Received:
    0
    Trophy Points:
    0
    I tested it before i posted it and it all worked fine :D
     
  19. eth0

    eth0 Member

    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    0
    Righty, i've re-edited the initial post document the 3 options with Theowningone's top.
     
  20. Slice

    Slice Member

    Messages:
    96
    Likes Received:
    0
    Trophy Points:
    0
    Awesome thanks
     

Share This Page