Editing unit traits?

K3fka

Chieftain
Joined
Oct 24, 2016
Messages
4
Been searching through the XML files, and I see Units referencing Trait definitions, but I can't find the actual code behind how these traits work. Is this something we're able to view and edit right now, or am I out of luck until we get some more tools down the road? Thanks.
 
Thanks for that, but maybe you can help out with this as well. Let's say I want to make a unit ignore terrain costs for a certain type of terrain. Looking at the Hills ignoring ability, for example, gives me:

Code:
        <Row>
            <ModifierId>ALTITUDE_TRAINING_IGNORE_HILLS</ModifierId>
            <ModifierType>MODIFIER_PLAYER_UNIT_ADJUST_IGNORE_TERRAIN_COST</ModifierType>
        </Row>

Digging into Modifiers.xml:
Code:
        <Row>
            <ModifierType>MODIFIER_PLAYER_UNIT_ADJUST_IGNORE_TERRAIN_COST</ModifierType>
            <CollectionType>COLLECTION_OWNER</CollectionType>
            <EffectType>EFFECT_ADJUST_UNIT_IGNORE_TERRAIN_COST</EffectType>
        </Row>

And tracing that to GameEffects.xml:
Code:
<Row Type="EFFECT_ADJUST_UNIT_IGNORE_TERRAIN_COST" Kind="KIND_EFFECT"/>

So that's where I hit a dead end. I don't see anywhere where it specifies that it's only for hills. I understand this is probably getting into some of the deeper parts of the game logic, but if you have any info, it would be appreciated.
 
Back
Top Bottom