Governor Promotion Trees (UNRESOLVED BUT ASKED IN ANOTHER POST)

SocialMechanic

Chieftain
Joined
May 11, 2019
Messages
97
EDIT:This part not yet resolved
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>

THE FOLLOWING IS RESOLVED:
I'm trying to change the order to Victors promotions are placed
Code:
    <GovernorPromotions>
        <Update>
            <Where ModifierId="GOVERNOR_PROMOTION_EMBRASURE"/>
            <Set Column="2"/>
        </Update>
        <Update>
            <Where ModifierId="GOVERNOR_PROMOTION_AIR_DEFENSE_INITIATIVE"/>
            <Set Level="2"/>
        </Update>
        <Update>
            <Where ModifierId="GOVERNOR_PROMOTION_EDUCATOR_ARMS_RACE_PROPONENT"/>
            <Set Column="1"/>
        </Update>
    </GovernorPromotions>
    <GovernorPromotionPrereqs>
        <Delete GovernorPromotionType="GOVERNOR_PROMOTION_EMBRASURE"/>
        <Row GovernorPromotionType="GOVERNOR_PROMOTION_EMBRASURE" PrereqGovernorPromotion="GOVERNOR_PROMOTION_DEFENSE_LOGISTICS"/>
        <Update>
            <Where GovernorPromotionType="GOVERNOR_PROMOTION_AIR_DEFENSE_INITIATIVE"/>
            <Set PrereqGovernorPromotion="GOVERNOR_PROMOTION_GARRISON_COMMANDER"/>
        </Update>
        <Row GovernorPromotionType="GOVERNOR_PROMOTION_EDUCATOR_ARMS_RACE_PROPONENT" PrereqGovernorPromotion="GOVERNOR_PROMOTION_AIR_DEFENSE_INITIATIVE"/>
    </GovernorPromotionPrereqs>
Now, functionally speaking, these prerequisites are working as intended, but visually, they are not. I thought that changing their column and level would do it, but it isn't.
So, even though the Air Defense promotion sits at the bottom of the tree, I can grab it even when I only have Garrison, and without Embrasure. This is as intended, but the Air Defense promotion should sit one level up in column "0" (which it is in by default).
Is there something else that needs to be done to change the visuals for governor promotions?
 
Last edited:
could be because gathering storm changes the layout of the promotion tree. does your mod have a loadorder specified? If not, go to the .modinfo file and add:

Code:
<Properties>
            <LoadOrder>1</LoadOrder>
        </Properties>

into the <UpdateDatabase> element.

Gathering Storm has a loadorder of 0, and setting loadorder in your mod to a higher number will make sure the mod loads after GS, thus preventing GS from altering the layout.
 
Is air defense the only one that doesn't move?
None of them move.
Also, I mine as well post the additional problem here. I'll also post it in the main post.
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>
 
Ok so I see now, the first problem is caused by using ModifierId where you should be using GovernorPromotionType, so just change that.

The second thing you are trying to do I don't believe is possible.
OH DUH!!! Jesus, most of the time its just simple horsehocky I don't catch xD

Oh nuu! T~T Really? That sucks >.<

EDIT:
Yes, that fixed the promotion tree problem.
I thought I figured out the other problem too, but I was wrong.
I have it as if the unit has to be BOTH a melee unit AND anti-cav, which is impossible. I split them into two seperate modifiers, but yeah, it still didn't work >.<
 
Last edited:
Top Bottom