Gameinfo.txt

Game Definition Files
 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.
; 
===Options===
Keys that affect what tabs and options that show up in the Options panel. Also see Customizing Options: Keyboard.
===Steam games list===
Keys that affect how your game or mod shows up in the Steam Library page.
===Engine and tools===
Keys that affect how the engine/tools runs and some options for the tools themselves.
===FileSystem===
Keys that are within the subkey FileSystem.
==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:
Mounting a directory will also mount the VPKs inside it. 
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 , 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 Marks the search path as a Game write path. It marks the directory as the default directory for writing (what exactly?) for this game. 
* GameBin 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.
* Game_LV Marks the directory as leading to Low Violence files.
* Platform Adds a special search path to the folder containing core engine files, this will usually lead to the game’s Platform folder.
* Mod 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 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.
* VGUI Marks the search path as containing .res files.
* Download Marks the search path as a Download write path. Random files downloaded from servers go here.
* Custom_Mod Marks the search path as a Custom_Mod search path, intended for custom HUD versioning and used for the folder. .res files may not load without an info.vdf file in the directory.
* VPK Used to mount a VPK by name. Do not put .vpk, "_dir" or "_###" at the end. The path is relative to .
:
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. 
== Example==
A full working GameInfo.txt ready for a 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 through a comprehensive UI without requiring the modder to mess with text files.
Category:File formats
Category:Modding
Category:Source SDK FAQ