Scripted effect
set_correct_mongol_breakup_vassalage_effect
set_correct_mongol_breakup_vassalage_effect = yesgame/common/scripted_effects/00_mongol_invasion_effects.txt, line 5041 (509 lines). No parameters.
set_correct_mongol_breakup_vassalage_effect is a scripted effect in Crusader Kings III, written at line 5041 of its file. It takes no parameters: set_correct_mongol_breakup_vassalage_effect = yes. The game's script calls it in 1 place, among them break_up_mongol_empire_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_mongol_invasion_effects.txt.
The comment above it in the file
Set up all vassals and assign them flags for the "correct" Khanate
What it does
Every line of it is script with no tooltip text: the script is below.
The script as written (120 lines of game script)
set_correct_mongol_breakup_vassalage_effect = {
scope:old_mongol_emperor = {
every_vassal = {
limit = {
NOT = { is_in_list = selected_mongol_heirs }
is_playable_character = yes
highest_held_title_tier >= tier_county
}
debug_log = "Trying to assign correct vassalage placement for:"
debug_log_scopes = no
save_scope_as = vassal
# Note: the variables for counting counties is set before checking whether the relevant title will be created, to prevent null-reference errors later
set_global_variable = {
name = ilkhanate_county_count
value = 0
}
if = { # Count Ilkhanate Counties
limit = {
exists = global_var:ilkhanate_handed_out
}
every_sub_realm_county = {
limit = {
is_in_list = ilkhanate_counties
}
scope:vassal = {
change_global_variable = {
name = ilkhanate_county_count
add = 1
}
}
}
}
set_global_variable = {
name = golden_horde_county_count
value = 0
}
if = { # Count Golden Horde Counties
limit = {
exists = global_var:golden_horde_handed_out
}
every_sub_realm_county = {
limit = {
is_in_list = golden_horde_counties
}
scope:vassal = {
change_global_variable = {
name = golden_horde_county_count
add = 1
}
}
}
}
set_global_variable = {
name = chagatai_county_count
value = 0
}
if = { # Count Chagatai Counties
limit = {
exists = global_var:chagatai_handed_out
}
every_sub_realm_county = {
limit = {
is_in_list = chagatai_counties
}
scope:vassal = {
change_global_variable = {
name = chagatai_county_count
add = 1
}
}
}
}
set_global_variable = {
name = great_yuan_county_count
value = 0
}
if = { # Count Great Yuan Counties
limit = {
exists = global_var:great_yuan_handed_out
}
every_sub_realm_county = {
limit = {
is_in_list = great_yuan_counties
}
scope:vassal = {
change_global_variable = {
name = great_yuan_county_count
add = 1
}
}
}
}
set_global_variable = {
name = red_horde_county_count
value = 0
}
if = { # Count Red Horde counties
limit = {
exists = global_var:red_horde_handed_out
}
every_sub_realm_county = {
limit = {
is_in_list = red_horde_counties
}
scope:vassal = {
change_global_variable = {
name = red_horde_county_count
add = 1
}
}
}
}
set_global_variable = {
name = white_horde_county_count
value = 0
}
if = { # Count White Horde counties
limit = {As written in game/common/scripted_effects/00_mongol_invasion_effects.txt.
The first 120 of its 509 lines; the rest is in game/common/scripted_effects/00_mongol_invasion_effects.txt from line 5041.
Where it is used
Every place in common/, events/ and history/ that calls set_correct_mongol_breakup_vassalage_effect.
Scripted effects (1)
Source: game/common/scripted_effects/00_mongol_invasion_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.