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
- scope:liege: Is an Independent Ruler
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.
Events (5)
- Chaotic Succession: Dissolution
mpo_chaotic_kurultai_succession.0014 - faction_demand.0001
- faction_demand.1000
- fp1_jomsvikings.1011
- Mandala Succession: The Road Ahead
tgp_east_asia_mandala_events.8550
On actions (the game's own hooks) (1)
- yearly_playable_pulse
Scripted effects (3)
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.