Event trigger.png We are conducting a survey to learn how we can improve the Paradox Wikis experience for our users. Please take the time to fill the Survey Event trigger.png

Traits modding

From Stellaris Wiki
Jump to navigation Jump to search

Version

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

This article is for the PC version of Stellaris only.

This page is about Traits modding, both Species Traits and Leader Traits. Traits are defined at "common/traits/xxx.txt".

Data Structure[edit]

Property Species Traits Leader Traits
cost = <int> The cost of this trait. Leader traits do also have "costs", see Leader modding for details.
icon = <gfx file path> Alternative icon of this trait. By default, the "gfx/interface/icons/traits/<trait key>.dds" will be used. Leader traits always have this property specified because their icons are stored at "gfx/interface/icons/traits/leader_traits/xxx.dds".
initial = <yes/no> If no, this trait cannot be picked in the empire creator and it cannot be added to a species template. If no, this trait cannot be given to a leader upon leader generation.
randomized = <yes/no> If no, this trait can't be picked by species random generator. It's still unclear, because Leader trait armchair commander.png Armchair Commander has randomized = no but can stll be given to a newly generated leader.
modification = <yes/no> If no, this trait cannot be added to or removed from a species template. It's still unclear, because leader traits always have modification = no.
improves_leaders = <yes/no> If yes, this trait will have a tooltip that says leaders from this species will have traits that enhance them. Actually, those leader traits must be implemented elsewhere. No.png
advanced_trait = <yes/no> If yes, this trait is considered an advanced trait and can be added to or removed from a species template only if the empire has researched any technology with the feature flag "add_advanced_traits".

This permission overrides initial = no, but doesn't override modification = no.

forced_happiness = <yes/no> If yes, Pops of a species with this trait will not be affected by happiness.
sapient = <yes/no> Vanilla pre-sapient traits have sapient = no. Seems to allow the trait to be selected by trait = random_presapient_trait in a create_species effect
immortal_leaders = <yes/no> If yes, leaders from a species with this trait will be immortal. This will also generate an entry of "Immortal" in tooltip. If yes, leaders with this trait will be immortal. This will also generate an entry of "Immortal" in tooltip.
hide_age = <yes/no> No.png If yes, leaders with this trait will have their age hidden in the leader tooltip. Only work for ruler traits.
modifier A block of Modifiers to be applied to Pops, Armies and Leaders of a species with this trait. A block of Modifiers to be applied to the scope this Leader is assigned at.
  • If this leader was a non-heir ruler, its traits will apply to the entire Empire.
  • If this leader was a governer, its traits will apply to the Sector it's governing.
  • If this leader was a scientist leading a research, only modifiers related to research speed will apply to the category it's researching.
  • If this leader was a scientist commanding a science ship, the modifiers will apply to the science ship.
  • If this leader was an admiral, its traits will apply to the fleet it's commanding.
  • If this leader was a general, its traits will apply to the armies it's commanding.
growing_modifier
assembling_modifier
declining_modifier
Blocks of Modifiers to be applied to the Planet while a Pop of this species is growing / assembling / declining.

The trait Recycled.png Recycled uses assembling_modifier to reduce Robot Assembler jobs upkeep by -20% to implement its effect.

No.png
self_modifier No.png A block of Modifiers to be applied only to the leader itself. Modifiers that affect leader experience gain, leader lifespan and leader cost / upkeep go here.
custom_tooltip = <localisation key> If specified, it will overwrite the generated tootlips based on modifiers.
prerequisites = { tech_xxx } This trait can't be added or removed by an Empire unless all technologies listed here have been researched. Vanilla unused. This trait can't be given to a leader upon leader generation unless all technologies listed here have been researched.
opposites = { trait_xx trait_yy } List of trait keys to be mutally exclusive with this trait. Only relevant upon leader generation, but only rulers will generate with 2 traits. This doesn't prevent excluded leader traits from being added by events.
ai_weight As of 2.3 ai_weight had a default value of 100 and was used by the AI to determine which traits to add when gene modding. Since negative traits still mostly have ai_weight = { weight = 0 } this is probably still the case. The block can also contain conditional modifier tags in country scope, with the species as root. How much should AI weight this trait for the tasks.
leader_age_min = <int>
leader_age_max = <int>
New leaders from this species will have their age randomized ranged among these properties. Vanilla use these to make Leader trait ruler hive mind.png Hive Mind leaders younger than usual and Trait lithoid.png Lithoid leaders older than usual. No.png
sorting_priority = <int> Species traits with same soring priority are sorted by alphabet order.
potential_crossbreeding_chance = <float> The chance this trait is inherited by crossbreeding. Relevant to the ascension perk Xeno Compatibility.
allowed_archetypes = { xxx yyy } A list of Species Archetype keys that is required by this species trait. See Species modding for details.
slave_cost = { <resource key> = <int> } The cost of a Pop of this species on slave market is added by this.
species_potential_add
species_possible_remove
Blocks of Conditions to determine can this trait be added to / removed from a species template. (Species scope, FROM is the empire)

With "species_potential_add" be evaluated false, a template with this trait can still be applied to Pops lacking it.

Similarly, "species_possible_remove" doesn't prevent Pops with this trait from being applied with a template laking it.

leader_trait = { ... } No.png A list of leader classes. Vanilla generic leader traits have leader_trait = all.
leader_class = { ... } A list of leader classes. Vanilla leader traits always have it the same as leader_trait. Actual difference between the two is unclear.
ai_categories = { ... } What kind of tasks the AI will consider this leader be suit of. Only relevant to scientists. Can be consist of any number of the following four: engineering, physics, society, survey.
leader_potential_add A block of Conditions to determine can the trait be added to a leader upon leader generation. (Leader scope, FROM is the empire)

Examples[edit]

Species Traits[edit]

Ingenious[edit]

trait_ingenious = {
	cost = 2
	potential_crossbreeding_chance = 1.0
	allowed_archetypes = { BIOLOGICAL LITHOID }
	modifier = {
		planet_jobs_energy_produces_mult = 0.15
	}
	slave_cost = {
		energy = 50
	}
}

Proles (Pre-Sapient)[edit]

trait_presapient_proles = {
	cost = 1
	opposites = { "trait_presapient_natural_intellectuals" }
	initial = no
	sapient = no
	modification = yes
	icon = "gfx/interface/icons/traits/trait_primitive.dds"
	allowed_archetypes = { BIOLOGICAL PRESAPIENT LITHOID }
	modifier = {
		army_damage_mult = 0.10
		planet_jobs_minerals_produces_mult = 0.10
		planet_jobs_food_produces_mult = 0.10
		planet_jobs_physics_research_produces_mult = -0.15
		planet_jobs_engineering_research_produces_mult = -0.15
		planet_jobs_society_research_produces_mult = -0.15
	}
}

Proles (Syncretic Evolution)[edit]

trait_syncretic_proles = {
	cost = 1
	potential_crossbreeding_chance = 0.33
	opposites = { "trait_intelligent" "trait_erudite" "trait_natural_engineers" "trait_natural_physicists" "trait_natural_sociologists" }
	initial = no
	modification = yes
	species_potential_add = { always = no }
	icon = "gfx/interface/icons/traits/trait_primitive.dds"
	allowed_archetypes = { BIOLOGICAL LITHOID }

	custom_tooltip = TRAIT_SYNCRETIC_PROLES_EFFECT
	modifier = {
		pop_happiness = 0.10
		planet_jobs_produces_mult = 0.10
	}
}

Leader Traits[edit]

Adaptable[edit]

leader_trait_adaptable = {
	cost = 1
	modification = no
	icon = "gfx/interface/icons/traits/leader_traits/leader_trait_adaptable.dds"
	self_modifier = {
		species_leader_exp_gain = 0.25
	}
	leader_potential_add = {
		NOT = { leader_class = ruler}
		NOT = { from = { has_ethic = "ethic_gestalt_consciousness" } }
		
	}
	leader_class = { admiral scientist general governor }
	opposites = { "leader_trait_stubborn" }
	leader_trait = all
	
	ai_categories = {
		engineering
		physics
		society
		survey
	}
	
	ai_weight = {
		weight = 50
	}
}

Corvette Focus[edit]

trait_ruler_corvette_focus = {
	cost = 1
	modification = no
	icon = "gfx/interface/icons/traits/leader_traits/trait_ruler_corvette_focus.dds"
	leader_potential_add = {
		NOT = { from = { has_ethic = "ethic_gestalt_consciousness" } }
	}
	modifier = {
		ship_corvette_cost_mult = -0.2
	}
	leader_trait = { ruler }
	leader_class = { ruler }
	prerequisites = { tech_destroyers } # 'corvette focus' is a bit silly when it's the only available ship
	opposites = { "trait_ruler_destroyer_focus" "trait_ruler_cruiser_focus" "trait_ruler_battleship_focus" }
}

Chosen One (Admiral)[edit]

leader_trait_admiral_chosen = {
	cost = 0
	modification = no
	icon = "gfx/interface/icons/traits/leader_traits/leader_trait_psionic_chosen_one.dds"
	immortal_leaders = yes
	modifier = {
		ship_weapon_damage = 0.2
		ship_evasion_mult = 0.3
	}
	leader_trait = { admiral }
	leader_class = { admiral }
	initial = no
	randomized = no
}
Empire EmpireEthicsGovernments • Civics • OriginsMandatesAgendasTraditions • Ascension PerksEdictsPoliciesRelicsTechnologiesCustom Empires
Pops JobsFactions
Leaders LeadersLeader Traits
Species SpeciesSpecies Traits
Planets PlanetsPlanetary Feature • Orbital DepositBuildings • DistrictsPlanetary Decisions
Systems SystemsStarbasesMegastructuresBypassesMap
Fleets FleetsShips • Components
Land Warfare ArmiesBombardment Stance
Diplomacy Diplomacy • Federations • Galactic CommunityOpinion ModifiersCasus Belli • War Goals
Events EventsAnomaliesSpecial projectsArchaeological Sites
Gameplay GameplayDefinesResources • Economy
Dynamic modding Dynamic moddingEffectsConditionsScopesModifiersVariablesAI
Media/localisation Maya exporterGraphicsPortraitsFlagsEvent picturesInterfaceIconsMusicLocalisation
Other Console commandsSave-game editingSteam Workshop