Gameinfo.txt: Difference between revisions
(→Steam games list: this still appears in the steam input UI for some reason???) |
mNo edit summary |
||
Line 35: | Line 35: | ||
{{KV|intn=0|Developer_URL|string|Your or the mod’s URL. Must start with <code><nowiki>http://</nowiki></code>. Doesn’t appear anymore in current versions of Steam.|deprecated=1}} | {{KV|intn=0|Developer_URL|string|Your or the mod’s URL. Must start with <code><nowiki>http://</nowiki></code>. Doesn’t appear anymore in current versions of Steam.|deprecated=1}} | ||
{{KV|intn=0|Manual|string|URL to the mod’s manual; can also be a local file. Doesn’t appear anymore in current versions of Steam.|deprecated=1}} | {{KV|intn=0|Manual|string|URL to the mod’s manual; can also be a local file. Doesn’t appear anymore in current versions of Steam.|deprecated=1}} | ||
{{KV|intn=0|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><icon>_big.tga</code>. {{Note|For transparency to work, the TGA must be saved in 32-bit mode with active alpha channel.}} }} | {{KV|intn=0|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><icon>_big.tga</code>. {{Note|For transparency to work, the TGA must be saved in 32-bit mode with active alpha channel.}}}} | ||
===Engine and tools=== | ===Engine and tools=== | ||
Line 42: | Line 42: | ||
{{KV|intn=0|GameData|string|Path to a [[FGD]] file, relative to [[Valve Hammer Editor|Hammer’s]] location. This is needed for [[instances]] to be compiled into maps. It is not used by Hammer itself.}} | {{KV|intn=0|GameData|string|Path to a [[FGD]] file, relative to [[Valve Hammer Editor|Hammer’s]] location. This is needed for [[instances]] to be compiled into maps. It is not used by Hammer itself.}} | ||
{{KV|intn=0|InstancePath|string|The default location in which to look for [[Instance]] VMFs.|since=2013}} | {{KV|intn=0|InstancePath|string|The default location in which to look for [[Instance]] VMFs.|since=2013}} | ||
{{KV|intn=0|SupportsDX8|boolean|When false, prevents the game from being ran in older [[ | {{KV|intn=0|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|also={{bms}}}} | ||
{{KV|intn=0|SupportsVR|boolean|Whether or not the game supports being ran in VR mode.|since=2013}} | {{KV|intn=0|SupportsVR|boolean|Whether or not the game supports being ran in VR mode.|since=2013}} | ||
{{KV|intn=0|SupportsXbox360|boolean|Whether or not the game supports Xbox 360 (and possibly other consoles, or it's controller). {{MConfirm|Does this enable being able to use a Xbox 360 controller with the game?, this was disabled in {{cs2|3.1}}, according to csgo_core\gameinfo.gi.<br> In {{bms|4}}, as of Necro Patch, {{code|SupportsXbox360}} is disabled and Steam Input API is used instead.}}|since=L4D | {{KV|intn=0|SupportsXbox360|boolean|Whether or not the game supports Xbox 360 (and possibly other consoles, or it's controller). {{MConfirm|Does this enable being able to use a Xbox 360 controller with the game?, this was disabled in {{cs2|3.1}}, according to csgo_core\gameinfo.gi.<br> In {{bms|4}}, as of Necro Patch, {{code|SupportsXbox360}} is disabled and Steam Input API is used instead.}}|since=L4D | ||
Line 50: | Line 50: | ||
Keys that are within the subkey <code>FileSystem</code>. | Keys that are within the subkey <code>FileSystem</code>. | ||
{{KV|intn=0|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 {{src13mp|4}}, 243730 for {{src13|4}}, 630 for {{as|4}}, or the AppID of the game you’re basing it off of if you’re not working with source code. | {{KV|intn=0|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 {{src13mp|4}}, 243730 for {{src13|4}}, 630 for {{as|4}}, 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 | {{Note|Most older Source mods will use AppID 215 for Source 2006 and 218 for Source 2007. If you are 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|2}} if it is based on a singleplayer game.}} }} | {{Note|Your mod won’t be protected by {{vac|2}} if it is based on a singleplayer game.}}}} | ||
{{KV|intn=0|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]]. | {{KV|intn=0|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]]. | ||
{{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}} | {{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}} | ||
Line 59: | Line 59: | ||
<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. | <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. | ||
Loadorder is defined by two things: Primarily, whether files are in a | Loadorder is defined by two things: Primarily, whether files are in a VPK or not, and secondarily the "Top-Down" order in which the Search paths are listed. | ||
The absolute highest priority over everything is given to whichever vpk file (such as hl2_misc_dir.vpk or pak01_dir.vpk) is highest in the search path. Even if it is the third path in the list, | |||
All subsequent vpk files according to the Gameinfo.txt's "Top-Down" rule will load all data that has not yet been found in the previous | The absolute highest priority over everything is given to whichever vpk file (such as hl2_misc_dir.vpk or pak01_dir.vpk) is highest in the search path. Even if it is the third path in the list, VPK has priority. | ||
Once all | |||
{{note|Some games like {{l4d2|3}} have an "Addons" folder that is not in the gameinfo.txt. These folders are only loaded by the game itself at runtime, not by Hammer, HLMV or other tools. | All subsequent vpk files according to the Gameinfo.txt's "Top-Down" rule will load all data that has not yet been found in the previous VPK file(s). | ||
Once all VPK files are loaded, it goes back to the top most search path and loads any loose files that are not yet in any VPK file. Then it continues along the Gameinfo.txt's "Top-Down" rule to check for any additional loose files not yet loaded. | |||
{{note|Some games like {{l4d2|3}} have an "Addons" folder that is not in the gameinfo.txt. These folders are only loaded by the game itself at runtime, not by Hammer, HLMV or other tools. | |||
If you want to mount addon content for Hammer, you'd need to unpack the addon and mount it as a pak01_dir.vpk in a whole new folder that has priority over everything.}} | If you want to mount addon content for Hammer, you'd need to unpack the addon and mount it as a pak01_dir.vpk in a whole new folder that has priority over everything.}} | ||
Line 74: | Line 78: | ||
Game "C:\MyFolderOfContent\content" // Mount this absolute directory, useful for mounting content temporarily.</nowiki>}} | Game "C:\MyFolderOfContent\content" // Mount this absolute directory, useful for mounting content temporarily.</nowiki>}} | ||
{{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. | {{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-chunk VPK, then put the name of the VPK in without the "_dir" or "_###" at the end.}} | ||
Mounting a directory will also mount the VPKs inside it. {{l4d|since}} | Mounting a directory will also mount the VPKs inside it. {{l4d|since}} | ||
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. | 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: | ||
* <code>../</code> <br> Goes back one folder, this will useful for mounting other games’ content like {{portal|4}}, since AdditionalContentID is deprecated. | * <code>../</code> <br> Goes back one folder, this will useful for mounting other games’ content like {{portal|4}}, 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: | ||
{{CodeBlock|<nowiki>// 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 | {{CodeBlock|<nowiki>// 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 | ||
Line 99: | Line 103: | ||
* <code>/*</code> <br> Mount every sub-folder and [[VPK]] in the current directory, this command is what makes the custom folder work in most up-to-date Source games. | * <code>/*</code> <br> Mount every sub-folder and [[VPK]] in the current directory, this command is what makes the custom folder work in most up-to-date Source games. An example of its use: | ||
{{CodeBlock|<nowiki>// Mount the custom folder's sub-folders and VPKs. | {{CodeBlock|<nowiki>// Mount the custom folder's sub-folders and VPKs. | ||
Line 111: | Line 115: | ||
The current keys known so far are: | The current keys known so far are: | ||
* <code>Game</code> <br> Adds the path as a simple search path. | * <code>Game</code> <br> Adds the path as a simple search path. Will add any content it finds. Also writes sound.cache file in each Game directory. | ||
* <code>Game_Write</code> {{src13|since}} <br> Marks the search path as a Game write path. | * <code>Game_Write</code> {{src13|since}} <br> Marks the search path as a Game write path. It marks the directory as the default directory for writing (what exactly?) for this game. {{confirm|Does this do anything?}} | ||
* <code>GameBin</code> {{src13|since}} <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. | * <code>GameBin</code> {{src13|since}} <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>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> {{src13|since}} <br> Marks the search path as a Mod path. This is usually where the game executable is. Essential for displaying chapter list in New Game menu, and probably for something else. | * <code>Mod</code> {{src13|since}} <br> Marks the search path as a Mod path. This is usually where the game executable is. Essential for displaying chapter list in New Game menu, and probably for something else. | ||
Line 121: | Line 125: | ||
:{{todo|Test the behaviour of this key in games other than {{con|4}}}} | :{{todo|Test the behaviour of this key in games other than {{con|4}}}} | ||
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: | 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: | ||
Line 260: | Line 264: | ||
}</nowiki>}} | }</nowiki>}} | ||
== Utilities == | ==Utilities== | ||
{{xblahmt|4}} | {{xblahmt|4}} | ||
* The mod information can be edited with {{Xblahmt|1}} through a comprehensive UI without requiring the modder to mess with text files. | * The mod information can be edited with {{Xblahmt|1}} through a comprehensive UI without requiring the modder to mess with text files. |
Revision as of 01:27, 9 September 2024
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.


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
)
- 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.)
- NoCrosshair <boolean>
- Hides the multiplayer crosshair selection menu.
- AdvCrosshair <boolean>
- Enables the special advanced crosshair options. Todo: How to implement.
- NoModels <boolean>
- Hides the multiplayer model selection menu.
- NoHIModel <boolean>
- Hides toggle checkbox for
cl_himodels
, which was used for multiplayer models inGoldSrc. 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. It 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 }.
- CommandLine <subkey> (only in
)
- List of launch options to start the mod with. Syntax is
-launchoption "value"
, with one entry per line. 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>- Deprecated.
The developer of the mod. Usually either the Mod Team’s name, or a single person’s name. Doesn’t appear anymore in current versions of Steam.

Developer_URL <string>- Deprecated.
Your or the mod’s URL. Must start withhttp://
. Doesn’t appear anymore in current versions of Steam.
Manual <string>- Deprecated.
URL to the mod’s manual; can also be a local file. Doesn’t appear anymore in current versions of Steam.
- 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
)
- 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
)
- The default location in which to look for Instance VMFs.
- SupportsDX8 <boolean> (in all games since
) (also in
)
- 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.
- SupportsXbox360 <boolean> (in all games since
) (also in
)
- Whether or not the game supports Xbox 360 (and possibly other consoles, or it's controller).
Confirm:Does this enable being able to use a Xbox 360 controller with the game?, this was disabled in Counter-Strike 2, according to csgo_core\gameinfo.gi.
InBlack Mesa, as of Necro Patch, SupportsXbox360 is disabled and Steam Input API is used instead.
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, 630 for
Alien Swarm, or the AppID of the game you’re basing it off of if you’re not working with source code.



AdditionalContentId <integer>- 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.

SearchPath
to it. Remember to delete the SearchPath before you release. [todo tested in ?]ToolsAppId <integer>- 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.
Loadorder is defined by two things: Primarily, whether files are in a VPK or not, and secondarily the "Top-Down" order in which the Search paths are listed.
The absolute highest priority over everything is given to whichever vpk file (such as hl2_misc_dir.vpk or pak01_dir.vpk) is highest in the search path. Even if it is the third path in the list, VPK has priority.
All subsequent vpk files according to the Gameinfo.txt's "Top-Down" rule will load all data that has not yet been found in the previous VPK file(s).
Once all VPK files are loaded, it goes back to the top most search path and loads any loose files that are not yet in any VPK file. Then it continues along the Gameinfo.txt's "Top-Down" rule to check for any additional loose files not yet loaded.

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:

.vpk
extension. If the VPK is a multi-chunk VPK, then put the name of the VPK in without the "_dir" or "_###" at the end.Mounting a directory will also mount the VPKs inside it. (in all games since )
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 likePortal, 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:
Here is also an example of how to mount a SourceMod:
.
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 every sub-folder and VPK in the current directory, this command is what makes the custom folder work in most up-to-date Source games. An example of its use:
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.



The current keys known so far are:
Game
Adds the path as a simple search path. Will add any content it finds. Also writes sound.cache file in each Game directory.Game_Write
(in all games since)
Marks the search path as a Game write path. It marks the directory as the default directory for writing (what exactly?) for this game.Confirm:Does this do anything?
GameBin
(in all games since)
A special key that requires that the path lead to a game’s binary files (whereServer.dll
andClient.dll
are located), and will use any other DLL files it finds. This should lead to your own mod’sBin
folder, or the game you’re basing it off’sBin
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’sPlatform
folder.Mod
(in all games since)
Marks the search path as a Mod path. This is usually where the game executable is. Essential for displaying chapter list in New Game menu, and probably for something else.Mod_Write
(in all games since)
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 save files and downloadlists for this mod.Default_Write_Path
Marks the search path as a Default write path. This is usually where GameInfo.txt is. It marks the directory as the default directory for writing config.cfg, node graphs, screenshots and some other files for this mod. Also a fallback for when either Mod_Write or Game_Write isn’t specified.VPK
(in all games since)
Used to mount a VPK by name. Do not put.vpk
, "_dir" or "_###" at the end. The path is relative to<base directory>/vpks/
.
- Todo: Test the behaviour of this key in games other than
Contagion
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:
It can instead be shortened like this:
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
.
Source 2013 Example
A full working GameInfo.txt ready for a Source 2013 game.
CS:GO, Alien Swarm, Portal 2, & Left 4 Dead Example
CS:GO, Alien Swarm, Portal 2, & Left 4 Dead engine branch gameinfo.txt, This will only be used if your using those engine branches to mod.
Utilities
- The mod information can be edited with XBLAH's Modding Tool through a comprehensive UI without requiring the modder to mess with text files.