colonies.xml:修改开局第一个城镇随机资源


每一局游戏,除了中国外,其他国家建立第一个城镇中心都会随机获得1个或两个资源箱,这个功能是在colonies.xml定义的。
colonies.xml需要用AOE3ED在data3.bar中提取,路径是data/placementrules/colonies.xml。

打开colonies.xml这个文件你会见到下列语句,(你看见了应该明白怎样修改了吧,)作用为随机抽选下面一种设定,开局建立第一个城镇中心后,赠送该设定的单位。其他的语句不要管了,我也不知道有什么用(测试不出来,大概是被废弃了吧)。

		<startingunits>
			<startingunitinfo>
				<unittype count="1">CrateofFood</unittype>
				<applystringid>31536</applystringid>
				<applystringidasian>63973</applystringidasian>
				<applystringidnative>63974</applystringidnative>
			</startingunitinfo>
			<startingunitinfo>
				<unittype count="1">CrateofWood</unittype>
				<applystringid>31536</applystringid>
				<applystringidasian>63973</applystringidasian>
				<applystringidnative>63974</applystringidnative>
			</startingunitinfo>
			<startingunitinfo>
				<unittype count="1">CrateofCoin</unittype>
				<applystringid>31536</applystringid>
				<applystringidasian>63973</applystringidasian>
				<applystringidnative>63974</applystringidnative>
			</startingunitinfo>
			<startingunitinfo>
				<unittype count="1">CrateofFood</unittype>
				<unittype count="1">CrateofWood</unittype>
				<applystringid>31536</applystringid>
				<applystringidasian>63973</applystringidasian>
				<applystringidnative>63974</applystringidnative>
			</startingunitinfo>
			<startingunitinfo>
				<unittype count="1">CrateofFood</unittype>
				<unittype count="1">CrateofCoin</unittype>
				<applystringid>31536</applystringid>
				<applystringidasian>63973</applystringidasian>
				<applystringidnative>63974</applystringidnative>
			</startingunitinfo>
			---------------------------------------分割线---------------------------------------
			<startingunitinfo>
				<unittype count="X">Protoname</unittype>		开局赠送的单位1,X为赠送数量
				<unittype count="X">Protoname</unittype>		开局赠送的单位2,X为赠送数量
				<unittype count="X">Protoname</unittype>		只要位置足够,可以赠送n种单位。
				<applystringid>StringID</applystringid>			欧洲国家显示“您的主城运送了资源来帮助您建立殖民地。”
				<applystringidasian>StringID</applystringidasian>	亚洲国家显示“皇帝赐予您帝国城市中的资源。”
				<applystringidnative>StringID</applystringidnative>	土著国家显示“议会提供您寻找新村庄所需的资源。”
			</startingunitinfo>
		</startingunits>

如果要自己增加新的随机资源的话,复制粘贴,然后修改就可以了。
例如开局赠送8只鹿、4只羊、5只山羊、3个超大钱币箱、2个大小麦堆、2个超大木材捆、1个美味的大型盛宴的修改如下:

			<startingunitinfo>
				<unittype count="4">Sheep</unittype>
				<unittype count="5">ypGoat</unittype>
				<unittype count="3">CrateofCoinLarge</unittype>
				<unittype count="2">CrateofWheatBundleLarge</unittype>
				<unittype count="2">CrateofWoodLarge</unittype>
				<unittype count="1">CrateofTurkeyLarge</unittype>
				<applystringid>31536</applystringid>
				<applystringidasian>63973</applystringidasian>
				<applystringidnative>63974</applystringidnative>
			</startingunitinfo>

  colonies.xml - 记事本 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)
<!-- converted from XMB to XML -->

<colonies>
	<colony name="Standard">
		<starttypes>
			<type maxcount="1">TownCenter</type>
		</starttypes>
		<addtypes>
			<type>colonyBuilding</type>
		</addtypes>
		<wallcost>
			<food>400</food>
			<wood>400</wood>
		</wallcost>
		<wallrepaircost>
			<food>300</food>
			<wood>300</wood>
		</wallrepaircost>
		<walldamageradius>12</walldamageradius>
		<wallradius>34</wallradius>
		<wallbuildrate>2.0</wallbuildrate>
		<walldowntime>60</walldowntime>
		<wallsegments>8</wallsegments>
		<wallradiusincrease>0</wallradiusincrease>
		<wallradiusincreaseinterval>180</wallradiusincreaseinterval>
		<wallmaxradius>34</wallmaxradius>
		<startingunits>
			<startingunitinfo>
				<unittype count="1">CrateofFood</unittype>
				<applystringid>31536</applystringid>
				<applystringidasian>63973</applystringidasian>
				<applystringidnative>63974</applystringidnative>
			</startingunitinfo>
			<startingunitinfo>
				<unittype count="1">CrateofWood</unittype>
				<applystringid>31536</applystringid>
				<applystringidasian>63973</applystringidasian>
				<applystringidnative>63974</applystringidnative>
			</startingunitinfo>
			<startingunitinfo>
				<unittype count="1">CrateofCoin</unittype>
				<applystringid>31536</applystringid>
				<applystringidasian>63973</applystringidasian>
				<applystringidnative>63974</applystringidnative>
			</startingunitinfo>
			<startingunitinfo>
				<unittype count="1">CrateofFood</unittype>
				<unittype count="1">CrateofWood</unittype>
				<applystringid>31536</applystringid>
				<applystringidasian>63973</applystringidasian>
				<applystringidnative>63974</applystringidnative>
			</startingunitinfo>
			<startingunitinfo>
				<unittype count="1">CrateofFood</unittype>
				<unittype count="1">CrateofCoin</unittype>
				<applystringid>31536</applystringid>
				<applystringidasian>63973</applystringidasian>
				<applystringidnative>63974</applystringidnative>
			</startingunitinfo>
			<startingunitinfo>
				<unittype count="4">Sheep</unittype>
				<unittype count="5">ypGoat</unittype>
				<unittype count="3">CrateofCoinLarge</unittype>
				<unittype count="2">CrateofWheatBundleLarge</unittype>
				<unittype count="2">CrateofWoodLarge</unittype>
				<unittype count="1">CrateofTurkeyLarge</unittype>
				<applystringid>31536</applystringid>
				<applystringidasian>63973</applystringidasian>
				<applystringidnative>63974</applystringidnative>
			</startingunitinfo>
		</startingunits>
	</colony>
</colonies>

有一点要注意,这是随机的,所以测试的时候不一定会出现你的设定。(多开n次游戏吧。)



如果中国开局没有赠送设定的随机资源箱(单位)怎么办?
打开civs,在中国的设定把<randomstartingunits>0</randomstartingunits>删掉。

  civs.xml - 记事本 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)
	<civ>
		<name>Chinese</name>
		<main>1</main>
		<gameid>ypack</gameid>
		<statsid>CH</statsid>
		<portrait>objects\flags\china</portrait>
		<culture>Chinese</culture>
		<displaynameid>60002</displaynameid>
		<rollovernameid>62430</rollovernameid>
		<alliedid>26446</alliedid>
		<alliedotherid>26445</alliedotherid>
		<unalliedid>26444</unalliedid>
		<hcshipmentmodifier>1.001234</hcshipmentmodifier>
		<hcshipmentgrowthmodifier>0.001234</hcshipmentgrowthmodifier>
		<hcmaxshipmentmaxgrowthmodifier>10</hcmaxshipmentmaxgrowthmodifier>
		<additionalwonderbuildrate>0.091</additionalwonderbuildrate>
		<additionalwonderbuildrate>0.1</additionalwonderbuildrate>
		<additionalwonderbuildrate>0.111</additionalwonderbuildrate>
		<additionalwonderbuildrate>0.125</additionalwonderbuildrate>
		<additionalwonderbuildrate>0.12</additionalwonderbuildrate>
		<additionalwonderbuildrate>0.119</additionalwonderbuildrate>
		<additionalwonderbuildrate>0.121</additionalwonderbuildrate>
		<additionalwonderbuildrate>0.125</additionalwonderbuildrate>
		<agetech>
			<age>Age0</age>
			<tech>YPAge0Chinese</tech>
		</agetech>
		<agetech>
			<age>Age1</age>
			<tech>YPColonializeChinese</tech>
		</agetech>
		<agetech>
			<age>Age2</age>
			<tech>YPFortressizeChinese</tech>
		</agetech>
		<agetech>
			<age>Age3</age>
			<tech>YPIndustrializeChinese</tech>
		</agetech>
		<agetech>
			<age>Age4</age>
			<tech>YPImperializeChinese</tech>
		</agetech>
		<postindustrialtech>ypPostIndustrialChinese</postindustrialtech>
		<postimperialtech>ypPostImperialChinese</postimperialtech>
		<buildingefficiency>0.3</buildingefficiency>
		<gold>0</gold>
		<food>0</food>
		<wood>0</wood>
		<startingunit>ypMonkChinese</startingunit>
		<startingunit>ypMonkDisciple</startingunit>
		<townstartingunit>ypGoat</townstartingunit>
		<townstartingunit>ypSettlerAsian</townstartingunit>
		<townstartingunit>ypSettlerAsian</townstartingunit>
		<townstartingunit>ypSettlerAsian</townstartingunit>
		<townstartingunit>ypSettlerAsian</townstartingunit>
		<townstartingunit>ypSettlerAsian</townstartingunit>
		<townstartingunit>ypSettlerAsian</townstartingunit>
		<townstartingunit>CrateofFood</townstartingunit>
		<townstartingunit>CrateofFood</townstartingunit>
		<townstartingunit>CrateofWood</townstartingunit>
		<townstartingunit>CrateofWood</townstartingunit>
		<townstartingunit>CrateofWood</townstartingunit>
		<randomstartingunits>0</randomstartingunits>删掉这句,只能删掉,就算把0改成1,进入游戏开局后还是没有随机资源箱的。
		<homecityfilename>homecitychinese.xml</homecityfilename>
		<homecityflagtexture>objects\flags\china</homecityflagtexture>
		<homecityflagbuttonset>ChineseFlagBtn</homecityflagbuttonset>
		<homecityflagbuttonsetlarge>ChineseFlagBtnLarge</homecityflagbuttonsetlarge>
		<postgameflagtexture>ui\ingame\ingame_ui_postgame_flag_chinese</postgameflagtexture>
		<matchmakingtextures>
			<bannertexture>ui\eso\civ_flags_quick_launch_y</bannertexture>
			<bannertexturecoords>0 0.0 0.78125 0.25</bannertexturecoords>
			<portraittexture>ui\eso\eso_quick_search_politicians_04</portraittexture>
			<portraittexturecoords>0.005859375 0.00390625 0.396484375 0.392578125</portraittexturecoords>
			<smallportraittexture>ui\singleplayer\cpai_avatar_chinese</smallportraittexture>
			<smallportraittexturecoords>0 0 1 1</smallportraittexturecoords>
		</matchmakingtextures>







伪造的记事本就是好,用来代替截图要多长有多长,而且不费时间、不占空间。