Difference between revisions of "Gameinfo.txt"

From Valve Developer Community
Jump to: navigation, search
 
m
 
(123 intermediate revisions by 43 users not shown)
Line 1: Line 1:
The <code>GameInfo.txt</code> file describes to the SDK tools and Source Engine which content is needed for a particular MOD or game. It is how the tools and engine know to load Half-Life 2, Counter-Strike, or Half-Life 2: Deathmatch content when they are running in the MOD's game directory. It also is a marker that the tools use to find your game directory.
+
{{otherlang2
 +
|es=The_GameInfo.txt_File_Structure:es
 +
|fr=The_GameInfo.txt_File_Structure:fr
 +
|ru=The_GameInfo.txt_File_Structure:ru
 +
|pl=The_GameInfo.txt_File_Structure:pl
 +
|jp=The_GameInfo.txt_File_Structure:jp
 +
|zh-cn=The_GameInfo.txt_File_Structure:zh-cn
 +
|ko=Gameinfo.txt:ko
 +
}}
  
'''Note:''' Only a programmer setting up a MOD project right at the very beginning ever need edit this file. In most cases, you won't need to edit it, but if you want your game to be based on content other than Half-Life 2, then you'll need to modify it. Once this file is setup for your MOD, it should be shipped with the MOD's content. The same <code>gameinfo.txt</code> file should sit in the game directory of all developers working on the mod.
+
:''For Half-Life 1/[[GoldSrc]], see [[The liblist.gam File Structure|liblist.gam]].''
  
=Basic GameInfo.txt usage=
+
{{toc-right}}
  
The main relevant thing in the <code>GameInfo.txt</code> file is the <code>SteamAppId</code> variable. If you look inside GameInfo.txt, you'll see a section that looks something like this:
+
'''<code>GameInfo.txt</code>''' is a [[KeyValues]] config file that describes a Source mod. Apart from containing metadata like the name of the mod or a link to the developer's website, it also defines which games it depends on and the '''SearchPaths''' that the engine uses to look up resources. It is stored in the mod's root folder. Source, the SDK tools and Steam rely on it.
  
<pre>
+
{{warning|GoldSource games do not have GameInfo.txt files! Use Hammer 3.4 to edit Half-Life maps.}}
SteamAppId    220        // This will mount all the GCFs we need (240=CS:S, 220=HL2).
 
</pre>
 
  
The <code>SteamAppId</code> value specifies which game content (Steam .GCF files) is accessible to the game for this <code>GameInfo.txt</code>.
+
{{note|Booleans are represented as 0 or 1.}}
 +
{{note|If a string contains spaces or tabs you have to wrap it in "quote marks".}}
  
The <code>SteamAppId</code> values for the core Source games are:
+
== Basic settings ==
  
{|
+
=== Name ===
| Half-Life 2 || 220
 
|-
 
| Counter-Strike: Source || 240
 
|-
 
| Half-Life 2: Deathmatch || 320
 
|}
 
  
=Advanced GameInfo.txt topics=
+
Keys that affect the menu and window title.
  
This section describes various components of <code>GameInfo.txt</code> in greater detail
 
  
==ToolsAppId==
+
{{KV|Game|string|The name of the mod in [[Wikipedia:ASCII|ASCII]]. Displayed in Steam and used as the window title. Only displayed in the main menu if <code>Title</code> isn't specified.}}
 +
{{KV|Title|string|A [[Wikipedia:Unicode|Unicode]] string displayed in the main menu of your mod.  You can also new line the menu text by adding another key of the same name <code>Title</code>, but append either 2 or a higher number onto it. {{note|The higher the number, the further down the text will be.}} }}
 +
; {{KV|GameLogo|boolean|Rather than displaying the <code>Title</code> text on the main menu, display the content in <code>resource\GameLogo.res</code>. See [[Adding Your Logo to the Menu]].|since=EP2}}
  
All <code>GameInfo.txt</code> files should contain a line like this:
+
=== Options ===
  
<pre>
+
Keys that affect what tabs and options that show up in the Options panel.  Also see [[Customizing Options: Keyboard]].
ToolsAppId    211
 
</pre>
 
  
This is a special case that tools use so they can load special content that is used by the tools, but is not used by the games. For example, the Hammer Editor uses a special material to draw the red translucent highlight on displacements when they are selected, and this is how it knows where to find that material.
 
  
==SearchPaths==
+
{{KV|Type|string|Affects which tabs appear in which order in the Options panel, the value will either be <code>Singleplayer_Only</code> or <code>Multiplayer_Only</code>. Omit this key if your mod has both SP and MP modes.}}
 +
{{KV|NoDifficulty|boolean|Hides the difficulty tab (this happens automatically if your mod is <code>Multiplayer_Only</code>.)}}
 +
{{KV|HasPortals|boolean|Shows the Portal options tab.|since=EP2}}
 +
{{KV|NoCrosshair|boolean|Hides the multiplayer crosshair selection menu.}}
 +
{{KV|AdvCrosshair|boolean|Enables the special advanced crosshair options. {{todo|How to implement.}} }}
 +
{{KV|NoModels|boolean|Hides the multiplayer model selection menu.}}
 +
{{KV|NoHIModel|boolean|Hides toggle checkbox for <code>cl_himodels</code>, which was used in [[GoldSource]]. Only displayed properly if <code>cl_himodels</code> exists in the first place.}}
 +
{{KV|Hidden_Maps|subkey|Maps in the subkey do not appear in the "Create a Server" dialogue. Does not stop users from being able to load them from the console though.  Syntax is <code>mapname 1</code>, with one entry per line. Don't include <code>.bsp</code>. Remember to open and close the subkey with { and }. }}
  
The <code>SearchPaths</code> section of the <code>GameInfo.txt</code> file describes where the content is to be found, either on your hard drive or inside Steam cache files. To understand this part, we must take a detour into how programmers using the Source engine access the game's files. All files that a programmer accesses in code must exist under a <i>path ID</i>. A path ID describes one or more locations on your hard drive or inside virtual Steam file systems.
+
=== Steam games list ===
  
As an example, most of your game's resources like scripts, sounds, model files, and materials are accessed under the <code>"Game"</code> path ID. A programmer might say, "open a file called <code>scripts\weapon_m4a1.txt</code> inside the <code>'Game'</code> path ID". If you were running a mod in <code>C:\MyMod\Blasters</code>, and you used <code>SteamAppId 240</code> which would load in the Counter-Strike: Source content, then it would look for the file in these locations:
+
Keys that affect how your game or mod shows up in the Steam Library page.
  
* <code>C:\MyMod\Blasters\scripts\weapon_m4a1.txt</code>
 
* <code><Steam install directory>\Steam\SteamApps\username\Counter-Strike Source\cstrike\scripts\weapon_m4a1.txt</code>
 
* <code><inside the virtual Steam file system>\cstrike\scripts\weapon_m4a1.txt</code>
 
  
Using path IDs to describe where the files are saves the programmer and artist from having to worry about all these different directories. They can use names relative to the game directory (like <code>scripts\weapon_m4a1.txt</code> or <code>materials\brick\brickwall001a.vmt</code>) and the engine and tools will find the full path to the file wherever it exists, as long as <code>GameInfo.txt</code> describes what the <code>"Game"</code> path ID means.
+
{{KV|Developer|string|The developer of the mod. Usually either the Mod Team's name, or a single person's name.}}
 +
{{KV|Developer_URL|string|Your or the mod's URL. Must start with <code><nowiki>http://</nowiki></code>.}}
 +
{{KV|Manual|string|URL to the mod's manual; can also be a local file.}}
 +
{{KV|Icon|string|Local path relative to GameInfo.txt, to an uncompressed 16x16 TGA that will appear as your mod's icon in Steam. Do ''not'' include the file extension. The larger 32px pixel icon that appears in Steam's Detail View should be placed next to the 16px one and called <code>&lt;icon&gt;_big.tga</code>. {{note|For transparency to work, the TGA must be saved in 32-bit mode with active alpha channel.}} }}
  
Inside the <code>GameInfo.txt</code> file, there is a section called <code>"SearchPaths"</code>, which describes the path IDs. Most mods will never need to modify the way these are setup from the way they are created when you run '''Create a Mod''' from the SDK launcher.
+
=== Engine and tools ===
  
The first part of each line is the name of the path ID, and the second part is where to look for files when this path ID is used. A simple example, which is illustrative, but you would never use (because it uses absolute paths including drive letters, which you can never assume exist on a user's machine) is this:
+
Keys that affect how the engine/tools runs and some options for the tools themselves.
  
{|
 
| <code>TestPathID</code> || <code>C:\TestMod1</code>
 
|-
 
| <code>TestPathID</code> || <code>C:\TestMod2</code>
 
|-
 
| <code>TestPathID</code> || <code>C:\TestMod3</code>
 
|}
 
  
If a programmer were to write code that asked for scripts\weapon_m4a1.txt and specify "TestPathID" as the path ID in code, then the engine would look for the file in these locations:
+
{{KV|Nodegraph|boolean|Whether or not to enable building [[nodegraph]]s (.ain files) for maps.|since=EP2}}
 +
{{KV|GameData|string|Path to a [[FGD]] file, relative to [[Hammer]]'s location. This is needed for [[instances]] to be compiled into maps. It is not used by Hammer itself.}}
 +
{{KV|InstancePath|string|The default location in which to look for [[Instance]] VMFs.|since=2013}}
 +
{{KV|SupportsDX8|boolean|When false, prevents the game from being ran in older [[DirectX_Versions|DirectX Versions]] such as DX8 and below, since they do not support the full range of graphic effects, also prevents [[Studiomdl]] from producing <code>.sw.vtx</code> and <code>.dx80.vtx</code> files for models, as they aren't needed.|since=L4D}}
 +
{{KV|SupportsVR|boolean|Whether or not the game supports being ran in VR mode.|since=2013}}
 +
{{KV|SupportsXBox360|boolean|Whether or not the game supports Xbox 360. {{confirm|Does this enable being able to use a Xbox 360 controller with the game?}}|since=L4D}}
  
* <code>C:\TestMod1\scripts\weapon_m4a1.txt</code>
+
=== FileSystem ===
* <code>C:\TestMod2\scripts\weapon_m4a1.txt</code>
 
* <code>C:\TestMod3\scripts\weapon_m4a1.txt</code>
 
  
Since the Source games access most of their content in the <code>"Game"</code> path ID, they do some things for you automatically if you have a path ID called <code>"Game"</code>. For each entry with a path ID of <code>"Game"</code>:
+
Keys that are within the subkey <code>FileSystem</code>.
  
# It adds a <code>"GameBin"</code> path ID, in <code><dir>\bin</code>
 
# It adds another <code>"Game"</code> path in front of it with <code>_<language></code> at the end. For example: <code>c:\hl2\cstrike</code> would get a <code>c:\hl2\cstrike_french</code> path added to it if you were running on a French-localized machine.
 
  
For the first <code>"Game"</code> search path:
+
{{KV|SteamAppID|int|The [[Steam Application IDs|AppID]] of the game the mod is to be based on. The mod will have access to all of this game's content, and will not be playable unless it is installed, the mod will also be ran with the game's executable as well.  If you're uploading your Source game to Steam, this will be your game's AppID.  Otherwise, this will be 243750 for Source 2013 Multiplayer, 243730 for Source 2013 Singleplayer, 630 for [[Alien Swarm]], or the AppID of the game you're basing it off of if you're not working with source code.
 +
{{note|Most older Source mods will use AppID 215 for Source 2006 and 218 for Source 2007.  If your making a new mod, you shouldn't use these IDs as they're for a obviously deprecated Source engine branch that was replaced by Source 2013 and Alien Swarm.  Only use them for legacy support.}}
 +
{{note|Your mod won't be protected by [[VAC]] if it is based on a singleplayer game.}} }}
  
# It adds a search path called <code>"MOD"</code> under the same folder.
+
{{KV|AdditionalContentId|int|Another AppID that the mod has access to. This feature was added to the SDK source code but somehow never made it to Valve's other games; you will have to build your own binaries to use it. If you need to mount multiple apps using this, [[Mounting multiple games|make these changes]].
# It adds a search path called <code>"DEFAULT_WRITE_PATH"</code>.
+
{{bug|The engine understands this command, but the SDK tools unfortunately do not. The best solution, currently, is to copy the content of the game to a location on your hard drive and add an absolute <code>SearchPath</code> to it. Remember to delete the SearchPath before you release.}} |deprecated=1}}
 +
{{KV|ToolsAppId|int|This is the AppID of the SDK currently in use.|deprecated=1}}
  
The default <code>SearchPaths</code> that would be used in most MODs are like this:
+
== SearchPaths ==
  
<pre>
+
<code>SearchPaths</code> is a subkey within <code>FileSystem</code>. It contains a key for every search path. When the engine needs a file it traverses the search paths, stopping when the desired file has been found, hence the order of the search paths is important.
Game        |gameinfo_path|.
 
Game        hl2
 
</pre>
 
  
Normally, a path specifier (the part on the right side) is relative to the base directory --The directory where <code>hl2.exe</code> is found. If <code>|gameinfo_path|</code> precedes the path, then it is relative to the directory where <code>GameInfo.txt</code> file instead. For example, if the <code>GameInfo.txt</code> file were in <code>C:\MyMod\Blasters</code>, and it had a path like <code><i>|gameinfo_path|SomeTestDirectory</i></code>, then the path ID you were creating would refer to:
 
  
<code>C:\MyMod\Blasters\SomeTestDirectory</code>
+
{{note|A thing to keep in mind, is the order that you put the search paths in is ''important'', if there are 2 files of the same name that are in 2 different search paths, and you list them both, the search path at the top will win, and use that file.}}
  
For Counter-Strike: Source, the <code>GameInfo.txt</code> file has a <code>SearchPaths</code> section that looks like the one above. If your Counter-Strike directory were:
+
=== Directories ===
  
<code>C:\Program Files\Valve\Steam\SteamApps\username\Counter-Strike Source</code>
+
The directory, which is the value of the key, will either be relative to the <code>SteamAppID</code>'s root directory (i.e. where the executable of the game is located), relative to GameInfo.txt or absolute.  A example of each one respectively would be this:
  
then it would be saying to look in these two directories:
+
Game      |All_Source_Engine_Paths|HL2 // Go to the executable directory, and mount a folder called HL2 in it.
 +
Game      |GameInfo_Path|. // Go to the directory of where GameInfo.txt is located, and mount the folder it's in.
 +
Game      "C:\MyFolderOfContent\content" // Mount this absolute directory, useful for mounting content temporarily.
  
* <code>C:\Program Files\Valve\Steam\SteamApps\username\Counter-Strike Source\cstrike</code>
+
{{note|In order to mount a [[VPK]] file, you need to add the VPK's name at the end of the directory with the <code>.vpk</code> extension.  If the VPK is a multi-chunck VPK, then put the name of the VPK in without the "_dir" or "_###" at the end.}}
because GameInfo.txt exists here.
+
 
* <code>C:\Program Files\Valve\Steam\SteamApps\username\Counter-Strike Source\hl2</code>
+
The 2 variables above will start the search in a certain directory, <code>|All_Source_Engine_Paths|</code> will start the directory within the root folder, and <code>|GameInfo_Path|</code> will start it in the folder where GameInfo.txt is located.  Both of these variables can be appended with any number of folders.  There are also some special commands you can append in addition to the folders and variables, the known ones are:
which only exists inside a virtual Steam file system.
+
 
 +
 
 +
 
 +
* <code>../</code> <br> Goes back one folder, this will useful for mounting other games' content like [[Portal]], since AdditionalContentID is deprecated.  If you wanted to mount Portal, and your game is in, say for example <code>"<SteamFolder>\SteamApps\Common\MyGame\FolderWhereGameInfoIs"</code>, you would create a search path like this to mount it's content:
 +
 
 +
// Start in the executable directory, then go back one folder so we're in Common, and then go into Portal/portal and mount portal_pak.vpk
 +
Game      |All_Source_Engine_Paths|../Portal/portal/portal_pak.vpk
 +
 
 +
 
 +
Here is also an example of how to mount a [[Modification|SourceMod]]:
 +
 
 +
// Start in the executable directory, then go back two folders so we're in SteamApps, and then go into SourceMods and mount the MySourceMod folder.
 +
Game      |All_Source_Engine_Paths|../../SourceMods/MySourceMod
 +
 
 +
 
 +
* <code>.</code> <br> This stops the search in the current directory, this should only be used if you want to directly mount where <code>|All_Source_Engine_Paths|</code> or <code>|GameInfo_Path|</code> are.  An example of both:
 +
 
 +
// Mount both |All_Source_Engine_Paths| and |GameInfo_Path| variables' path.
 +
Game      |All_Source_Engine_Paths|.
 +
Game      |GameInfo_Path|.
 +
 
 +
 
 +
* <code>/*</code> <br> Mount every sub-folder and [[VPK]] in the current directory, this command is what makes the custom folder work in most update to date Source games.  An example of it's use:
 +
 
 +
// Mount the custom folder's sub-folders and VPKs.
 +
Game      |GameInfo_Path|custom/*
 +
 
 +
=== Keys ===
 +
 
 +
In most older Source games, the only keys for search pathing is <code>Game</code> and <code>Platform</code>, while these keys will suit most search pathing, in Source 2013 a few new keys where introduced that add more control.
 +
 
 +
{{tip|[[Insurgency]] and [[Day of Infamy]] use the same search pathing system as Source 2013, so commands and keys that work in Source 2013 will work for them as well!}}
 +
 
 +
The current keys known so far are:
 +
 
 +
* <code>Game</code> <br> Adds the path as a simple search path.  Will add any content it finds.
 +
* <code>Game_Write</code> {{2013 add}} <br> Marks the search path as a Game write path.  This is usually where the game executable is. It marks the directory as the default directory for writing (configuration files, etc) for this game.
 +
* <code>GameBin</code> {{2013 add}} <br> A special key that requires that the path lead to a game's binary files (where <code>Server.dll</code> and <code>Client.dll</code> are located), and will use any other DLL files it finds.  This should lead to your own mod's <code>Bin</code> folder, or the game you're basing it off's <code>Bin</code> folder if you're not building your own DLLs.
 +
* <code>Platform</code> <br> Adds a special search path to the folder containing core engine files, this will usually lead to the game's <code>Platform</code> folder.
 +
* <code>Mod</code> {{2013 add}} <br> Marks the search path as a Mod path. This is usually where the game executable is. {{todo|What does this do exactly?}}
 +
* <code>Mod_Write</code> {{2013 add}} <br> Marks the search path as a Mod write path.  This is usually where GameInfo.txt is. It marks the directory as the default directory for writing (configuration files, etc) for this mod.
 +
* <code>Default_Write_Path</code> <br> A fallback for when either Mod_Write or Game_Write isn't specified.  This is usually where GameInfo.txt is. {{todo|What does this "Write" exactly?}}
 +
* <code>VPK</code> {{Contagion add}} <br> Used to mount a [[VPK]] by name.  Do not put <code>.vpk</code> at the end.
 +
 
 +
 
 +
In Source 2013, you may also append keys to each other by separating each key name by a <code>+</code> sign, this way if you need to use one directory for multiple keys, instead of writing this:
 +
 
 +
Game      |GameInfo_Path|MyFolder
 +
Mod      |GameInfo_Path|MyFolder
 +
 
 +
It can instead be shortened like this:
 +
 
 +
Game+Mod  |GameInfo_Path|MyFolder
 +
 
 +
This saves you time from having to retype the directory over again.
 +
 
 +
=== Automatic localization ===
 +
 
 +
Source automatically creates localized search paths. If you mount the folder <code>HL2</code>, then when your mod runs in French <code>HL2_French</code> is automatically mounted just above it, overriding any content in <code>HL2</code>. {{todo|Does this also apply for the mod folder?}}
 +
 
 +
== Example ==
 +
A full working GameInfo.txt ready for a Source 2013 Singleplayer mod.
 +
 
 +
<source lang=ini>
 +
 
 +
GameInfo
 +
{
 +
Game "My Mod Name"
 +
GameLogo 0
 +
Nodegraph 1
 +
Title "My Mod Title"
 +
Developer "My Name"
 +
Developer_URL "https://developer.valvesoftware.com/wiki/Main_Page"
 +
Type Singleplayer_Only
 +
SupportsDX8 0
 +
SupportsVR 0
 +
SupportsXbox360 0
 +
GameData HalfLife2.fgd
 +
FileSystem
 +
{
 +
SteamAppId 243730
 +
SearchPaths
 +
{
 +
GameBin |All_Source_Engine_Paths|SourceTest/Bin // Using the SourceTest DLLs.
 +
 +
// Source 2013 Singleplayer comes with Episode 2, Episode 1, and Lost Coast content. So let's mount it.
 +
Game |All_Source_Engine_Paths|EP2/EP2_Pak.vpk // EP2 content has the highiest priority.
 +
Game |All_Source_Engine_Paths|Episodic/EP1_Pak.vpk
 +
Game |All_Source_Engine_Paths|SourceTest/SourceTest_Pak.vpk // Lost Coast
 +
 +
// Source 2013 Multiplayer comes with HL2 Deathmatch, and Lost Coast content, so let's mount the HL2 Deathmatch content too.
 +
Game "|All_Source_Engine_Paths|../Source SDK Base 2013 Multiplayer/HL2MP/HL2MP_Pak.vpk" // Has to be in quotes because of spaces.
 +
 +
Game |All_Source_Engine_Paths|HL2/HL2_Misc.vpk
 +
Game |All_Source_Engine_Paths|HL2/HL2_Sound_Misc.vpk
 +
Game |All_Source_Engine_Paths|HL2/HL2_Sound_VO_English.vpk // Optional, just dialog.
 +
Game |All_Source_Engine_Paths|HL2/HL2_Textures.vpk
 +
 +
Game+Game_Write+Mod+Mod_Write+Default_Write_Path |GameInfo_Path|.
 +
 +
// These search for loose files in the folders, incase we missed anything.
 +
Game |All_Source_Engine_Paths|EP2
 +
Game |All_Source_Engine_Paths|Episodic
 +
Game |All_Source_Engine_Paths|SourceTest
 +
Game |All_Source_Engine_Paths|HL2
 +
 
 +
Platform |All_Source_Engine_Paths|Platform
 +
Platform |All_Source_Engine_Paths|Platform/Platform_Misc.vpk
 +
}
 +
}
 +
}
 +
 
 +
</source>
 +
 
 +
[[Category:File formats]]
 +
[[Category:Modding]]
 +
[[Category:Source SDK FAQ]]

Latest revision as of 14:48, 24 May 2020

Español Français Polski Русский 日本語 简体中文 한국어
For Half-Life 1/GoldSrc, see liblist.gam.

GameInfo.txt is a KeyValues config file that describes a Source mod. Apart from containing metadata like the name of the mod or a link to the developer's website, it also defines which games it depends on and the SearchPaths that the engine uses to look up resources. It is stored in the mod's root folder. Source, the SDK tools and Steam rely on it.

Warning: GoldSource games do not have GameInfo.txt files! Use Hammer 3.4 to edit Half-Life maps.

Note:Booleans are represented as 0 or 1.
Note:If a string contains spaces or tabs you have to wrap it in "quote marks".

Basic settings

Name

Keys that affect the menu and window title.


Game <string>
The name of the mod in ASCII. Displayed in Steam and used as the window title. Only displayed in the main menu if Title isn't specified.
Title <string>
A Unicode string displayed in the main menu of your mod. You can also new line the menu text by adding another key of the same name Title, but append either 2 or a higher number onto it.
Note:The higher the number, the further down the text will be.
GameLogo <boolean> (in all games since <Half-Life 2: Episode Two><Half-Life 2: Episode Two>)
Rather than displaying the Title text on the main menu, display the content in resource\GameLogo.res. See Adding Your Logo to the Menu.

Options

Keys that affect what tabs and options that show up in the Options panel. Also see Customizing Options: Keyboard.


Type <string>
Affects which tabs appear in which order in the Options panel, the value will either be Singleplayer_Only or Multiplayer_Only. Omit this key if your mod has both SP and MP modes.
NoDifficulty <boolean>
Hides the difficulty tab (this happens automatically if your mod is Multiplayer_Only.)
HasPortals <boolean> (in all games since <Half-Life 2: Episode Two><Half-Life 2: Episode Two>)
Shows the Portal options tab.
NoCrosshair <boolean>
Hides the multiplayer crosshair selection menu.
AdvCrosshair <boolean>
Enables the special advanced crosshair options. To do: How to implement.
NoModels <boolean>
Hides the multiplayer model selection menu.
NoHIModel <boolean>
Hides toggle checkbox for cl_himodels, which was used in GoldSource. Only displayed properly if cl_himodels exists in the first place.
Hidden_Maps <subkey>
Maps in the subkey do not appear in the "Create a Server" dialogue. Does not stop users from being able to load them from the console though. Syntax is mapname 1, with one entry per line. Don't include .bsp. Remember to open and close the subkey with { and }.

Steam games list

Keys that affect how your game or mod shows up in the Steam Library page.


Developer <string>
The developer of the mod. Usually either the Mod Team's name, or a single person's name.
Developer_URL <string>
Your or the mod's URL. Must start with http://.
Manual <string>
URL to the mod's manual; can also be a local file.
Icon <string>
Local path relative to GameInfo.txt, to an uncompressed 16x16 TGA that will appear as your mod's icon in Steam. Do not include the file extension. The larger 32px pixel icon that appears in Steam's Detail View should be placed next to the 16px one and called <icon>_big.tga.
Note:For transparency to work, the TGA must be saved in 32-bit mode with active alpha channel.

Engine and tools

Keys that affect how the engine/tools runs and some options for the tools themselves.


Nodegraph <boolean> (in all games since <Half-Life 2: Episode Two><Half-Life 2: Episode Two>)
Whether or not to enable building nodegraphs (.ain files) for maps.
GameData <string>
Path to a FGD file, relative to Hammer's location. This is needed for instances to be compiled into maps. It is not used by Hammer itself.
InstancePath <string> (in all games since <Source><Source>)
The default location in which to look for Instance VMFs.
SupportsDX8 <boolean> (in all games since <Left 4 Dead>)
When false, prevents the game from being ran in older DirectX Versions such as DX8 and below, since they do not support the full range of graphic effects, also prevents Studiomdl from producing .sw.vtx and .dx80.vtx files for models, as they aren't needed.
SupportsVR <boolean> (in all games since <Source><Source>)
Whether or not the game supports being ran in VR mode.
SupportsXBox360 <boolean> (in all games since <Left 4 Dead>)
Whether or not the game supports Xbox 360.
Confirm:Does this enable being able to use a Xbox 360 controller with the game?

FileSystem

Keys that are within the subkey FileSystem.


SteamAppID <integer>
The AppID of the game the mod is to be based on. The mod will have access to all of this game's content, and will not be playable unless it is installed, the mod will also be ran with the game's executable as well. If you're uploading your Source game to Steam, this will be your game's AppID. Otherwise, this will be 243750 for Source 2013 Multiplayer, 243730 for Source 2013 Singleplayer, 630 for Alien Swarm, or the AppID of the game you're basing it off of if you're not working with source code.
Note:Most older Source mods will use AppID 215 for Source 2006 and 218 for Source 2007. If your making a new mod, you shouldn't use these IDs as they're for a obviously deprecated Source engine branch that was replaced by Source 2013 and Alien Swarm. Only use them for legacy support.
Note:Your mod won't be protected by VAC if it is based on a singleplayer game.
AdditionalContentId <integer> <Obsolete>
Deprecated. Another AppID that the mod has access to. This feature was added to the SDK source code but somehow never made it to Valve's other games; you will have to build your own binaries to use it. If you need to mount multiple apps using this, make these changes.
Bug: The engine understands this command, but the SDK tools unfortunately do not. The best solution, currently, is to copy the content of the game to a location on your hard drive and add an absolute SearchPath to it. Remember to delete the SearchPath before you release.
ToolsAppId <integer> <Obsolete>
Deprecated. This is the AppID of the SDK currently in use.

SearchPaths

SearchPaths is a subkey within FileSystem. It contains a key for every search path. When the engine needs a file it traverses the search paths, stopping when the desired file has been found, hence the order of the search paths is important.


Note:A thing to keep in mind, is the order that you put the search paths in is important, if there are 2 files of the same name that are in 2 different search paths, and you list them both, the search path at the top will win, and use that file.

Directories

The directory, which is the value of the key, will either be relative to the SteamAppID's root directory (i.e. where the executable of the game is located), relative to GameInfo.txt or absolute. A example of each one respectively would be this:

Game       |All_Source_Engine_Paths|HL2 // Go to the executable directory, and mount a folder called HL2 in it.
Game       |GameInfo_Path|. // Go to the directory of where GameInfo.txt is located, and mount the folder it's in.
Game       "C:\MyFolderOfContent\content" // Mount this absolute directory, useful for mounting content temporarily.
Note:In order to mount a VPK file, you need to add the VPK's name at the end of the directory with the .vpk extension. If the VPK is a multi-chunck VPK, then put the name of the VPK in without the "_dir" or "_###" at the end.

The 2 variables above will start the search in a certain directory, |All_Source_Engine_Paths| will start the directory within the root folder, and |GameInfo_Path| will start it in the folder where GameInfo.txt is located. Both of these variables can be appended with any number of folders. There are also some special commands you can append in addition to the folders and variables, the known ones are:


  • ../
    Goes back one folder, this will useful for mounting other games' content like Portal, since AdditionalContentID is deprecated. If you wanted to mount Portal, and your game is in, say for example "<SteamFolder>\SteamApps\Common\MyGame\FolderWhereGameInfoIs", you would create a search path like this to mount it's content:
// Start in the executable directory, then go back one folder so we're in Common, and then go into Portal/portal and mount portal_pak.vpk
Game       |All_Source_Engine_Paths|../Portal/portal/portal_pak.vpk 


Here is also an example of how to mount a SourceMod:

// Start in the executable directory, then go back two folders so we're in SteamApps, and then go into SourceMods and mount the MySourceMod folder.
Game       |All_Source_Engine_Paths|../../SourceMods/MySourceMod


  • .
    This stops the search in the current directory, this should only be used if you want to directly mount where |All_Source_Engine_Paths| or |GameInfo_Path| are. An example of both:
// Mount both |All_Source_Engine_Paths| and |GameInfo_Path| variables' path.
Game       |All_Source_Engine_Paths|.
Game       |GameInfo_Path|.


  • /*
    Mount every sub-folder and VPK in the current directory, this command is what makes the custom folder work in most update to date Source games. An example of it's use:
// Mount the custom folder's sub-folders and VPKs.
Game       |GameInfo_Path|custom/*

Keys

In most older Source games, the only keys for search pathing is Game and Platform, while these keys will suit most search pathing, in Source 2013 a few new keys where introduced that add more control.

Tip:Insurgency and Day of Infamy use the same search pathing system as Source 2013, so commands and keys that work in Source 2013 will work for them as well!

The current keys known so far are:

  • Game
    Adds the path as a simple search path. Will add any content it finds.
  • Game_Write (in all games since <Source><Source>)
    Marks the search path as a Game write path. This is usually where the game executable is. It marks the directory as the default directory for writing (configuration files, etc) for this game.
  • GameBin (in all games since <Source><Source>)
    A special key that requires that the path lead to a game's binary files (where Server.dll and Client.dll are located), and will use any other DLL files it finds. This should lead to your own mod's Bin folder, or the game you're basing it off's Bin folder if you're not building your own DLLs.
  • Platform
    Adds a special search path to the folder containing core engine files, this will usually lead to the game's Platform folder.
  • Mod (in all games since <Source><Source>)
    Marks the search path as a Mod path. This is usually where the game executable is. To do: What does this do exactly?
  • Mod_Write (in all games since <Source><Source>)
    Marks the search path as a Mod write path. This is usually where GameInfo.txt is. It marks the directory as the default directory for writing (configuration files, etc) for this mod.
  • Default_Write_Path
    A fallback for when either Mod_Write or Game_Write isn't specified. This is usually where GameInfo.txt is. To do: What does this "Write" exactly?
  • VPK (in all games since <Contagion>)
    Used to mount a VPK by name. Do not put .vpk at the end.


In Source 2013, you may also append keys to each other by separating each key name by a + sign, this way if you need to use one directory for multiple keys, instead of writing this:

Game      |GameInfo_Path|MyFolder
Mod       |GameInfo_Path|MyFolder

It can instead be shortened like this:

Game+Mod  |GameInfo_Path|MyFolder

This saves you time from having to retype the directory over again.

Automatic localization

Source automatically creates localized search paths. If you mount the folder HL2, then when your mod runs in French HL2_French is automatically mounted just above it, overriding any content in HL2. To do: Does this also apply for the mod folder?

Example

A full working GameInfo.txt ready for a Source 2013 Singleplayer mod.

GameInfo
{
	Game			"My Mod Name"
	GameLogo		0
	Nodegraph		1
	Title			"My Mod Title"
	Developer 		"My Name"
	Developer_URL 	"https://developer.valvesoftware.com/wiki/Main_Page"
	Type			Singleplayer_Only
	SupportsDX8 	0
	SupportsVR		0
	SupportsXbox360	0
	GameData		HalfLife2.fgd
	FileSystem
	{
		SteamAppId	243730
		SearchPaths
		{
			GameBin		|All_Source_Engine_Paths|SourceTest/Bin // Using the SourceTest DLLs.
			
			// Source 2013 Singleplayer comes with Episode 2, Episode 1, and Lost Coast content. So let's mount it.
			Game		|All_Source_Engine_Paths|EP2/EP2_Pak.vpk // EP2 content has the highiest priority.
			Game		|All_Source_Engine_Paths|Episodic/EP1_Pak.vpk
			Game		|All_Source_Engine_Paths|SourceTest/SourceTest_Pak.vpk // Lost Coast
			
			// Source 2013 Multiplayer comes with HL2 Deathmatch, and Lost Coast content, so let's mount the HL2 Deathmatch content too.
			Game		"|All_Source_Engine_Paths|../Source SDK Base 2013 Multiplayer/HL2MP/HL2MP_Pak.vpk" // Has to be in quotes because of spaces.
			
			Game		|All_Source_Engine_Paths|HL2/HL2_Misc.vpk
			Game		|All_Source_Engine_Paths|HL2/HL2_Sound_Misc.vpk
			Game		|All_Source_Engine_Paths|HL2/HL2_Sound_VO_English.vpk // Optional, just dialog.
			Game		|All_Source_Engine_Paths|HL2/HL2_Textures.vpk
			
			Game+Game_Write+Mod+Mod_Write+Default_Write_Path	|GameInfo_Path|.
			
			// These search for loose files in the folders, incase we missed anything.
			Game		|All_Source_Engine_Paths|EP2
			Game		|All_Source_Engine_Paths|Episodic
			Game		|All_Source_Engine_Paths|SourceTest
			Game		|All_Source_Engine_Paths|HL2

			Platform	|All_Source_Engine_Paths|Platform
			Platform	|All_Source_Engine_Paths|Platform/Platform_Misc.vpk
		}
	}
}