- UID
- 37087
- 阅读权限
- 255
- 注册时间
- 2009-8-27
- 最后登录
- 2024-10-25
- 在线时间
- 5598 小时
教皇
帝國榮譽元帥
- 耕战
- 64323
- 鹰币
- 97876
- 天龙币
- 0
- 回帖
- 200
|
官网:https://support.ageofempires.com/hc/en-us/articles/360062106732-Additive-Data-Mods
简而言之,modder无须每次游戏更新后重新复制修改一整串xml文件了!微软终于做了点人事……
在Data路径内按下表规则命名模组文件『*mods.xml』并定义同名xml根节点元素『<*mods></*mods>』。
除字符串模组外,每个xml数据节点均可指定四种 mergeMode(整合模式)属性之一:modify, add, remove, replace(修改、增加、移除、替换),对原始数据集的对应节点进行操作。如不指定,默认为若存在则修改,不存在则增加。
Base file | Mod file | Root node name | protoy.xml | protomods.xml | <protomods> | techtreey.xml | techtreemods.xml | <techtreemods> | civs.xml | civmods.xml | <civmods> | politiciandata.xml | politicianmods.xml | <politicianmods> | nuggets.xml | nuggetmods.xml | <nuggetmods>
| protounitcommands.xml | protounitcommandmods.xml | <protounitcommandmods>
| cultures.xml | culturemods.xml | <culturemods>
| maptypes.xml | maptypemods.xml | <maptypemods>
| mapspecifictechs.xml | mapspecifictechmods.xml | <mapspecifictechmods>
| attacktime.xml | attacktimemods.xml | <attacktimemods>
| abilities\abilities.xml | abilities\abilitymods.xml | <abilitymods>
| abilities\powers.xml | abilities\powermods.xml | <powermods>
| randomnames.xml | randomnamemods.xml | <randomnamemods>
| strings\<language>\*.xml | strings\<language>\stringmods.xml | <stringmods>
| economymode.xml | economymodemods.xml | <economymodemods>
| personalities.xml | personalitiesmods.xml | <personalitiesmods>
| homecity<civ>.xml | homecity<civ>.mods.xml | <homecitymods>
| tactics\<type>.tactics | tactics\<type>.mods.tactics | <tacticsmods>
| uitechtree\techtreedata_<civ>.xml | uitechtree\techtreedata_<civ>.mods.xml | <uitechtreemods>
|
示例:
protomods.xml
- <protomods>
- <!-- remove a proto unit -->
- <Unit mergeMode='remove' name='PropsPottedPlants'/>
- <!-- modify a proto unit (add a new flag) -->
- <Unit name='PropsPoles'>
- <Flag>NotPlayerPlaceable</Flag>
- </Unit>
- <!-- modify a proto unit (add a Train and remove an existing Train) -->
- <Unit name='Manor'>
- <Train row='0' page='1' column='2'>Longbowman</Train>
- <Train mergeMode='remove'>xpColonialMilitia</Train>
- </Unit>
- <!-- replace a proto unit -->
- <Unit mergeMode='replace' id="1797" name='deIconUSCowboy'>
- <DBID>2372</DBID>
- <Icon>resources\art\units\spc\outlaws\cowboy_icon2.png</Icon>
- <PortraitIcon>resources\art\units\spc\outlaws\cowboy_portrait2.png</PortraitIcon>
- </Unit>
- <!-- add a proto unit -->
- <Unit name='MyNewProtoUnit'>
- <DBID>2400</DBID>
- <!-- ... proto unit data ... -->
- </Unit>
- </protomods>
复制代码
techtreemods.xml
- <techtreemods>
- <!-- modify a tech (add effect - enable Pikeman for the Russians) -->
- <Tech name ='Age0Russian'>
- <Effects>
- <Effect mergeMode='add' type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
- <Target type ='ProtoUnit'>Pikeman</Target>
- </Effect>
- </Effects>
- </Tech>
- <!-- modify a tech (modify an effect by adding and removing - Sacred Cows now cost 10 food instead of 125
- food) -->
- <Tech name ='ypAge0IndiansSpecialTechs'>
- <Effects>
- <Effect mergeMode='remove' type ='Data' amount ='45.00' subtype ='Cost' resource ='Food' relativity
- ='Absolute'>
- <Target type ='ProtoUnit'>ypSacredCow</Target>
- </Effect>
- <Effect mergeMode='add' type ='Data' amount ='-70.00' subtype ='Cost' resource ='Food' relativity
- ='Absolute'>
- <Target type ='ProtoUnit'>ypSacredCow</Target>
- </Effect>
- </Effects>
- </Tech>
- </techtreemods>
复制代码
stringmods.xml
- <stringmods>
- <StringTable>
- <Language name='English'>
- <!-- change the text of the Continue button on the Main Menu -->
- <String _locID='20038'>ModContinue</String>
- </Language>
- </StringTable>
- </stringmods>
复制代码
|
|