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

Scripted effect · By God Alone files

pam_canonize_saint_effect

pam_canonize_saint_effect = { CANDIDATE = … CANONIZER = … CONSECRATION_PROVINCE = … PRESET = … }

game/common/scripted_effects/pam_saint_effects.txt, line 66 (79 lines). Parameters: $CANDIDATE$, $CANONIZER$, $CONSECRATION_PROVINCE$, $PRESET$.

pam_canonize_saint_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 66 of its file. A call passes 4 parameters: CANDIDATE, CANONIZER, CONSECRATION_PROVINCE and PRESET. The game's script calls it in 55 places, among them pam_saint_events.0002 (event), on_death (on action) and 101519 (history). Patch 1.20.1.2, from game/common/scripted_effects/pam_saint_effects.txt.

The comment above it in the file

The actual canonization.
CANONIZER - the ruler putting the saint forward (not root; also run from the HoF approval event).
CANDIDATE - the dead character being canonized.
CONSECRATION_PROVINCE - where they are consecrated / buried.
PRESET - yes for history burials, so the tomb gives the lighter travel homage.

What it does

  • $CANDIDATE$ = { add_trait = saint }
  • $CANONIZER$.faith ?= { … }
  • $CONSECRATION_PROVINCE$ = { … }
  • If

    • $CANONIZER$ = { is_alive = yes }
    • $CANONIZER$.rite ?= { rite_has_parameter = tenet_dulia_canonization_faith_bonus }

    Then

  • $CANDIDATE$.dynasty ?= { … }

• 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 (79 lines of game script)
pam_canonize_saint_effect = {
	$CANDIDATE$ = {
		add_trait = saint
	}
	# Register on the canonizer's faith for the Saints-list UI and faith-split; add_saint needs the saint trait (added above) and a burial province with a holding.
	$CANONIZER$.faith ?= {
		hidden_effect = {
			add_saint = {
				character = $CANDIDATE$
				burial_province = $CONSECRATION_PROVINCE$
			}
		}
	}

	if = {
		limit = {
			$CANDIDATE$ = {
				is_alive = no
				has_dead_character_variable = no_corpse_left
			}
		}
		$CONSECRATION_PROVINCE$ = {
			set_variable = no_corpse_left
		}
	}

	# The engine's saint registry (add_saint, above) owns the saint->province link (saint_burial_location) and the relic charges (remaining_saint_relics). All we keep is the buried-saint travel PoI, plus a thin province list the PoI builder iterates.
	$CONSECRATION_PROVINCE$ = {
		# Only readable through the tomb PoI, so skip provinces that will never get one
		if = {
			limit = {
				$PRESET$ = yes
				NOT = { has_variable = hide_location_for_saint }
			}
			set_variable = pam_preset_buried_saint
		}
		if = {
			limit = {
				NOR = {
					has_variable = hide_location_for_saint
					has_travel_point_of_interest = poi_buried_saint
				}
			}
			add_to_global_variable_list = {
				name = pam_buried_saint_poi_list
				target = $CONSECRATION_PROVINCE$
			}
			add_travel_point_of_interest = poi_buried_saint
		}
	}

	if = {
		limit = {
			$CANONIZER$ = { is_alive = yes }
			$CANONIZER$.rite ?= { rite_has_parameter = tenet_dulia_canonization_faith_bonus }
		}
		pam_grant_dulia_canonization_faith_bonus_effect = {
			CANONIZER = $CANONIZER$
			CANDIDATE = $CANDIDATE$
		}
	}

	# Cost of the next canonization scales with how many saints the dynasty has.
	$CANDIDATE$.dynasty ?= {
		if = {
			limit = { has_variable = pam_dynasty_saint_count }
			change_variable = {
				name = pam_dynasty_saint_count
				add = 1
			}
		}
		else = {
			set_variable = {
				name = pam_dynasty_saint_count
				value = 1
			}
		}
	}
}

As written in game/common/scripted_effects/pam_saint_effects.txt.

Where it is used

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

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

  • on_death

History files (the start of the game) (52)

  • 101519 (characters)
  • 102527 (characters)
  • 1296 (characters)
  • 145241 (characters)
  • 145250 (characters)
  • 145274 (characters)
46 more
  • 145277 (characters)
  • 145278 (characters)
  • 145279 (characters)
  • 145280 (characters)
  • 145290 (characters)
  • 145292 (characters)
  • 161518 (characters)
  • 166132 (characters)
  • 166236 (characters)
  • 166237 (characters)
  • 166238 (characters)
  • 168130 (characters)
  • 168673 (characters)
  • 168686 (characters)
  • 168700 (characters)
  • 168749 (characters)
  • 168750 (characters)
  • 482 (characters)
  • 489 (characters)
  • 506 (characters)
  • 601 (characters)
  • 608 (characters)
  • 70523 (characters)
  • 70599 (characters)
  • 7772 (characters)
  • 7883 (characters)
  • 7893 (characters)
  • 99 (characters)
  • han_7436 (characters)
  • saint_0001 (characters)
  • saint_0002 (characters)
  • saint_0003 (characters)
  • saint_0004 (characters)
  • saint_0005 (characters)
  • saint_0006 (characters)
  • saint_0007 (characters)
  • saint_0008 (characters)
  • saint_0009 (characters)
  • saint_0010 (characters)
  • saint_0011 (characters)
  • saint_0012 (characters)
  • saint_0013 (characters)
  • saint_0014 (characters)
  • saint_0015 (characters)
  • saint_0016 (characters)
  • walpurga_6 (characters)

Scripted effects (1)

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