GoldSource mapping in Hammer 4.x

From Valve Developer Community
Revision as of 22:22, 13 December 2008 by Octavio (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Although it's not easy to set up, it is possible to map for any GoldSource game using Hammer 4.x All you need to do is download the appropriate .fgd files and modify your GameConfig.txt file (either Episode One or Orange Box; it doesn't matter).

To edit your GameConfig.txt go to c:\program files\steam\steamapps\<username>\sourcesdk\bin\ep1\bin\ or c:\program files\steam\steamapps\<username>\sourcesdk\bin\orangebox\bin\ and open it with your text editor of choice.

Read the section below for a better understanding of the structure of GameConfig.txt

Modifiying GameConfig.txt

Add any of these into your GameConfig.txt file of choice. Be sure to change <username> to your Steam username. Also, make sure all the paths are correct for your computer.

Counter-Strike

		"Counter-Strike"
		{
			"GameDir"		"c:\program files\steam\steamapps\<username>\counter-strike\cstrike"
			"hammer"
			{
				"GameData0"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\halflife-cs.fgd"
				"TextureFormat"		"2"
				"MapFormat"		"3"
				"DefaultTextureScale"		"0.250000"
				"DefaultLightmapScale"		"16"
				"GameExe"		"c:\program files\steam\steamapps\<username>\counter-strike\hl.exe"
				"DefaultSolidEntity"		"func_detail"
				"DefaultPointEntity"		"info_player_start"
				"BSP"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\qbsp2.exe"
				"Vis"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\vis.exe"
				"Light"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\qrad.exe"
				"GameExeDir"		"c:\program files\steam\steamapps\<username>\counter-strike"
				"MapDir"		"c:\program files\steam\steamapps\<username>\counter-strike\cstrike\maps"
				"BSPDir"		"c:\program files\steam\steamapps\<username>\counter-strike\cstrike\maps"
				"CordonTexture"		"tools\toolsskybox"
				"MaterialExcludeCount"		"0"
			}
		}

Condition Zero

		"Condition Zero"
		{
			"GameDir"		"c:\program files\steam\steamapps\<username>\condition zero\czero"
			"hammer"
			{
				"GameData0"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\halflife-cs.fgd"
				"TextureFormat"		"2"
				"MapFormat"		"3"
				"DefaultTextureScale"		"0.250000"
				"DefaultLightmapScale"		"16"
				"GameExe"		"c:\program files\steam\steamapps\<username>\condition zero\hl.exe"
				"DefaultSolidEntity"		"func_detail"
				"DefaultPointEntity"		"info_player_start"
				"BSP"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\qbsp2.exe"
				"Vis"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\vis.exe"
				"Light"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\qrad.exe"
				"GameExeDir"		"c:\program files\steam\steamapps\<username>\condition zero"
				"MapDir"		"c:\program files\steam\steamapps\<username>\condition zero\czero\maps"
				"BSPDir"		"c:\program files\steam\steamapps\<username>\condition zero\czero\maps"
				"CordonTexture"		"tools\toolsskybox"
				"MaterialExcludeCount"		"0"
			}
		}

Condition Zero Deleted Scenes

		"Condition Zero Deleted Scenes"
		{
			"GameDir"		"c:\program files\steam\steamapps\<username>\condition zero deleted scenes\czeror"
			"hammer"
			{
				"GameData0"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\halflife-cs.fgd"
				"TextureFormat"		"2"
				"MapFormat"		"3"
				"DefaultTextureScale"		"0.250000"
				"DefaultLightmapScale"		"16"
				"GameExe"		"c:\program files\steam\steamapps\<username>\condition zero deleted scenes\hl.exe"
				"DefaultSolidEntity"		"func_detail"
				"DefaultPointEntity"		"info_player_start"
				"BSP"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\qbsp2.exe"
				"Vis"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\vis.exe"
				"Light"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\qrad.exe"
				"GameExeDir"		"c:\program files\steam\steamapps\<username>\condition zero deleted scenes"
				"MapDir"		"c:\program files\steam\steamapps\<username>\condition zero deleted scenes\czeror\maps"
				"BSPDir"		"c:\program files\steam\steamapps\<username>\condition zero deleted scenes\czeror\maps"
				"CordonTexture"		"tools\toolsskybox"
				"MaterialExcludeCount"		"0"
			}
		}

Day of Defeat

		"Day of Defeat"
		{
			"GameDir"		"c:\program files\steam\steamapps\<username>\day of defeat\dod"
			"hammer"
			{
				"GameData0"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\dod.fgd"
				"TextureFormat"		"2"
				"MapFormat"		"3"
				"DefaultTextureScale"		"0.250000"
				"DefaultLightmapScale"		"16"
				"GameExe"		"c:\program files\steam\steamapps\<username>\day of defeat\hl.exe"
				"DefaultSolidEntity"		"func_detail"
				"DefaultPointEntity"		"info_player_allies"
				"BSP"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\qbsp2.exe"
				"Vis"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\vis.exe"
				"Light"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\qrad.exe"
				"GameExeDir"		"c:\program files\steam\steamapps\<username>\day of defeat"
				"MapDir"		"c:\program files\steam\steamapps\<username>\day of defeat\dod\maps"
				"BSPDir"		"c:\program files\steam\steamapps\<username>\day of defeat\dod\maps"
				"CordonTexture"		"tools\toolsskybox"
				"MaterialExcludeCount"		"0"
			}
		}

Team Fortress Classic

		"Team Fortress Classic"
		{
			"GameDir"		"c:\program files\steam\steamapps\<username>\team fortress classic\tfc"
			"hammer"
			{
				"GameData0"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\halflife-tfc.fgd"
				"TextureFormat"		"2"
				"MapFormat"		"3"
				"DefaultTextureScale"		"0.250000"
				"DefaultLightmapScale"		"16"
				"GameExe"		"c:\program files\steam\steamapps\<username>\team fortress classic\hl.exe"
				"DefaultSolidEntity"		"func_detail"
				"DefaultPointEntity"		"info_player_teamspawn"
				"BSP"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\qbsp2.exe"
				"Vis"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\vis.exe"
				"Light"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\qrad.exe"
				"GameExeDir"		"c:\program files\steam\steamapps\<username>\team fortress classic"
				"MapDir"		"c:\program files\steam\steamapps\<username>\team fortress classic\tfc\maps"
				"BSPDir"		"c:\program files\steam\steamapps\<username>\team fortress classic\tfc\maps"
				"CordonTexture"		"tools\toolsskybox"
				"MaterialExcludeCount"		"0"
			}
		}

Half-Life

		"Half-Life"
		{
			"GameDir"		"c:\program files\steam\steamapps\<username>\half-life\valve"
			"hammer"
			{
				"GameData0"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\halflife.fgd"
				"TextureFormat"		"2"
				"MapFormat"		"3"
				"DefaultTextureScale"		"0.250000"
				"DefaultLightmapScale"		"16"
				"GameExe"		"c:\program files\steam\steamapps\<username>\half-life\hl.exe"
				"DefaultSolidEntity"		"func_detail"
				"DefaultPointEntity"		"info_player_start"
				"BSP"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\qbsp2.exe"
				"Vis"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\vis.exe"
				"Light"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\qrad.exe"
				"GameExeDir"		"c:\program files\steam\steamapps\<username>\half-life"
				"MapDir"		"c:\program files\steam\steamapps\<username>\half-life\valve\maps"
				"BSPDir"		"c:\program files\steam\steamapps\<username>\half-life\valve\maps"
				"CordonTexture"		"tools\toolsskybox"
				"MaterialExcludeCount"		"0"
			}
		}

Half-Life Blue Shift

		"Half-Life: Blue Shift"
		{
			"GameDir"		"c:\program files\steam\steamapps\<username>\half-life blue shift\bshift"
			"hammer"
			{
				"GameData0"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\halflife-bs.fgd"
				"TextureFormat"		"2"
				"MapFormat"		"3"
				"DefaultTextureScale"		"0.250000"
				"DefaultLightmapScale"		"16"
				"GameExe"		"c:\program files\steam\steamapps\<username>\half-life blue shift\hl.exe"
				"DefaultSolidEntity"		"func_detail"
				"DefaultPointEntity"		"info_player_start"
				"BSP"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\qbsp2.exe"
				"Vis"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\vis.exe"
				"Light"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\qrad.exe"
				"GameExeDir"		"c:\program files\steam\steamapps\<username>\half-life blue shift"
				"MapDir"		"c:\program files\steam\steamapps\<username>\half-life blue shift\bshift\maps"
				"BSPDir"		"c:\program files\steam\steamapps\<username>\half-life blue shift\bshift\maps"
				"CordonTexture"		"tools\toolsskybox"
				"MaterialExcludeCount"		"0"
			}
		}

Half-Life Opposing Force

		"Half-Life: Opposing Force"
		{
			"GameDir"		"c:\program files\steam\steamapps\<username>\opposing force\gearbox"
			"hammer"
			{
				"GameData0"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\halflife-op4.fgd"
				"TextureFormat"		"2"
				"MapFormat"		"3"
				"DefaultTextureScale"		"0.250000"
				"DefaultLightmapScale"		"16"
				"GameExe"		"c:\program files\steam\steamapps\<username>\opposing force\hl.exe"
				"DefaultSolidEntity"		"func_detail"
				"DefaultPointEntity"		"info_player_start"
				"BSP"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\qbsp2.exe"
				"Vis"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\vis.exe"
				"Light"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\qrad.exe"
				"GameExeDir"		"c:\program files\steam\steamapps\<username>\opposing force"
				"MapDir"		"c:\program files\steam\steamapps\<username>\opposing force\gearbox\maps"
				"BSPDir"		"c:\program files\steam\steamapps\<username>\opposing force\gearbox\maps"
				"CordonTexture"		"tools\toolsskybox"
				"MaterialExcludeCount"		"0"
			}
		}

Make sure that you paste these configurations between

"Configs"
{
	"Games"
	{

and

	}
	"SDKVersion"		"3"
}

If your GameConfig.txt is missing a '{' or '}' because you didn't paste properly it probably won't work.

Adding your own configuration

Read through this to work out how to add in a custom configuration for a mod.

		"Modname"
		{
			"GameDir"		"c:\program files\steam\steamapps\<username>\half-life\modname"  // path to the mod directory
			"hammer"
			{
				"GameData0"		"c:\modname.fgd"  // path to .fgd file
				"TextureFormat"		"2"  // leave this as 2: it tells Hammer to use .wad textures instead of .vtf
				"MapFormat"		"3" // leave this as 3: it tells Hammer to use .rmf map files instead of .vmf
				"DefaultTextureScale"		"0.250000"  // ??? (leave it)
				"DefaultLightmapScale"		"16"  // ??? (leave it)
				"GameExe"		"c:\program files\steam\steamapps\<username>\half-life\hl.exe"  // path to Half-Life executable
				"DefaultSolidEntity"		"func_detail"  // ???
				"DefaultPointEntity"		"info_player_start"  // player start entity
				"BSP"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\qbsp2.exe"  // set this to whatever because Hammer doesn't have support for the CSG process; you'll have to compile with a .bat file
				"Vis"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\vis.exe"  // set this to whatever because Hammer doesn't have support for the CSG process; you'll have to compile with a .bat file
				"Light"		"c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\qrad.exe"  // set this to whatever because Hammer doesn't have support for the CSG process; you'll have to compile with a .bat file
				"GameExeDir"		"c:\program files\steam\steamapps\<username>\half-life"  // leave it because mods won't use any othe executable
				"MapDir"		"c:\program files\steam\steamapps\<username>\half-life\modname\maps"  // directory to load maps from
				"BSPDir"		"c:\program files\steam\steamapps\<username>\half-life\valve\maps"  // directory to place compiled maps in: not needed because compilation needs to be donw manually
				"CordonTexture"		"tools\toolsskybox"  // leave it (it doesn't matter)
				"MaterialExcludeCount"		"0"  // ??? (leave it )
			}
		}


Forge Game Data

I haven't checked if Hammer 3.x .fgd files work in Hammer 4.x, but there's no reason they shouldn't. Look below for links to .fgd files.

If you are going to use the configurations from above, copy your .fgd files to c:\program files\steam\steamapps\<username>\sourcesdk\bin\halflife\bin\

Bugs

  • I'm pretty sure Hammer 4.x will not load any .mdl or .spr referenced by the .fgd file.
  • Hammer 3.x .fgd files may not work in Hammer 4.x. This needs to be tested.

External Links