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_depart_effect

hostage_depart_effect = { HOME_COURT = … HOSTAGE = … WARDEN = … }

game/common/scripted_effects/05_bp2_hostage_effects.txt, line 436 (164 lines). Parameters: $HOME_COURT$, $HOSTAGE$, $WARDEN$.

hostage_depart_effect is a scripted effect in Crusader Kings III, in the Wards and Wardens files, written at line 436 of its file. A call passes 3 parameters: HOME_COURT, HOSTAGE and WARDEN. The game's script calls it in 9 places, among them Demand Hostage (interaction), Exchange Hostages (interaction) and Offer Hostage (interaction). Its body carries 10 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/05_bp2_hostage_effects.txt.

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)
hostage_depart_effect = {
	$HOSTAGE$ ?= {
		# Remove guardian if relevant
		if = {
			limit = {
				any_relation = { type = guardian }
			}
			every_relation = {
				type = guardian
				save_scope_as = current_guardian_scope
				remove_guardian_effect = {
					GUARDIAN = scope:current_guardian_scope
					WARD = $HOSTAGE$
					RETURN_WARD = no
					HIDE_OPINION = yes
				}
			}
		}
		else_if = {
			limit = {
				any_relation = { type = ward }
			}
			every_relation = {
				type = ward
				save_scope_as = current_ward_scope
				remove_guardian_effect = {
					GUARDIAN = $HOSTAGE$
					WARD = scope:current_ward_scope
					RETURN_WARD = yes
					HIDE_OPINION = yes
				}
			}
		}
		hidden_effect = {
			$HOME_COURT$ = {
				send_interface_toast = {
					title = hostage_departs_title
					left_icon = $HOSTAGE$
					right_icon = $WARDEN$
					# Departure info
					$HOSTAGE$ = {
						custom_description = {
							text = hostage_leaves_home_tt 
							subject = $HOSTAGE$
							object = $WARDEN$
						}
					}
				}
			}
			# Toast for recipient
			$WARDEN$ = {
				send_interface_toast = {
					title = hostage_departs_title
					left_icon = $HOSTAGE$
					right_icon = $HOME_COURT$
					# Departure info
					$HOSTAGE$ = {
						custom_description = {
							text = hostage_leaves_home_tt 
							subject = $HOSTAGE$
							object = $WARDEN$
						}
					}
				}
			}
		}
		show_as_tooltip = {
			$WARDEN$ = { take_hostage = $HOSTAGE$ }
		}
		if = {
			limit = {
				OR = {
					bp2_warden_title_tier_lower_trigger = { WARDEN = $WARDEN$ HOME_COURT = $HOME_COURT$ }
					bp2_warden_dynasty_renown_lower_trigger = { WARDEN = $WARDEN$ HOME_COURT = $HOME_COURT$ }
				}
			}
			if = {
				limit = {
					$WARDEN$.faith = {
						faith_hostility_level = {
							target = $HOME_COURT$.faith
							value >= faith_hostile_level
						}
					}
				}
				custom_description = {
					text = hostage_prestige_piety_renown_income_tt
					subject = $WARDEN$
				}
				custom_description_no_bullet = {
					text = hostage_faith_hostility_tt
					subject = $WARDEN$
					object = $HOME_COURT$
				}
				if = {
					limit = {
						bp2_warden_dynasty_renown_lower_trigger = { WARDEN = $WARDEN$ HOME_COURT = $HOME_COURT$ }
					}
					custom_description_no_bullet = {
						text = warden_lower_dynasty_renown_tt
						subject = $WARDEN$
						object = $HOME_COURT$
					}
				}
				if = {
					limit = {
						bp2_warden_title_tier_lower_trigger = { WARDEN = $WARDEN$ HOME_COURT = $HOME_COURT$ }
					}
					custom_description_no_bullet = {
						text = warden_lower_title_tier_tt
						subject = $WARDEN$
						object = $HOME_COURT$
					}
				}
			}
			else = {
				custom_description = {
					text = hostage_prestige_renown_income_tt
					subject = $WARDEN$
				}

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

The first 120 of its 164 lines; the rest is in game/common/scripted_effects/05_bp2_hostage_effects.txt from line 436.

Where it is used

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

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?