New Leader tags: <DefaultTraits> and <DefaultComplexTraits>

Thunderbrd

C2C War Dog
Joined
Jan 2, 2010
Messages
29,813
Location
Las Vegas
I'm pushing forward on some things that are related to OLD projects and NEW projects, in particular to help me build up to an automatic flavoring mechanism in the dll for most game objects. This came into my radar as a quick and easy thing to establish right away that creates leads into that project as well, which also cycles around then into how we can improve the unit review by cleaning up some of the leader stuff first.

Anyhow, I've just added:
New Leader tags: <DefaultTraits> and <DefaultComplexTraits>
Example of how to use in LeaderHeadInfos.xml:
Code:
            <DefaultTraits>
                <TraitType>TRAIT_PHILOSOPHICAL</TraitType>
                <TraitType>TRAIT_AGGRESSIVE</TraitType>
                <TraitType>TRAIT_MEGALOMANIAC</TraitType>
                <TraitType>TRAIT_PHILOSOPHICAL1</TraitType>
                <TraitType>TRAIT_AGGRESSIVE1</TraitType>
                <TraitType>TRAIT_MEGALOMANIAC1</TraitType>
            </DefaultTraits>
            <DefaultComplexTraits>
                <TraitType>TRAIT_PHILOSOPHICAL</TraitType>
                <TraitType>TRAIT_AGGRESSIVE</TraitType>
                <TraitType>TRAIT_MEGALOMANIAC</TraitType>
                <TraitType>TRAIT_PHILOSOPHICAL1</TraitType>
                <TraitType>TRAIT_AGGRESSIVE1</TraitType>
                <TraitType>TRAIT_MEGALOMANIAC1</TraitType>
            </DefaultComplexTraits>
Much easier than the dumb originals and much more data friendly.
Code:
            <Traits>
                <Trait>
                    <TraitType>TRAIT_PHILOSOPHICAL</TraitType>
                    <bTrait>1</bTrait>
                </Trait>
                <Trait>
                    <TraitType>TRAIT_AGGRESSIVE</TraitType>
                    <bTrait>1</bTrait>
                </Trait>
                <Trait>
                    <TraitType>TRAIT_MEGALOMANIAC</TraitType>
                    <bTrait>1</bTrait>
                </Trait>
                <Trait>
                    <TraitType>TRAIT_PHILOSOPHICAL1</TraitType>
                    <bTrait>1</bTrait>
                </Trait>
                <Trait>
                    <TraitType>TRAIT_AGGRESSIVE1</TraitType>
                    <bTrait>1</bTrait>
                </Trait>
                <Trait>
                    <TraitType>TRAIT_MEGALOMANIAC1</TraitType>
                    <bTrait>1</bTrait>
                </Trait>
            </Traits>

We can temporarily still use the original <Traits> tag to designate default traits on leaders so that the xml didn't have to be adapted overnight.

However, now we have the ability to use these tags to override those designations if we wish.

Eventually, we should use these tags as absolute replacements to the original <Traits> tag (with the Array and bool usage) but I wanted to give us time to adapt the xml first AND investigate into how the python may still, and possibly quite erroneously for the sake of Developing Leaders, be using the original <Traits> as exposed to py.

We may (?) need to expose these new vector tags to python, while perhaps debugging for Developing Leaders.

At least this gives us immediately the ability to add new Leader defaults for Complex Traits, which has a much wider set of options and not all Traits in Complex are even exact smooth replacements of the core traits, as there are a few traits that are positive in the core that are negative in Complex, numerous Complex Trait options that don't exist at all in the core, and so on.

Therefore, if we didn't give this tag for our leaders, we'd have all kinds of gaps in the leader defaults when using Complex Traits.

It's my hope that this will lead to another innovation, perhaps even by the end of the week, where we can average out the default trait flavors on the defaults pertaining to the options in use in a given game, to automatically determine flavor settings on Leaders!

This would make it easier for us with new leaders because we won't need to even define new leader flavors, just their default traits in core and complex arrangements.

This is part of how we can also move forward into totally random leader entities IN-GAME eventually for future projects like replaceable leaders and leaders as units. Also lets us add leaders a LOT faster (or adapt a bunch of them I should say.)

Now, Khalig has been doing a lot of work on improving leaderhead xml and this may complicate that work a bit but may also ease things up for him. That said, there are a LOT of leaders in our modmod download options that could REALLY use these new tags put to use, so EVEN if he doesn't need any help with this in the core Assets/XML/CIV4LeaderHeadInfos.xml and all those found in our modules folders, I KNOW the leaders in the optional modmods could benefit a lot from being updated for this.

So, my job here is mostly in the code - who would be willing to help improve our selections for additional leader trait defaults?

I've gotta get Khalig in here to at least help me know what he wants from this - he's got spreadsheets and such going on the existing core leaders and this will probably complicate things a little for him too but hopefully we'll be able to get some help here, particularly since the flavoring project is beginning to seem more like a dll buildout with some occasional valuation debates and discussions than an XML modding project now.

Thoughts? Offers of assistance? I know a lot of folks really like the leaders in the additional civs modmod...
 
where are the traits for developing leaders located, I see for example scientific1, in civ4traitinfos in the xml/civilizations but there are no lvl 2 or 3's in there for me to change them to medieval era(which I want to do because I like changing things after playing like 20+ runs). I hope none of the modders take it personally or are offended :).
 
where are the traits for developing leaders located, I see for example scientific1, in civ4traitinfos in the xml/civilizations but there are no lvl 2 or 3's in there for me to change them to medieval era(which I want to do because I like changing things after playing like 20+ runs). I hope none of the modders take it personally or are offended :).
They use a replacement method and are located in the modules xml file folders. Take some care there. If you're just replacing the prereq techs to something earlier, I THINK they are defined on each one but it may be the promotionline has that information rather than the traits themselves. I can't recall which layer has the tech prereq established off the top of my head.
 
modules? do you just mean the mod folder? cuz thats pretty vague, each xml file can vary greatly...and before i look again i just want to check with you
 
There's a module specifically referring to complex traits I believe? I haven't been part of the recent restructuring efforts on the way data is organized in the file systems.
 
i found it, it was in a different place, probably because im using an old version...because ive made changes im too lazy to do again if i upgrade to the newer version at this time, I will probably when I get a new computer though, thats going to be fun but I will spend the first few days downloading stuff :).
 
Top Bottom