CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

Scripted effect

assign_commander_trait_effect

assign_commander_trait_effect = yes

game/common/scripted_effects/00_education_effects.txt, line 700 (250 lines). No parameters.

assign_commander_trait_effect is a scripted effect in Crusader Kings III, written at line 700 of its file. It takes no parameters: assign_commander_trait_effect = yes. The game's script calls it in 1 place, among them Coming of Age (event coming_of_age.0003). Patch 1.20.1.2, from game/common/scripted_effects/00_education_effects.txt.

The comment above it in the file

To assign a commander trait (based on culture, faith, etc.) to a child with a martial education

What it does

• the game's own tooltip text · ◦ our reading of the script line · code the script where neither exists

“They” is whatever it runs on (the scope it is called in). The scripted triggers and effects it calls link to their own pages; $PARAMETERS$ stay as written: each call fills them in.

The script as written (120 lines of game script)
assign_commander_trait_effect = {
	random_list = {
		100 = {
			trigger = { NOT = { has_trait = logistician } }
			add_trait = logistician
		}
		100 = {
			trigger = { NOT = { has_trait = military_engineer } }
			add_trait = military_engineer
		}
		100 = {
			trigger = { NOT = { has_trait = aggressive_attacker } }
			add_trait = aggressive_attacker
		}
		100 = {
			trigger = { NOT = { has_trait = unyielding_defender } }
			add_trait = unyielding_defender
		}
		100 = {
			trigger = { NOT = { has_trait = forder } }
			add_trait = forder
		}
		100 = {
			trigger = { NOT = { has_trait = flexible_leader } }
			add_trait = flexible_leader
		}
		100 = {
			trigger = {
				NOT = { has_trait = desert_warrior }
				OR = {
					any_directly_owned_province = {
						terrain = desert
					}
					AND = {
						exists = scope:educator
						scope:educator = {
							any_directly_owned_province = {
								terrain = desert
							}
						}
					}
					AND = {
						NOT = { exists = scope:educator }
						liege ?= {
							any_directly_owned_province = {
								terrain = desert
							}
						}
					}
				}
			}
			modifier = {
				culture = {
					has_cultural_parameter = desert_warrior_trait_more_common
				}
				factor = 2
			}
			add_trait = desert_warrior
		}
		100 = {
			trigger = {
				NOT = { has_trait = jungle_stalker }
				OR = {
					any_directly_owned_province = {
						terrain = jungle
					}
					AND = {
						exists = scope:educator
						scope:educator = {
							any_directly_owned_province = {
								terrain = jungle
							}
						}
					}
					AND = {
						NOT = { exists = scope:educator }
						liege ?= {
							any_directly_owned_province = {
								terrain = jungle
							}
						}
					}
				}
			}
			modifier = {
				culture = {
					has_cultural_parameter = jungle_stalker_trait_more_common
				}
				factor = 2
			}
			add_trait = jungle_stalker
		}
		100 = {
			trigger = {
				NOT = { has_trait = winter_soldier }
				OR = {
					any_directly_owned_province = {
						OR = {
							terrain = taiga
							geographical_region = world_tibet
							geographical_region = world_europe_north
							geographical_region = world_europe_east
							geographical_region = world_steppe
						}
					}
					AND = {
						exists = scope:educator
						scope:educator = {
							any_directly_owned_province = {
								OR = {
									terrain = taiga
									geographical_region = world_tibet
									geographical_region = world_europe_north
									geographical_region = world_europe_east
									geographical_region = world_steppe
								}
							}
						}
					}
					AND = {

As written in game/common/scripted_effects/00_education_effects.txt.

The first 120 of its 250 lines; the rest is in game/common/scripted_effects/00_education_effects.txt from line 700.

Where it is used

Every place in common/, events/ and history/ that calls assign_commander_trait_effect.

Events (1)

Source: game/common/scripted_effects/00_education_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.

Spotted a mistake on this page?