Hammer GMod Setup

Mapping tips, tricks, and tutorials.

Hammer GMod Setup

Postby eldarstorm » Sat Jan 11, 2014 7:12 pm

Took a bit to get all this setup since everything changed. Will still need a few more tweeks.

This configuration allows you to have access to multiple game content instead of having to swap between CSS and HL2 for example.
Make sure you have all the games listed in the configuration files installed. If you do not own those games, just comment ot remove those lines.

1. Install Source SDK Base 2013 Multiplayer
2. Browse to
Code: Select all
C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer

Copy the hl2mp directory and name it gmodSDK
3. In the gmodSDK folder, edit the gameinfo.txt file
You will need to update the path to garrysmod with your steamid
Code: Select all
"GameInfo"
{
   game   "Half-Life 2 DM"
   title   "HALF+LIFE'"
   title2   "deathmatch"
   type multiplayer_only
   nomodels 0
   nohimodel 1
   nocrosshair 1
   hidden_maps
   {
      "test_speakers"      1
      "test_hardware"      1
   }


   FileSystem
   {
      SteamAppId            320
      
      //
      // Setup engine search paths.
      //
      // If a search path contains "_english", and the current language is not english, then
      // another search path will be inserted above the english one by replacing "_english" with
      // the appropriate language.
      //
      // To debug how the engine has parsed this file, type "path" at the console.
      //
      // Search paths are relative to the base directory, which is where hl2.exe is found.
      //
      // |gameinfo_path| points at the directory where gameinfo.txt is.
      // |all_source_engine_paths| points at the directory cintaining HL2 shared content.
      //
      SearchPaths
      {

         // First, mount all user customizations.  This will search for VPKs and subfolders
         // and mount them in alphabetical order.  The easiest way to distribute a mod is to
         // pack up the custom content into a VPK.  To "install" a mod, just drop it in this
         // folder.
         //
         // Note that this folder is scanned only when the game is booted.
         game+mod         gmodSDK/custom/*

         // We search VPK files before ordinary folders, because most files will be found in
         // VPK and we can avoid making thousands of file system calls to attempt to open files
         // in folders where they don't exist.  (Searching a VPK is much faster than making an operating
         // system call.)
         game+mod         gmodSDK/hl2mp_english.vpk
         game+mod         gmodSDK/hl2mp_pak.vpk
         
         game            |all_source_engine_paths|../../steamid/garrysmod/garrysmod/garrysmod.vpk
         
         game            |all_source_engine_paths|../Portal/portal/portal_sound_vo_english.vpk
         game            |all_source_engine_paths|../Portal/portal/portal_pak.vpk
         
         game            "|all_source_engine_paths|../Counter-Strike Source/cstrike/cstrike_pak.vpk"
         
         game            "|all_source_engine_paths|../Half-Life 2/ep2/ep2_english.vpk"
         game            "|all_source_engine_paths|../Half-Life 2/ep2/ep2_pak.vpk"
         game            "|all_source_engine_paths|../Half-Life 2/episodic/ep1_english.vpk"
         game            "|all_source_engine_paths|../Half-Life 2/episodic/ep1_pak.vpk"
         game            |all_source_engine_paths|hl2/hl2_english.vpk
         game            |all_source_engine_paths|hl2/hl2_pak.vpk
         game            |all_source_engine_paths|hl2/hl2_textures.vpk
         game            |all_source_engine_paths|hl2/hl2_sound_vo_english.vpk
         game            |all_source_engine_paths|hl2/hl2_sound_misc.vpk
         game            |all_source_engine_paths|hl2/hl2_misc.vpk
         platform         |all_source_engine_paths|platform/platform_misc.vpk

         // Now search loose files.  We'll set the directory containing the gameinfo.txt file
         // as the first "mod" search path (after any user customizations).  This is also the one
         // that's used when writing to the "mod" path.
         mod+mod_write+default_write_path      |gameinfo_path|.

         // Add the hl2mp directory as a game search path.  This is also where where writes
         // to the "game" path go.
         game+game_write      hl2mp

         // Where the game's binaries are
         gamebin            hl2mp/bin

         // Last, mount in shared HL2 loose files
      //   game            |all_source_engine_paths|episodic
         game            |all_source_engine_paths|hl2
         platform         |all_source_engine_paths|platform

         // Random files downloaded from gameservers go into a seperate directory, so
         // that it's easy to keep those files segregated from the official game files
         // or customizations intentially installed by the user.
         //
         // This directory is searched LAST.  If you visit a server and download
         // a custom model, etc, we don't want that file to override the default
         // game file indefinitely (after you have left the server).  Servers CAN have
         // custom content that overrides the default game files, it just needs to be
         // packed up in the .bsp file so that it will be mounted as a map search pack.
         // The map search pack is mounted at the top of the search path list,
         // but only while you are connected that server and on that map.
         game+download   hl2mp/download
      }
   }
}


4. Edit the GameConfig.txt file in C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin
You will need to edi the BSP and MapDir locations
Code: Select all
"Configs"
{
   "Games"
   {
      "Garrys Mod"
      {
         "GameDir"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\gmodSDK"
         "Hammer"
         {
            "GameData0"      "C:\Program Files (x86)\Steam\steamapps\eldarstorm\garrysmod\garrysmod\garrysmod.fgd"
            "GameData1"      "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Source\bin\cstrike.fgd"
            "GameData2"      "C:\Program Files (x86)\Steam\steamapps\common\Portal\bin\portal.fgd"
            "GameData3"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\base.fgd"
            "GameData4"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\halflife2.fgd"
            "GameData5"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\hl2mp.fgd"
            "GameData6"      "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\bin\tf.fgd"
            "TextureFormat"      "5"
            "MapFormat"      "4"
            "DefaultTextureScale"      "0.250000"
            "DefaultLightmapScale"      "16"
            "GameExe"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\hl2.exe"
            "DefaultSolidEntity"      "func_detail"
            "DefaultPointEntity"      "info_player_start"
            "BSP"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\vbsp.exe"
            "Vis"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\vvis.exe"
            "Light"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\vrad.exe"
            "GameExeDir"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer"
            "MapDir"      "G:\Dev\HL2 Maps"
            "BSPDir"      "C:\Program Files (x86)\Steam\steamapps\steamid\garrysmod\garrysmod\maps"
            "CordonTexture"      "tools\toolsskybox"
            "MaterialExcludeCount"      "0"
         }
      }
      "Half-Life 2: Deathmatch"
      {
         "GameDir"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\hl2mp"
         "Hammer"
         {
            "GameData0"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\hl2mp.fgd"
            "TextureFormat"      "5"
            "MapFormat"      "4"
            "DefaultTextureScale"      "0.250000"
            "DefaultLightmapScale"      "16"
            "GameExe"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\hl2.exe"
            "DefaultSolidEntity"      "func_detail"
            "DefaultPointEntity"      "info_player_deathmatch"
            "BSP"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\vbsp.exe"
            "Vis"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\vvis.exe"
            "Light"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\vrad.exe"
            "GameExeDir"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer"
            "MapDir"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\sourcesdk_content\hl2mp\mapsrc"
            "BSPDir"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\hl2mp\maps"
            "CordonTexture"      "tools\toolsskybox"
            "MaterialExcludeCount"      "0"
         }
      }
      "Half-Life 2"
      {
         "GameDir"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\hl2"
         "Hammer"
         {
            "GameData0"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\halflife2.fgd"
            "TextureFormat"      "5"
            "MapFormat"      "4"
            "DefaultTextureScale"      "0.250000"
            "DefaultLightmapScale"      "16"
            "GameExe"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\hl2.exe"
            "DefaultSolidEntity"      "func_detail"
            "DefaultPointEntity"      "info_player_start"
            "BSP"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\vbsp.exe"
            "Vis"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\vvis.exe"
            "Light"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\vrad.exe"
            "GameExeDir"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer"
            "MapDir"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\sourcesdk_content\hl2\mapsrc"
            "BSPDir"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\hl2\maps"
            "CordonTexture"      "tools\toolsskybox"
            "MaterialExcludeCount"      "0"
         }
      }
      "SourceTest"
      {
         "GameDir"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\sourcetest"
         "Hammer"
         {
            "GameData0"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\halflife2.fgd"
            "TextureFormat"      "5"
            "MapFormat"      "4"
            "DefaultTextureScale"      "0.250000"
            "DefaultLightmapScale"      "16"
            "GameExe"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\hl2.exe"
            "DefaultSolidEntity"      "func_detail"
            "DefaultPointEntity"      "info_player_start"
            "BSP"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\vbsp.exe"
            "Vis"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\vvis.exe"
            "Light"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\vrad.exe"
            "GameExeDir"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer"
            "MapDir"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\sourcesdk_content\sourcetest\mapsrc"
            "BSPDir"      "C:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Multiplayer\sourcetest\maps"
            "CordonTexture"      "tools\toolsskybox"
            "MaterialExcludeCount"      "0"
         }
      }
   }
   "SDKVersion"      "5"
}


Last:
Make sure your map location does exist. With this current configuration you can not launch the game from hammer.

Hop this helps everyone.
Image
User avatar
eldarstorm
Developer
 
Posts: 1172
Joined: Tue Nov 17, 2009 1:56 pm

Return to Mapping Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests

cron