Scripted effect
ep3_frankokratia_clear_old_lands_change_capital_effect
ep3_frankokratia_clear_old_lands_change_capital_effect = yesgame/common/scripted_effects/07_frankokratia_scripted_effects.txt, line 2416 (129 lines). No parameters.
ep3_frankokratia_clear_old_lands_change_capital_effect is a scripted effect in Crusader Kings III, written at line 2416 of its file. It takes no parameters: ep3_frankokratia_clear_old_lands_change_capital_effect = yes. The game's script calls it in 2 places, among them Baptized by Fire (event ep3_frankokratia_events.0042) and Ours is the Purple (event ep3_frankokratia_events.0044). Its body carries 4 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/07_frankokratia_scripted_effects.txt.
What it does
If
Then
Else if
Then
• 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)
ep3_frankokratia_clear_old_lands_change_capital_effect = {
if = {
limit = {
ep3_frankokratia_discard_old_lands_trigger = yes
exists = scope:latin_kingdom_1
exists = scope:latin_kingdom_2
this = scope:latin_empire_receiver
}
custom_tooltip = old_titles_vassals_emp_beneficiary_2_kings_tooltip
}
else_if = {
limit = {
ep3_frankokratia_discard_old_lands_trigger = yes
exists = scope:latin_kingdom_1
this = scope:latin_empire_receiver
}
custom_tooltip = old_titles_vassals_emp_beneficiary_1_king_tooltip
}
else_if = {
limit = {
this = scope:latin_empire_receiver
}
custom_tooltip = old_titles_vassals_emp_beneficiary_no_king_tooltip
}
else = {
custom_tooltip = old_titles_vassals_lord_beneficiary_tooltip
}
if = {
limit = {
this != scope:latin_empire_receiver
}
scope:beneficiary = {
save_scope_as = old_title_gainer
}
}
else = {
scope:emp_beneficiary = {
save_scope_as = old_title_gainer
}
}
hidden_effect = {
if = {
limit = {
OR = {
any_in_list = {
list = root_old_vassals
count >= 1
}
any_in_list = {
list = root_old_titles
count >= 1
}
}
}
#Remove all of character's other titles - pass to heir?
create_title_and_vassal_change = {
type = granted
save_scope_as = change
add_claim_on_loss = no
}
every_in_list = {
list = root_old_vassals
change_liege = {
liege = scope:old_title_gainer
change = scope:change
}
}
every_in_list = {
list = root_old_titles
change_title_holder = {
holder = scope:old_title_gainer
change = scope:change
}
}
resolve_title_and_vassal_change = scope:change
#Need to give titles back to their former liege
if = {
limit = {
has_variable = old_liege
}
var:old_liege = {
save_scope_as = old_liege
}
scope:old_title_gainer = {
create_title_and_vassal_change = {
type = granted
save_scope_as = change
add_claim_on_loss = no
}
change_liege = {
liege = scope:old_liege
change = scope:change
}
resolve_title_and_vassal_change = scope:change
}
}
##Or need to make titles independent
else_if = {
limit = {
scope:old_title_gainer = {
highest_held_title_tier < tier_empire
}
}
scope:old_title_gainer = {
create_title_and_vassal_change = {
type = independency
save_scope_as = change
add_claim_on_loss = no
}
becomes_independent = { change = scope:change }
resolve_title_and_vassal_change = scope:change
}
}
}
if = {
limit = {
any_realm_county = {
this = title:c_byzantion
}
capital_county = {As written in game/common/scripted_effects/07_frankokratia_scripted_effects.txt.
The first 120 of its 129 lines; the rest is in game/common/scripted_effects/07_frankokratia_scripted_effects.txt from line 2416.
Where it is used
Every place in common/, events/ and history/ that calls ep3_frankokratia_clear_old_lands_change_capital_effect.
Events (2)
- Baptized by Fire
ep3_frankokratia_events.0042 - Ours is the Purple
ep3_frankokratia_events.0044
Source: game/common/scripted_effects/07_frankokratia_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.