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

hostage_travel_invalidation_effect

hostage_travel_invalidation_effect = yes

game/common/scripted_effects/05_bp2_hostage_effects.txt, line 602 (78 lines). No parameters.

hostage_travel_invalidation_effect is a scripted effect in Crusader Kings III, in the Wards and Wardens files, written at line 602 of its file. It takes no parameters: hostage_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 hostages

What it does

  • If

    • One of these

      • var:hostage_travelling_to_warden:
        • One of these

      • or

        Is imprisoned
      • or

        is_playable_character = yes
      • or

        If

        a check the game hides

        Then

        • NOT = { is_child_of = liege }
        • NOT = { is_grandchild_of = liege }
        • NOT = { is_sibling_of = liege }
        • NOT = { is_nibling_of = liege }

        Otherwise

        • NOT = { exists = liege }

    Then

    • var:hostage_travelling_to_warden › scope:hostage:
      • return_hostage = yes
    • scope:home_court › scope:hostage:
      • return_hostage = yes
      • 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 (78 lines of game script)
hostage_travel_invalidation_effect = {
	if = {
		limit = {
			exists = var:hostage_travelling_to_warden
			OR = {
				var:hostage_travelling_to_warden = {	
					OR = {
						# Warden dies (flag:warden)
						is_alive = no
						# Warden loses lands (flag:warden)
						is_playable_character = no
						# War
						AND = {
							exists = root.liege
							is_at_war_with = root.liege
						}
					}
				}
				# Hostage is jailed (flag:imprisoner)
				is_imprisoned = yes
				# Hostage becomes landed (flag:ruler)
				is_playable_character = yes
				# No longer important to home court (flag:invalid)
				trigger_if = {
					limit = { exists = liege }
					NOR = {
						is_child_of = liege
						is_grandchild_of = liege
						is_sibling_of = liege
						is_nibling_of = liege
					}
				}
				trigger_else = {
					# Home court no longer landed (flag:home_court)
					NOT = { exists = liege }
				}
			}
		}
		save_scope_as = hostage
		if = {
			limit = { exists = liege }
			liege = { save_scope_as = home_court }
		}
		var:hostage_travelling_to_warden = {
			send_interface_toast = {
				title = hostage_invalidated_during_travel_title
				left_icon = scope:hostage
				right_icon = scope:home_court
                show_as_tooltip = {
                    scope:hostage = { return_hostage = yes }
                }
			}
		}
		scope:home_court ?= {
			send_interface_toast = {
				title = hostage_invalidated_during_travel_title
				left_icon = scope:hostage
				right_icon = scope:hostage.var:hostage_travelling_to_warden
				scope:hostage = {
					show_as_tooltip = { return_hostage = yes }
					current_travel_plan = {
						if = {
							limit = { can_cancel = yes }
							cancel_travel_plan = yes
						}
					}
					set_location_to_default = yes
				}
			}
		}
		if = {
			limit = { is_alive = yes }
			remove_variable = hostage_travelling_to_warden
		}
		debug_log = "Hostage 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 hostage_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?