Trait modding - CK3 Wiki (2024)

Please help with verifying or updating older sections of this article.
At least some were last verified for version 1.0.

Traits are possessed by characters in the game and can modify their attributes, opinions, personality and other parameters.

Contents

  • 1 Character Traits
  • 2 Creating a trait
    • 2.1 Trait category
    • 2.2 Trait validation
    • 2.3 Special trait flags
    • 2.4 Creating immortal traits
    • 2.5 Trait Index
  • 3 Localization
  • 4 Icon
  • 5 Unique Numerical Identifier List (Obsolete)

Character Traits[edit | edit source]

The script which stores all character traits can be found in /Crusader Kings III/game/common/traits.

Personality TraitsEducation & Court TraitsLifestyle traitsStress TraitsCommander Traits
lustfulchasteeducation_intrigue_1 (4)diplomatfamily_firstdrunkardhashishiyahlogisticianmilitary_engineer
gluttonoustemperateeducation_diplomacy_1 (4)augusthunter_1 (3)rakishreclusiveaggressive_attackerunyielding_defender
greedygenerouseducation_stewardship_1 (4)strategistreveler_1 (3)irritableflagellantforderflexible_leader
lazydiligenteducation_martial_1 (4)overseergallantprofligateimprovidentdesert_warriorjungle_stalker
wrathfulcalmeducation_learning_1 (4)architectadministratorcontritecomfort_eaterreaverreckless
patientimpatientdiplomatic_court_1 (2)blademaster_1 (3)avariciousinappeteticjournallerholy_warrioropen_terrain_expert
arroganthumblewarlike_court_1 (2)schemerwhole_of_bodyconfiderathleticrough_terrain_expertforest_fighter
deceitfulhonestadministrative_court_1 (2)seducerscholarcautious_leaderorganizer
cravenbraveintrigue_court_1 (2)torturertheologianHealth Traitswinter_soldier
shygregariousscholarly_court_1 (2)mystic_1 (3)physician_1 (3)pregnantdepressed_genetic (1)
ambitiouscontenteducation_republican_knowledge_1 (4)lifestyle_herbalistlifestyle_gardenerlunatic_genetic (1)possessed_genetic (1)Fame Traits
arbitraryjusteducation_martial_prowess_1 (4)illpneumonicberserkershieldmaiden
cynicalzealousPhysical Traitsgreat_poxearly_great_poxvarangianpoet
paranoidtrustingFaith Traitsbeauty_bad_1 (3)beauty_good_1 (3)lovers_poxleperbastardlegitimized_bastard
compassionatecallouscelibateintellect_bad_1 (3)intellect_good_1 (3)wounded_1 (3)maimeddisputed_heritagechild_of_concubine_female
sad*sticpilgrimphysique_bad_1 (3)physique_good_1 (4)one_eyedone_leggedchild_of_concubine_malewild_oat
stubbornfickleexcommunicatedpure_bloodedfecunddisfiguredinfirmbastard_foundertwin
vengefulforgivingdevotedstrongshrewdincapablegout_riddenkinslayer_1 (3)deviant
eccentricsayyidclubfootedhunchbackedconsumptioncancercannibalsodomite
Childhood Traitssaoshyantlispingstutteringtyphusbubonic_plagueincestuousadulterer
rowdycharmingsaoshyant_descendantdwarfgiantsmallpoxscarredfornicatormurderer
curiouspensivesaviorinbredweakeunuchblindborn_in_the_purpleaugustus
bossysicklydivine_blooddullimpotentvikingreincarnation
blood_of_prophetspindlyscalyCulture-Specific Traitsadventurerheresiarch
faith_warrioralbinowheezingcrusader_kingchakravartipeasant_leaderwitch
saintbleederinfertilegreatest_of_khansparagondisinheriteddenounced
order_memberconsecrated_bloodloyaldisloyal

Creating a trait[edit | edit source]

Traits are defined in .txt files in the directory /Crusader Kings III/game/common/traits.

Example trait:

my_new_trait = {education = yes #yes/no to define whether this is an Education trait# Flags and modifiers ... # Flags and modifiers ... # Flags and modifiers }

Trait category[edit | edit source]

What unique category this trait is in, categories have gameplay implications as well as sorting

category = X

Where X can be one of:

NameDescriptionUsage
personalityThe core personality of a character, character's auto generate with somecategory = personality
educationA character's education, they can only have one at a time and are auto generated withcategory = education
childhoodThe core personality of a child, it will grow into an adult personality trait, auto generated on childrencategory = childhood
commanderA combat trait for how a character fights, auto added to characters if requiredcategory = commander
winter_commanderA commander trait but will only be added for characters in an area with wintercategory = winter_commander
lifestyleA lifestyle progress traitcategory = lifestyle
court_typeA trait from a court typecategory = court_type
fameA fame (or infamy) traitcategory = fame
healthA trait representing a health conditioncategory = health

Trait validation[edit | edit source]

NameDescriptionUsage
valid_sexDetermines the valid sex for the trait. Defaults to "all". Trait can only be had by characters of this sexvalid_sex = male/female/all
minimum_ageSpecifies the minimum age required to have this trait (an integer value).minimum_age = 16
maximum_ageSpecifies the maximum age allowed to have this trait (an integer value).maximum_age = 15
potentialList of triggers which are required for a character to get this trait.
potential = { exists = dynasty.dynast faith = dynasty.dynast.faith}

Special trait flags[edit | edit source]

NameDescriptionUsage
healthChanges actual health valuehealth = X.X
fertilityPercentage modifier on fertilityfertility = X.X
inherit_chanceChance of passing on the trait to childreninherit_chance = X
birthHow many characters out of 100 are born with this trait (when not inherited). Can have decimalsbirth = X
random_creationHow many characters out of 100 are created with this trait? (As opposed to actually being born; this is for things like generated characters, script characters, etc.)random_creation = X
triggered_opinionApplied if the associated conditions are fulfilled
triggered_opinion = {opinion_modifier = opinion_modifier_key# Everything below is optionalparameter = doctrine_parameter_key check_missing = yessame_faith = yessame_dynasty = yesignore_opinion_value_if_same_trait = yesmale_only = yesfemale_only = yes}
compatibilityThis is not a opinion modifier, but can be used by 'compatibility_modifier' and 'trait_compatibility' trigger. Compatibility is checked for the trait holder vs the listed traits (of another character.)
compatibility = {gluttonous = 20drunkard = @pos_compat_low}
parent_inheritance_sexspecifies whether the trait can be inherited from male/female/all parents (all by default)parent_inheritance_sex = male/female/all
child_inheritance_sexspecifies whether the trait can be inherited by male/female/all children (all by default)child_inheritance_sex = male/female/all
geneticIf set to yes (no by default), the inheritance will follow the following rules: The trait can be inactive. Children can inherit the trait from both active and inactive parent traits.

An active trait is inherited with 100% chance, an inactive trait with a 50% chance. If the trait is successfully inherited from both parents, it becomes active.If it's inherited only from one parent, it's inactive.

genetic = yes/no
group_equivalenceAllows multiple traits to be checked using a single, defined name.
lunatic_1 = {group_equivalence = lunatic}lunatic_genetic = {group_equivalence = lunatic}has_trait = lunatic
inherit_from_real_fatherShould the trait be inherited from the real (biological) father? (yes by default)inherit_from_real_father = yes/no
enables_inbredThis trait enables the children of the character to be considered for the inbred trait (no by default).

It only enables the inbred chance if there are common ancestors of the parents, so there is no risk of 'inbred' if the parents are not related.If inbred is not enabled by parents' traits, but there are common ancestors, there's a chance (same as for inbred trait when it's enabled) the child will get a random trait with enables_inbred = yes.

enables_inbred = yes/no
goodmarks this trait as good (default no)good = yes/no
genetic_constraint_allThis genetic constraint will be applied when gaining the trait. To add a new genetic constraint, further modifications in gfx\portraits\trait_portrait_modifiers are needed before setting ranges in common\ethnicitiesgenetic_constraint_all = beauty
forced_portrait_age_indexThe character will use this portrait age index instead of one of the age sub-genes marked as "generic". You can specify more than one such index if you want to randomize between them. If multiple traits force indexes, it randomizes between all of themforced_portrait_age_index = 1
forced_portrait_age_indexExample showing that you can define more than one indexforced_portrait_age_index = 2
portrait_extremity_shiftWhen gaining this trait, every single morph gene will be shifted by this percentage towards 0 or 1; whichever it is closest to. E.G., 0.4 will shift 25% towards 0, resulting in 0.3portrait_extremity_shift = 0.25
immortalWill stop visual aging, and make the character immune to natural death. Can still be killed by script. Fertility will match visual age. You can use set_immortal_age to change the visual ageimmortal = yes
physicalMarks the trait as physicalphysical = yes
trait_exclusive_if_realm_containsA list of terrain types that are taken into consideration when commander traits are randomly assigned to commanders. These traits are only assigned/considered if the commander's culture contains a province that has one of the terrain types specified in the listtrait_exclusive_if_realm_contains = {}
shown_in_ruler_designerDefaults to yes, determines whether trait can be selected from the Ruler Designershown_in_ruler_designer = yes/no

Creating immortal traits[edit | edit source]

As with the previous game, traits that grant immortality are not present in the game at launch but are already programmed and can be easily created. It only requires adding the following parameter to a trait: immortal = yes

For your immortals to look forever young, you can use the effect immortal age. Such as, set_immortal_age = 30

Trait Index[edit | edit source]

With recent updates, traits no longer use indexes. They instead appear in the ruler designer by order of appearance in code.

Localization[edit | edit source]

By default, the name key is trait_<key>, and the desc key is trait_<key>_desc.

Icon[edit | edit source]

The default icon path is gfx/interface/icons/traits/<trait>.dds.

These can be overridden with dynamic descriptions.E.G.,name = some_loc_keyOrname = {first_valid = { ... }}

The parameters are: name, desc, icon.

The root scope is the character.Note that in some cases there may be no root, so make sure your first check is a fallback for "NOT = { exists = this }" if you add dynamic names, descs, or icons.

An example:

icon = {first_valid = {triggered_desc = {trigger = { NOT = { exists = this } }desc = "gfx/interface/icons/traits/diligent.dds"}triggered_desc = {trigger = { gold > 1000 }desc = "gfx/interface/icons/traits/diligent.dds"}desc = "gfx/interface/icons/traits/deceitful.dds"}}

Unique Numerical Identifier List (Obsolete)[edit | edit source]

To avoid possible conflicts there is a Google Sheets document to overview which Trait IDs are already used by the community. The list is not complete, but editable by anyone. Please edit carefully, since there are formulas in use, and if possible only add input into the columns "Name", "Author(s)" and "Link". Green background indicates that the Numerical Identifier (column A, blue background) is most likely not used by another person's mod already.

Community document of traits

Modding

DocumentationScopesEffectsTriggersVariablesModifiers
ScriptingAIBookmarksCharactersCommandsCouncilCultureDecisionsDynastiesEventsGovernmentsHistoryHoldingsLifestylesRegimentsReligionsStory cyclesTitlesTraits
InterfaceInterfaceData typesLocalizationCustomizable localization
MapMapTerrain
Graphics3D modelsExportersCoat of armsGraphical assetsFontsParticlesShadersUnit models
AudioMusicSound
OtherConsole commandsChecksumMod structureModding toolsTroubleshooting

Retrieved from ""

Trait modding - CK3 Wiki (2024)
Top Articles
Latest Posts
Article information

Author: Rev. Porsche Oberbrunner

Last Updated:

Views: 6121

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Rev. Porsche Oberbrunner

Birthday: 1994-06-25

Address: Suite 153 582 Lubowitz Walks, Port Alfredoborough, IN 72879-2838

Phone: +128413562823324

Job: IT Strategist

Hobby: Video gaming, Basketball, Web surfing, Book restoration, Jogging, Shooting, Fishing

Introduction: My name is Rev. Porsche Oberbrunner, I am a zany, graceful, talented, witty, determined, shiny, enchanting person who loves writing and wants to share my knowledge and understanding with you.