Adding yields to TraitInfos xml

ThermobaricPunch

Chieftain
Joined
Apr 26, 2019
Messages
15
I managed to add two extra fields of YieldChanges and YieldModifiers to the TraitInfos xml through the schema, and the modifiers work ingame but I encountered a problem: the bonuses don't show up on the trait description (the +10% hammers I added to the industrious trait works as expected but the actual bonus doesn't show up on the trait)

I already made TXT_KEY_TRAIT_YIELD_CHANGES and TXT_KEY_TRAIT_YIELD_MODIFIERS entries but now the problem is... I have no idea where those text tags are supposed to go so they show up on the trait description.
 
Last edited:
To add text to anything in Civ 4 go to under the strategy and add the following:
<Help>TXT_KEY_TRAIT_YEILD_CHANGES</Help>
Yeah in general that's the way to do it. However this only works for static text as in "it's always the same for UNIT_WARRIOR or whatever you point at".

The question for this thread is how to add help text, which is generated at runtime. For instance +X% hammers, but only if X isn't 0. This can't be done with a simple TXT_KEY. Instead there is a source file dedicated to generate those more complex and conditional help texts.

It is actually good that you pointed out the help tag. If a less experienced modder would read this thread, he/she would go "adding help text looks complicated" since this thread only mentioned the most complex way of adding help text. There is no reason to be misleading like that.
 
Top Bottom