1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Dynamic Traits 2016-10-05

Dynamic Traits

  1. Grey Fox
    Dynamic Traits
    Thread: http://forums.civfanatics.com/showthread.php?t=416391

    Dynamic Traits is a System that allows the leaders of civ to dynamically gain and lose traits based on their choices and actions during a game. Including is random traits, and temporary traits that can create a more interesting world, where small rewards or penalties can be given to players. Techs, Events, quests, anything you could think of could reward a temporary trait. I have prepared a showcase mod, that will demonstrate some, if not all of the features of this System.​
    Here is a more in-depth list of what this mod component does.
    Core Changes/Additions

    • Traits can now have a Trait Class
    • Traits can now have levels
    • The trait display have been updated, with sorting of traits and hiding of temporary traits until you press shift. (This actually requires you to press and hold shift before you hover the flag). Trait names are now colored Orange to separate from techs that also used the Green Highlight color
    • Every civ can have one Trait that all their leaders start with
    • Leader now have:
      • Minimum amount of Traits
      • Maximum set by Trait Class
      • TraitLoss boolean, can this leader lose traits? - default true
      • TraitGain boolean, can this leader gain traits? - default true

    Trait Counter

    • Trait gain and loss based on points
    • All counters and requirements are modified by gamespeed
    • Counter on all traits and points that can be awarded from techs, units, civics, buildings, and python, so basically from anything
    • Initial Trait Counters can be specified on a per leader basis, so you can set a certain leader to have a massive Trait Counter on a certain trait. Making it virtually impossible to lose it, or you can set the trait counter to -1000 or lower, which makes it impossible to ever gain the trait for this leader (set by global define).
    • Threshold Minimum and Difference, which specify the minimum points required in a trait to gain it, with the difference being used if you have reached your max number of Traits and another Trait is competing for it's place. - Default 100, and Difference 20 (but a global define modifier modifies this value depending on what gameturn it is).
    • Minimum required points can also be set on a per trait basis, the highest of the thresholds will be used
    • Traits can give points to itself when you gain it (so that once you gain it, it will be harder to lose it right away)

    Trait Levels

    • Traits can now have levels and "Level Up", each level is another trait, but gameplay-wise it is treated as one trait.
    • Trait Level bonuses stack, so trait level 2 does not replace trait level 1, but instead add to it.
    • The Level 1 trait is called a parent, and how this works in the xml is that you set a <NextTrait> on each trait that have a "next" level, and on each child you set which trait is the parent with <ParentTrait>
    • Traits level up, if they can, by gaining additional points towards any traits in the "trait chain" (they all go to the parent anyways, and typically it's the parent you give points to)

    Temporary Traits

    • Traits can now be Temporary, and last for any amount of turns
    • Temporary traits can be set to not-temporary or even permanent with Python

    Random Traits

    • Random Temporary Traits by Trait Class, that can be gained from techs, goody huts, units, wonders, and python
    • Traits can be disabled by other Traits, Units, Buildings and Civics
    • Goody Huts can now give random temporary traits by class

    The GreyFox Debug Window ;)

    • I'm working on a debug window which will hopefully be quite useful eventually
    • Currently it is far from finished, but to show it click SHIFT+C
    • After a turn or a few turns you should see new tabs showing some debug messages. Currently I have it show Trait Counters, Trait Losses and Trait Gains. But only on the current player atm. In the future I will add a dropdown to change which player to display

    Other Features

    • More Tags - Almost everything that civics can do, traits can also do now. [A Full list and explanations will be somewhere later]
    • Traits can give free specialists to buildings
    • Traits can be Permanent, which means they can't ever be lost (unless they lose their permanency somehow, which can be done with python)
    • Traits can be Unique, which means only one civ can have the Trait at one time
    • Traits can affect other leaders attitude towards you
    • Traits can be invisible (so they don't show up on the flag or otherwise).
    • Traits can change the yields of features, improvements, etc (so a Trait can give +1 Food on forests for example).
    • Includes DaveMcWs mod that show all hidden attitude modifiers.
    • AI Autoplay can be activated by pressing Ctrl+Shift+Z
    • I'll explain more once I have written a section for all tags, and exposed python functions...

    Spoiler Screenshots :

    Regular Trait Help:
    Spoiler :

    Holding Shift while mousing over Trait Help:
    Spoiler :

    Trait Counters from techs:
    Spoiler :

    *NEW* Trait Popup
    Spoiler :

    Unique and Permanent Traits:
    Spoiler :

    Traits Breakdown (with levels and temporary trait countdown)
    Spoiler :