收起左侧

关于难民卡召集村民的数量

[复制链接]
juseser发表于 2021-11-9 11:28:23
用的是亚洲王朝版本,所以修改了techtreey文件中的属性,但游戏中没有效果,仍然只能召集一个村民
こはね发表于 2021-11-9 13:16:48
这个要去提取村庄的tactics文件,然后修改里面的数量。.......一般来说是提取tactics文件没错,但是我刚才查了一下是旗军

<!--村庄的tactics文件-->
<!-- converted from XMB to XML -->

<tactics>
<action>
<name stringid="38133">RangedAttack</name>
<type>Attack</type>
<attackaction>1</attackaction>
<rangedlogic>1</rangedlogic>
<activeifcontainsunits>1</activeifcontainsunits>
<damagefactorcap>10</damagefactorcap>
<scalebycontainedunits>1</scalebycontainedunits>
<anim>RangedAttack</anim>
<maxheight>0</maxheight>
<accuracy>1.0</accuracy>
<aimbonus>0</aimbonus>
<maxspread>5</maxspread>
<spreadfactor>0.25</spreadfactor>
<trackrating>12</trackrating>
<unintentionaldamagemultiplier>0.7</unintentionaldamagemultiplier>
<projectile>InvisibleProjectile</projectile>
<impacteffect>effects\impacts\gun</impacteffect>
<rate type="Unit">1.0 </rate>
<instantballistics>1</instantballistics>
<active>0</active>
</action>
<action>
<name stringid="38121">AntiShipAttack</name>
<type>Attack</type>
<attackaction>1</attackaction>
<rangedlogic>1</rangedlogic>
<anim>RangedAttackShip</anim>
<maxheight>0</maxheight>
<accuracy>1.0</accuracy>
<aimbonus>0</aimbonus>
<maxspread>5</maxspread>
<spreadfactor>0.25</spreadfactor>
<trackrating>12</trackrating>
<unintentionaldamagemultiplier>0.7</unintentionaldamagemultiplier>
<projectile>Cannonball</projectile>
<impacteffect>effects\impacts\cannon</impacteffect>
<perfectaccuracy>1</perfectaccuracy>
<rate type="Ship">1.0 </rate>
<active>0</active>
</action>
<action>
<name stringid="68972">SpawnSaiga</name>
<type>Maintain</type>
<rate type="ypSaiga">4</rate>
<active>1</active>
<persistent>0</persistent>
<singleuse>1</singleuse>
</action>
<action>
<name stringid="68971">SpawnRefugees1</name>
<type>Maintain</type>
<rate type="ypMigrantArmySmall">1</rate>
<active>1</active>
<persistent>0</persistent>
<singleuse>1</singleuse>
</action>
<action>
<name stringid="68971">SpawnRefugees2</name>
<type>Maintain</type>
<rate type="ypMigrantArmySmall">1</rate>
<active>1</active>
<persistent>0</persistent>
<singleuse>1</singleuse>
</action>
<action>
<name stringid="68973">SpawnLivestock1</name>
<type>Maintain</type>
<rate type="ypMigrantGoats">1</rate>
<active>1</active>
<persistent>0</persistent>
<singleuse>1</singleuse>
</action>
<action>
<name stringid="68973">SpawnLivestock2</name>
<type>Maintain</type>
<rate type="ypMigrantOx">1</rate>
<active>1</active>
<persistent>0</persistent>
<singleuse>1</singleuse>
</action>
<action>
<name stringid="68973">SpawnLivestock3</name>
<type>Maintain</type>
<rate type="ypMigrantGoats">1</rate>
<active>1</active>
<persistent>0</persistent>
<singleuse>1</singleuse>
</action>
<action>
<name stringid="68971">SpawnMigrants3</name>
<type>Maintain</type>
<rate type="ypMigrantArmyLarge">1</rate>
<active>1</active>
<persistent>0</persistent>
<singleuse>1</singleuse>
</action>
<tactic>
Normal
<attacktype>LogicalTypeRangedUnitsAttack</attacktype>
<autoattacktype>LogicalTypeRangedUnitsAutoAttack</autoattacktype>
<attackresponsetype>LogicalTypeRangedUnitsAttack</attackresponsetype>
<action priority="100">AntiShipAttack</action>
<action priority="75">RangedAttack</action>
<action priority="15">SpawnSaiga</action>
<action priority="15">SpawnRefugees1</action>
<action priority="15">SpawnRefugees2</action>
<action priority="15">SpawnMigrants3</action>
<action priority="15">SpawnLivestock1</action>
<action priority="15">SpawnLivestock2</action>
<action priority="15">SpawnLivestock3</action>
</tactic>
</tactics>


既然是旗军的设定,那么就去提取civs.xml文件,然后查找ypMigrantArmySmall(时代1难民卡激活tactics战术所生产的单位)为什么要查找ypMigrantArmySmall?如果你在techtreey找过难民卡这个卡片,一定会见过SpawnRefugees1、SpawnRefugees2、SpawnRefugees3的其中一个,分别是时代1、时代3、时代4的难民卡激活的战术,然后在tactics查找SpawnRefugees1你会找到<rate type="ypMigrantArmySmall">1</rate>,这个就是战术所生产的单位了,最后转到civs查找这个单位

你在civs查找ypMigrantArmySmall的时候,会找个4个设定,中国的城镇中心与村庄各一个,战役中国的城镇中心与村庄各一个
全部修改掉就行
例如下面这样修改,城镇中心生产10个中国村民,村庄生产一个中国村民+一个欧洲村民

<multipleblocktrain>
<building>ypVillage</building>
<multipleblockunit>ypMigrantArmySmall</multipleblockunit>
<units>
<unit>ypSettlerAsian</unit>
</units>
<unitcounts>
<count>10</count>
</unitcounts>
</multipleblocktrain>
<multipleblocktrain>
<building>TownCenter</building>
<multipleblockunit>ypMigrantArmySmall</multipleblockunit>
<units>
<unit>ypSettlerAsian</unit>
<unit>Settler</unit>
</units>
<unitcounts>
<count>1</count>
<count>1</count>
</unitcounts>
</multipleblocktrain>

79098618a03ec7a33f.png
juseser发表于 2021-11-9 18:23:41

np大佬,这个没道理的比其他单位修改复杂好多还有就是亚洲王朝原版是没有SpawnRefugees3,时代四的是YPHCSpawnMigrants1
こはね发表于 2021-11-9 22:04:31
juseser 发表于 2021-11-9 18:23
np大佬,这个没道理的比其他单位修改复杂好多还有就是亚洲王朝原版是没有SpawnRefugees3,时代四 ...

这样啊,其实我没有提取过文件,也没看过techtreey,全是靠猜,除了civs语句其他都是从圣典复制过来的
跳转到