Gameinfo.txt: Difference between revisions
TomEdwards (talk | contribs) (otherlang2; first half reformatted) |
TomEdwards (talk | contribs) (finished rewrite - added AdditionalContentId details) |
||
Line 23: | Line 23: | ||
: These are the 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. | : These are the 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. | ||
: <code>title2</code> (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 in <code>resource/clientscheme.res</code> to change its font. [[Half-Life 2]] uses a specially-made font ("HalfLife2") that only has a specific set of characters; it won't display most text properly.}} | : <code>title2</code> (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 in <code>resource/clientscheme.res</code> to change its font. [[Half-Life 2]] uses a specially-made font ("HalfLife2") that only has a specific set of characters; it won't display most text properly.}} | ||
; <code>gamelogo <[[boolean]]></code> | ; {{EP2 add|<<code>gamelogo <[[boolean]]></code>}} | ||
: Rather than displaying the <code>title</code>/<code>title2</code> text, display the content in <code>resource/GameLogo.res</code>. This was used for all three of the games in the [[Orange Box]]. | : Rather than displaying the <code>title</code>/<code>title2</code> text, display the content in <code>resource/GameLogo.res</code>. This was used for all three of the games in the [[Orange Box]]. | ||
Line 32: | Line 32: | ||
; <code>nodifficulty <boolean></code> | ; <code>nodifficulty <boolean></code> | ||
: Hides the difficulty tab | : Hides the difficulty tab | ||
; <code>hasportals <boolean></code> | ; {{EP2 add|<<code>hasportals <boolean></code>}} | ||
: Shows the Portal options tab | : Shows the Portal options tab | ||
; <code>nocrosshair <boolean></code> | ; <code>nocrosshair <boolean></code> | ||
Line 41: | Line 41: | ||
: Hides toggle checkbox for <code>cl_himodels</code>. Only displayed properly if <code>cl_himodels</code> exists in the first place! | : Hides toggle checkbox for <code>cl_himodels</code>. Only displayed properly if <code>cl_himodels</code> exists in the first place! | ||
=== Steam | === Steam games list === | ||
; <code>developer <[[string]]></code> | ; <code>developer <[[string]]></code> | ||
Line 57: | Line 57: | ||
: Maps in the subkey do not appear in the "create server" dialogue (but can still be loaded from the console). | : Maps in the subkey do not appear in the "create server" dialogue (but can still be loaded from the console). | ||
: 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 }. | : 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 }. | ||
; <code>nodegraph <[[boolean]]></code> | ; {{EP2 add|<<code>nodegraph <[[boolean]]></code>}} | ||
: Prevents the engine from creating [[nodegraph]]s for NPCs. | : Prevents the engine from creating [[nodegraph]]s for NPCs. | ||
== Mounted content and required games == | == Mounted content and required games == | ||
There are two stages to getting at a game's content: | |||
# Mount its AppID | |||
# Mount its folder as a searchpath | |||
This all happens within the <code>filesystem</code> key. | |||
{{warning|Your mod will not be protected by [[VAC]] if it is based on a single-player game.}} | |||
{{warning| | |||
; <code>SteamAppID <[[int]]></code> | |||
: The [[Steam Application IDs|appid]] of the game the mod is to be based on. The mod will have access to all of its content, and not be playable unless it is installed. | |||
: For most mods this will be either 215 (Ep1) or 218 (OB), both of which point to different versions of [[Source SDK Base]]. | |||
; {{EP2 add|<code>AdditionalContentId <int></code>}} | |||
: Another game that the mod both has access to and depends on. Any number of <code>AdditionalContentId</code>s can be specified. {{note|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 (see below). Remember to delete the SearchPath before you release.}} | |||
; <code>ToolsAppId <int></code> | |||
: This is the appid of the SDK currently in use. Currently, the only valid value is 211 (i.e. the Source SDK). | |||
This is | |||
=== SearchPaths === | === SearchPaths === | ||
<code>SearchPaths</code> is a further subkey group within <code>FileSystem</code>. It contains a list of folders that the engine will search for content in, with the pattern <code>Game <path></code>. | |||
The engine starts its search in the first path, and stops as soon as it finds the file it's looking for. This means that the order in which you provide search paths is important: files in one search path override those in paths below it. | |||
A path is normally relative to <code>SteamAppID</code>'s root directory (i.e. where hl2.exe is located) or absolute (e.g. <code>C:\SomeFolder\</code>). There are two "magic words" you can use to overcome this: | |||
# '''<code>|all_source_engine_paths|</code>''' (points to the folders of both the <code>SteamAppID</code> and any <code>AdditionalContentId</code>s you have used) | |||
# '''<code>|gameinfo_path|</code>''' (points to the folder containing your mod's gameinfo.txt) | |||
Finally, Source automatically creates localised search paths from each path you provide. For example, passing <code>hl2</code> means that <code>hl2_french</code> is added too (if the player runs your mod in that language). {{todo|Does this also apply for the mod folder itself?}} | |||
=== Example === | |||
The following code would mount the content of both [[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 game code will be loaded - but you ''could'' pitch [[GLaDOS]] against a pack of [[Hunter]]s! | |||
If you did want to use Portal's game code, you would simply promote its search path above Ep2's. | |||
[[category:Technical]] | [[category:Technical]] | ||
[[Category:Modding]] | [[Category:Modding]] | ||
[[Category:Source SDK FAQ]] | [[Category:Source SDK FAQ]] |
Revision as of 15:12, 16 July 2009
- For Half-Life 1 (i.e. GoldSrc), see liblist.gam.
GameInfo.txt
describes your mod. It contains metadata like its name, a link to your website and a manual, and defines which games it needs to run. It is also the marker that Steam, Source and the SDK tools use to detect the location of your project.
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 will want to edit it and add new data.

UI settings
Name
game <string>
- The name of your mod. Displayed in Steam, on the Windows task bar, but not on the main menu (unless you don't define a
title
). title <string>
title2 <string>
- These are the 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 in
resource/clientscheme.res
to change its font. Half-Life 2 uses a specially-made font ("HalfLife2") that only has a specific set of characters; it won't display most text properly.- Template:EP2 add
- Rather than displaying the
title
/title2
text, display the content inresource/GameLogo.res
. This was used for all three of the games in the Orange Box.
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
- Template:EP2 add
- Shows the Portal options tab
nocrosshair <boolean>
- Hides the multiplayer crosshair selection menu
nomodels <boolean>
- Hides the multiplayer model selection menu
nohimodel <boolean>
- Hides toggle checkbox for
cl_himodels
. 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 local.
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. 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
- Prevents the engine from creating nodegraphs for NPCs.
Mounted content and required games
There are two stages to getting at a game's content:
- Mount its AppID
- Mount its folder as a searchpath
This all happens within the filesystem
key.

SteamAppID <int>
- The appid of the game the mod is to be based on. The mod will have access to all of its content, and not be playable unless it is installed.
- For most mods this will be either 215 (Ep1) or 218 (OB), both of which point to different versions of Source SDK Base.
- Template:EP2 add
- Another game that the mod both has access to and depends on. Any number of
AdditionalContentId
s can be specified.Note: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 (see below). Remember to delete the SearchPath before you release. ToolsAppId <int>
- This is the appid of the SDK currently in use. Currently, the only valid value is 211 (i.e. the Source SDK).
SearchPaths
SearchPaths
is a further subkey group within FileSystem
. It contains a list of folders that the engine will search for content in, with the pattern Game <path>
.
The engine starts its search in the first path, and stops as soon as it finds the file it's looking for. This means that the order in which you provide search paths is important: files in one search path override those in paths below it.
A path is normally relative to SteamAppID
's root directory (i.e. where hl2.exe is located) or absolute (e.g. C:\SomeFolder\
). There are two "magic words" you can use to overcome this:
|all_source_engine_paths|
(points to the folders of both theSteamAppID
and anyAdditionalContentId
s you have used)|gameinfo_path|
(points to the folder containing your mod's gameinfo.txt)
Finally, Source automatically creates localised search paths from each path you provide. For example, passing hl2
means that hl2_french
is added too (if the player runs your mod in that language).
Example
The following code would mount the content of both 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 game code will be loaded - but you could pitch GLaDOS against a pack of Hunters!
If you did want to use Portal's game code, you would simply promote its search path above Ep2's.