Scripted effect
get_guardian_scope_effect
get_guardian_scope_effect = yesgame/common/scripted_effects/00_childhood_effects.txt, line 22 (196 lines). No parameters.
get_guardian_scope_effect is a scripted effect in Crusader Kings III, written at line 22 of its file. It takes no parameters: get_guardian_scope_effect = yes. The game's script calls it in 14 places, among them A Judgment (event child_personality.0007), A Kindling Fire (event child_personality.3003) and A Life in My Hands (event child_personality.0010). Patch 1.20.1.2, from game/common/scripted_effects/00_childhood_effects.txt.
The comment above it in the file
Get a child's Guardian, or alternatively a suitable stand-in, since the event relies on an adult being present
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)
get_guardian_scope_effect = {
if = {
limit = {
any_relation = {
type = guardian
always = yes
}
}
random_relation = {
type = guardian
save_scope_as = guardian
}
}
if = {
limit = {
NOT = { exists = scope:guardian }
exists = court_owner.court_position:court_tutor_court_position
}
court_owner.court_position:court_tutor_court_position ?= {
save_scope_as = guardian
}
}
else_if = {
limit = {
NOT = { exists = scope:guardian }
exists = court_owner.court_position:court_guru_court_position
}
court_owner.court_position:court_guru_court_position ?= {
save_scope_as = guardian
}
}
if = {
limit = {
NOT = { exists = scope:guardian }
is_ruler = yes
any_parent = {
is_available_ai_adult = yes
is_in_the_same_court_as = root
}
}
random_parent = {
limit = {
is_available_ai_adult = yes
is_in_the_same_court_as = root
}
save_scope_as = guardian
}
}
if = {
limit = {
NOT = { exists = scope:guardian }
is_ruler = yes
any_courtier_or_guest = {
is_available_ai_adult = yes
}
}
random_courtier_or_guest = {
limit = {
is_available_ai_adult = yes
}
save_scope_as = guardian
}
}
if = {
limit = {
NOT = { exists = scope:guardian }
any_parent = {
is_ai = yes
is_available = yes
}
}
random_parent = {
limit = {
is_in_the_same_court_as = root
is_ai = yes
is_available = yes
}
alternative_limit = {
is_ai = yes
is_available = yes
}
save_scope_as = guardian
}
}
if = {
limit = {
NOT = { exists = scope:guardian }
any_sibling = {
is_available_ai_adult = yes
}
}
random_sibling = {
limit = {
is_available_ai_adult = yes
is_in_the_same_court_as = root
}
alternative_limit = {
is_available_ai_adult = yes
}
save_scope_as = guardian
}
}
if = {
limit = {
NOT = { exists = scope:guardian }
liege ?= {
any_courtier_or_guest = {
is_available_ai_adult = yes
}
}
}
liege = {
random_courtier_or_guest = {
limit = {
is_available_ai_adult = yes
}
save_scope_as = guardian
}
}
}As written in game/common/scripted_effects/00_childhood_effects.txt.
The first 120 of its 196 lines; the rest is in game/common/scripted_effects/00_childhood_effects.txt from line 22.
Where it is used
Every place in common/, events/ and history/ that calls get_guardian_scope_effect.
Events (14)
- A Judgment
child_personality.0007 - A Kindling Fire
child_personality.3003 - A Life in My Hands
child_personality.0010 - A Mess of a Feast
child_personality.0012 - A Ruler in the Making
child_personality.3005 - Absent Instruction
tgp_child_personality.0004
8 more
- Constant Inquiry
tgp_child_personality.7100 - Harsh Words
tgp_child_personality.7070 - Lost In Thought
child_personality.3009 - Object of My Desire
child_personality.0011 - Open Schedule
tgp_child_personality.7000 - The Burden of Expectations
tgp_child_personality.0010 - Unearned Honor
tgp_child_personality.0003 - Work Smarter, Not Harder
child_personality.3007
Source: game/common/scripted_effects/00_childhood_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.