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

Scripted effect

return_guardian_travel_effect

return_guardian_travel_effect = { GUARDIAN = … WARD = … }

game/common/scripted_effects/00_education_effects.txt, line 2049 (40 lines). Parameters: $GUARDIAN$, $WARD$.

return_guardian_travel_effect is a scripted effect in Crusader Kings III, written at line 2049 of its file. A call passes 2 parameters: GUARDIAN and WARD. The game's script calls it in 1 place, among them remove_guardian_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_education_effects.txt.

What it does

• 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 (40 lines of game script)
return_guardian_travel_effect = {
	if = {
		limit = {
			is_foreign_court_guest = yes
			NOR = {
				host = liege
				is_playable_character = yes
				any_relation = { #They're not at another ward's court
					type = ward
					is_playable_character = yes
					this = $GUARDIAN$.host
				}
			}
		}
		show_as_tooltip = { return_to_court = yes }
		location ?= { save_scope_as = starting_location }
		set_variable = {
			name = ward_educated
			value = $WARD$
			years = 3
		}
		set_variable = {
			name = ward_educated_realm
			value = host.primary_title
			years = 3
		}
		# Actually return guardian last
		hidden_effect = {
			set_location = scope:starting_location
			start_travel_plan = {
				destination = liege.capital_province
				on_start_on_action = on_guardian_depart_for_home
				on_travel_planner_cancel_on_action = on_guardian_depart_travel_planner_exit
				on_arrival_on_action = on_guardian_arrive_at_home
				on_arrival_destinations = last
				return_trip = no # One way
			}
		}
	}
}

As written in game/common/scripted_effects/00_education_effects.txt.

Where it is used

Every place in common/, events/ and history/ that calls return_guardian_travel_effect.

Scripted effects (1)

Source: game/common/scripted_effects/00_education_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?