This article's documentation is for Source 2. Click here for more information.

gameinfo.gi

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)

Game Definition Files
edit
English (en)Translate (Translate)

GameInfo.gi is a KeyValues config file that describes a Source 2 games/mod. Most of the basic are slightly different compared to the Source 1 counterpart (gameinfo.txt), and Source 2 also introducing new keyvalues and subkey. For example, GameInfo.gi can contain a Source 2 equivalent of an "autoexec.cfg", which is defined in the "ConVars" KeyValue.

Note.pngNote:Booleans are represented as 0 or 1.
Note.pngNote: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.pngNote:The higher the number, the further down the text will be.
Title_PW <string>
Most likely game title in Chinese (CS2 Perfect World). Obfuscated using unknown Unicode encoder.[confirm] (only in Counter-Strike 2)

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.
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 in GoldSrc GoldSrc. Only displayed properly if cl_himodels exists in the first place.
Confirm:Confirm if some of these options from Source 1 still works in Source 2.
Todo: Add more information and KeyValues.

Counter-Strike 2 Counter-Strike 2 exclusive

LayeredOnMod <string>
Inherits the gameinfo.gi data from specified game/mod folder.
SatelliteDir <string>
Unknown. Specified as csgo_gc.

Engine and tools

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

Nodegraph <boolean>
Whether or not to enable building nodegraphs (.ain files) for maps. Disabled in Half-Life: Alyx.
Tonemapping <boolean>
Show Tonemapping UI in tools mode.
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 2013)
The default location in which to look for Instance VMFs.
SupportsXbox360 <boolean> Obsolete
Deprecated.
Likely deprecated. Only present in previous version of Counter-Strike 2. Mark the game whether if it was supported on Xbox 360 or not.

FileSystem

Keys that are within the subkey FileSystem.

SteamAppID <integer>
The Steam AppID of the game. On Source 2 this is likely not needed, and only present in gameinfo.gi on 🖿core folder (using non-existent/private AppID "890", aswell as 🖿csgo_core in CS2, which uses the old CS:GO Beta Dev AppID).
Note.pngNote:Your mod won’t be protected by VAC VAC if it is based on a singleplayer game.
ToolsAppId <integer> Obsolete
Deprecated.
This is the AppID of the SDK currently in use. Deprecated and leftover from Source. Only present in gameinfo.gi on 🖿core folder (using non-existent/private AppID "895"_

SearchPaths

Note.pngNote:Lots of stuff has been changed in Source 2, and since Source 2 was built from Source 1's Left 4 Dead engine branch and above. It may not support mounting VPK files with name other than pak01_xxx.dir for example.
Confirm:Confirm whether some Source 1 stuff still works in Source 2, such as "|All_Source_Engine_Paths|".

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.gi or absolute. A example of each one respectively would be this:

Game hlvr // Mount a folder called "hlvr" (for Half-Life: Alyx) in it. Game core // Mount Source 2's "core" folder. 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.

In Source 2, 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 Portal 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 up-to-date Source games. An example of its use:
// Mount the custom folder's sub-folders and VPKs. Game |GameInfo_Path|custom/*

Keys

Source 2, like Source 2013, introduces few new keys 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, including VPKs. Core engine files (located in 🖿core folder), are also mounted after the game folder.
  • Game_LV (only in Counter-Strike 2)
    Marks the directory as leading to Low Violence files.
  • Mod
    Marks the search path as a Mod path. This is usually where GameInfo.gi is.
  • Write
    Marks the search path as a write path. This is usually where GameInfo.gi is. It marks the directory as the default directory for writing for this game.
  • Default_Write_Path
    Marks the search path as a Default write path. This is usually where GameInfo.gi 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 Write isn’t specified.[confirm]
  • AddonRoot
    Mount game addons located in specified folder. Usually set to game_name_addons.

New KeyValues

This section contains new keyvalues introduced in Source 2.

Engine2

Counter-Strike 2

  • DepotBuildDateTimeInTitleBar
    Show depot build date & time in titlebar.
  • InitFilterTextEarly
    Unknown
  • CNPW
    Unknown, has a password for something.
  • LvConfig
    Low violence config?

Half-Life: Alyx

  • HasModAppSystems
  • Capable64Bit
    Mark if the game is 64-bit capable.
  • URLName
    Website name? Set to "hlvr" (same as game/mod folder) in Half-Life: Alyx
  • UsesPanorama
    Mark if the game use Panorama.
  • UsesBink
    Mark if the game use Bink.
  • PanoramaUIClientFromClient
  • RenderingPipeline
    • SkipPostProcessing
      - Skip rendering post processing effect?
    • PostProcessingInMainPipeline
    • TonemappingVRForward
    • Tonemapping_UseLogLuminance
    • ToolsVisModes
    • OpaqueFade
    • AmbientOcclusionProxies
    • RetinaBurnFx
      - Renders retina burn effect.
  • MSAADefaultNonVR
    - Changes MSAA sample count (or disable it), when the game runs in non-VR mode.
  • SuppressNonConsoleVGuiInVR
    Supress non-console VGUI in VR

ConVars

Executes the console variable when starting the game.

In Counter-Strike 2 for example, grass quality, Steam Audio and other commands are set to specific value and FPS are capped to 400.

Hammer

Contains KeyValues for Hammer 5.x Hammer 5.x.

SupportedLanguages

List of languages supported by the game.

Examples

Counter-Strike 2 Counter-Strike 2 Example

A GameInfo.gi from Counter-Strike 2 Counter-Strike 2.

Note.pngNote:Last retrieved Jan 28, 2025.
Build date: Jan 21, 2025
"GameInfo" { // ******************************************************************************** // ******************************************************************************** // ******************************************************************************** // DO NOT EDIT THIS FILE DIRECTLY - YOU PROBABLY WANT TO EDIT CSGO_CORE/GAMEINFO.GI // ******************************************************************************** // ******************************************************************************** // ******************************************************************************** game "Counter-Strike 2" title "Counter-Strike 2" title_pw "E58F8DE68190E7B2BEE88BB1EFBC9AE585A8E79083E694BBE58ABF" LayeredOnMod csgo_imported SatelliteDir csgo_gc FileSystem { SearchPaths { Game_LowViolence csgo_lv // Perfect World content override Game csgo Game csgo_imported Game csgo_core Game core Mod csgo Mod csgo_imported Mod csgo_core AddonRoot csgo_addons LayeredGameRoot "../game_otherplatforms/etc" [$MOBILE || $ETC_TEXTURES] //Some platforms do not support DXT compression. ETC is a well-supported alternative. LayeredGameRoot "../game_otherplatforms/low_bitrate" [$MOBILE] } "UserSettingsPathID" "USRLOCAL" "UserSettingsFileEx" "cs2_" } Engine2 { "DepotBuildDateTimeInTitleBar" "1" "InitFilterTextEarly" "1" "CNPW" "CD535060BE7CF1821AFF685103743B65BF52" "LvConfig" "0" } InputSystem { "ButtonCodeIsScanCode" "1" "LockButtonCodeIsScanCode" "1" } pulse { "pulse_enabled" "1" } DelayedConCommands { "connect_lobby" "1" "connect" "1" "playcast" "1" "csgo_econ_action_preview" "1" "csgo_download_match" "1" "playdemo" "1" "gcconnect" "1" } ConVars { // Bandwidth control default: 300,000 Bps "rate" { "min" "98304" "default" "786432" "max" "1000000" } "sv_minrate" "98304" "sv_maxunlag" "0.200" "cl_interp_ratio" "0" // GOTV controls "tv_secret_code" "0" "tv_relay_secret_code" "0" "tv_update_hibernation_enabled" "0" // Performance "sv_parallel_checktransmit" "2" "fps_max" "400" "fps_max_ui" { "default" "200" "version" "2" } "r_add_views_in_pre_output" "1" // Nav fixups "nav_path_fixup_climb_up_segments" "1" "nav_gen_agent_radius_buffer" "0.75" "nav_gen_jump_connection_min_overlap_ratio" "0.1" // CSM override "csm_slope_scale_db_override" "3" // SSAO customization for CSGO (this is used on viewmodels) "r_ssao_radius" "8" "r_ssao_strength" "3" "r_ssao_bias" "2.5" // this cache kills performance due to mutex contention "bone_decode_cache_enabled" "0" // Disable warning about oscillating panorama classes "panorama_classes_oscillation_warning" "0" // Spew warning when adding/removing classes to/from the top of the hierarchy "panorama_classes_perf_warning_threshold_ms" "0.75" // Panorama - enable render target cache "panorama_disable_render_target_cache" "0" // Panorama - enable minidumps on JS exceptions "panorama_js_minidumps" "1" // HLTV AutoDirector - disable it for now so that it doesn't interfere with our spectator camera during replays / hltv / demos // Needs to be revisited when we re-enable AutoDirector "spec_autodirector" "false" // Grass "r_grass_quality" "3" "r_grass_alpha_test" "1" "r_grass_density_mode" "1" "r_grass_start_fade" "3000" "r_grass_end_fade" "3900" // Disable smooth morph normals "r_smooth_morph_normals" "0" // Default to binding keys based on keyboard position instead of key name "input_button_code_is_scan_code" "1" "input_button_code_is_scan_code_scd" "1" // Disable Cubemap Brightening "lb_cubemap_normalization_max" "1" // For low quality shaders, cubemap bounds are scaled by this percentage of the fade region "lb_low_quality_shader_fade_region_rescale" "0.5" // Use normal quality compression even in MET, this makes compiles in MET slower than // the default of fastest (0), but reduces artifacts that are confusing to artists since // it's not clear that texture compression quality is different in MET than when regularly compiled. "rc_default_texture_encode_quality" "2" // The engine default of 50 for CS:GO is too high, drop down to a more sensible // default value. "mouse_pitchyaw_sensitivity" "3" "pitch_extra_mouse_sensitivity" "1.0" "r_size_cull_threshold" "0.33" "r_size_cull_threshold_fade" "7.5" "inferno_scorch_decals" "0" // Steam Audio project specific convars "snd_musicvolume" { "version" "2" } "snd_steamaudio_enable_custom_hrtf" "0" "snd_steamaudio_enable_perspective_correction" "1" "snd_steamaudio_perspective_correction_factor" "1.0" "snd_steamaudio_normalize_default_hrtf_volume" "1" "snd_steamaudio_default_hrtf_volume_gain" "0.0" "snd_hrtf_distance_behind" "50" "snd_steamaudio_max_hrtf_normalization_gain_db" "6.0" "snd_steamaudio_enable_pathing" "1" "snd_steamaudio_source_pathing_debug" "0" "snd_event_browser_default_stack" "csgo_mega" "snd_event_browser_default_vsnd_field" "public.vsnd_files_track_01" // Need much tighter sound clock sync "snd_delay_sound_ms_max" "40" //don't let people miss with speaker config settings. "speaker_config" { "min" "-1" "default" "-1" "max" "-1" } "cl_disconnect_voice_fade" "-1.0" "cl_disconnect_soundevent" "StopSoundEvents.StopAllExceptMusic" // Physics specific customization "phys_use_position_based_toi_test" "1" // VOIP Settings. "voice_in_process" "1" "voice_threshold" { "version" "2" } "sv_long_frame_ms" "15" "cq_buffer_bloat_msecs_max" "64" } // Temporarily allowing this because the particle files that are tripping this up ALSO crash PET so I // cannot fix them. We'll sort this out Monday 2/13/23. //ResourceCompiler //{ // // See csgo_imported's gameinfo.gi // "DeprecatedBehaviorVersionsAllowed" "0" //} GMS { "Advertise" "1" "RequireLoginForDedicatedServers" "1" } GameInstructor { "SaveToSteamStats" "1" } SupportedLanguages { "brazilian" "3" "bulgarian" "3" "czech" "3" "danish" "3" "dutch" "3" "english" "3" "finnish" "3" "french" "3" "german" "3" "greek" "3" "hungarian" "3" "italian" "3" "indonesian" "3" "japanese" "3" "koreana" "3" "latam" "3" "norwegian" "3" "polish" "3" "portuguese" "3" "romanian" "3" "russian" "3" "schinese" "3" "spanish" "3" "swedish" "3" "tchinese" "3" "thai" "3" "turkish" "3" "ukrainian" "3" "vietnamese" "3" } CS2WorkshopManager { "RequiredTag" "CS2" "HighlightEntriesMissingRequiredTag" "1" } AssetBrowser { retail_filter0 "characters/models/" retail_filter1 "materials/decals/sprays/" retail_filter2 "panorama/" retail_filter3 "patches/" retail_filter4 "stickers/" retail_filter5 "weapons/" retail_filter6 "materials/models/inventory_items/" } AddonConfig { "VpkDirectories" { "exclude" "maps/content_examples" "include" "maps" "include" "cfg/maps" "include" "materials" "include" "models" "include" "panorama/images/overheadmaps" "include" "panorama/images/map_icons" "include" "particles" "include" "resource/overviews" "include" "scripts/vscripts" "include" "sounds" "include" "soundevents" "include" "lighting/postprocessing" "include" "postprocess" "include" "addoninfo.txt" } "AllowAddonDownload" "1" "AllowAddonDownloadForDemos" "1" "DisableAddonValidationForDemos" "1" } }

Gameinfo_branchspecific.gi

"GameInfo" { // this file is intentionally empty for generating depot signatures FileSystem { EmptyFileSystemValue 1 } }