Gameinfo.txt
This page either contains information that is only partially or incorrectly translated, or there isn't a translation yet.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article tries to comply with the alternate languages guide.
- 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 SDK 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.
Paramètres de l'interface
Nom
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.
ClientTitleFont
se trouvant dans resource\clientscheme.res
pour changer sa police. La valeur par défaut ("HalfLife2") a seulement un ensemble spécifique de caractères et n'affichera pas plus correctement le texte.- Template:EP2 add
- Plutôt que d'afficher le texte de
title
/title2
, affiche le contenu deresource\GameLogo.res
. Voir Ajout de votre Logo au Menu .
Options
type <singleplayer_only | multiplayer_only>
- Affecte l'ordre des onglets dans le panneau Options. Peut influer également sur la vitesse de téléchargement Steam. A omettre si votre mod possède un mode SP et un mode MP
nodifficulty <boolean>
- Masque l'onglet Difficulté (Cela se produit automatiquement si votre mod est
multiplayer_only
) - Template:EP2 add
- Affiche l'onglet Options de Portal
nocrosshair <boolean>
- Masque le menu de sélection de viseurs du mode multijoueur
advcrosshair
- Enables special advanced crosshair options. À Faire: 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!
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.
Divers
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 nodegraph s.
- Template:EP2 add
- Path to a FGD, relative to Hammer's location. Currently has no effect.
- Template:EP2 add
- Found in TF2's gameinfo with the value
maps/instances/
...
Montage du contenu
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. 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. Astuce:For most mods this will be either 215 (Ep1) or 218 (OB), both of which point to different versions of the Source SDK Base .
- Template:EP2 add
- 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 .Attention: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!Template:Dictionary/Bug/fr: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 absoluteSearchPath
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).
SearchPaths
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:
|all_source_engine_paths|
(root folders of both theSteamAppID
and anyAdditionalContentId
s you have used)|gameinfo_path|
(folder containing your mod's gameinfo.txt)
Localisation
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.
Exemple
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 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. (Needless to say, if there are binaries in your mod's folder then they will be loaded.)