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

Scripted trigger · By God Alone files

pam_county_has_actor_primary_site_trigger

pam_county_has_actor_primary_site_trigger = { ACTOR = … }

game/common/scripted_triggers/pam_saint_triggers.txt, line 143 (26 lines). Parameters: $ACTOR$.

pam_county_has_actor_primary_site_trigger is a scripted trigger in Crusader Kings III, in the By God Alone files, written at line 143 of its file. A call passes 1 parameter: ACTOR. The game's script calls it in 3 places, among them … … (decision), pam_pick_actor_consecration_province_effect (scripted effect) and pam_has_free_adjacent_site_trigger (scripted trigger). Patch 1.20.1.2, from game/common/scripted_triggers/pam_saint_triggers.txt.

The comment above it in the file

Does this county (title scope) hold one of $ACTOR$'s primary consecration sites? Used to find provinces adjacent to a real site. Cathedral faiths: a cathedral (an ecclesiastical domicile) in $ACTOR$'s realm sits in the county, whoever owns it. Others: a holy site of $ACTOR$'s faith sits in the county, in realm. Identified from the province's domicile side (same walk as pam_has_free_primary_site_trigger and setup_items) - a cathedral barony's holder isn't reliably the bishop, so a barony->holder lookup misses them. Intentionally intrinsic (cathedral/holy-site nature, not occupancy) so an adjacency burial never seeds further neighbours.

What it checks

  • If

    • $ACTOR$ = { pam_faith_uses_cathedrals_trigger = yes }

    Then

    • $ACTOR$ = { … }

    Otherwise

    • $ACTOR$ = { … }

• 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 (26 lines of game script)
pam_county_has_actor_primary_site_trigger = {
	save_temporary_scope_as = pam_primary_site_county
	trigger_if = {
		limit = { $ACTOR$ = { pam_faith_uses_cathedrals_trigger = yes } }
		$ACTOR$ = {
			OR = {
				AND = {
					pam_character_has_cathedral_trigger = yes
					domicile ?= { domicile_location ?= { county = scope:pam_primary_site_county } }
				}
				any_realm_province = {
					county = scope:pam_primary_site_county
					any_province_domicile = { owner = { pam_character_has_cathedral_trigger = yes } }
				}
			}
		}
	}
	trigger_else = {
		$ACTOR$ = {
			any_realm_province = {
				barony ?= { is_holy_site_of = $ACTOR$.faith }
				county = scope:pam_primary_site_county
			}
		}
	}
}

As written in game/common/scripted_triggers/pam_saint_triggers.txt.

Where it is used

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

Source: game/common/scripted_triggers/pam_saint_triggers.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?