I wanted to give 30 combat strength to all Dutch anti cavalry units. Why doesn't it work?

Narvana

Chieftain
Joined
Nov 20, 2016
Messages
62
HTML:
Expansion1_Leaders_Major.xml:

    <Types>
        <Row Type="TRAIT_RADIO_ORANJE" Kind="KIND_TRAIT"/>
    </Types>
    <LeaderTraits>
        <Row LeaderType="LEADER_WILHELMINA" TraitType="TRAIT_RADIO_ORANJE"/>
    </LeaderTraits>
    <TraitModifiers>
        <Row TraitType="TRAIT_RADIO_ORANJE" ModifierId="TRAIT_SPEARMEN_BONUS"/>
    </TraitModifiers>
    
Expansion1_Leaders.xml
    
    <Modifiers>
        <Row>
            <ModifierId>TRAIT_SPEARMEN_BONUS</ModifierId>
            <ModifierType>MODIFIER_PLAYER_UNITS_GRANT_ABILITY</ModifierType>
        </Row>
    </Modifiers>
    <ModifierArguments>
        <Row>
            <ModifierId>TRAIT_SPEARMEN_BONUS</ModifierId>
            <Name>AbilityType</Name>
            <Value>ABILITY_BANG</Value>
        </Row>
    </ModifierArguments>
    
Expansion1_UnitAbilities.xml

    <Types>
        <Row Type="ABILITY_BANG" Kind="KIND_ABILITY"/>
    </Types>
    <TypeTags>
        <Row Type="ABILITY_BANG" Tag="CLASS_ANTI_CAVALRY"/>
    </TypeTags>
    <UnitAbilities>
        <Row UnitAbilityType="ABILITY_BANG" Name="LOC_ABILITY_ALPINE_TRAINING_NAME" Description="LOC_ABILITY_ALPINE_TRAINING__DESCRIPTION" Inactive="true"/>
    </UnitAbilities>
    <UnitAbilityModifiers>
        <Row>
            <UnitAbilityType>ABILITY_BANG</UnitAbilityType>
            <ModifierId>SPEAR_BONUS</ModifierId>
        </Row>
    </UnitAbilityModifiers>
    <Modifiers>
        <Row>
            <ModifierId>SPEAR_BONUS</ModifierId>
            <ModifierType>MODIFIER_UNIT_ADJUST_BASE_COMBAT_STRENGTH</ModifierType>
        </Row>
    </Modifiers>
    <ModifierArguments>
        <Row>
            <ModifierId>SPEAR_BONUS</ModifierId>
            <Name>Amount</Name>
            <Value>30</Value>
        </Row>
    </ModifierArguments>
 
I would suggest looking at your Database & Modding logs located at "..\User Files\Documents\My Games\Sid Meier's Civilization VI\Logs" for errors. Just taking a quick look I'd say right off the bat you're probably getting a Unique Constraint error for trying to add TRAIT_RADIO_ORANJE and attaching it to LEADER_WILHELMINA. You can't add a row to a table that already exists.
 
I would suggest looking at your Database & Modding logs located at "..\User Files\Documents\My Games\Sid Meier's Civilization VI\Logs" for errors. Just taking a quick look I'd say right off the bat you're probably getting a Unique Constraint error for trying to add TRAIT_RADIO_ORANJE and attaching it to LEADER_WILHELMINA. You can't add a row to a table that already exists.
Exactly so, Unique Constraint error.

The thing is, that's how it looks in the TraitModifiers of "...Leaders_Major":

<Row TraitType="TRAIT_RADIO_ORANJE" ModifierId="TRAIT_IDENTITY_FROM_DOMESTIC_TRADE_ROUTES"/>
<Row TraitType="TRAIT_RADIO_ORANJE" ModifierId="TRAIT_CULTURE_FROM_INTERNATIONAL_TRADE_ROUTES"/>
<Row TraitType="TRAIT_RADIO_ORANJE" ModifierId="TRAIT_CULTURE_FROM_INCOMING_TRADE_ROUTES"/>

And I just tried adding another one "<Row TraitType="TRAIT_RADIO_ORANJE" ModifierId="TRAIT_SPEARMEN_BONUS"/>"

No matter how you name the modifierID, it results with an error. But oddly enough, if you add new rows for other leader traits in the same file, it works just fine. o.O
It's as if Radio_Oranje trait was somehow hard-wired to have only these three modifierIDs, of these exact traits and I just don't know why... If you leave the name "TRAIT_CULTURE_FROM_INCOMING_TRADE_ROUTES" but change the way it works to something else, it still works. But if you change "TRAIT_CULTURE_FROM_INCOMING_TRADE_ROUTES" to, let's say, "TRAIT_CULTURE_FROM_INCOMING_TRADE_ROUTES_2", all crashes.

I'm so confused by this.
 
Top Bottom