Scripted effect · By God Alone files
pam_seed_cardinals_effect
pam_seed_cardinals_effect = yesgame/common/scripted_effects/11_dlc_pam_scripted_effects.txt, line 480 (106 lines). No parameters.
pam_seed_cardinals_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 480 of its file. It takes no parameters: pam_seed_cardinals_effect = yes. The game's script calls it in 3 places, among them on_faith_created (on action), on_game_start (on action) and pam_apply_great_schism_creation_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/11_dlc_pam_scripted_effects.txt.
The comment above it in the file
ROOT = faith. Fill the College up to 10 so vacancy AI does not spam the HoF on creation.
What it does
If
Then
- 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 = yes
- Their holder:
If
- scope:pam_seed_faith: Clerical elector title (less than 10):
Then
grant_cardinal_title_effect = { CARDINAL_COUNTY = capital_county }
- Where › Their holder:
scope:pam_seed_hof:while = { … }
If
NOT = { current_date_is_start_date_trigger = yes }- In list (at least 1):
- scope:pam_seed_hof: Is played by a person
Then
- scope:pam_seed_hof: Event pam_clergy_events.0042 (after 3 days)
- One clerical region title, picked in order:
• 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 (106 lines of game script)
pam_seed_cardinals_effect = {
if = {
limit = {
has_pam_dlc_trigger = yes
has_doctrine_parameter = has_clerical_electors
any_clerical_elector_title = { count < 10 }
OR = {
exists = religious_head
exists = title:k_papal_state.holder
}
}
# Callers fire this from on_actions whose root is a character, so the faith needs its own scope
save_scope_as = pam_seed_faith
if = {
limit = { exists = religious_head }
religious_head = { save_scope_as = pam_seed_hof }
}
else = {
title:k_papal_state.holder = { save_scope_as = pam_seed_hof }
}
scope:pam_seed_hof.capital_county ?= { save_scope_as = pam_seed_cardinal_county }
if = {
limit = { NOT = { exists = scope:pam_seed_cardinal_county } }
title:c_roma = { save_scope_as = pam_seed_cardinal_county }
}
# One ordered pass - same eligibility as pam_cardinal_vacancy_on_death_effect
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:pam_seed_hof
pam_can_hold_cardinalate_trigger = yes
pam_pope_is_head_of_faith_or_rite_trigger = yes
pam_ai_cardinal_candidate_is_immersive_trigger = yes
}
}
order_by = holder.piety_level
max = 10
check_range_bounds = no
holder = {
if = {
limit = {
scope:pam_seed_faith = { any_clerical_elector_title = { count < 10 } }
}
grant_cardinal_title_effect = {
CARDINAL_COUNTY = capital_county
}
if = {
limit = {
is_ai = no
NOT = { current_date_is_start_date_trigger = yes }
}
scope:pam_seed_hof = { save_scope_as = head_of_faith }
pam_notify_player_became_cardinal_effect = yes
}
add_to_list = pam_seeded_cardinals
}
}
}
# Mint only what the promotion pass could not fill (count = 10 is a hard bound)
scope:pam_seed_hof = {
while = {
count = 10
limit = {
scope:pam_seed_faith = { any_clerical_elector_title = { count < 10 } }
}
pam_create_seed_cardinal_effect = {
HOF = scope:pam_seed_hof
LOCATION = scope:pam_seed_cardinal_county.title_province
FAITH = scope:pam_seed_faith
}
scope:pam_new_cardinal ?= {
grant_cardinal_title_effect = {
CARDINAL_COUNTY = scope:pam_seed_cardinal_county
}
add_to_list = pam_seeded_cardinals
}
}
}
# Seeding at game start is part of the setup, but mid-game it would otherwise be silent
if = {
limit = {
NOT = { current_date_is_start_date_trigger = yes }
any_in_list = { list = pam_seeded_cardinals count >= 1 }
scope:pam_seed_hof = { is_ai = no }
}
ordered_in_list = {
list = pam_seeded_cardinals
order_by = piety_level
max = 1
check_range_bounds = no
save_scope_as = cardinal_candidate
}
scope:pam_seed_hof = {
trigger_event = {
id = pam_clergy_events.0042
days = 3
}
}
}
}
}As written in game/common/scripted_effects/11_dlc_pam_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls pam_seed_cardinals_effect.
On actions (the game's own hooks) (2)
- on_faith_created
- on_game_start
Scripted effects (1)
Source: game/common/scripted_effects/11_dlc_pam_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.