Adding traits...

Rayki

Chieftain
Joined
Nov 19, 2014
Messages
78
Location
Australia
Ok so I want to add +25% to the strength of military units as a sponsor trait, having limited knowledge in XML and none in LUA is making it hard so can someone possibly tell me where I'd find compatible traits and some kind of example/template on how to go about adding a new trait?

I've looked at the guide and a few mods and some posts on here but I'm not sure I understand...One of my issues, I have a single traits XML containing the basic integer type CivBE traits from the core traits file, so do I define new traits in a separate XML then link it back through txt tags, or can it all go in the one traits file? To be honest not sure if I'm on the right track at all, 12:30 am, been up since 6:00am.

Any help would be appreciated. :)
 
That should be trivial (only require XML). Use Brazillia's trait as an example.

<Leader_Traits> table (in the leaders XML file) lets you connect a leader to a trait.

Then go to the Trait XML file where you will be able to define the effects the trait has. You want to connect your trait to a promotion via the <Trait_FreePromotion> table.

Then go to the promotions (not unit perks! Those are different) and have the promotion give the bonus. Make sure you add the promotion to <UnitPromotions_UnitCombats> which indicates what unit combat types are allowed to have the promotion.
 
Ahhh I see now...I have a couple of problems, one: I didn't add <UnitPromotions_UnitCombats> and two I was trying to add a perk not a promotion.

Thanks hopefully that'll get things sorted. :)

I'm a total newbie at this, just had a minor celebration coz my first bit of SQL ever written actually worked and removed the original sponsors from the game like magic, fairly small achievement but it made me excited. lol ;)

Edit: All sorted, got one of my traits going now, thanks heaps mate. :)

Another problem now, the <culturefromkills> trait doesn't seem to do anything, I've looked everywhere for a reference to it but I can't see where it is used or if it actually works. I know there are apparently features that are written in but just don't work because of redundancy from Civ V or pre-release testing, maybe I just don't understand how it is used, so does anyone know if this works or if it's just a bit of trait tease?

2nd edit: Nevermind I understand culturefrom kills now. ;)
 
Back
Top Bottom