Scripted effect · By God Alone files
pam_cardinal_vacancy_on_death_effect
pam_cardinal_vacancy_on_death_effect = yesgame/common/scripted_effects/pam_effects.txt, line 13521 (97 lines). No parameters.
pam_cardinal_vacancy_on_death_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 13521 of its file. It takes no parameters: pam_cardinal_vacancy_on_death_effect = yes. The game's script calls it in 1 place, among them on_death (on action). Patch 1.20.1.2, from game/common/scripted_effects/pam_effects.txt.
What it does
If
One of these
exists = clerical_elector_titleor
has_character_flag = cardinal_flag
One of these
exists = faith.religious_heador
exists = title:k_papal_state.holder
- Their faith:
Then
If
- scope:head_of_faith: Is played by the AI
Then
- Their faith › One clerical region title, picked in order:
- Where › Their holder:
- Is an Adult
- Is not incapable
- Does not have the Trait: Excommunicated
pam_can_hold_cardinalate_trigger = yespam_pope_is_head_of_faith_or_rite_trigger = yespam_ai_cardinal_candidate_is_immersive_trigger = yespam_is_antipope_trigger = no
- Their holder: Event pam_clergy_events.0040 (after 3 days)
- Where › Their holder:
Otherwise
• 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 (97 lines of game script)
pam_cardinal_vacancy_on_death_effect = {
if = {
limit = {
has_pam_dlc_trigger = yes
OR = {
exists = clerical_elector_title
has_character_flag = cardinal_flag
}
OR = {
exists = faith.religious_head
exists = title:k_papal_state.holder
}
faith = {
has_doctrine_parameter = has_clerical_electors
any_clerical_elector_title = { count < 10 }
}
}
if = {
limit = { exists = faith.religious_head }
faith.religious_head = { save_scope_as = head_of_faith }
}
else = {
title:k_papal_state.holder = { save_scope_as = head_of_faith }
}
if = {
limit = {
scope:head_of_faith = { is_ai = yes }
}
faith = {
ordered_clerical_region_title = {
limit = {
holder ?= {
is_alive = yes
is_adult = yes
is_incapable = no
NOT = { has_trait = excommunicated }
NOT = { exists = clerical_elector_title }
this != scope:head_of_faith
pam_can_hold_cardinalate_trigger = yes
pam_pope_is_head_of_faith_or_rite_trigger = yes
pam_ai_cardinal_candidate_is_immersive_trigger = yes
pam_is_antipope_trigger = no
}
}
order_by = holder.piety_level
max = 1
check_range_bounds = no
holder = {
save_scope_as = cardinal_candidate
trigger_event = {
id = pam_clergy_events.0040
days = 3
}
}
}
}
}
else = {
faith = {
ordered_clerical_region_title = {
limit = {
holder ?= {
is_ai = yes
is_alive = yes
is_adult = yes
is_incapable = no
NOT = { has_trait = excommunicated }
NOT = { exists = clerical_elector_title }
this != scope:head_of_faith
pam_can_hold_cardinalate_trigger = yes
pam_pope_is_head_of_faith_or_rite_trigger = yes
pam_ai_cardinal_candidate_is_immersive_trigger = yes
pam_is_antipope_trigger = no
}
}
order_by = holder.piety_level
max = 1
check_range_bounds = no
holder = {
save_scope_as = cardinal_candidate
}
}
}
if = {
limit = {
exists = scope:cardinal_candidate
}
scope:head_of_faith = {
trigger_event = {
id = pam_clergy_events.0041
days = 3
}
}
}
}
}
}As written in game/common/scripted_effects/pam_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls pam_cardinal_vacancy_on_death_effect.
On actions (the game's own hooks) (1)
- on_death
Source: game/common/scripted_effects/pam_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.