Dynamic Traits

Grey Fox

Master of Points
Joined
Dec 19, 2001
Messages
8,726
Location
Sweden
Dynamic Traits
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 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.
Mechanics
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...

Screenshots
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 :



I will share the source at a later date... For now I need playtesting and maybe some ideas for the showcase mod. It's not meant to be balanced or anything, just enough stuff to showcase the things you can do with the mod.

Download Dynamic Traits
 
This is great! Can you please, please, please make this for RevDCM?
 
(Already commented on your file; just didn't see this thread...)

Very impressive!

EDIT: since you've asked for suggestions:

How about allowing the counter to be influenced by actions such as declaring a war, or sending explorers away, or founding cities?
I know it's probably possible using Python, but adding some of these basic actions to an XML file could prove useful...
 
Looks awesome! :)

Can you show us some more traits you added? I can't download this right now, so I'll have to wait before I can see more.
 
(Already commented on your file; just didn't see this thread...)

Very impressive!

EDIT: since you've asked for suggestions:

How about allowing the counter to be influenced by actions such as declaring a war, or sending explorers away, or founding cities?
I know it's probably possible using Python, but adding some of these basic actions to an XML file could prove useful...

To answer the question in your other comment: IIRC, source will come once it is included in RifE (at least via an SVN update). Grey Fox is working on that now, just has to have some modifications (we're controlling it by LeaderStatus, not by individual leader).

On the rest... Founding cities or declaring war could be useful, but most others would be very situational.

They may even be possible already, I can't remember. :lol:
 
(Already commented on your file; just didn't see this thread...)

Very impressive!

EDIT: since you've asked for suggestions:

How about allowing the counter to be influenced by actions such as declaring a war, or sending explorers away, or founding cities?
I know it's probably possible using Python, but adding some of these basic actions to an XML file could prove useful...
Yeah these are all possible with python. Not sure if I will implement them via XML.
 
a big part of the pedia is broken right now, right?
got 3 gamecrashs until i decided to simply start a game :D.
wanted to look traits up but iguess they dont have their own entries yet.
im gonna test it now !

edit: the yieldchanges dont work for me. it says 1 production on tiles with 4 but my plains hill mine has 4 hammers.
 
I noticed the same thing. There are also some other things that are not working correctly.
 
the bonus food for forests works though.
just the global bonusyields dont seem to work.

i really love how the trait hover tooltip has been changed. Brilliant

this concept and realization is really really good. the only problem would be that all those boni via tech etc are just adding tons and tons of stuff to read but its just too much.


the concept should be a bit (dont know how to express it in english that well) softer and more in the background. like i can find out how it works but the concept itself doesnt bombard me with tons of entries in every other screen of the game (popup, techtree, yet another popup, text-popup)

(i do know its just a first show-off)
 
This may be a stupid question but where do you install this in the MOD, directory or elsewhere. I keep getting kicked out of game, and it doesn't load back up.
 
Grey Fox, this is a great innovation and will definitely be placed in my mod. I have been wondering about doing something like this and had hoped to tackle it in the future. I am only doing XML stuff until I get some vacation time to learn Python, etc.

I know that others had worked on this before (how I found this thread) so I want to thank them and you are this amazing piece of modding genius. :goodjob:

I will be on the look out for more details of the documentation and the other features you have added. Thanks again.
 
why did i start as a leader outside my civ?
 
Top Bottom