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

Scripted effect

ward_depart_effect

ward_depart_effect = yes

game/common/scripted_effects/00_education_effects.txt, line 3288 (184 lines). No parameters.

ward_depart_effect is a scripted effect in Crusader Kings III, written at line 3288 of its file. It takes no parameters: ward_depart_effect = yes. The game's script calls it in 1 place, among them educate_child_interaction_effect (scripted effect). Its body carries 4 texts of the game's own for the player. 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 (120 lines of game script)
ward_depart_effect = {
	scope:guardian = { add_to_list = toast_list }
	scope:ward = { add_to_list = toast_list }
	scope:guardian_liege = { add_to_list = toast_list }
	scope:ward_liege = { add_to_list = toast_list }
	# Set variables
	scope:ward = {
		set_variable = {
			name = character_making_education_request
			value = scope:puppet_or_actor
			years = 10
		}
		# Remove existing guardian if relevant
		if = {
			limit = {
				exists = scope:offer_guardianship_interaction
				any_relation = { type = guardian }
			}
			random_relation = {
				type = guardian
				save_scope_as = guardian_to_remove
			}
			remove_guardian_effect = {
				GUARDIAN = scope:guardian_to_remove
				WARD = scope:ward
				RETURN_WARD = no
				HIDE_OPINION = no
			}
		}
		remove_character_flag = under_offer_as_ward_flag
	}
	if = { # No travel necessary
		limit = {
			OR = {
				scope:ward = scope:guardian.host
				scope:guardian = scope:ward.host
				scope:ward.host = scope:guardian.host
				#allow landed ruler to landed ruler education
				AND = {
					scope:ward = {
						is_landed_or_landless_administrative_or_theocratic = yes
					}
					scope:guardian = {
						is_landed_or_landless_administrative_or_theocratic = yes
					}
				}
			}
		}
		hidden_effect = { #to prevent doubling of "becomes guardian of x" effect in the interaction confirmation window
			if = {
				limit = {
					NOT = {
						scope:guardian = { has_relation_ward = scope:ward }
					}
				}
				scope:guardian = { set_relation_ward = scope:ward }
			}
		}
		#Opinions
		guardian_add_opinion_effect = {
			GUARDIAN = scope:guardian
			WARD_LIEGE = scope:ward_liege
			WARD = scope:ward
		}
		# Convert culture setup
		scope:ward = {
			if = {
				limit = { has_character_flag = convert_culture }
				scope:guardian = {
					add_relation_flag = {
						relation = ward
						target = scope:ward
						flag = convert_culture
					}
				}
				remove_character_flag = convert_culture
			}
			# Convert faith setup
			if = {
				limit = { has_character_flag = convert_faith }
				scope:guardian = {
					add_relation_flag = {
						relation = ward
						target = scope:ward
						flag = convert_faith
					}
				}
				remove_character_flag = convert_faith
			}
		}
	}
	else = {
		if = { # Guardian heads to landed Ward
			limit = {
				scope:ward = { is_playable_character = yes }
			}
			scope:guardian = {
				set_variable = {
					name = guardian_travelling_to_ward
					years = 2
					value = scope:ward
				}
				start_travel_plan = {
					destination = scope:ward.capital_province
					on_start_on_action = on_guardian_depart_for_ward
					on_travel_planner_cancel_on_action = on_guardian_depart_travel_planner_exit
					on_arrival_on_action = on_guardian_arrive_at_ward
					on_arrival_destinations = last
					return_trip = no # One way
				}
			}
			hidden_effect = {
				every_in_list = {
					list = toast_list
					send_interface_toast = {
						title = guardian_departs_title
						left_icon = scope:guardian
						right_icon = scope:ward
						custom_tooltip = guardian_departs_tt
					}

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

The first 120 of its 184 lines; the rest is in game/common/scripted_effects/00_education_effects.txt from line 3288.

Where it is used

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

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?