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

Scripted effect

change_liege_or_become_independent

change_liege_or_become_independent = { CHANGE = … VASSAL = … }

game/common/scripted_effects/00_war_effects.txt, line 1271 (26 lines). Parameters: $CHANGE$, $VASSAL$.

change_liege_or_become_independent is a scripted effect in Crusader Kings III, written at line 1271 of its file. A call passes 2 parameters: CHANGE and VASSAL. The game's script calls it in 13 places, among them Dissolution Faction (casus belli), Independence Faction (casus belli) and Independence War (casus belli). Patch 1.20.1.2, from game/common/scripted_effects/00_war_effects.txt.

What it does

  • If

    Then

    • scope:vassal:
      • becomes_independent = { change = scope:change }

    Otherwise

    • scope:vassal:
      • change_liege = { liege = scope:liege.liege change = scope:change }

• 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 (26 lines of game script)
change_liege_or_become_independent = {
	$CHANGE$ = { save_scope_as = change }
	$VASSAL$ = { save_scope_as = vassal }
	scope:vassal.liege = { save_scope_as = liege }

	if = {
		limit = {
			scope:liege = {
				top_liege = this
			}
		}
		scope:vassal = {
			becomes_independent = {
				change = scope:change
			}
		}
	}
	else = {
		scope:vassal = {
			change_liege = {
				liege = scope:liege.liege
				change = scope:change
			}
		}
	}
}

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

Where it is used

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

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?