收起左侧

[求助] 请问如何实现给亚洲稻田添加可以采集木头的选项

[复制链接]
静中先生发表于 2021-8-19 20:38:38
自己试了在protoy里仿照coin和food的语句加了一下wood,没卵用
こはね发表于 2021-8-20 12:52:40
  • 静中先生 : 谢谢大佬,顺便问一句,我不知道改了什么,protoy,导致进游戏ailoaderstander xs无法编译(protoy的原因不是ai3的原因,我找出来了),换成原来的protoy就可以了,是不是某些参数不能改啊?
  • 静中先生 : 我通过软件文本比对,也没发现多一个空格少一个标点符号的问题,只是单位的属性参数变换了而已
  • こはね 回复 静中先生 : 看下是不是tactics出错了
  • 静中先生 回复 こはね : 是的,刚刚又找了一遍,改好了,谢谢
静中先生发表于 2021-8-20 23:12:27
<?xml version="1.0" encoding="utf-8"?>

<tactics>
<action>
<name stringid="43294">ModifyGatherCoin</name>
<type>ModifyGather</type>
<active>1</active>
<persistent>1</persistent>
</action>
<action>
<name stringid="43295">ModifyGatherFood</name>
<type>ModifyGather</type>
<active>1</active>
<persistent>1</persistent>
</action>
<action>
<name stringid="43296">ModifyGatherWood</name>
<type>ModifyGather</type>
<active>1</active>
<persistent>1</persistent>
</action>
<tactic>
PaddyFood
<action>ModifyGatherFood</action>
<transition>
<tactic>PaddyCoin</tactic>
<length>2</length>
<exit>1</exit>
</transition>
</tactic>
<tactic>
PaddyCoin
<action>ModifyGatherCoin</action>
<transition>
<tactic>PaddyFood</tactic>
<length>2</length>
<exit>1</exit>
</transition>
</tactic>
<tactic>
PaddyWood
<name>RicePaddyWood</name>
<icon>art\ui\command\tactic_rice_paddy_food_off</icon>
<activeicon>art\ui\command\tactic_rice_paddy_wood_on</activeicon>
<disabledicon>art\ui\command\tactic_rice_paddy_wood_off</disabledicon>
<rollovertextid>66055</rollovertextid>
<activerollovertextid>66056</activerollovertextid>
<command>unitSetTactic("PaddyWood")</command>
<tactic>PaddyFood</tactic>
<length>2</length>
<exit>1</exit>
</tactic>
</tactics>
我理解是这个意思吗,没反应
こはね发表于 2021-8-21 00:34:35
静中先生 发表于 2021-8-20 23:12
ModifyGatherCoin
ModifyGather
1

明天晚上给你整个具体的

不过被遗弃的按钮仅仅只有三个,用完就没了

  • 静中先生 : 好的,谢谢大佬
こはね发表于 2021-8-21 21:47:54
例如使用已经废弃掉的SquadUnlock按钮

protoy.xml找到稻田,新增内容已用红色字体标出
<Unit id ='919' name ='ypRicePaddy'>
<DBID>1346</DBID>
<DisplayNameID>60204</DisplayNameID>
<ObstructionRadiusX>2.0000</ObstructionRadiusX>
<ObstructionRadiusZ>2.0000</ObstructionRadiusZ>
<MaxVelocity>0.0000</MaxVelocity>
<MovementType>land</MovementType>
<AnimFile>buildings\asian_civs\rice_paddy\rice_paddy.xml</AnimFile>
<DeadReplacement>BuildingRubble3x3</DeadReplacement>
<DeadReplacementLifespan>15</DeadReplacementLifespan>
<ImpactType>Wood</ImpactType>
<PhysicsInfo>mill</PhysicsInfo>
<PlacementFile>mill.xml</PlacementFile>
<Icon>buildings\asian_civs\rice_paddy\china\china_rice_paddy_icon</Icon>
<PortraitIcon>buildings\asian_civs\rice_paddy\china\china_rice_paddy_icon_portrait</PortraitIcon>
<RolloverTextID>60203</RolloverTextID>
<ShortRolloverTextID>60202</ShortRolloverTextID>
<InitialHitpoints>2500.0000</InitialHitpoints>
<MaxHitpoints>2500.0000</MaxHitpoints>
<LOS>12.0000</LOS>
<BuildPoints>20.0000</BuildPoints>
<Bounty>160.0000</Bounty>
<BuildBounty>80.0000</BuildBounty>
<Cost resourcetype ='Wood'>400.0000</Cost>
<CarryCapacity resourcetype ='Food'>100.0000</CarryCapacity>
<CarryCapacity resourcetype ='Gold'>100.0000</CarryCapacity>
<InitialResource resourcetype ='Food'>999.0000</InitialResource>
<InitialResource resourcetype ='Gold'>0.0000</InitialResource>
<ResourceSubType>grain</ResourceSubType>
<BuildingWorkRate>1.0000</BuildingWorkRate>
<AllowedAge>0</AllowedAge>
<Armor type ='Siege' value ='0.0000'></Armor>
<GathererLimit>10</GathererLimit>
<BuilderLimit>10</BuilderLimit>
<UnitType>LogicalTypeValidSabotage</UnitType>
<UnitType>LogicalTypeMinimapFilterEconomic</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>ConvertsHerds</UnitType>
<UnitType>HasBountyValue</UnitType>
<UnitType>CountsTowardEconomicScore</UnitType>
<UnitType>Resource</UnitType>
<UnitType>Building</UnitType>
<UnitType>AbstractFarm</UnitType>
<UnitType>ColonyBuilding</UnitType>
<UnitType>Food</UnitType>
<UnitType>BuildingClass</UnitType>
<UnitType>Economic</UnitType>
<Tech row ='0' page ='1' column ='0'>ypWaterConservancy</Tech>
<Tech row ='0' page ='1' column ='0'>ypIrrigationSystems</Tech>
<Tech row ='0' page ='1' column ='0'>ypImpLargeScaleAgricultureAsian</Tech>
<Tech row ='0' page ='1' column ='1'>ypLandRedistribution</Tech>
<Tech row ='0' page ='1' column ='0'>ypCultivateWasteland</Tech>
<Tech row ='0' page ='1' column ='1'>ypSharecropping</Tech>
<Tech row ='0' page ='1' column ='1'>ypCooperative</Tech>
<Tech row ='0' page ='1' column ='1'>ypImpExcessiveTributeAsian</Tech>
<Tech row ='1' page ='1' column ='0'>SeedDrill</Tech>
<Tech row ='1' page ='1' column ='0'>ArtificialFertilizer</Tech>
<Tech row ='0' page ='1' column ='1'>ypCropMarket</Tech>
<Flag>EnterHotkeyContext</Flag>
<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>UnlimitedSupply</Flag>
<Flag>ColonyBuilding</Flag>
<Flag>Tracked</Flag>
<Flag>ShowTactics</Flag><!--理论上不添加也行,稻田本身能显示按钮,但其他没有按钮的建筑需要添加ShowTactics这个flag-->
<Command page ='10' column ='1'>Delete</Command>
<Command page ='9' column ='1'>RicePaddyCoin</Command>
<Command page ='9' column ='0'>RicePaddyFood</Command>
<Command page ='9' column ='2'>SquadUnlock</Command><!--显示按钮SquadUnlock-->
<Tactics>ricepaddy.tactics</Tactics>
<ProtoAction>
<Name>ModifyGatherCoin</Name>
<Rate type ='Gold'>1.000000</Rate>
</ProtoAction>
<ProtoAction>
<Name>ModifyGatherFood</Name>
<Rate type ='Food'>1.000000</Rate>
</ProtoAction>
</Unit>

35885612102e4aecd4.png

然后找到你要修改的村民,有n个村民全部都添加一遍吧
在Gather添加采集效率
<ProtoAction>
<Name>Gather</Name>
<Rate type ='Tree'>0.500000</Rate>
<Rate type ='Farm'>0.500000</Rate>
<Rate type ='Plantation'>0.500000</Rate>
<Rate type ='Herdable'>2.000000</Rate>
<Rate type ='Huntable'>0.840000</Rate>
<Rate type ='AbstractMine'>0.600000</Rate>
<Rate type ='BerryBush'>0.670000</Rate>
<Rate type ='FirePit'>0.100000</Rate>
<Rate type ='Mill'>0.670000</Rate>
<Rate type ='ypRicePaddy' resource ='Food'>0.500000</Rate>
<Rate type ='ypRicePaddy' resource ='Wood'>0.500000</Rate>
<Rate type ='ypRicePaddy' resource ='Gold'>0.340000</Rate>
<Rate type ='ypBerryBuilding'>0.670000</Rate>
<Rate type ='ypGroveBuilding'>0.500000</Rate>
</ProtoAction>

9823661210374e93bb.png

提取稻田的tactics,新增内容已用红色字体标出
<?xml version="1.0" encoding="utf-8"?>

<tactics>
<action>
<name stringid="43294">ModifyGatherCoin</name>
<type>ModifyGather</type>
<active>1</active>
<persistent>1</persistent>
</action>
<action>
<name stringid="43295">ModifyGatherFood</name>
<type>ModifyGather</type>
<active>1</active>
<persistent>1</persistent>
</action>
<action>
<name>ModifyGatherWood</name>
<type>ModifyGather</type>
<Rate type ='Wood'>1.000000</Rate>
<active>1</active>
<persistent>1</persistent>
</action>
<tactic>
PaddyFood
<action>ModifyGatherFood</action>
<transition>
<tactic>PaddyCoin</tactic>
<length>2</length>
<exit>1</exit>
</transition>
<transition>
<tactic>PaddyWood</tactic>
<length>2</length>
<exit>1</exit>
</transition>
</tactic>
<tactic>
PaddyCoin
<action>ModifyGatherCoin</action>
<transition>
<tactic>PaddyFood</tactic>
<length>2</length>
<exit>1</exit>
</transition>
<transition>
<tactic>PaddyWood</tactic>
<length>2</length>
<exit>1</exit>
</transition>
</tactic>
<tactic>
PaddyWood
<action>ModifyGatherWood</action>
<transition>
<tactic>PaddyFood</tactic>
<length>2</length>
<exit>1</exit>
</transition>
<transition>
<tactic>PaddyCoin</tactic>
<length>2</length>
<exit>1</exit>
</transition>
</tactic>
</tactics>

86467612102602633d.png
6615961210292600b3.png

protounitcommands.xml找到SquadUnlock,然后将SquadUnlock的command修改掉,图标什么的自己修改
<protounitcommand>
<name>SquadUnlock</name>
<icon>art\ui\command\formation_unlocked</icon>
<activeicon>art\ui\command\formation_unlocked_on</activeicon>
<disabledicon>art\ui\command\formation_unlocked_off</disabledicon>
<rollovertextid>30152</rollovertextid>
<disabledrollovertextid/>
<command>unitSetTactic("PaddyWood")</command><!--对应tactics-->
</protounitcommand>
6196561210209d0c44.png
  • 静中先生 : 感谢大佬指导
跳转到