初始科技 | 添加外国单位教程




通过修改初始科技,可以让某个国家训练其他国家的单位或建筑,例如中国建造法国猎人、建造银行等;除此之外还能添加外国的科技以及获得特殊的加成,例如让中国的碉堡可以像俄罗斯那样升级,让中国所有村民增加一倍生命值。

起始(发现时代)科技
国家 发现时代科技 国家 发现时代科技 战役国家 发现时代科技
西班牙 Age0Spanish 奥斯曼 Age0Ottoman 圣约翰骑士团 Age0SPCAct1
英国 Age0British 易落魁 Age0XPIroquois 布莱克佣兵 Age0SPCAct2
法国 Age0French 苏族 Age0XPSioux 猎鹰公司 Age0SPCAct3
葡萄牙 Age0Portuguese 阿兹特克 Age0XPAztec 酋长战役 Age0XPSPC
荷兰 Age0Dutch 日本 YPAge0Japanese 战役日本 YPAge0JapaneseSPC
俄国 Age0Russian 中国 YPAge0Chinese 战役中国 YPAge0ChineseSPC
德国 Age0German 印度 YPAge0Indians 战役印度 YPAge0IndiansSPC




打开techtreey.xml然后搜索上面表格的Age0XXXXXX,例如中国你就搜索YPAge0Chinese,然后你看见的就是中国的初始科技了(例如下图)

  techtreey.xml - 记事本 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)
	<Tech name ='YPAge0Chinese' type ='Normal'>
<DBID>3529</DBID>
<Status>UNOBTAINABLE</Status>
<Flag>Shadow</Flag>
<Effects>
<Effect type ='TechStatus' status ='active'>YPAAAsianStartingTechs</Effect>
<Effect type ='TechStatus' status ='active'>YPAge0ChineseSpecialTechs</Effect>
<Effect type ='TechStatus' status ='active'>YPAge0ChineseTechs</Effect>
<Effect type ='TechStatus' status ='active'>YPAge0ChineseConsulate</Effect>
<Effect type ='TechStatus' status ='active'>YPAge0ChineseMonks</Effect>
<Effect type ='TechStatus' status ='active'>YPAge0ChineseUnits</Effect>
<Effect type ='TechStatus' status ='active'>YPAge0ChineseBuildings</Effect>
<Effect type ='TechStatus' status ='active'>YPAge0ChineseWonders</Effect>
</Effects>
</Tech>
<Tech name ='YPAge0Indians' type ='Normal'>
<DBID>3530</DBID>
<Status>UNOBTAINABLE</Status>
<Flag>Shadow</Flag>
<Effects>
<Effect type ='TechStatus' status ='active'>YPAAAsianStartingTechs</Effect>
<Effect type ='TechStatus' status ='active'>ypAge0IndiansBuildings</Effect>
<Effect type ='TechStatus' status ='active'>ypAge0IndiansUnits</Effect>
<Effect type ='TechStatus' status ='active'>ypAge0IndiansWonders</Effect>
<Effect type ='TechStatus' status ='active'>ypAge0IndiansTechs</Effect>
<Effect type ='TechStatus' status ='active'>ypAge0IndiansSpecialTechs</Effect>
<Effect type ='TechStatus' status ='active'>ypAge0IndiansMonks</Effect>
<Effect type ='TechStatus' status ='active'>ypAge0IndiansConsulate</Effect>
</Effects>
</Tech>

你是不是发现中国初始科技只有8个语句,有点小的样子?答案是不是的,<Effect type ='TechStatus' status ='active'>Techname</Effect>是直接改良的意思,也就是说中国初始科技直接改良了那8个科技,从而获得各种解锁单位、科技与单位属性加成等设定。 我们来搜索YPAge0ChineseTechs试试看:

  techtreey.xml - 记事本 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)

<Tech name ='YPAge0ChineseTechs' type ='Normal'>
<DBID>4981</DBID>
<Status>UNOBTAINABLE</Status>
<Flag>Shadow</Flag>
<Effects>
<Effect type ='TechStatus' status ='obtainable'>YPDisciplinedChuKoNu</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPDisciplinedQiangPikeman</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPDisciplinedKeshik</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPDisciplinedFlameThrower</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPExaltedHandMortar</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPExaltedFlameThrower</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPHonoredHandMortar</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPHonoredFlameThrower</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPExaltedIronFlail</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPExaltedKeshik</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPExaltedArquebusier</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPExaltedChuKoNu</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPHonoredIronFlail</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPHonoredKeshik</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPHonoredArquebusier</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPHonoredChuKoNu</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPExaltedFlyingCrow</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPExaltedFuchuan</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPDisciplinedSteppeRider</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPHonoredChangdao</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPHonoredQiangPikeman</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPHonoredSteppeRider</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPHonoredMeteorHammer</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPExaltedChangdao</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPExaltedQiangPikeman</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPExaltedSteppeRider</Effect>
<Effect type ='TechStatus' status ='obtainable'>YPExaltedMeteorHammer</Effect>
<Effect type ='TechStatus' status ='obtainable'>ypDisciplinedArquebusierShadow</Effect>
<Effect type ='TechStatus' status ='obtainable'>ypDisciplinedIronFlailShadow</Effect>
<Effect type ='TechStatus' status ='obtainable'>ypDisciplinedMeteorHammerShadow</Effect>
<Effect type ='TechStatus' status ='obtainable'>ypDisciplinedChangdaoShadow</Effect>
</Effects>
</Tech>
<Tech name ='YPAge0ChineseUnits' type ='Normal'>
<DBID>4982</DBID>
<Status>UNOBTAINABLE</Status>
<Flag>Shadow</Flag>
<Effects>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypSettlerAsian</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypMeteorHammer</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypIronFlail</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypKeshik</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypSteppeRider</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypQiangPikeman</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypChuKoNu</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypArquebusier</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypChangdao</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypHandMortar</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypFlameThrower</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypGoat</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypFishingBoatAsian</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypWarJunk</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypFireship</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypOldHanArmy</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypForbiddenArmy</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypTerritorialArmy</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypImperialArmy</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypFuchuan</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypMingArmy</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypStandardArmy</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypBlackFlagArmy</Target></Effect>
<Effect type ='Data' action ='SpawnCannon' amount ='1.00' subtype ='ActionEnable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Factory</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ypMongolianArmy</Target></Effect>
</Effects>
</Tech>

在YPAge0ChineseTechs是不是看见多了很多启用科技的设定?YPAge0ChineseUnits是不是有许多启用单位的设定?所以说中国的初始科技是通过改良其他科技获得效果的。 再来重复一遍,中国初始科技通过Techname直接改良科技来获得获得各种解锁单位、科技与单位属性加成等设定。

像法国这些西方国家的初始科技就没有用<Effect type ='TechStatus' status ='active'>Techname</Effect>来获得科技效果,所以解锁单位、科技与单位属性加成等设定都是在Age0French添加:(techtreey.xml顶部第一个科技就是法国科技,没必要搜索)

  techtreey.xml - 记事本 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)
	<Tech name ='Age0French' type ='Normal'>
<DBID>105</DBID>
<Status>UNOBTAINABLE</Status>
<Flag>Shadow</Flag>
<Effects>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Explorer</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>TownCenter</Target></Effect>
<Effect type ='TechStatus' status ='active'>AAStandardStartingTechs</Effect>
<Effect type ='TechStatus' status ='obtainable'>RGVoltigeur</Effect>
<Effect type ='TechStatus' status ='obtainable'>RGGendarmes</Effect>
<Effect type ='TechStatus' status ='obtainable'>ChurchCodeNapoleon</Effect>
<Effect type ='TechStatus' status ='obtainable'>ChurchGardeImperial1</Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Hussar</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Sheep</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>House</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Mill</Target></Effect>
<Effect type ='TechStatus' status ='obtainable'>VeteranMusketeers</Effect>
<Effect type ='TechStatus' status ='obtainable'>GuardMusketeers</Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Musketeer</Target></Effect>
<Effect type ='TechStatus' status ='obtainable'>ChurchGardeImperial3</Effect>
<Effect type ='TechStatus' status ='obtainable'>ChurchGardeImperial2</Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Coureur</Target></Effect>
<Effect type ='TechStatus' status ='obtainable'>GuardHalberdiers</Effect>
<Effect type ='TechStatus' status ='obtainable'>GuardDragoons</Effect>
<Effect type ='TechStatus' status ='obtainable'>VeteranPikemen</Effect>
<Effect type ='TechStatus' status ='obtainable'>ImperialHalberdiers</Effect>
<Effect type ='TechStatus' status ='obtainable'>ImperialGendarme</Effect>
<Effect type ='TechStatus' status ='obtainable'>ImperialVoltigeur</Effect>
<Effect type ='TechStatus' status ='obtainable'>ImperialMusketeers</Effect>
<Effect type ='TechStatus' status ='obtainable'>ImperialDragoons</Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Capitol</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Falconet</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>ArtilleryDepot</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Stable</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Barracks</Target></Effect>
<Effect type ='TechStatus' status ='obtainable'>VeteranCrossbowmen</Effect>
<Effect type ='TechStatus' status ='obtainable'>PoliticianGeneral</Effect>
<Effect type ='TechStatus' status ='obtainable'>PoliticianPresidente</Effect>
<Effect type ='TechStatus' status ='obtainable'>PoliticianMohawk</Effect>
<Effect type ='TechStatus' status ='obtainable'>PoliticianEngineer</Effect>
<Effect type ='TechStatus' status ='obtainable'>PoliticianMusketeerFrench</Effect>
<Effect type ='TechStatus' status ='obtainable'>PoliticianNaturalist</Effect>
<Effect type ='TechStatus' status ='obtainable'>PoliticianMarksman</Effect>
<Effect type ='TechStatus' status ='obtainable'>PoliticianQuartermaster</Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Plantation</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>TradingPost</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Outpost</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Caravel</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Dock</Target></Effect>
<Effect type ='TechStatus' status ='active'>XPTrickle</Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Market</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Arsenal</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Skirmisher</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>CWallGate</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>LivestockPen</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Church</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>WallStraight2</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>WallStraight5</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>WallConnector</Target></Effect>
<Effect type ='TechStatus' status ='obtainable'>UnlockPoliticianTycoonFrench</Effect>
<Effect type ='TechStatus' status ='obtainable'>UnlockPoliticianScoutFrench</Effect>
<Effect type ='TechStatus' status ='obtainable'>UnlockPoliticianPhilosopherPrinceFrench</Effect>
<Effect type ='TechStatus' status ='obtainable'>UnlockPoliticianGovernorFrench</Effect>
<Effect type ='TechStatus' status ='obtainable'>UnlockPoliticianExiledPrinceFrench</Effect>
<Effect type ='TechStatus' status ='obtainable'>UnlockPoliticianCavalierFrench</Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Pikeman</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Crossbowman</Target></Effect>
<Effect type ='TechStatus' status ='obtainable'>ImperialHussars</Effect>
<Effect type ='TechStatus' status ='obtainable'>GuardHussars</Effect>
<Effect type ='TechStatus' status ='obtainable'>VeteranHussars</Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Halberdier</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>FieldHospital</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Priest</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Cuirassier</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Culverin</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Mortar</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Dragoon</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Monitor</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Frigate</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Galleon</Target></Effect>
<Effect type ='TechStatus' status ='obtainable'>Bayonet</Effect>
<Effect type ='TechStatus' status ='active'>Levy</Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>FishingBoat</Target></Effect>
<Effect type ='Data' action ='SpawnCannon' amount ='1.00' subtype ='ActionEnable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Factory</Target></Effect>
<Effect type ='TechStatus' status ='obtainable'>ImperialCannon</Effect>
<Effect type ='TechStatus' status ='obtainable'>ImperialFieldGun</Effect>
<Effect type ='TechStatus' status ='obtainable'>FieldGun</Effect>
<Effect type ='TechStatus' status ='obtainable'>VeteranDragoonsShadow</Effect>
<Effect type ='TechStatus' status ='obtainable'>VeteranSkirmishersShadow</Effect>
<Effect type ='TechStatus' status ='obtainable'>ImperialMonitors</Effect>
<Effect type ='TechStatus' status ='obtainable'>ImperialManOWar</Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Saloon</Target></Effect>
<Effect type ='TechStatus' status ='obtainable'>XPRevolutionLouverture</Effect>
<Effect type ='TechStatus' status ='obtainable'>XPRevolutionSantander</Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>xpPetard</Target></Effect>
<Effect type ='TechStatus' status ='obtainable'>ImperialHorseArtillery</Effect>
<Effect type ='TechStatus' status ='obtainable'>HeavyHorseArtillery</Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>xpHorseArtillery</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>xpSpy</Target></Effect>
<Effect type ='TechStatus' status ='obtainable'>ShipHowitzers</Effect>
</Effects>
</Tech>





此教程的重点↓



我们来给中国解锁几个个单位与科技试试看,顺便再加一个给村民添加一个两倍生命值的效果:

我们直接在在YPAge0Chinese下面添加这些语句

(搜索YPAge0Chinese,然后复制下列语句,按照格式粘贴)
			<Effect type ='TechStatus' status ='obtainable'>FortifiedBlockhouse</Effect>
<Effect type ='TechStatus' status ='obtainable'>FrontierBlockhouse</Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Bank</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Coureur</Target></Effect>

<Effect type ='Data' amount ='2.00' subtype ='Hitpoints' relativity ='BasePercent'>
<Target type ='ProtoUnit'>AbstractVillager</Target></Effect>
第一句蓝色语句的作用是启用强化碉堡的科技,第二句蓝色语句的作用是启用前线碉堡科技,第三句红色语句是启用银行,第四句绿色语句是启用法国猎人,最后一个语句是给所有带有村民标签(AbstractVillager)的单位增加两倍生命值。

上述修改如下图所示(下图红色语句)

  techtreey.xml - 记事本 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)
	<Tech name ='YPAge0Chinese' type ='Normal'>
<DBID>3529</DBID>
<Status>UNOBTAINABLE</Status>
<Flag>Shadow</Flag>
<Effects>
<Effect type ='TechStatus' status ='active'>YPAAAsianStartingTechs</Effect>
<Effect type ='TechStatus' status ='active'>YPAge0ChineseSpecialTechs</Effect>
<Effect type ='TechStatus' status ='active'>YPAge0ChineseTechs</Effect>
<Effect type ='TechStatus' status ='active'>YPAge0ChineseConsulate</Effect>
<Effect type ='TechStatus' status ='active'>YPAge0ChineseMonks</Effect>
<Effect type ='TechStatus' status ='active'>YPAge0ChineseUnits</Effect>
<Effect type ='TechStatus' status ='active'>YPAge0ChineseBuildings</Effect>
<Effect type ='TechStatus' status ='active'>YPAge0ChineseWonders</Effect>
<Effect type ='TechStatus' status ='obtainable'>FortifiedBlockhouse</Effect>
<Effect type ='TechStatus' status ='obtainable'>FrontierBlockhouse</Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Bank</Target></Effect>
<Effect type ='Data' amount ='1.00' subtype ='Enable' relativity ='Absolute'>
<Target type ='ProtoUnit'>Coureur</Target></Effect>
<Effect type ='Data' amount ='2.00' subtype ='Hitpoints' relativity ='BasePercent'>
<Target type ='ProtoUnit'>AbstractVillager</Target></Effect>

</Effects>
</Tech>
<Tech name ='YPAge0Indians' type ='Normal'>
<DBID>3530</DBID>
<Status>UNOBTAINABLE</Status>
<Flag>Shadow</Flag>
<Effects>
<Effect type ='TechStatus' status ='active'>YPAAAsianStartingTechs</Effect>
<Effect type ='TechStatus' status ='active'>ypAge0IndiansBuildings</Effect>
<Effect type ='TechStatus' status ='active'>ypAge0IndiansUnits</Effect>
<Effect type ='TechStatus' status ='active'>ypAge0IndiansWonders</Effect>
<Effect type ='TechStatus' status ='active'>ypAge0IndiansTechs</Effect>
<Effect type ='TechStatus' status ='active'>ypAge0IndiansSpecialTechs</Effect>
<Effect type ='TechStatus' status ='active'>ypAge0IndiansMonks</Effect>
<Effect type ='TechStatus' status ='active'>ypAge0IndiansConsulate</Effect>
</Effects>
</Tech>





应该有人会发现解锁碉堡升级科技后,中国的演武堂会多出那两个科技,导致有一行升级科技会被隐藏,无法改良,例如截图:

为了解决这个问题,我们需要在protoy.xml中把演武堂这两个碉堡升级科技的按钮删掉。 打开protoy.xml搜索ypWarAcademy(演武堂调用名),找到演武堂这个单位的语句,然后把下列语句删掉

这两句是升级碉堡的按钮:
		<Tech row ='0' page ='1' column ='4'>FortifiedBlockhouse</Tech>
<Tech row ='0' page ='1' column ='4'>FrontierBlockhouse</Tech>
不要给我问是这句吗或者说找不到,下图有,找不到就继续搜索,搜索到末尾了还是找不到就往上搜索,再不行直接把你电脑砸了吧 修改效果如下图红色语句所示,你可以直接把那两句给删除了,也可以像截图那样添加<!-- -->
【作者:<!-- -->是xml的注释语法,在“<!--”与“-->”之间的内容是无效的,但是不代表你可以输入中文字,如果需要输入中文字,在往后的教程会说到的】
  protoy.xml - 记事本 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)
	<Unit id ='926' name ='ypWarAcademy'>
<DBID>1354</DBID>
<DisplayNameID>60231</DisplayNameID>
<ObstructionRadiusX>4.0000</ObstructionRadiusX>
<ObstructionRadiusZ>4.0000</ObstructionRadiusZ>
<MaxVelocity>0.0000</MaxVelocity>
<MaxRunVelocity>0.0000</MaxRunVelocity>
<MovementType>land</MovementType>
<AnimFile>buildings\asian_civs\war_academy\war_academy.xml</AnimFile>
<DeadReplacement>BuildingRubble4x4</DeadReplacement>
<DeadReplacementLifespan>15</DeadReplacementLifespan>
<ImpactType>Wood</ImpactType>
<PhysicsInfo>blockhouse</PhysicsInfo>
<PlacementFile>buildingsmall.xml</PlacementFile>
<Icon>buildings\asian_civs\war_academy\china_waracademy_icon_64</Icon>
<PortraitIcon>buildings\asian_civs\war_academy\china_waracademy_icon_portrait</PortraitIcon>
<RolloverTextID>60230</RolloverTextID>
<ShortRolloverTextID>60229</ShortRolloverTextID>
<InitialHitpoints>2500.0000</InitialHitpoints>
<MaxHitpoints>2500.0000</MaxHitpoints>
<LOS>34.0000</LOS>
<UnitAIType>RangedCombative</UnitAIType>
<BuildPoints>30.0000</BuildPoints>
<Bounty>40.0000</Bounty>
<BuildBounty>20.0000</BuildBounty>
<Cost resourcetype ='Wood'>200.0000</Cost>
<BuildingWorkRate>1.0000</BuildingWorkRate>
<AllowedAge>1</AllowedAge>
<Armor type ='Siege' value ='0.0000'></Armor>
<BuilderLimit>8</BuilderLimit>
<UnitType>LogicalTypeValidSabotage</UnitType>
<UnitType>LogicalTypeHandUnitsAutoAttack</UnitType>
<UnitType>LogicalTypeBuildingsNotWalls</UnitType>
<UnitType>LogicalTypeRangedUnitsAutoAttack</UnitType>
<UnitType>LogicalTypeVillagersAttack</UnitType>
<UnitType>LogicalTypeHandUnitsAttack</UnitType>
<UnitType>LogicalTypeShipsAndBuildings</UnitType>
<UnitType>LogicalTypeRangedUnitsAttack</UnitType>
<UnitType>LogicalTypeBuildingsNotWallsOrGroves</UnitType>
<UnitType>LogicalTypeMinimapFilterMilitary</UnitType>
<UnitType>BuildingClass</UnitType>
<UnitType>MilitaryBuilding</UnitType>
<UnitType>Building</UnitType>
<UnitType>CountsTowardMilitaryScore</UnitType>
<UnitType>HasBountyValue</UnitType>
<UnitType>AbstractBarracks2</UnitType>
<UnitType>ConvertsHerds</UnitType>
<Train row ='0' page ='0' column ='0'>ypOldHanArmy</Train>
<Train row ='0' page ='0' column ='1'>ypStandardArmy</Train>
<Train row ='0' page ='0' column ='2'>ypMingArmy</Train>
<Train row ='0' page ='0' column ='5'>ypImperialArmy</Train>
<Train row ='0' page ='0' column ='4'>ypForbiddenArmy</Train>
<Train row ='0' page ='0' column ='3'>ypTerritorialArmy</Train>
<Train row ='0' page ='0' column ='1'>Pikeman</Train>
<Train row ='0' page ='0' column ='0'>Strelet</Train>
<Train row ='0' page ='0' column ='3'>Halberdier</Train>
<Train row ='0' page ='0' column ='2'>Musketeer</Train>
<Tech row ='0' page ='2' column ='1'>YPDisciplinedQiangPikeman</Tech>
<Tech row ='0' page ='22' column ='2'>YPExaltedChangdao</Tech>
<Tech row ='0' page ='2' column ='1'>YPHonoredQiangPikeman</Tech>
<Tech row ='0' page ='22' column ='0'>YPDisciplinedSteppeRider</Tech>
<Tech row ='0' page ='2' column ='1'>YPExaltedQiangPikeman</Tech>
<Tech row ='0' page ='22' column ='3'>YPExaltedMeteorHammer</Tech>
<Tech row ='0' page ='22' column ='2'>YPHonoredChangdao</Tech>
<Tech row ='0' page ='22' column ='3'>YPHonoredMeteorHammer</Tech>
<Tech row ='0' page ='1' column ='0'>VeteranStrelets</Tech>
<Tech row ='0' page ='1' column ='0'>ImperialStrelets</Tech>
<!-- <Tech row ='0' page ='1' column ='4'>FortifiedBlockhouse</Tech> -->
<-- <Tech row ='0' page ='1' column ='4'>FrontierBlockhouse</Tech> -->

<Tech row ='0' page ='1' column ='0'>GuardStrelets</Tech>
<Tech row ='0' page ='2' column ='0'>YPDisciplinedChuKoNu</Tech>
<Tech row ='0' page ='2' column ='2'>YPExaltedArquebusier</Tech>
<Tech row ='0' page ='2' column ='0'>YPHonoredChuKoNu</Tech>
<Tech row ='0' page ='2' column ='3'>YPExaltedIronFlail</Tech>
<Tech row ='0' page ='2' column ='0'>YPExaltedChuKoNu</Tech>
<Tech row ='0' page ='2' column ='3'>YPHonoredIronFlail</Tech>
<Tech row ='0' page ='1' column ='2'>VeteranMusketeers</Tech>
<Tech row ='0' page ='1' column ='1'>VeteranPikemen</Tech>
<Tech row ='0' page ='1' column ='3'>GuardHalberdiers</Tech>
<Tech row ='0' page ='1' column ='2'>GuardMusketeers</Tech>
<Tech row ='0' page ='1' column ='3'>ImperialHalberdiers</Tech>
<Tech row ='0' page ='1' column ='2'>ImperialMusketeers</Tech>
<Tech row ='0' page ='22' column ='1'>YPDisciplinedKeshik</Tech>
<Tech row ='0' page ='22' column ='1'>YPExaltedKeshik</Tech>
<Tech row ='0' page ='2' column ='2'>YPHonoredArquebusier</Tech>
<Tech row ='0' page ='22' column ='1'>YPHonoredKeshik</Tech>
<Tech row ='0' page ='22' column ='0'>YPExaltedSteppeRider</Tech>
<Tech row ='0' page ='22' column ='0'>YPHonoredSteppeRider</Tech>
<Flag>CollidesWithProjectiles</Flag>
<Flag>StartsAtFullEfficiency</Flag>
<Flag>Immoveable</Flag>
<Flag>NoBloodOnDeath</Flag>
<Flag>ObscuresUnits</Flag>
<Flag>NonAutoFormedUnit</Flag>
<Flag>Doppled</Flag>
<Flag>SelectWithObstruction</Flag>
<Flag>PaintTextureWhenPlacing</Flag>
<Flag>FlattenGround</Flag>
<Flag>HasGatherPoint</Flag>
<Flag>Tracked</Flag>
<Command page ='10' column ='0'>SetGatherPointMilitary</Command>
<Command page ='10' column ='3'>Delete</Command>
</Unit>

删除后的游戏截图跟没改过的亚洲王朝的效果是一样的,我就不放截图了。


另外我们可以反过来为单位添加科技按钮之类的,具体如下:

添加建造单位按钮 在protoy.xml查找到单位代码后添加以下语句
<Train row ='0' page ='X' column ='Y'>单位调用名</Train>
这个语句是添加单位训练按钮,建造单位或改良科技的位置(X值是第几行,X还有特殊的用途,在本教程的1-1有详细介绍,Y是X行的第几个),XXXX为单位的调用名 例如:让中国的少林大师生产堡垒,就在少林大师那按照格式添加 <Train row ='0' page ='6' column ='0'>FortFrontier</Train>即可。(因为中国本身就能建造堡垒,所以不需要在techtreey启用堡垒。)
  protoy.xml - 记事本 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)
	<Unit id ='918' name ='ypMonkChinese'>
<DBID>1345</DBID>
<DisplayNameID>60200</DisplayNameID>
<EditorNameID>60201</EditorNameID>
<ObstructionRadiusX>0.4900</ObstructionRadiusX>
<ObstructionRadiusZ>0.4900</ObstructionRadiusZ>
<FormationCategory>Mobile</FormationCategory>
<MaxVelocity>4.5000</MaxVelocity>
<MaxRunVelocity>6.5000</MaxRunVelocity>
<MovementType>land</MovementType>
<TurnRate>18.0000</TurnRate>
<AnimFile>units\asians\chinese\monk\monk.xml</AnimFile>
<ImpactType>Flesh</ImpactType>
<Icon>units\asians\chinese\shaolin_disciple\shaolin_master_icon_64</Icon>
<MinimapIcon>ui\minimap\hero</MinimapIcon>
<PortraitIcon>units\asians\chinese\shaolin_disciple\shaolin_master_icon_portrait</PortraitIcon>
<SelectionPriority>5</SelectionPriority>
<RolloverTextID>60199</RolloverTextID>
<ShortRolloverTextID>69907</ShortRolloverTextID>
<InitialHitpoints>450.0000</InitialHitpoints>
<MaxHitpoints>450.0000</MaxHitpoints>
<LOS>18.0000</LOS>
<ProjectileProtoUnit>ypShuriken</ProjectileProtoUnit>
<AutoAttackRange>16.0000</AutoAttackRange>
<UnitAIType>RangedCombative</UnitAIType>
<TrainPoints>30.0000</TrainPoints>
<BuildLimit>1</BuildLimit>
<Bounty>90.0000</Bounty>
<Cost resourcetype ='Gold'>300.0000</Cost>
<AllowedAge>0</AllowedAge>
<Armor type ='Ranged' value ='0.1000'></Armor>
<UnitType>LogicalTypeHealed</UnitType>
<UnitType>LogicalTypeNeededForVictory</UnitType>
<UnitType>LogicalTypeHandUnitsAutoAttack</UnitType>
<UnitType>LogicalTypeLandMilitary</UnitType>
<UnitType>LogicalTypeScout</UnitType>
<UnitType>LogicalTypeValidSPCUnitsDeadCondition</UnitType>
<UnitType>LogicalTypeGarrisonInShips</UnitType>
<UnitType>LogicalTypeRangedUnitsAutoAttack</UnitType>
<UnitType>LogicalTypeVillagersAttack</UnitType>
<UnitType>LogicalTypeHandUnitsAttack</UnitType>
<UnitType>LogicalTypeRangedUnitsAttack</UnitType>
<UnitType>LogicalTypeMinimapFilterMilitary</UnitType>
<UnitType>AbstractInfantry</UnitType>
<UnitType>Hero</UnitType>
<UnitType>Unit</UnitType>
<UnitType>Military</UnitType>
<UnitType>UnitClass</UnitType>
<UnitType>AbstractCavalryInfantry</UnitType>
<UnitType>HasBountyValue</UnitType>
<UnitType>ConvertsHerds</UnitType>
<UnitType>AbstractCanSeeStealth</UnitType>
<UnitType>AbstractHandInfantry</UnitType>
<UnitType>AbstractChineseMonk</UnitType>
<UnitType>AbstractMonk</UnitType>
<Train row ='0' page ='6' column ='0'>FortFrontier</Train>
<Tech row ='0' page ='11' column ='5'>ypMonkMakeDisciple</Tech>
<Train row ='0' page ='6' column ='1'>TradingPost</Train>
<Train row ='0' page ='6' column ='0'>TownCenter</Train>
<Train row ='0' page ='6' column ='3'>NatBlowgunAmbusher</Train>
<Train row ='0' page ='6' column ='2'>WarDog</Train>
<Train row ='0' page ='6' column ='4'>NatClubmanLoyal</Train>
<Train row ='0' page ='6' column ='2'>PetJaguar</Train>
<Train row ='0' page ='6' column ='0'>YPPetPanda</Train>
<Train row ='0' page ='6' column ='2'>ypMonkDisciple</Train>
<Flag>CollidesWithProjectiles</Flag>
<Flag>ApplyHandicapTraining</Flag>
<Flag>CorpseDecays</Flag>
<Flag>ShowGarrisonButton</Flag>
<Flag>DontRotateObstruction</Flag>
<Flag>ObscuredByUnits</Flag>
<Flag>HeroName2</Flag>
<Flag>RotateInPlace</Flag>
<Flag>ForceBuildingData</Flag>
<Flag>KnockoutDeath</Flag>
<Flag>NotDeleteable</Flag>
<Flag>CanAutoHeal</Flag>
<Flag>Tracked</Flag>
<Command page ='10' column ='0'>Garrison</Command>
<Command page ='10' column ='2'>Stop</Command>
<Command page ='11' column ='0'>Abilities</Command>
<Tactics>ypchinesemonk.tactics</Tactics>
<ProtoAction>
<Name>Build</Name>
<Rate type ='TradingPost'>3.000000</Rate>
<Rate type ='TownCenter'>1.000000</Rate>
</ProtoAction>
<ProtoAction>
<Name>BuildingAttack</Name>
<Damage>15.000000</Damage>
<DamageType>Siege</DamageType>
<ROF>3.000000</ROF>
<DamageBonus type ='Building'>1.000000</DamageBonus>
</ProtoAction>
<ProtoAction>
<Name>CoverBuildingAttack</Name>
<Damage>8.000000</Damage>
<DamageType>Siege</DamageType>
<ROF>3.000000</ROF>
<DamageBonus type ='Building'>1.000000</DamageBonus>
</ProtoAction>
<ProtoAction>
<Name>CoverHandAttack</Name>
<Damage>4.000000</Damage>
<DamageType>Hand</DamageType>
<ROF>1.500000</ROF>
<DamageBonus type ='Guardian'>3.000000</DamageBonus>
<DamageBonus type ='AbstractVillager'>0.250000</DamageBonus>
<DamageBonus type ='Hero'>0.750000</DamageBonus>
</ProtoAction>
<ProtoAction>
<Name>HandAttack</Name>
<Damage>7.000000</Damage>
<DamageType>Hand</DamageType>
<ROF>1.500000</ROF>
<DamageBonus type ='Guardian'>3.000000</DamageBonus>
<HitPercent>20.000000</HitPercent>
<DamageMultiplier>2.000000</DamageMultiplier>
<HitPercentType>CriticalAttack</HitPercentType>
<DamageBonus type ='AbstractVillager'>0.250000</DamageBonus>
<DamageBonus type ='Hero'>0.750000</DamageBonus>
</ProtoAction>
<ProtoAction>
<Name>Heal</Name>
<Type>Heal</Type>
<Rate type ='LogicalTypeHealed'>6.000000</Rate>
</ProtoAction>
<ProtoAction>
<Name>RoundhouseAttack</Name>
<Damage>170.000000</Damage>
<DamageType>Hand</DamageType>
<ROF>2.000000</ROF>
<DamageCap>200.000000</DamageCap>
<DamageBonus type ='AbstractVillager'>0.250000</DamageBonus>
<DamageArea>3.000000</DamageArea>
<DamageFlags>GAIAEnemy</DamageFlags>
<DamageBonus type ='MercType2'>0.250000</DamageBonus>
</ProtoAction>
<ProtoAction>
<Name>Stun</Name>
<Damage>30.000000</Damage>
<DamageType>Ranged</DamageType>
<MinRange>0.000000</MinRange>
<MaxRange>16.000000</MaxRange>
<ROF>3.000000</ROF>
</ProtoAction>
<ProtoAction>
<Name>Stun2</Name>
<Damage>30.000000</Damage>
<DamageType>Hand</DamageType>
<MinRange>4.000000</MinRange>
<MaxRange>6.000000</MaxRange>
<ROF>3.000000</ROF>
</ProtoAction>
</Unit>







其他(与本教程无关,重复一下1-1的内容): 添加建造单位按钮
<Train row ='0' page ='X' column ='Y'>单位调用名</Train>
添加科技按钮
<Tech row ='0' page ='X' column?='Y'>科技调用名</Tech>
注意:若X相同而且Y大于6的话,有空位会自动填充,每行最多6个,多于6格会自动占据下一行,若导致最后一行按钮被屏蔽,那行按钮将会永远消失。 如果原本修改的单位不具备建造建筑能力,则只能生产单位而不能生产建筑。例如火绳枪手是不能建造建筑的,如果想要建造建筑,看第八章的内容。