[BTS] How to edit Leader Traits?

Upuauta

Chieftain
Joined
Jun 16, 2024
Messages
16
Hello
I´m trying to change the traits of a given Leader. For this I edit the file CIV4LeaderHeadInfos.xml I change the following lines:
<Traits>
<Trait>
<TraitType>TRAIT_PHILOSOPHICAL</TraitType>
<bTrait>1</bTrait>
</Trait>
<Trait>
<TraitType>TRAIT_AGRARIAN</TraitType>
<bTrait>1</bTrait>
</Trait>
<Trait>
<TraitType>TRAIT_IDEALISTIC</TraitType>
<bTrait>1</bTrait>
</Trait>
</Traits>


to the following

<Traits>
<Trait>
<TraitType>TRAIT_INDUSTRIOUS</TraitType>
<bTrait>1</bTrait>
</Trait>
<Trait>
<TraitType>TRAIT_FINANCIAL</TraitType>
<bTrait>1</bTrait>
</Trait>
<Trait>
<TraitType>TRAIT_IDEALISTIC</TraitType>
<bTrait>1</bTrait>
</Trait>
</Traits>

When I start the game now it correctly shows the changed traits ingame. But it seems it doesn´t really use the effects of the new traits. Meaning in this case Finansial should give 1 extra commerce where there is already 3. But it doesn´t.
Do I miss something here? Do I also need to edit another file?
Thanks a lot for any help.
 
Perhaps the mod you're working with has changed the effect of the Financial trait. Civ4TraitInfos.xml should provide the ExtraYieldThreshold of 2 for the Commerce yield: CIV4TraitInfos.xml#L177
Well, I guess this is Realism Invictus, and the threshold is 3 instead of 2. And you've already written that 3 commerce aren't adding a fourth. Loading a savegame probably won't work as a test because the trait effects get cached at game start. But it also sounds like you've already tried launching a new game ... :undecide:

Unfortunately, one can't easily trace what the DLL does with the leader and trait XML data, i.e. not without compiling a debug DLL.

Is the Industrious trait getting applied correctly?
 
Perhaps the mod you're working with has changed the effect of the Financial trait. Civ4TraitInfos.xml should provide the ExtraYieldThreshold of 2 for the Commerce yield: CIV4TraitInfos.xml#L177
Well, I guess this is Realism Invictus, and the threshold is 3 instead of 2. And you've already written that 3 commerce aren't adding a fourth. Loading a savegame probably won't work as a test because the trait effects get cached at game start. But it also sounds like you've already tried launching a new game ... :undecide:

Unfortunately, one can't easily trace what the DLL does with the leader and trait XML data, i.e. not without compiling a debug DLL.

Is the Industrious trait getting applied correctly?
Hello f1pro
Thank you very much for your answer. Yes it is Realism Invictus. I did the changes mid-game and it didn´t work. Now I started a new game and now it seems to work.
 
Then yes, this is precisely because a lot of stuff gets cached, or its effects applied otherwise in a permanent way (for instance, for Seafaring trait the bonus trade route will remain in a given game even if you remove the trait itself). It is always best to launch a new game for any such changes.
 
Then yes, this is precisely because a lot of stuff gets cached, or its effects applied otherwise in a permanent way (for instance, for Seafaring trait the bonus trade route will remain in a given game even if you remove the trait itself). It is always best to launch a new game for any such changes.
Yes, I restarted in the meantime and now it works. Thanks for your help. :)
 
Top Bottom