Gameinfo.txt/fr

From Valve Developer Community
Jump to: navigation, search
Info content.png
This page needs to be translated.

Cette page contient soit des informations qui ne sont que partiellement ou incorrectement traduites, soit il n'y a pas encore de traduction.
Si cette page ne peut pas être traduite pour une raison quelconque, ou si elle reste non traduite pendant une période prolongée après la publication de cet avis, il convient de demander la suppression de la page.

Veillez également à ce que l'article respecte le guide des langues alternatives.
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.

Note.pngNote:Les valeurs Booléennes sont représentés sous forme de nombres entiers.
Warning.pngAttention:Si une valeur contient des espaces ou des tabulations, mettez-le "entre guillemets".

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.
Note.pngNote:Il est probable que votre titre ne s'affiche pas correctement jusqu'à ce que vous modifiez 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.
gamelogo <boolean> (in all games since Half-Life 2: Episode Two)
Plutôt que d'afficher le texte de title/title2, affiche le contenu de resource\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)
hasportals <boolean> (in all games since Half-Life 2: Episode Two)
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.
Blank image.pngÀ 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 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.

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

Montage du contenu

Warning.pngAttention: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.pngAstuce: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> (in all games since Half-Life 2: Episode Two)
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.pngAttention: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!
Icon-Bug.pngBug: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

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)

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.

Blank image.pngÀ Faire: Does this also apply for the mod folder itself?
Note.pngNote:Language differences can also change AppIDs, but don't worry. Steam handles everything internally.

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 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.)