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_extract_relic_from_saint_effect

pam_extract_relic_from_saint_effect = { SITE = … }

game/common/scripted_effects/pam_saint_effects.txt, line 741 (51 lines). Parameters: $SITE$.

pam_extract_relic_from_saint_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 741 of its file. A call passes 1 parameter: SITE. The game's script calls it in 3 places, among them Extract a Relic (decision), A Sacred Relic (event pam_saint_events.0006) and At the Tomb of … (event pam_saint_events.0007). Patch 1.20.1.2, from game/common/scripted_effects/pam_saint_effects.txt.

The comment above it in the file

Run from the extracting ruler (root)
$SITE$ is the burial province to extract from

What it does

• 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 (51 lines of game script)
pam_extract_relic_from_saint_effect = {
	$SITE$ = {
		save_scope_as = relic_site
		saint_in_province = { save_scope_as = relic_creator_saint }
	}
	save_scope_as = extractor
	# Set the relic's tier from the saint before the charge is spent.
	scope:relic_creator_saint = {
		save_scope_value_as = {
			name = quality
			value = pam_saint_relic_quality_value
		}
	}
	# Spend one of the saint's relic charges; the engine checks faith, realm and remaining charges.
	hidden_effect = { consume_saint_relic_charge = scope:relic_creator_saint }
	# Religion-appropriate relic creation (hidden_effect_new_object; saves scope:newly_created_artifact).
	create_appropriate_relic_artifact_from_character_effect = {
		OWNER = scope:extractor
		CREATOR = scope:relic_creator_saint
	}
	# Surface + rename the drawn relic (no repeated type per saint).
	if = {
		limit = { exists = scope:newly_created_artifact }
		hidden_effect_new_object = {
			scope:newly_created_artifact = { save_scope_as = relic_artifact }
			scope:relic_artifact = {
				# Stamped onto the artifact because relic_creator_saint is only in scope during extraction.
				set_variable = {
					name = pam_saint_relic_saint
					value = scope:relic_creator_saint
				}
			}
		}

		# Dulia: relics carry one extra blessing. Hidden so the on-site option tooltip doesn't pre-spoil the random roll.
		if = {
			limit = { rite = { rite_has_parameter = tenet_dulia_extra_relic_modifier } }
			hidden_effect = { pam_add_dulia_extra_relic_modifier_effect = yes }
		}
		# Dulia: a relic from one's own dynast glorifies the house.
		if = {
			limit = {
				rite = { rite_has_parameter = tenet_dulia_dynasty_prestige_from_relics }
				exists = dynasty
				exists = scope:relic_creator_saint.dynasty
				scope:relic_creator_saint.dynasty = dynasty
			}
			pam_grant_dulia_relic_dynasty_prestige_effect = yes
		}
	}
}

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_extract_relic_from_saint_effect.

Decisions (1)

Events (2)

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?