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

Scripted effect · Wards and Wardens files

ward_travel_invalidation_effect

ward_travel_invalidation_effect = yes

game/common/scripted_effects/05_bp2_hostage_effects.txt, line 682 (68 lines). No parameters.

ward_travel_invalidation_effect is a scripted effect in Crusader Kings III, in the Wards and Wardens files, written at line 682 of its file. It takes no parameters: ward_travel_invalidation_effect = yes. The game's script calls it in 2 places, among them migration_events_on_action (on action) and travel_events_on_action (on action). Patch 1.20.1.2, from game/common/scripted_effects/05_bp2_hostage_effects.txt.

The comment above it in the file

Invalidate travelling wards

What it does

  • If

    • One of these

      • Is imprisoned
      • or

        Any relation:
      • or

        is_playable_character = yes
      • or

        var:ward_travelling_to_guardian:
        • is_alive = no
        • Is imprisoned
        • Num of relation ward at least 2
      • or

        NOT = { exists = var:ward_travelling_to_guardian }
      • or

        NOT = { exists = var:character_making_education_request }

    Then

    • If a check the game hides passes: the same again (1 line)
      • Their liege › scope:ward:
        • remove_relation_guardian = scope:guardian
    • scope:guardian › scope:ward:
      • remove_relation_guardian = scope:guardian
      • current_travel_plan = { … }
      • set_location_to_default = yes

• 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 (68 lines of game script)
ward_travel_invalidation_effect = {
	if = {
		limit = {
			exists = var:ward_travelling_to_guardian
			OR = {
				# Ward is imprisoned
				is_imprisoned = yes
				# Ward has guardian already
				any_relation = { type = guardian }
				is_playable_character = yes

				var:ward_travelling_to_guardian = {
					is_alive = no
					# Guardian is jailed
					is_imprisoned = yes
					# Guardian has wards already
					num_of_relation_ward >= 2
				}
				NOT = { exists = var:ward_travelling_to_guardian }
				NOT = { exists = var:character_making_education_request }
			}
		}
		var:ward_travelling_to_guardian ?= { save_scope_as = guardian }
		save_scope_as = ward
		if = {
			limit = { exists = liege }
			liege = {
				save_scope_as = ward_liege
				send_interface_toast = {
					title = ward_invalidated_during_travel_title
					left_icon = scope:ward
					right_icon = scope:guardian
					show_as_tooltip = {
						scope:ward = { remove_relation_guardian = scope:guardian }
					}
				}
			}
		}
		scope:guardian ?= {
			send_interface_toast = {
				title = ward_invalidated_during_travel_title
				left_icon = scope:ward
				right_icon = scope:ward_liege
				scope:ward = {
					show_as_tooltip = { remove_relation_guardian = scope:guardian }
					current_travel_plan = {
						if = {
							limit = { can_cancel = yes }
							cancel_travel_plan = yes
						}
					}
					set_location_to_default = yes
				}
			}
			if = {
				limit = { is_alive = yes }
				remove_variable = guardian_waiting_for_ward
			}
		}
		if = {
			limit = { is_alive = yes }
			remove_variable = ward_travelling_to_guardian
			remove_variable = character_making_education_request
		}
		debug_log = "Ward invalidated during travel"
		debug_log_scopes = yes
	}
}

As written in game/common/scripted_effects/05_bp2_hostage_effects.txt.

Where it is used

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

On actions (the game's own hooks) (2)

  • migration_events_on_action
  • travel_events_on_action

Source: game/common/scripted_effects/05_bp2_hostage_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?