How to add units to a custom Civ that uses SQL

Yes. So the swordsman would become a musketman, and still keep the unique promotions. Then later, it would become a rifleman, and the promotions would still be present and applicable. This kind of thing was so easy in Civ 5, but I haven't found a way to do it in Civ 6. In Civ 5 it was just using the FreePromotion table.

Hmm....I'm thinking maybe you should create a trait (leader or civ) that adds the ability to only your units. And you would have to add that ability by era or by unit type, similar to how Nubia's Pitati Archers and all her ranged units have special experience abilities?

Code:
<TraitModifiers>
        <Row>
            <TraitType>TRAIT_CIVILIZATION_TA_SETI</TraitType>
            <ModifierId>TRAIT_ANCIENT_RANGED_UNIT_PRODUCTION</ModifierId>
        </Row>
</TraitModifiers>

This code adds an experience modifier under the Ta Seti trait group. There are similar lines for each era (ancient, modern, information, etc).

Code:
        <Row>
            <ModifierId>TRAIT_ANCIENT_RANGED_UNIT_PRODUCTION</ModifierId>
            <Name>UnitPromotionClass</Name>
            <Value>PROMOTION_CLASS_RANGED</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_ANCIENT_RANGED_UNIT_PRODUCTION</ModifierId>
            <Name>EraType</Name>
            <Value>ERA_ANCIENT</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_ANCIENT_RANGED_UNIT_PRODUCTION</ModifierId>
            <Name>Amount</Name>
            <Value>50</Value>
        </Row>

This code determines who the trait happens to and how much effect is applied.

You also need to use Requirements to make sure the correct type of units are being affected and that only your units are affected.

If you're lucky, the effect you're using is already player specific, so you won't need a "player only requirement". Most likely you'll need a requirement that only your custom unit can pass.
 
Top Bottom