Zh/Gameinfo.txt: Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
m (otherlang2'd)
m (Replaced outdated page with text from The GameInfo.txt File Structure:zh-cn.)
Line 1: Line 1:
{{otherlang2
{{lang|Gameinfo.txt|GameInfo.txt}}
|en=The_GameInfo.txt_File_Structure
:''关于HL1/[[GoldSrc]],请查阅[[The liblist.gam File Structure|liblist.gam]].''
|ru=The_GameInfo.txt_File_Structure:ru
|pl=The_GameInfo.txt_File_Structure:pl
|jp=The_GameInfo.txt_File_Structure:jp
}}
<code>GameInfo.txt</code> 文件用来向 SDK 工具 和 Source 引擎 传递 MOD 或游戏中要使用到的文件. 这就是在运行 MOD 的时候 SDK 和 Source 引擎查看要调用的是 Half-Life 2, Counter-Strike, 还是 Half-Life 2: Deathmatch 中的内容. 这也是 SDK 工具来找到您的 MOD 所在文件夹的一种途径.


{{note|对于 Half-Life 1 (GoldSrc), 请看 [[The liblist.gam File Structure|liblist.gam 的文件结构]].}}
{{toc-right}}


仅仅当一个程序员刚刚建立起一个 MOD 时, 才需要修改这个文件了. 在大多时间里, 您不需要修改此文件, 但是如果您希望您的 MOD 能够调用除了 Half-Life 2 之外的其他内容, 您就需要修改它了. 只要您 MOD 中的这个文件设置好了, 它就应该和您的 MOD 内容放置在一起. 当所有开发者工作时, 必须使用同一个 <code>gameinfo.txt</code>.
'''<code>gameinfo.txt</code>'''是用来描述你的mod.就如同它名字所表达的那样,就如同一个网站的指导手册一样,并且制定游戏的内容数据哪些可以被访问. 它存在于你的根目录下别且就像是Steam用来标记那样, Source和SDK工具也需要它的存在.


== UI 设定 ==
SDK会在你开始制作一个MOD时,自动生成一个gameinfo文件. 这将会使得你有一个很好的开头, 但是别以为你可以一劳永逸,你还需要在适当的时候编辑它
许多的 UI 设定, 包括您的游戏标题, 都是由 <code>gameinfo.txt</code> 文件来控制的. 包含的关键字:


{{note|[[Boolean|布尔 (Boolean)]] 值是以整型 (int) 来表示.}}
{{note|[[Boolean|布尔值]]将表示为[[integer|整数]]}}


//基本信息
{{warning|如果一个数值含有空格或者制表,请使用 "引号"进行标注.}}
game "Game Title" // 这里的文字就是 Steam 游戏菜单中显示的内容.
gamelogo boolean // 当打开这个选项的时候
// 显示的就不是 title/title2 的文本了
//而是显示 <code>resource/GameLogo.res</code> 文件里面的内容.
// 设定将被读取到引擎的 VGUI
// 以便使用 <code>gamelogo</code> 文件来修改.
title "Game Title" // 这是在游戏中的菜单上显示的实际内容.
title2 "..." // 副标题 (非必需)
type singleplayer_only // 也可以是 multiplayer_only .  帮助 GameUI 了解
// 在 选项 面板上哪些 UI 组件是要显示的.
// 如果 MOD 结合了 [[MP|多人模式]] 和 [[SP|单人模式]] 就可以忽略此项了.
// 如果设置了 <code>multiplayer_only</code>, 那么 多人游戏 标签 // 将显示在 选项 面板的最前面 // 否则, 如果没有 <code>singleplayer_only</code> 它会被添加到最后.


nodifficulty boolean // 在 选项 面板上隐藏 困难度标签
== 界面设置 ==
hasportals boolean // 在 选项 面板上显示 Portal 标签
//选项 面板上的 多人游戏 标签
nocrosshair boolean // 隐藏 准心选择 面板
nohimodel boolean // Hides cvar toggles checkbox for <code>cl_himodels</code>
// Only is displayed properly if <code>cl_himodels</code> is registered
nomodels boolean // 隐藏多人游戏中的 模型选择 标签
//Steam 游戏列表
developer "Team name" // 您的团队的名字 (或许只有您一人!)
developer_url "Web address" // 您团队的主页. 必须把 <nowiki>http://</nowiki> 卸载最前面.
manual "URL" // 游戏手册的地址; 也可以是本地目录.
// 安装文件可以修改这个值
// 以便在安装时修正文件位置.
icon "path/to/icon" // 图标必须为未压缩的 16x16 像素的 TGA 格式文件.
// 为了使透明度正常, TGA 文件必须以拥有 Alpha 通道的 32-bit 模式储存
// 路径为 相对 MOD 安装目录的 相对路径
// (就是 <code>gameinfo.txt</code> 文件)
// 还应该不含有 .TGA 扩展名.
//创建服务器会话
hidden_maps // 括号内的地图将不会显示
{ // 但是通过 自动完成 列表
"mapname" 1 // 和 <code>changelevel</code> 命令
"mapname" 1 // 可以打开.
}
nodegraph boolean // 告诉引擎是否要生成地图的 nodegraphs.


当您创建一个新 MOD 的时候, <code>gameinfo.txt</code> 文件内的 标题 (title) 和 游戏类型 (type) 都是空的, 别忘了自己写上.
=== 名字 ===


{{note|在您更改 <code>resource/clientscheme.res</code>文件中 标题 所用的字体之前, 标题可能无法正常显示. [[Half-Life 2]] 使用一个独特定制的字体 ("HalfLife2") 里面只包含有一堆的特殊图形; 这个字体无法正常显示大多数的文本. 改变 clientscheme.res 文件内的 ClientTitleFontto 项的字体列表 来修正这个问题.}}
;<code>game <[[string|字符值]]></code>
: 请使用[[Wikipedia:ASCII|ASCII]]码来命名你的MOD名. MOD的名字显示在Steam库中或windows窗口上, 但是 ''不会''在主菜单里(好吧除非你不想用<code>title</code>).
; <code>title <字符值></code>
; <code>title2 <字符值></code>
:  请使用[[Wikipedia:Unicode|Unicode]]码来编辑在主菜单里显示的标题. 由于字体的不同所以无法保证在Steam或者桌面上显示样式是一样.
: <code>title2</code> (还有 3, 4,等等)它允许你在不同的情况下显示不同的标题 {{note|这有可能导致有些字符无法显示因为默认字体可能没有你所使用字符的样式,请通过编辑 <code>ClientTitleFont</code> 在 <code>resource\clientscheme.res</code> 来改变默认字体. 默认的("HalfLife2")字体可以显示大多数的字符.}}
; {{EP2 add|<code>gamelogo <[[bool|布尔值]]></code>}}
: 不是显示你的标题<code>title</code>/<code>title2</code>在主菜单里面, 而是显示<code>resource\GameLogo.res</code>. 请查阅[[Adding Your Logo to the Menu|在菜单上添加你的logo]].


== SteamAppId ==
=== 设置 ===
<code>GameInfo.txt</code> 文件内有用的还有 <code>SteamAppId</code> 的值. 如果您打开 GameInfo.txt, 您将看到这样的一块:


SteamAppId 215 //This will mount all the GCFs we need (240=CS:S, 220=HL2).
; <code>type <singleplayer_only | multiplayer_only></code>
: 这将决定在设置选项里是否会有单人和多人模式,多人模式可能会影响steam的下载速度,如果你的mod含有独立的单人和多人模式,请删除
; <code>nodifficulty <布尔值></code>
: 在设置面板中隐藏困难选项 (如果你的mod是多人游戏的mod的话,这将会自动生成 <code>multiplayer_only</code>)
; {{EP2 add|<code>hasportals <布尔值></code>}}
: 显示入口选项在设置面板中
; <code>nocrosshair <布尔值></code>
: 隐藏准星设置在多人游戏设置中
; <code>advcrosshair</code>
: 允许一些高级准星在多人游戏设置中出现. {{todo|如何实现.}}
; <code>nomodels <布尔值></code>
: 隐藏多人游戏选项
; <code>nohimodel <布尔值></code>
: Hides toggle checkbox for <code>cl_himodels</code>, which was used in [[GoldSrc]]. Only displayed properly if <code>cl_himodels</code> exists in the first place!


<code>SteamAppId</code> 的值制定了游戏要使用的内容 (就是 [[GCF]] 文件).
=== Steam游戏相关 ===


{{note|所有的 MOD 应该都使用 <code>215</code> AppId, 除非有特殊的需要, 比如 218 是读取 Orange Box Source 引擎.}}
; <code>developer <[[String|字符]]></code>
{{warning|选择您的 MOD 所以依赖的游戏时, 注意 '''您将不能依赖于那些其他游戏没有共享的内容.'''}}
: 你的团队名 (或者就是你的名字!)
{{warning|'''要让 VAC 反作弊系统保护您的多人游戏 MOD, 请确定 MOD 是基于一个多人游戏'''. [[HL2DM]] 是个不错的选择.}}
; <code>developer_url <字符值></code>
: 你的或者你这个Mod的网站.必须以<code><nowiki>http://</nowiki></code>开头.
; <code>manual <字符值></code>
: 游戏手册相关,可以指向一个本地文件或者是一个URL.
; <code>icon <字符值></code>
: 由本地路径组成,有一个16x16像素的TGA文件组成这将成为你在steam显示的图标. 请'不要''包含文件扩展名.32位的图标是用来显示在Steam详细信息页面的,必须放在icon之后,并且声明<code>&lt;icon&gt;_big.tga</code>. {{note|如果是要保留透明度的话,TGA文件必须要使用32位并且保留alpha通道的储存方式.}}


Source 引擎游戏的 <code>SteamAppId</code> 的值可以在 [[Steam Application IDs]] 找到. 共享 GCFs 将在文件名中包含 'shared' , 这些文件可以随时被调用; 剩下的一切就是个人的问题了.
=== 其他 ===


== 文件系统 ==
; <code>hidden_maps <subkey></code>
这一段详细描述了文件系统中的大量组件
: 被指定的地图将不会成为在"创建服务器"所出现选取地图选项中(但是任然可以使用控制台来创建).
: 具体的语法是<code>mapname 1</code>,每行只循序有一项.请不要包含<code>.bsp</code>.记得通过{ and }来关闭或者打开子键.
; {{EP2 add|<code>nodegraph <[[bool|布尔值]]></code>}}
: 当设置为false的时候组织引擎创建[[nodegraph|网点图]]s.
; {{EP2 add|<code>GameData <字符值></code>}}
: 指向FGD文件, 相对于Hammer的路径. 只有编译工具才会使用到,不包括Hammer.
; {{EP2 add|<code>InstancePath <字符值></code>}}
: The default location in which to look for [[instance]] VMFs.
; {{L4D add|'''<code>SupportsDX8 <布尔值></code>'''}}
: 防止游戏运行与DX8以下的版本,因为他不能支持许多游戏特效


=== ToolsAppId ===
== 安装内容相关 ==
所有 <code>GameInfo.txt</code> 文件都有这样的一行:


ToolsAppId 211 //Tools will load this (ie: source SDK caches) to get
There are two stages to getting at a game's content:
//things like materials\debug, materials\editor, etc.


这是一个特殊的设定, 这个值被工具读取, 用来看看那些内容要被工具使用, 这不被游戏使用.
# Mount its AppID
# Mount its folder as a searchpath


=== SearchPaths ===
This all happens within the <code>filesystem</code> key. [[#Example|See this example.]]
<code>GameInfo.txt</code> 文件中的 <code>SearchPaths</code> 片段描述了在哪里可以找到游戏内容, 在您的硬盘和 Steam 缓存文件内. 要理解这部分内容, 我们必须去看看程序员是怎样调用 Source 引擎来读取游戏文件的. 程序员要访问的所有文件中代码都必须拥有一个 <i>path ID</i>. path ID 表示了一个或多个您的硬盘或是虚拟的 Steam 文件系统的目录.


举个例子, 您的游戏中大多数像 脚本 (scripts), 音效 (sounds), 模型 (model) 文件, 和 材质 (materials) 这样的资源以 <code>"Game"</code> path ID 被访问. 一个程序员或许会说, "打开一个在 <code>'Game'</code> path ID 里面的 <code>scripts\weapon_m4a1.txt</code> 文件". 如果您的 MOD 位于 <code>C:\MyMod\Blasters</code>, 并且您使用了 <code>SteamAppId 240</code> 这将会读取 Counter-Strike: Source 的内容, 它将会在这几个地方搜寻文件:
{{warning|Your mod will not be protected by [[VAC]] if it is based on a single-player game.}}


* <code>C:\MyMod\Blasters\scripts\weapon_m4a1.txt</code>
=== Commands ===
* <code><Steam install directory>\Steam\SteamApps\username\Counter-Strike Source\cstrike\scripts\weapon_m4a1.txt</code>
* <code><inside the virtual Steam file system>\cstrike\scripts\weapon_m4a1.txt</code>


使用 path IDs 来描述文件, 就可以让程序员和开发人员无需担心这些不懂的文件目录. 他们可以使用关联到游戏目录的名称 (比如 <code>scripts\weapon_m4a1.txt</code> 或者 <code>materials\brick\brickwall001a.vmt</code>) 引擎和工具会帮您搜寻这些文件的位置, 只要 <code>GameInfo.txt</code> 描述了 <code>"Game"</code> path ID 的意义.
; <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 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]].}}
; <code>AdditionalContentId <int></code> <em style="font-weight:normal;">(MODS ONLY)</em>
: 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, [[Mounting multiple games|make these changes]]. {{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 <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 ID is 211 (the Source SDK). {{todo|What about the L4D Authoring Tools?}}


在 <code>GameInfo.txt</code> 文件里面, 有一个 <code>"SearchPaths"</code> 字段, 描述了 path IDs. 大多数的 MOD 无须改动这个路径, 他在您从 SDK launcher 运行 '''Create a Mod''' 的时候就建立了.
=== SearchPaths ===
 
每一行的第一部分是 path ID 的名称, 第二部分是当 path ID 使用时要搜索的路径. 一个简单的例子是这样的:
 
SearchPaths
{
TestPathID C:\TestMod1
TestPathID C:\TestMod2
TestPathID C:\TestMod3
}
 
如果一个程序员需要写代码到 scripts\weapon_m4a1.txt 并且使用了 "TestPathID" 作为代码中的 path ID , 引擎就会搜寻如下位置:


* <code>C:\TestMod1\scripts\weapon_m4a1.txt</code>
<code>SearchPaths</code> is a subkey within <code>FileSystem</code>. It contains a list of folders (in the form <code>Game <path></code>, once per line) that the engine will look for files in.
* <code>C:\TestMod2\scripts\weapon_m4a1.txt</code>
* <code>C:\TestMod3\scripts\weapon_m4a1.txt</code>


Since the Source games access most of their content in the <code>"Game"</code> path ID, they do some things for you automatically if you have a path ID called <code>"Game"</code>. For each entry with a path ID of <code>"Game"</code>:
The engine starts looking for a file in the first path. If it finds it there it stops, but otherwise it looks in the second. This means that the order in which you provide search paths is important: files in a higher path override those in a lower one.


# It adds a <code>"GameBin"</code> path ID, in <code><dir>\bin</code>
A search path is normally either relative to the <code>SteamAppID</code>'s root directory (i.e. where hl2.exe is located) or absolute (e.g. <code>C:\SomeFolder\</code>). Thankfully there are two "magic words" which are more useful:
# It adds another <code>"Game"</code> path in front of it with <code>_<language></code> at the end. For example: <code>c:\hl2\cstrike</code> would get a <code>c:\hl2\cstrike_french</code> path added to it if you were running on a French-localized machine.


For the first <code>"Game"</code> search path:
; <code>|all_source_engine_paths|</code>
: Root folders of both the <code>SteamAppID</code> game and any <code>AdditionalContentId</code> games you have mounted
; <code>|gameinfo_path|</code>
: Folder containing your mod's gameinfo.txt


# It adds a search path called <code>"MOD"</code> under the same folder.
==== Localization ====
# It adds a search path called <code>"DEFAULT_WRITE_PATH"</code>.


The default <code>SearchPaths</code> that would be used in most mods are like this:
Source automatically creates localised search paths. If you mount <code>hl2</code>, then when your mod runs in French <code>hl2_french</code> is automatically mounted just above it. {{todo|Does this also apply for the mod folder?}}


SearchPaths
(Different languages can have different AppIDs, but don't worry. Steam handles all that internally.)
{
Game        |gameinfo_path|.
Game        hl2
}


Normally, a path specifier (the part on the right side) is relative to the base directory --The directory where <code>hl2.exe</code> is found. If <code>|gameinfo_path|</code> precedes the path, then it is relative to the directory where <code>GameInfo.txt</code> file instead. For example, if the <code>GameInfo.txt</code> file were in <code>C:\MyMod\Blasters</code>, and it had a path like <code><i>|gameinfo_path|SomeTestDirectory</i></code>, then the path ID you were creating would refer to:
=== Example ===


<code>C:\MyMod\Blasters\SomeTestDirectory</code>
The following code would mount the content of both [[Episode Two]] and [[Portal]]:


For Counter-Strike: Source, the <code>GameInfo.txt</code> file has a <code>SearchPaths</code> section that looks like the one above. If your Counter-Strike directory was:
<source lang=ini>FileSystem
{
SteamAppId 420 // Ep2
ToolsAppId 211
AdditionalContentId 400 // Portal


<code>C:\Program Files\Valve\Steam\SteamApps\username\Counter-Strike Source</code>
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>


then it would be saying to look in these two directories:
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!


* <code>C:\Program Files\Valve\Steam\SteamApps\username\Counter-Strike Source\cstrike</code>
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.
because GameInfo.txt exists here.
* <code>C:\Program Files\Valve\Steam\SteamApps\username\Counter-Strike Source\hl2</code>
which only exists inside a virtual Steam file system.


[[category:Technical:zh-cn]]
[[Category:File formats:zh-cn]]
[[Category:Modding:zh-cn|MOD 制作]]
[[Category:Modding:zh-cn]]
[[Category:Source SDK FAQ:zh-cn]]
[[Category:Source SDK FAQ:zh-cn]]

Revision as of 00:21, 11 September 2021

English (en)Deutsch (de)Español (es)Français (fr)日本語 (ja)한국어 (ko)Polski (pl)Русский (ru)中文 (zh)Translate (Translate)
Info content.png
This translated page needs to be updated.
You can help by updating the translation.
Also, please make sure the article complies with the alternate languages guide.(en)
This notice is put here by LanguageBar template and if you want to remove it after updating the translation you can do so on this page.


关于HL1/GoldSrc,请查阅liblist.gam.

gameinfo.txt是用来描述你的mod.就如同它名字所表达的那样,就如同一个网站的指导手册一样,并且制定游戏的内容数据哪些可以被访问. 它存在于你的根目录下别且就像是Steam用来标记那样, Source和SDK工具也需要它的存在.

SDK会在你开始制作一个MOD时,自动生成一个gameinfo文件. 这将会使得你有一个很好的开头, 但是别以为你可以一劳永逸,你还需要在适当的时候编辑它

Note.png注意:布尔值将表示为整数
Warning.png警告:如果一个数值含有空格或者制表,请使用 "引号"进行标注.

界面设置

名字

game <字符值>
请使用ASCII码来命名你的MOD名. MOD的名字显示在Steam库中或windows窗口上, 但是 不会在主菜单里(好吧除非你不想用title).
title <字符值>
title2 <字符值>
请使用Unicode码来编辑在主菜单里显示的标题. 由于字体的不同所以无法保证在Steam或者桌面上显示样式是一样.
title2 (还有 3, 4,等等)它允许你在不同的情况下显示不同的标题
Note.png注意:这有可能导致有些字符无法显示因为默认字体可能没有你所使用字符的样式,请通过编辑 ClientTitleFontresource\clientscheme.res 来改变默认字体. 默认的("HalfLife2")字体可以显示大多数的字符.
Template:EP2 add
不是显示你的标题title/title2在主菜单里面, 而是显示resource\GameLogo.res. 请查阅在菜单上添加你的logo.

设置

type <singleplayer_only | multiplayer_only>
这将决定在设置选项里是否会有单人和多人模式,多人模式可能会影响steam的下载速度,如果你的mod含有独立的单人和多人模式,请删除
nodifficulty <布尔值>
在设置面板中隐藏困难选项 (如果你的mod是多人游戏的mod的话,这将会自动生成 multiplayer_only)
Template:EP2 add
显示入口选项在设置面板中
nocrosshair <布尔值>
隐藏准星设置在多人游戏设置中
advcrosshair
允许一些高级准星在多人游戏设置中出现.
待完善: 如何实现.
nomodels <布尔值>
隐藏多人游戏选项
nohimodel <布尔值>
Hides toggle checkbox for cl_himodels, which was used in GoldSrc. Only displayed properly if cl_himodels exists in the first place!

Steam游戏相关

developer <字符>
你的团队名 (或者就是你的名字!)
developer_url <字符值>
你的或者你这个Mod的网站.必须以http://开头.
manual <字符值>
游戏手册相关,可以指向一个本地文件或者是一个URL.
icon <字符值>
由本地路径组成,有一个16x16像素的TGA文件组成这将成为你在steam显示的图标. 请'不要包含文件扩展名.32位的图标是用来显示在Steam详细信息页面的,必须放在icon之后,并且声明<icon>_big.tga.
Note.png注意:如果是要保留透明度的话,TGA文件必须要使用32位并且保留alpha通道的储存方式.

其他

hidden_maps <subkey>
被指定的地图将不会成为在"创建服务器"所出现选取地图选项中(但是任然可以使用控制台来创建).
具体的语法是mapname 1,每行只循序有一项.请不要包含.bsp.记得通过{ and }来关闭或者打开子键.
Template:EP2 add
当设置为false的时候组织引擎创建网点图s.
Template:EP2 add
指向FGD文件, 相对于Hammer的路径. 只有编译工具才会使用到,不包括Hammer.
Template:EP2 add
The default location in which to look for instance VMFs.
Template:L4D add
防止游戏运行与DX8以下的版本,因为他不能支持许多游戏特效

安装内容相关

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. See this example.

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

Commands

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.png提示: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> (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.
Warning.png警告: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.png错误: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.  [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).
待完善: What about the L4D Authoring Tools?

SearchPaths

SearchPaths is a subkey 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 for a file in the first path. If it finds it there it stops, but otherwise it looks in the second. This means that the order in which you provide search paths is important: files in a higher path override those in a lower one.

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 the SteamAppID game and any AdditionalContentId games you have mounted
|gameinfo_path|
Folder containing your mod's gameinfo.txt

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.

待完善: Does this also apply for the mod folder?

(Different languages can have different AppIDs, but don't worry. Steam handles all that internally.)

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