The GameInfo.txt File Structure:fr

From Valve Developer Community
Revision as of 17:40, 3 March 2010 by Kouki1000 (talk | contribs) (Started french translation)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
English Español Polski Русский 日本語
Pour Half-Life 1/GoldSrc, lisez liblist.gam.

Le fichier gameinfo.txt décrit votre mod. Il contient des métadonnées comme le nom du mod, un lien vers votre site web et un manuel, et définit comment on peut y accéder. Ce fichier est stocké dans le dossier principal de votre mod, et il fait office de marqueur pour Steam, Source et le Source SDK pour détecter son existence.

Le lanceur du SDL génère un fichier gameinfo.txt quand vous lancez "Créer un mod". Cela marche bien pour le développement, mais avant que vous ne publiez votre mod, vous devrez sûrement le modifier et ajouter quelques nouvelles données.

Note:Les valeurs Booléennes sont représentés sous forme de nombres entiers.

Warning: Si une valeur contient des espaces ou des tabulations, mettez-le "entre guillemets".

Paramètres de l'interface


game <string>
Le nom de votre mod en ASCII. Affiché dans Stream et sur la barre des tâches Windows, mais pas sur le menu principal (à moins que vous ne définissiez pas de titre).
title <string>
title2 <string>
Ce sont les chaînes affichés en Unicode dans le menu principal de votre mod. Ils pourraient être différents des chaînes affichées dans Steam et sur le bureau si vous utilisez une police fantaisie.
title2 (et 3, 4, etc.) sont utilisables pour appliquer différents styles à des parties différentes du titre de votre mod.
Note:It's likely your title won't display right until you edit ClientTitleFont in resource\clientscheme.res to change its font. The default ("HalfLife2") only has a specific set of characters and won't display most text properly.
gamelogo <boolean> (New with Half-Life 2: Episode Two / Source 2007)
Rather than displaying the title/title2 text, display the content in resource\GameLogo.res. See Adding Your Logo to the Menu.


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)
hasportals <boolean> (New with Half-Life 2: Episode Two / Source 2007)
Shows the Portal options tab
nocrosshair <boolean>
Hides the multiplayer crosshair selection menu
Enables special advanced crosshair options. To do: 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 if cl_himodels exists in the first place!

Liste de jeux Steam

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.


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 }.
nodegraph <boolean> (New with Half-Life 2: Episode Two / Source 2007)
When false, prevents the engine from creating nodegraphs.
GameData <string> (New with Half-Life 2: Episode Two / Source 2007)
Path to a FGD, relative to Hammer's location. Currently has no effect.
InstancePath <string> (New with Half-Life 2: Episode Two / Source 2007)
Found in TF2's gameinfo with the value maps/instances/...

Montage du contenu

Warning: Your mod will not be protected by VAC if it is based on a single-player game.

There are two stages to getting at a game's content:

  1. Mount its AppID
  2. Mount its folder as a searchpath

This all happens within the filesystem key. Scroll down for an example.

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.
Tip:For most mods this will be either 215 (Ep1) or 218 (OB), both of which point to different versions of the Source SDK Base.
AdditionalContentId <int> (New with Half-Life 2: Episode Two / Source 2007)
Another game that the mod has access to. In Valve's binaries only one AdditionalContentId can be specified; implement this code to allow unlimited mounting. Warning: Your mod will run regardless of whether or not the user owns the game that you mount content for. If the game isn't owned the content will not be mounted, and error signs will appear everywhere instead!
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 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 ID is 211 (the Source SDK).


SearchPaths is a further subkey group within FileSystem. It contains a list of folders (in the form Game <path>, once per line) that the engine will look for files in.

The engine starts looking in the first path, and stops as soon as it finds what it wants. This means that the order in which you provide search paths is important: files in one path override those in paths below it.

A search path is normally either relative to the SteamAppID's root directory (i.e. where hl2.exe is located) or absolute (e.g. C:\SomeFolder\). Thankfully there are two "magic words" which are more useful:

  1. |all_source_engine_paths| (root folders of both the SteamAppID and any AdditionalContentIds you have used)
  2. |gameinfo_path| (folder containing your mod's gameinfo.txt)


Source automatically creates localised search paths. If you mount hl2, then when a player runs your mod in French hl2_french is automatically mounted just in front. To do: Does this also apply for the mod folder itself?

Note:Language differences can also change AppIDs, but don't worry. Steam handles everything internally.


The following code would mount the content of both Episode Two and Portal:

	SteamAppId	420	// Ep2
	ToolsAppId	211
	AdditionalContentId	400	// Portal

		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. (Needless to say, if there are binaries in your mod's folder then they will be loaded.)