craby 发表于 2026-10-13 14:23:51

求助,决定版新的征召按钮添加不了

本帖最后由 craby 于 2026-10-13 15:22 编辑

想做出美国发后备民兵募集这张卡后,西班牙移民招的长矛兵数量也增加到16个的效果,参考原卡片实现的方法,做了一个新按钮并链接科技和TC,触发后原巡逻队按钮消失但是新按钮并未出现,求各位dalao帮忙看下是哪里出了问题
按钮:
<protounitcommandmods>
<protounitcommand>
    <name>deImmigrantsSpanishLevy</name>
    <associatedpower>deUSLevyMinutemen</associatedpower>
</protounitcommand>

<protounitcommand>
    <name>deImmigrantsSpanishConscription</name>
    <icon>resources\images\icons\techs\americans\levy_pikemen.png</icon>
    <spawncommand>
    </spawncommand>
    <unittype>ypConsulateTercio</unittype>
    <amount>16</amount>
    <associatedtech>deImmigrantsSpanishConscription</associatedtech>
    <associatedpower>deUSLevyMinutemen</associatedpower>
    <sharedcooldownpower>deImmigrantsChineseLevy</sharedcooldownpower>
    <forbidtech>DEUSLevy</forbidtech>
    <forbidtech>DEUSConscription</forbidtech>
    <forbidtech>DEImmigrantsChineseTradingPostLevy</forbidtech>
    <rollovertextid>110167</rollovertextid>
    <disabledrollovertextid>110170</disabledrollovertextid>
    <usemultiple>
    </usemultiple>
    <donotallowoverpoplimit>
    </donotallowoverpoplimit>
</protounitcommand>

</protounitcommandmods>

techtreemods新增了按钮对应科技和解锁科技:
<tech name="deImmigrantsSpanishConscription" type="Normal">
    <dbid>20015</dbid>
    <displaynameid>110168</displaynameid>
    <cost resourcetype="Food">400.0000</cost>
    <cost resourcetype="Gold">400.0000</cost>
    <researchpoints>5.0000</researchpoints>
    <status>UNOBTAINABLE</status>
    <flag>Shadow</flag>
    <icon>resources\art\units\asians\consulate\spanish_expeditionary_company.png</icon>
    <rollovertextid>110167</rollovertextid>
    <effects>
      <effect all="true" type="TextOutput">110169</effect>
    </effects>
</tech>

<tech name="DEHCMinutemenCompaniesShadow" type="Normal">
    <dbid>20016</dbid>
    <researchpoints>0.0000</researchpoints>
    <status>OBTAINABLE</status>
    <flag>Shadow</flag>
    <prereqs>
      <techstatus status="Active">DEImmigrantsSpanishLevyShadow</techstatus>
      <techstatus status="Active">DEHCMinutemenCompanies</techstatus>
    </prereqs>
<effects>
      <effect type="TechStatus" status="unobtainable">DEImmigrantsSpanishLevy</effect>
      <effect type="TechStatus" status="active">deImmigrantsSpanishConscription</effect>
    </effects>
</tech>

protomods对TC的修改,在原deImmigrantsSpanishLevy下新增了命令:
    <command page="0" column="4">deImmigrantsSpanishLevy</command>
    <command page="0" column="4">deImmigrantsSpanishConscription</command>

こはね 发表于 2026-10-13 22:12:52

不太了解决定版,近期没空,刚发现电脑的5080 N卡炸了、被断电3个月,想办法修复中{:7_265:}

craby 发表于 2026-10-14 15:52:52

破案了,需要通过commandadd的方式添加,而不是在protoy里修改对应建筑
页: [1]
查看完整版本: 求助,决定版新的征召按钮添加不了