Gameinfo.txt: Difference between revisions
(cleanup notice) |
|||
Line 7: | Line 7: | ||
|zh-cn=The_GameInfo.txt_File_Structure:zh-cn | |zh-cn=The_GameInfo.txt_File_Structure:zh-cn | ||
}} | }} | ||
:''For Half-Life 1/[[GoldSrc]], see [[The liblist.gam File Structure|liblist.gam]].'' | :''For Half-Life 1/[[GoldSrc]], see [[The liblist.gam File Structure|liblist.gam]].'' | ||
Line 106: | Line 104: | ||
(Different languages can have different AppIDs, but don't worry. Steam handles all that internally.) | (Different languages can have different AppIDs, but don't worry. Steam handles all that internally.) | ||
=== Example === | |||
The following code would mount the content of [[Episode Two]] and [[Portal]]: | |||
<source lang=ini>FileSystem | |||
{ | |||
SteamAppId 420 // Ep2 | |||
ToolsAppId 211 | |||
AdditionalContentId 400 // Portal | |||
SearchPaths | |||
{ | |||
Game |gameinfo_path|. // Your mod folder should always come first | |||
Game |all_source_engine_paths|ep2 | |||
Game |all_source_engine_paths|episodic // Ep2 also uses some Ep1 content | |||
Game |all_source_engine_paths|portal | |||
Game |all_source_engine_paths|hl2 // HL2 should always come last | |||
} | |||
}</source> | |||
Episode Two comes first and so has priority. This means that you won't be able to use portals, as the Ep2 binaries will be loaded - but you ''could'' pitch [[GLaDOS]] against a pack of [[Hunter]]s! | |||
If you did want to use Portal's binaries, you would simply promote its search path above Ep2's. But if there are custom binaries in <code>|gameinfo_path|</code> (your mod's folder) then ''they'' will be loaded in both cases. | |||
== Source 2013 Example == | |||
The following code would mount the content of both [[Episode Two]] and [[Portal]] on 2013 engine branch: | |||
<source lang=ini>FileSystem | |||
{ | |||
SteamAppId 243730 // Source SDK Base 2013 Singleplayer | |||
SearchPaths | |||
{ | |||
// No /custom/ folders because they can interfere with mod content and shouldn't be in mod gameinfo. | |||
game+mod+mod_write+default_write_path |gameinfo_path|. // Mod | |||
gamebin |gameinfo_path|bin // Mod's Binaries | |||
// Using SSDKBase13 path, then back to /common/ and then using Portal folder. | |||
// |all_source_engine_paths| magic help here too. | |||
game |all_source_engine_paths|../Portal/portal/portal_sound_vo_english.vpk | |||
game |all_source_engine_paths|../Portal/portal/portal_pak.vpk | |||
// Base Half-Life 2 Content: ep2, episodic, hl2 | |||
game_lv |all_source_engine_paths|hl2/hl2_lv.vpk | |||
game |all_source_engine_paths|ep2/ep2_english.vpk | |||
game |all_source_engine_paths|ep2/ep2_pak.vpk | |||
game |all_source_engine_paths|episodic/ep1_english.vpk | |||
game |all_source_engine_paths|episodic/ep1_pak.vpk | |||
game |all_source_engine_paths|hl2/hl2_english.vpk | |||
game |all_source_engine_paths|hl2/hl2_pak.vpk | |||
game |all_source_engine_paths|hl2/hl2_textures.vpk | |||
game |all_source_engine_paths|hl2/hl2_sound_vo_english.vpk | |||
game |all_source_engine_paths|hl2/hl2_sound_misc.vpk | |||
game |all_source_engine_paths|hl2/hl2_misc.vpk | |||
platform |all_source_engine_paths|platform/platform_misc.vpk | |||
// Find loose files that are not in the vpk's | |||
game |all_source_engine_paths|episodic | |||
game |all_source_engine_paths|hl2 | |||
platform |all_source_engine_paths|platform | |||
} | |||
}</source> | |||
[[Category:File formats]] | [[Category:File formats]] | ||
[[Category:Modding]] | [[Category:Modding]] | ||
[[Category:Source SDK FAQ]] | [[Category:Source SDK FAQ]] |
Revision as of 11:14, 17 July 2018
- 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.
The SDK launcher generates a gameinfo.txt when you run the "Create a Mod" wizard. This will work fine for development, but before release you should manually update it.


UI settings
Name
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>
title2 <string>
- These are the Unicode strings displayed in the main menu of your mod. They might be different from the strings displayed in Steam and on the desktop if you are using a fancy font.
title2
(and 3, 4, etc.) are to enable you to apply different styles to different parts of your title.Note:It's likely your title won't display right until you edit
ClientTitleFont
inresource\clientscheme.res
to change its font. The default ("HalfLife2") only has a specific set of characters and won't display most text properly.- Template:EP2 add
- Rather than displaying the
title
/title2
text on the main menu, display the content inresource\GameLogo.res
. See Adding Your Logo to the Menu.
Options
type <singleplayer_only | multiplayer_only>
- Affects which tabs appear in which order the Options panel. May also affect Steam's download speed. Omit if your mod has both SP and MP modes.
nodifficulty <boolean>
- Hides the difficulty tab (this happens automatically if your mod is
multiplayer_only
) - Template:EP2 add
- Shows the Portal options tab
nocrosshair <boolean>
- Hides the multiplayer crosshair selection menu
advcrosshair
- Enables 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 in GoldSrc. Only displayed properly ifcl_himodels
exists in the first place!
Steam games list
developer <string>
- Your team's name (or just yours!)
developer_url <string>
- Your or the mod's website. Must start with
http://
. manual <string>
- URL to the mod's manual; can 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.
Miscellaneous
hidden_maps <subkey>
- Maps in the subkey do not appear in the "create server" dialogue (but can still be loaded from the console).
- Syntax is
mapname 1
, with one entry per line. Don't include.bsp
. Remember to open and close the subkey with { and }. - Template:EP2 add
- When false, prevents the engine from creating nodegraphs.
- Template:EP2 add
- Path to a FGD, relative to Hammer's location. This is used by the compile tools, but not by Hammer.
- Template:EP2 add
- The default location in which to look for instance VMFs.
- Template:L4D add
- Prevents the game from running under DirectX8, which does not support the full range of graphics effects, also prevents Studiomdl from producing .sw.vtx and .dx80.vtx files for models, as they aren't needed.
The FileSystem key / How to mount content
SteamAppID <int>
- 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.


AdditionalContentId <int>
(MODS ONLY)- 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, make these changes.


SearchPath
to it (see below). Remember to delete the SearchPath before you release. [todo tested in ?]ToolsAppId <int>
- This is the AppID of the SDK currently in use. Currently, the only valid ID is 211 (the Source SDK). Todo: What about the L4D Authoring Tools?
SearchPaths
SearchPaths
is a subkey within FileSystem
. It contains a Game
key for every search path. When the engine needs a resource file it traverses the search paths, stopping when the desired file has been found, hence the order of the search paths is important.
A search path is either relative to the SteamAppID
's root directory (i.e. where hl2.exe is located) or absolute.
There are two variables that you can use:
|all_source_engine_paths|
Root folders of both theSteamAppID
game and anyAdditionalContentId
games you have mounted|gameinfo_path|
Folder containing your mod's gameinfo.txt
Automatic localization
Source automatically creates localised search paths. If you mount hl2
, then when your mod runs in French hl2_french
is automatically mounted just above it.
(Different languages can have different AppIDs, but don't worry. Steam handles all that internally.)
Example
The following code would mount the content of Episode Two and Portal:
FileSystem
{
SteamAppId 420 // Ep2
ToolsAppId 211
AdditionalContentId 400 // Portal
SearchPaths
{
Game |gameinfo_path|. // Your mod folder should always come first
Game |all_source_engine_paths|ep2
Game |all_source_engine_paths|episodic // Ep2 also uses some Ep1 content
Game |all_source_engine_paths|portal
Game |all_source_engine_paths|hl2 // HL2 should always come last
}
}
Episode Two comes first and so has priority. This means that you won't be able to use portals, as the Ep2 binaries will be loaded - but you could pitch GLaDOS against a pack of Hunters!
If you did want to use Portal's binaries, you would simply promote its search path above Ep2's. But if there are custom binaries in |gameinfo_path|
(your mod's folder) then they will be loaded in both cases.
Source 2013 Example
The following code would mount the content of both Episode Two and Portal on 2013 engine branch:
FileSystem
{
SteamAppId 243730 // Source SDK Base 2013 Singleplayer
SearchPaths
{
// No /custom/ folders because they can interfere with mod content and shouldn't be in mod gameinfo.
game+mod+mod_write+default_write_path |gameinfo_path|. // Mod
gamebin |gameinfo_path|bin // Mod's Binaries
// Using SSDKBase13 path, then back to /common/ and then using Portal folder.
// |all_source_engine_paths| magic help here too.
game |all_source_engine_paths|../Portal/portal/portal_sound_vo_english.vpk
game |all_source_engine_paths|../Portal/portal/portal_pak.vpk
// Base Half-Life 2 Content: ep2, episodic, hl2
game_lv |all_source_engine_paths|hl2/hl2_lv.vpk
game |all_source_engine_paths|ep2/ep2_english.vpk
game |all_source_engine_paths|ep2/ep2_pak.vpk
game |all_source_engine_paths|episodic/ep1_english.vpk
game |all_source_engine_paths|episodic/ep1_pak.vpk
game |all_source_engine_paths|hl2/hl2_english.vpk
game |all_source_engine_paths|hl2/hl2_pak.vpk
game |all_source_engine_paths|hl2/hl2_textures.vpk
game |all_source_engine_paths|hl2/hl2_sound_vo_english.vpk
game |all_source_engine_paths|hl2/hl2_sound_misc.vpk
game |all_source_engine_paths|hl2/hl2_misc.vpk
platform |all_source_engine_paths|platform/platform_misc.vpk
// Find loose files that are not in the vpk's
game |all_source_engine_paths|episodic
game |all_source_engine_paths|hl2
platform |all_source_engine_paths|platform
}
}