CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

Scripted effect

get_guardian_scope_effect

get_guardian_scope_effect = yes

game/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)

8 more

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.

Spotted a mistake on this page?