Implementing WoundedUnitDamageMod in Trait

rarmonio8920

Chieftain
Joined
Oct 15, 2008
Messages
28
So I've started creating a Trait for my new civilization. I only have enough knowledge to change XML files.

I'm making it so that Units have a X% strength increase in their own territory and X% increase when they are wounded.

The strength increase in friendly territory is easily solved by using the Himeji Castle or Nationalism promotions. However, I have not figured out how to make units stronger when damaged.

My idea came from the Populist Policy which uses the WoundedUnitDamageMod in the Civ5Policies.xml file. I don't even know if it's possible to get that exact modifier into the Trait I'm making.

Any thoughts?
 
You can't do this in XML.

Just because some function is available to a Policy IN NO WAY implies that it can be used for a Trait. If it's not already explicitly defined for a Trait, then you can't use it for a Trait. XML is like this; every stub is explicitly linked to a given table, and if it's not there, you can't do it.

Now, it IS possible to do this through Lua, by tying events to RunCombatSim and EndCombatSim, but there are some HUGE problems with doing so, like the inability to use Quick Combat or Strategic View. Pretty much anything is possible through Lua if you're willing to put up with enough headaches. But it's definitely not for beginners.
 
Back
Top Bottom