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

Scripted effect

give_random_commander_trait_effect

give_random_commander_trait_effect = yes

game/common/scripted_effects/00_martial_lifestyle_effects.txt, line 13 (136 lines). No parameters.

give_random_commander_trait_effect is a scripted effect in Crusader Kings III, written at line 13 of its file. It takes no parameters: give_random_commander_trait_effect = yes. The game's script calls it in 13 places, among them Inspire the Troops (decision), …: Tourney Day (event councillor_spouse_martial.1001) and Change of Path (event tgp_dynastic_cycle_events.0030). Patch 1.20.1.2, from game/common/scripted_effects/00_martial_lifestyle_effects.txt.

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)
give_random_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 }
				any_sub_realm_barony = {
					title_province = {
						OR = {
							terrain = desert
							terrain = desert_mountains
							terrain = oasis
							terrain = drylands
						}
					}
				}
			}
			add_trait = desert_warrior
		}
		100 = {
			trigger = {
				NOT = { has_trait = jungle_stalker }
				any_sub_realm_barony = {
					title_province = {
						terrain = jungle
					}
				}
			}
			add_trait = jungle_stalker
		}
		100 = {
			trigger = {
				NOT = { has_trait = winter_soldier }
				any_sub_realm_barony = {
					title_province = {
						OR = {
							terrain = taiga
							geographical_region = world_tibet
							geographical_region = world_europe_north
							geographical_region = world_europe_east
							geographical_region = world_steppe
						}
					}
				}
			}
			add_trait = winter_soldier
		}
		100 = {
			trigger = {
				NOT = { has_trait = forest_fighter }
				any_sub_realm_barony = {
					title_province = {
						OR = {
							terrain = forest
							terrain = taiga
						}
					}
				}
			}
			add_trait = forest_fighter
		}
		100 = {
			trigger = {
				NOT = { has_trait = open_terrain_expert }
				any_sub_realm_barony = {
					title_province = {
						OR = {
							terrain = plains
							terrain = farmlands
							terrain = steppe
						}
					}
				}
			}
			add_trait = open_terrain_expert
		}
		100 = {
			trigger = {
				NOT = { has_trait = rough_terrain_expert }
				any_sub_realm_barony = {
					title_province = {
						OR = {
							terrain = hills
							terrain = mountains
							terrain = wetlands
						}
					}
				}
			}
			add_trait = rough_terrain_expert
		}
		100 = {
			trigger = { NOT = { has_trait = reaver } }
			add_trait = reaver
		}
		100 = {
			trigger = { NOT = { has_trait = reckless } }

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

The first 120 of its 136 lines; the rest is in game/common/scripted_effects/00_martial_lifestyle_effects.txt from line 13.

Where it is used

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

Decisions (1)

Events (5)

Scripted character templates (6)

  • new_commander_character
  • new_siege_engineer
  • new_warrior_character
  • pool_repopulate_local_flavor
  • tgp_minister_commander_template
  • tgp_warrior_monk_template

Source: game/common/scripted_effects/00_martial_lifestyle_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?