Scripted effect
game_rule_random_ruler_placement_shuffle_list_effect
game_rule_random_ruler_placement_shuffle_list_effect = { LIST_NAME = … }game/common/scripted_effects/00_game_rule_effects.txt, line 762 (48 lines). Parameters: $LIST_NAME$.
game_rule_random_ruler_placement_shuffle_list_effect is a scripted effect in Crusader Kings III, written at line 762 of its file. A call passes 1 parameter: LIST_NAME. The game's script calls it in 1 place, among them game_rule_random_ruler_placement_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_game_rule_effects.txt.
What it does
- One random in list:
remove_from_list = $LIST_NAME$
while = { … }
• 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 (48 lines of game script)
game_rule_random_ruler_placement_shuffle_list_effect = {
random_in_list = {
list = $LIST_NAME$
save_scope_as = previous_ruler
remove_from_list = $LIST_NAME$
} #First ruler will get stuff and not give away anything, lucky them
while = {
limit = {
any_in_list = {
list = $LIST_NAME$
NOT = { has_character_flag = already_swapped }
}
}
random_in_list = {
limit = { NOT = { has_character_flag = already_swapped } }
list = $LIST_NAME$
#Create change
create_title_and_vassal_change = {
type = conquest
save_scope_as = change
add_claim_on_loss = no
}
every_held_title = {
title_tier >= county
change_title_holder_include_vassals = {
holder = scope:previous_ruler
change = scope:change
}
}
resolve_title_and_vassal_change = scope:change
#Convert if needed
if = {
limit = { has_game_rule = random_ruler_placement_on_conversion }
set_character_faith_with_conversion = scope:previous_ruler.faith
}
#Saved to take titles next + blocked from being stolen from again
save_scope_as = previous_ruler
add_character_flag = {
flag = already_swapped
days = 3
}
}
}
}As written in game/common/scripted_effects/00_game_rule_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls game_rule_random_ruler_placement_shuffle_list_effect.
Scripted effects (1)
Source: game/common/scripted_effects/00_game_rule_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.