1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Governor Promotion

Discussion in 'Mod Creation Help' started by SocialMechanic, Nov 16, 2019.

  1. SocialMechanic

    SocialMechanic Chieftain

    Joined:
    May 11, 2019
    Messages:
    86
    I'm trying to make Air Defense give +5 combat strength to all melee and anti-cav units within 9 tiles of the governor.
    This is the code I'm using but it is also not working
    Code:
        <GovernorPromotionModifiers>
            <Delete GovernorPromotionType="GOVERNOR_PROMOTION_AIR_DEFENSE_INITIATIVE"/>
           <Row GovernorPromotionType="GOVERNOR_PROMOTION_AIR_DEFENSE_INITIATIVE" ModifierId="SM_AIR_DEFENSE_STRENGTH_BONUS"/>
        </GovernorPromotionModifiers>
        <Modifiers>
          <Row ModifierId="SM_AIR_DEFENSE_STRENGTH_BONUS" ModifierType="MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH" SubjectRequirementSetId="SM_MELEE_BONUS_REQUIREMENTS"/>
        </Modifiers>
        <ModifierArguments>
            <Row ModifierId="SM_AIR_DEFENSE_STRENGTH_BONUS" Name="Amount" Value="5"/>
        </ModifierArguments>
        <RequirementSets>
            <Row RequirementSetId="SM_MELEE_BONUS_REQUIREMENTS" RequirementSetType="REQUIREMENTSET_TEST_ALL"/>
        </RequirementSets>
        <RequirementSetRequirements>
            <Row RequirementSetId="SM_MELEE_BONUS_REQUIREMENTS" RequirementId="SM_9_TILES_AWAY_REQUIREMENTSID"/>
            <Row RequirementSetId="SM_MELEE_BONUS_REQUIREMENTS" RequirementId="SM_MELEE_BONUS_REQUIREMENTID"/>
            <Row RequirementSetId="SM_MELEE_BONUS_REQUIREMENTS" RequirementId="SM_ANTICAV_BONUS_REQUIREMENTID"/>
        </RequirementSetRequirements>
        <Requirements>
            <Row RequirementId="SM_9_TILES_AWAY_REQUIREMENTSID" RequirementType="REQUIREMENT_PLOT_ADJACENT_TO_OWNER"/>
            <Row RequirementId="SM_MELEE_BONUS_REQUIREMENTID" RequirementType="REQUIREMENT_UNIT_PROMOTION_CLASS_MATCHES"/>
            <Row RequirementId="SM_ANTICAV_BONUS_REQUIREMENTID" RequirementType="REQUIREMENT_UNIT_PROMOTION_CLASS_MATCHES"/>
        </Requirements>
        <RequirementArguments>
            <Row RequirementId="SM_9_TILES_AWAY_REQUIREMENTSID" Name="MinDistance" Value="0"/>
            <Row RequirementId="SM_9_TILES_AWAY_REQUIREMENTSID" Name="MaxDistance" Value="9"/>
            <Row RequirementId="SM_MELEE_BONUS_REQUIREMENTID" Name="UnitPromotionClass" Value="PROMOTION_CLASS_MELEE"/>
          <Row RequirementId="SM_ANTICAV_BONUS_REQUIREMENTID" Name="UnitPromotionClass" Value="PROMOTION_CLASS_ANTI_CAVALRY"/>
        </RequirementArguments>
    I was told this is impossible but I wanted to confirm.
     
  2. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,603
    Location:
    Illinois, USA
    Don't know if the effect you are after is impossible or not, but it is impossible for a unit to be both "PROMOTION_CLASS_MELEE" and "PROMOTION_CLASS_ANTI_CAVALRY". You're using "REQUIREMENTSET_TEST_ALL" which means all the conditions of all the requirements must be met.
     
  3. SocialMechanic

    SocialMechanic Chieftain

    Joined:
    May 11, 2019
    Messages:
    86
    Yeah, I fixed that and made it two separate set requirements but it still doesn't work >.<
     

Share This Page