• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

teh1337st

Recruit
Oct 9, 2014
3
0
I'm trying to modify the effect of the messenger unit's action: entreaty by removing adding population and upping the wealth reward.

I deleted the origional entreaty card, appended to unitactions, and then copy the pasted the same card from the example XMLs, and removed/edited some parts. This is the same method I used for editing techs and national spirits, but not working for unitactions for some reason.

Can someone check my code? Thanks!

XML:
<ADeck>
   <ReshuffleWhenEmpty>false</ReshuffleWhenEmpty>
   <MaintainOrderWhenShuffled>true</MaintainOrderWhenShuffled>
   <DeckName>TOH_UNITACTIONS</DeckName>
   <AppendToDeck>UNITACTIONS</AppendToDeck>
  
   <Definition>
  
       <ACard>
         <ID>UNITACTIONS-MESSENGER_ENTREATY_DELETION</ID>
         <ExecutionType>CX_All</ExecutionType>
         <Choices>
            <ACardChoice>
               <Effects>
               </Effects>
            </ACardChoice>
         </Choices>
         <CardTags>
            <Tags>
               <Tag>RemoveCard:UNITACTIONS-MESSENGER_ENTREATY</Tag>           
            </Tags>
         </CardTags>
      </ACard>   
  
      <ACard>
         <ID>UNITACTIONS-MESSENGER_ENTREATY</ID>
         <ExecutionType>CX_All</ExecutionType>
         <CardSpriteName>UI/Icons/Unit Actions/deployMinorNation</CardSpriteName>
         <Choices>
            <ACardChoice>
               <Requirements>
                  <ACardRequirement>
                     <ReqType>CR_EntityTagCount</ReqType>
                     <Req>ALLPLAYERS-NeutralTown,GTE,1</Req>
                     <Target>LOC,TILERADIUS,1</Target>
                     <AddToEntityBuffer>true</AddToEntityBuffer>
                  </ACardRequirement>
                  <ACardRequirement>
                     <ReqType>CR_GameData</ReqType>
                     <Req>MovedThisTurn,BOOL_FALSE,0</Req>
                     <UseBooleanFormat>true</UseBooleanFormat>
                     <UsePlainFormat>true</UsePlainFormat>
                  </ACardRequirement>
               </Requirements>
               <Effects>
                  <!-- Consume the Messenger -->
                  <ACardEffect>
                     <EffectType>CE_DestroyEntity</EffectType>
                     <Target>ENT,EXEC</Target>
                     <SuppressTriggers>true</SuppressTriggers>
                  </ACardEffect>

                  <!-- Convert the Minor into an Outpost -->
                  <ACardEffect>
                     <EffectType>CE_DestroyEntity</EffectType>
                     <Target>ENT,FINDTAGLOCRAD,ALLPLAYERS-+NeutralConversionTarget,EXECLOC,1</Target>
                  </ACardEffect>
                  <ACardEffect>
                     <EffectType>CE_SpawnEntity</EffectType>
                     <Payload>OUTPOST,B_TILEIMP_OUTPOST</Payload>
                     <Target>LOC,REQTARGETLOC</Target>
                  </ACardEffect>

                  <!-- Recruit the Population -->
                  <ACardEffect>
                     <EffectType>CE_AdjustGameData</EffectType>
                     <Payload>ResCoin,ADD,500</Payload>
                     <Target>PLAYER</Target>
                  </ACardEffect>

                  <ACardEffect>
                     <EffectType>CE_AdjustGameData</EffectType>
                     <Payload>PeacefulAnnexation,ADD,1</Payload>
                     <Target>PLAYER</Target>
                     <HiddenInTooltip>true</HiddenInTooltip>
                  </ACardEffect>

                  <ACardEffect>
                     <EffectType>CE_PlayFX</EffectType>
                     <Payload>FX/FX_EstablishEnvoy</Payload>
                     <Target>LOC,REQTARGETLOC</Target>
                     <HiddenInTooltip>true</HiddenInTooltip>
                  </ACardEffect>
                  <ACardEffect>
                     <EffectType>CE_PlaySound</EffectType>
                     <Payload>UnitActionSettleCity</Payload>
                  </ACardEffect>
               </Effects>
            </ACardChoice>
         </Choices>
         <CardTags>
            <Tags>
               <Tag>ValidAction-BT_Messenger</Tag>
               <Tag>AIUseUnitAction</Tag>
            </Tags>
         </CardTags>
      </ACard>
      
   </Definition>
</ADeck>
 
The action icon just doesn't show up. I got it working though by not appending to unitactions, and just created a new deck all together. Same exact code, not sure what went wrong.
Hmmm, then at least the deleting part was working, just not the re-adding.

I've definitely also had times when my mod code wasn't working, so I just restarted doing the same thing, and then it worked.