UHC Configuration File(UHC 配置文件)

语言(Language):

简体中文由こはね使用ChatGPT o3-mini-high进行翻译。


The UHC Configuration file is a file that is read before the game starts up and that allows modders to define which UHC Patch features should be loaded and to extend or change hardcoded properties that can't be generalized just by pure coding, like farming animations, proper market behavior, maximum population capacity and so on...

UHC Configuration File 是一个在游戏启动前读取的文件,它允许模组作者定义哪些 UHC Patch 功能 应该 被加载,并扩展或更改那些不能仅仅通过纯编码概括的硬编码属性,比如 farming animations、proper market behavior、maximum population capacity 等……


By default, it should be located at <AoE3 Path>\Startup\uhc.cfg . The location of the UHC configuration file can be changed by setting a different location while installing the patch or changing the value of the offset 0x00865083 in the age3y.exe after applying the patch.

默认情况下,它应位于 < AoE3 Path >\Startup\uhc.cfg 。可以在安装补丁时设置不同的位置,或在应用补丁后修改 age3y.exe 中偏移量 0x00865083 的值,从而改变 UHC Configuration File 的存放位置。


An example UHC Configuration File can be found at the Documentation\Examples\ Configuration File folder in the files included with this release.

本次发布的文件中包含了一个示例 UHC Configuration File,可在 Documentation\Examples\Configuration File 文件夹中找到。


File Structure(文件结构)


The UHC Configuration File should follow the following structure:

UHC Configuration File 的结构应符合如下格式:

multiValueProperty1 Value1 Value2 ...
singleValueProperty=Value3
structProperty ItemA Value1A Value2A ...
patchSetting1
...


As for UHC Patch v1.5+, colons (“:”) should not be used to denote properties and the name of some properties have been changed. The Patcher should be able to do the necessary changes, but, in case it doesn’t, the file will have to be manually edited.

对于 UHC Patch v1.5+ ,不应使用冒号 (“:”) 来标示属性,而且部分属性名称已作更改。补丁程序一般会自动完成这些修改,若未能实现,则需要手动编辑文件。


Each one of the available properties of the UHC Configuration Files belongs to one of the following categories:

所有 UHC Configuration File 中可用的属性均归为以下几类:


Supported Properties(支持的属性)


Multi-value properties(多值属性)

Single value properties(单值属性)

Struct properties(结构属性):

Patch settings(补丁设置):

Notes(注意)


After enabling the custom Revolution Banners option in the configuration file used by the UnHardcode Patch, the game will load the banner for a Revolution from the path Art\ui\ingame\politicians\REV_banner_<techname>, in which <techname> would be the name of the technology used by a Revolution, without the "XPRevolution" prefix, but, unlike previous versions of the patch, the original revolutions will retain their original banner paths.

启用 UnHardcode Patch 使用的配置文件中的 custom Revolution Banners 选项后,游戏会从路径 Art\ui\ingame\politicians\REV_banner_<techname> 加载 Revolution 的横幅,其中 <techname> 为 Revolution 所用技术的名称(不含 "XPRevolution" 前缀);但与旧版本补丁不同,原始 Revolution 将保留其原有的横幅路径。


If the option to extend the maximum amount of teams is enabled in the configuration file, in order to make the new teams options show up in Multiplayer lobbies, you’ll have to add the following xml entries:

若配置文件中启用了扩展最大团队数的选项,为使 Multiplayer lobbies 中出现新的 teams 选项,你需要添加如下 xml 条目:


				<dropdown>$$36143$ 3</dropdown>
				<dropdown>$$36144$ 4</dropdown>
	  

After the following entry:

紧接在以下条目之后:


				<dropdown>$$36145$ ?</dropdown>
	  

In every <gadget name="mpsetup-playerX-team" ... > entry in both of the data\uiMPGameSetupPage.xml and data\uimpesogamesetuppage2.xml files, where “X” refers to all player numbers from 1 to 8. You can find versions of those files with the necessary edits in the Documentation\Examples\Team Limit folder in the files included with this release.

在 data\uiMPGameSetupPage.xml 以及 data\uimpesogamesetuppage2.xml 文件中每个 <gadget name="mpsetup-playerX-team" ... > 条目中,“X” 表示所有玩家编号(1 至 8)。所需修改后的文件版本可在本次发布文件的 Documentation\Examples\Team Limit 文件夹中找到。


While the new teams work flawlessly in Single Player, in multiplayer, if any player selects any of the new teams, only this player will see what he or she selected correctly, but the game will detect the new team(s) correctly once the game starts.

虽然新 teams 在 Single Player 中运作正常,但在 Multiplayer 中,若任一玩家选择新 teams,只有该玩家能正确看到其选择,但一旦游戏开始,系统将能正确识别新 teams。


Original teams aren't affected by this bug, and it isn't present in Single Player.

原有 teams 不受此 bug 影响,并且在 Single Player 中也不存在此问题。