Scripted effect · The Royal Court files
court_trait_handle_multiple_scopes_effect
court_trait_handle_multiple_scopes_effect = { COURT_TYPE = … TRAIT_LEVEL = … }game/common/scripted_effects/00_ep1_court_type_effects.txt, line 10 (53 lines). Parameters: $COURT_TYPE$, $TRAIT_LEVEL$.
court_trait_handle_multiple_scopes_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 10 of its file. A call passes 2 parameters: COURT_TYPE and TRAIT_LEVEL. The game's script calls it in 1 place, among them court_trait_save_scopes_and_send_interface_message_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_ep1_court_type_effects.txt.
The comment above it in the file
Effect to save down the multiple scopes needed to send interface messages about courtiers gaining/leveling court type traits
What it does
- Every Courtier:
- Where:
ep1_courtier_valid_for_court_trait_$TRAIT_LEVEL$_trigger = { TYPE = $COURT_TYPE$ }
change_trait_rank = { trait = $COURT_TYPE$_court rank = 1 }
- Where:
• 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 (53 lines of game script)
court_trait_handle_multiple_scopes_effect = {
#Save down two scopes for the gathered message
random_courtier = {
limit = {
ep1_courtier_valid_for_court_trait_$TRAIT_LEVEL$_trigger = { TYPE = $COURT_TYPE$ }
is_of_major_interest_to_root_trigger = yes
}
alternative_limit = {
ep1_courtier_valid_for_court_trait_$TRAIT_LEVEL$_trigger = { TYPE = $COURT_TYPE$ }
is_of_minor_interest_to_root_trigger = yes
}
alternative_limit = {
ep1_courtier_valid_for_court_trait_$TRAIT_LEVEL$_trigger = { TYPE = $COURT_TYPE$ }
}
save_scope_as = courtier_1
}
random_courtier = {
limit = {
ep1_courtier_valid_for_court_trait_$TRAIT_LEVEL$_trigger = { TYPE = $COURT_TYPE$ }
is_of_major_interest_to_root_trigger = yes
this != scope:courtier_1
}
alternative_limit = {
ep1_courtier_valid_for_court_trait_$TRAIT_LEVEL$_trigger = { TYPE = $COURT_TYPE$ }
is_of_minor_interest_to_root_trigger = yes
this != scope:courtier_1
}
alternative_limit = {
ep1_courtier_valid_for_court_trait_$TRAIT_LEVEL$_trigger = { TYPE = $COURT_TYPE$ }
this != scope:courtier_1
}
save_scope_as = courtier_2
}
set_variable = {
name = num_other_relevant_courtiers
value = 1
}
every_courtier = {
limit = {
ep1_courtier_valid_for_court_trait_$TRAIT_LEVEL$_trigger = { TYPE = $COURT_TYPE$ }
}
change_trait_rank = {
trait = $COURT_TYPE$_court
rank = 1
}
root = {
change_variable = {
name = num_other_relevant_courtiers
add = 1
}
}
}
}As written in game/common/scripted_effects/00_ep1_court_type_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls court_trait_handle_multiple_scopes_effect.
Scripted effects (1)
Source: game/common/scripted_effects/00_ep1_court_type_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.