简体中文由こはね使用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 中可用的属性均归为以下几类:
Multi-value properties: Accept a finite set of items and are used to assign a property (or a set of properties) to the given set of items, which may represent units or civilizations.
多值属性:这类属性接收有限的项目集合,用于将某个属性(或属性集合)分配给这些项目,项目可能代表单位或文明。
Single-value properties: Accept only one value and are used to assign a particular value to one of the settings of the patch or of the game itself. Those properties are denoted by an equal (“=”) sign, that explicitly indicates that a single particular value should be read and assigned to that property, as seen in the example code above.
单值属性:此类属性仅接收单一值,用于为补丁或游戏的某个设置赋予一个特定数值。这些属性以等号 (“=”) 标识,表明只需读取并分配一个特定值,如上例代码所示。
Struct properties: Used to define properties that require more than one argument per item
结构属性:用于定义需要为每个项目提供多个参数的属性。
Patch Settings: Enable a particular setting or option of the UHC Patch, and are usually set in the UHC Configuration File by the UHC Patcher.
补丁设置:这类设置用于激活 UHC Patch 的特定选项,通常由 UHC Patcher 在 UHC Configuration File 中进行配置。
Supported Properties(支持的属性)
Multi-value properties(多值属性):
enableFarmAnim: Defines the (additional) buildings in which settlers would walk through it while gathering a resource from it, like AoE3 Mills and Plantations.
enableFarmAnim:用于指定定居者在采集资源时会穿行的额外建筑,如 AoE3 Mills 和 Plantations。
rectFarmAnim: Defines the (additional) buildings which would have a behaviour similar to the rectangular Farms of the TWC civilizations.
rectFarmAnim:用于指定那些额外建筑,其行为类似于 TWC civilizations 中的矩形 Farms。
marketUnits: Defines which (additional) buildings should support a proper market behaviour.
marketUnits:用于确定哪些额外建筑应具备正常的市场行为。
asianCivs: Defines which civilizations should get export UI, plus support wonder age up.
asianCivs:用于指定哪些文明能够获得 export UI,并支持 wonder age up。
nativeCivs: Defines which civilizations should get the fire pit UI, plus support council age up.
nativeCivs:用于指定哪些文明将拥有 fire pit UI,并支持 council age up。
tacticSwitching: Defines the (additional) buildings that should support tactic switching through ProtoUnitCommands, like the Factory and the Rice Paddy do, in the original game.
tacticSwitching:用于指定额外的建筑,这些建筑应通过 ProtoUnitCommands 支持 tactic switching,类似于原游戏中 Factory 和 Rice Paddy 的做法。
twoScoutCivs: Defines the (additional) civilizations which should support setting two explorer/monk names upon the creation of a new Home City.
twoScoutCivs:用于指定额外的文明,在新建 Home City 时这些文明将支持设置两个 explorer/monk 名称。
Single value properties(单值属性):
basePop: Defines the maximum base population to be used by the game. If it’s not set, the default value is 200.
basePop:用于设定游戏的最大 base population ,若未配置,则默认值为 200 。
extraPop: Defines the maximum extra population to be used by the game. If it’s not set, the default value is 50.
extraPop:用于设定游戏的最大 extra population ,若未配置,则默认值为 50 。
deckCardCount: Defines the maximum possible number of cards in a deck. If it’s not set, the default value is 25.
deckCardCount:用于设定牌组中牌的最大数量,若未配置,则默认值为 25 。
Struct properties(结构属性):
farmingRadius: Defines the maximum area in which villagers should be able to
walk, while gathering resources from particular buildings defined in the
enableFarmAnim property. Every item assigned to this property should follow
the following format:
farmingRadius:用于定义村民在采集 enableFarmAnim 属性中指定建筑资源时可行走的最大范围。每个分配给此属性的项须遵循如下格式:
farmUnitIndex areaWidth areaHeight
farmUnitIndex should be replaced by the index of a building whose maximum farming area will be changed in the enableFarmAnim property
farmUnitIndex 替换为需要调整其最大 farming area 的建筑索引
areaWidth should be replaced by the width of the new maximum farming area in the X axis
areaWidth 替换为新最大 farming area 在 X 轴的宽度
areaHeight should be replaced by the height of the new maximum farming area in the Z axis
areaHeight 替换为新最大 farming area 在 Z 轴的高度
attackTypeIcons: Assigns UI icons and stringtable IDs to existing attack types in the game. Every item assigned to this property should follow the following format:
attackTypeIcons:用于为游戏中现有的 attack types 分配 UI 图标和 stringtable ID。每项内容需遵循以下格式:
attackType stringID iconPath
attackType should be replaced by the name of an attack type
attackType 替换为 attack type 的名称
stringID should be replaced by the string table ID to be assigned to the aforementioned attack type
stringID 替换为分配给该 attack type 的 string table ID
iconPath should be replaced by the path to the icon to be assigned to the attack type, which should be relative to the art directory and should not contain any spaces
iconPath 替换为图标路径,此路径须相对于 art 目录且不包含空格
explorerUnits: Defines units which should receive custom explorer or monk names and/or should deliver a knockout message once they are killed, in case they are heroes. Every item assigned to this property should follow the following format:
explorerUnits:用于指定那些单位,在它们被击杀时(如果是英雄)将显示击倒信息,并获得自定义的 explorer 或 monk 名称。每项内容须遵循格式:
unitName explorerNameType msgStringID
unitName should be replaced by the unit name of an unit in the protoy.xml
unitName 替换为 protoy.xml 中某单位的名称
explorerNameType should be replaced by 1, to make all instances of this unit use the first explorer/monk name set in the HC creation screen, 2, to make them use the second explorer/monk name, or 0, to make them retain their original names.
explorerNameType 替换为 1(表示使用 HC 创建界面中设置的第一个 explorer/monk 名称)、2(表示使用第二个 explorer/monk 名称)或 0(表示保留原有名称)
msgStringID should be replaced by the stringtable ID for the knockout message
msgStringID 替换为击倒消息的 stringtable ID
Patch settings(补丁设置):
noAILimit: Removes the hardcoded 14 AI/Civilization limit by making the game read all .personality files in the from the AI directory defined in the .exe (which should be \AI3, by default).
noAILimit:该设置移除了硬编码的 14 AI/Civilization 限制,通过让游戏读取位于 .exe 所定义 AI 目录(默认为 \AI3)中的所有 .personality 文件实现。
customRevolutionBanners: Allows new revolutions to have banners above the revolutionary’s portrait in the Revolution UI.
customRevolutionBanners:使得新革命能够在 Revolution UI 中于革命者头像上方展示横幅。
ignoreRegistryPath: Makes the game read the AoE3 files from the folder in which the AoE3 .exe is located, instead of looking for a working path in the registry.
ignoreRegistryPath:该设置使游戏直接从 AoE3 .exe 所在文件夹读取 AoE3 文件,而非从注册表中搜索有效路径。
enableAllTeams: Enables team options 3 and 4 for Single Player and Multiplayer games.
enableAllTeams:该选项在 Single Player 与 Multiplayer 游戏中启用 team options 3 和 4。
removeFameRestriction: Allows the usage of the Fame Resource in ProtoActions, like AutoGather and ModifyGather, and also enables proper displaying of Fame, Experience and Shipment costs in the politician screen and HC cards.
removeFameRestriction:此设置允许在 ProtoActions(如 AutoGather 和 ModifyGather)中使用 Fame Resource,并能在 politician screen 与 HC cards 上正确显示 Fame、Experience 及 Shipment costs。
customSyscalls: Allows the UHC Patch to load and register custom syscalls implemented through plugins.
customSyscalls:该选项使 UHC Patch 能够通过插件加载并注册自定义 syscalls。
customCheats: Allows the UHC Patch to load and register custom cheats implemented through plugins.
customCheats:此设置使 UHC Patch 可以通过插件加载并注册自定义 cheats。
removeConversionRestriction: Allows the usage of the ConvertGuardian tactic unit action on units that aren’t linked to a treasure, which effectively allows the usage of that action in powers that affect classes other than the Guardian class.
removeConversionRestriction:该选项允许对未与 treasure 关联的单位使用 ConvertGuardian tactic unit action,从而在作用于非 Guardian class 的技能中实现该动作的使用。
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 中也不存在此问题。