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

Scripted effect

commander_trait_leveling_leveling_effect

commander_trait_leveling_leveling_effect = { XP = … }

game/common/scripted_effects/00_war_effects.txt, line 2736 (296 lines). Parameters: $XP$.

commander_trait_leveling_leveling_effect is a scripted effect in Crusader Kings III, written at line 2736 of its file. A call passes 1 parameter: XP. The game's script calls it in 2 places, among them on_combat_end_loser (on action) and on_combat_end_winner (on action). Patch 1.20.1.2, from game/common/scripted_effects/00_war_effects.txt.

The comment above it in the file

ROOT is a combat side in this scripted effect, but the THIS scope should be the commander

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)
commander_trait_leveling_leveling_effect = {
	if = { # Terrain Based
		limit = {
			OR = {
				has_trait = desert_warrior
				has_trait = open_terrain_expert
				has_trait = rough_terrain_expert
				has_trait = forest_fighter
				has_trait = jungle_stalker
			}
		}
		if = {
			limit = {
				has_trait = desert_warrior
				location = {
					OR = {
						terrain = drylands
						terrain = desert
						terrain = desert_mountains
						terrain = oasis
					}
				}
			}
			add_trait_xp = {
				trait = desert_warrior
				value = {
					value = $XP$
					multiply = 2
					add = {
						value = martial
						divide = 10
					}
				}
			}
		}
		else_if = {
			limit = {
				has_trait = open_terrain_expert
				location = {
					OR = {
						terrain = farmlands
						terrain = plains
						terrain = steppe
					}
				}
			}
			add_trait_xp = {
				trait = open_terrain_expert
				value = {
					value = $XP$
					multiply = 2
					add = {
						value = martial
						divide = 10
					}
				}
			}
		}
		else_if = {
			limit = {
				has_trait = rough_terrain_expert
				location = {
					OR = {
						terrain = hills
						terrain = mountains
						terrain = wetlands
					}
				}
			}
			add_trait_xp = {
				trait = rough_terrain_expert
				value = {
					value = $XP$
					multiply = 2
					add = {
						value = martial
						divide = 10
					}
				}
			}
		}
		else_if = {
			limit = {
				has_trait = forest_fighter
				location = {
					OR = {
						terrain = forest
						terrain = taiga
					}
				}
			}
			add_trait_xp = {
				trait = forest_fighter
				value = {
					value = $XP$
					multiply = 2
					add = {
						value = martial
						divide = 10
					}
				}
			}
		}
		else_if = {
			limit = {
				has_trait = jungle_stalker
				location = {
					terrain = jungle
				}
			}
			add_trait_xp = {
				trait = jungle_stalker
				value = {
					value = $XP$
					multiply = 2
					add = {
						value = martial
						divide = 10
					}
				}

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

The first 120 of its 296 lines; the rest is in game/common/scripted_effects/00_war_effects.txt from line 2736.

Where it is used

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

On actions (the game's own hooks) (2)

  • on_combat_end_loser
  • on_combat_end_winner

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