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

Scripted effect · All Under Heaven files

pledge_loyalty_to_liege_refund_and_cleanup_effect

pledge_loyalty_to_liege_refund_and_cleanup_effect = yes

game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt, line 1308 (47 lines). No parameters.

pledge_loyalty_to_liege_refund_and_cleanup_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 1308 of its file. It takes no parameters: pledge_loyalty_to_liege_refund_and_cleanup_effect = yes. The game's script calls it in 2 places, among them on_travel_plan_cancel (on action) and pledge_loyalty_to_liege_travel_planner_exit (on action). Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt.

What it does

  • If has “pledge loyalty to liege gold value” (a variable the game's script sets): They gets …
  • Depending on traits:
    • If they have Shy: Loses 30 Stress
    • If they have Arrogant: Loses 30 Stress

• 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 (47 lines of game script)
pledge_loyalty_to_liege_refund_and_cleanup_effect = {
	send_interface_toast = {
		type = event_toast_effect_neutral
		title = pledge_loyalty_to_liege_costs_refunded
		left_icon = root
		# Remove variable preventing you from kneeling before liege again
		if = {
			limit = {
				has_variable = pledge_loyalty_to_liege_grace
				exists = liege
				var:pledge_loyalty_to_liege_grace = liege
			}
			remove_variable = pledge_loyalty_to_liege_grace
		}
		# refund any costs
		if = {
			limit = {
				has_variable = pledge_loyalty_to_liege_gold_value
			}
			add_gold = var:pledge_loyalty_to_liege_gold_value
		}
		switch = {
			trigger = has_trait
			shy = { add_stress = medium_stress_impact_loss }
			arrogant = { add_stress = medium_stress_impact_loss }
		}
	}
	# Variable cleanup
	if = {
		limit = { has_variable = homage_type }
		remove_variable = homage_type
	}
	# Contract
	if = {
		limit = { has_variable = pledge_loyalty_to_liege_contract_type }
		remove_variable = pledge_loyalty_to_liege_contract_type
	}
	# Liege
	if = {
		limit = { has_variable = pledge_loyalty_to_liege_scope }
		remove_variable = pledge_loyalty_to_liege_scope
	}
	if = {
		limit = { has_variable = pledge_loyalty_to_liege_gold_value }
		remove_variable = pledge_loyalty_to_liege_gold_value
	}
}

As written in game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt.

Where it is used

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

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

  • on_travel_plan_cancel
  • pledge_loyalty_to_liege_travel_planner_exit

Source: game/common/scripted_effects/10_dlc_tgp_scripted_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?