Scripted effect · By God Alone files
pam_ai_personal_tenet_pulse_effect
pam_ai_personal_tenet_pulse_effect = yesgame/common/scripted_effects/pam_effects.txt, line 1188 (177 lines). No parameters.
pam_ai_personal_tenet_pulse_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 1188 of its file. It takes no parameters: pam_ai_personal_tenet_pulse_effect = yes. The game's script calls it in 1 place, among them five_year_playable_pulse (on action). Patch 1.20.1.2, from game/common/scripted_effects/pam_effects.txt.
The comment above it in the file
Called from five_year_playable_pulse. Root is the character.
What it does
If
is_physically_able_ai = yes
Then
If
Then
while = { … }
while = { … }If
- Free personal tenet slots at most 0
- Any desired tenet:
only_positive = yesthreshold = 1selection_count = 97None of these
- You › Any personal tenet:
this = scope:pam_personal_tenet_candidate
- You › Any personal tenet:
One of these
NOT = { root.faith.main_rite = { … } }or
You:
Then
- 30% chance of › One random desired tenet:
- Where:
None of these
- You › Any personal tenet:
this = scope:pam_personal_tenet_candidate
- You › Any personal tenet:
One of these
NOT = { root.faith.main_rite = { … } }or
You:
only_positive = yesthreshold = 1selection_count = 97- You:
force_set_personal_tenet = prev
- Where:
• 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 (120 lines of game script)
pam_ai_personal_tenet_pulse_effect = {
if = {
limit = {
is_physically_able_ai = yes
}
# Phase 0: cardinals may hold beliefs their rite prohibits, so a new pontiff can arrive carrying one
# Ahead of Phase 1 so the freed slot refills this pulse; on_personal_tenet_loss clears the secret
if = {
limit = {
pam_holds_college_elected_church_seat_trigger = yes
pam_has_forbidden_personal_tenet_trigger = yes
}
faith.main_rite = { save_temporary_scope_as = pam_pontiff_rite }
while = {
count = 8
limit = { pam_has_forbidden_personal_tenet_trigger = yes }
random_personal_tenet = {
limit = {
scope:pam_pontiff_rite = {
has_tenet_status = {
tenet = prev
status = prohibited
}
}
}
root = { remove_personal_tenet = prev }
}
}
}
# Phase 1: fill every empty personal tenet slot. No chance gate - empty slots are wasted SF and immersion.
# 8 = safety upper bound on slot cap (base 1 + up to ~5 from piety levels, with headroom).
while = {
count = 8
limit = {
free_personal_tenet_slots > 0
any_desired_tenet = {
only_positive = yes
threshold = 1
selection_count = 97
save_temporary_scope_as = pam_personal_tenet_candidate
NOT = {
root = {
any_personal_tenet = {
this = scope:pam_personal_tenet_candidate
}
}
}
OR = {
NOT = {
root.faith.main_rite = {
has_tenet_status = {
tenet = scope:pam_personal_tenet_candidate
status = prohibited
}
}
}
root = { pam_ai_can_consider_forbidden_personal_tenet_trigger = yes }
}
}
}
random_desired_tenet = {
only_positive = yes
threshold = 1
selection_count = 97
limit = {
save_temporary_scope_as = pam_personal_tenet_candidate
NOT = {
root = {
any_personal_tenet = {
this = scope:pam_personal_tenet_candidate
}
}
}
OR = {
NOT = {
root.faith.main_rite = {
has_tenet_status = {
tenet = scope:pam_personal_tenet_candidate
status = prohibited
}
}
}
root = { pam_ai_can_consider_forbidden_personal_tenet_trigger = yes }
}
}
root = { set_personal_tenet = prev }
}
}
# Phase 2: chance-gated swap, only when there are no free slots left to fill.
if = {
limit = {
free_personal_tenet_slots <= 0
any_desired_tenet = {
only_positive = yes
threshold = 1
selection_count = 97
save_temporary_scope_as = pam_personal_tenet_candidate
NOT = {
root = {
any_personal_tenet = {
this = scope:pam_personal_tenet_candidate
}
}
}
OR = {
NOT = {
root.faith.main_rite = {
has_tenet_status = {
tenet = scope:pam_personal_tenet_candidate
status = prohibited
}
}
}
root = { pam_ai_can_consider_forbidden_personal_tenet_trigger = yes }
}
}As written in game/common/scripted_effects/pam_effects.txt.
The first 120 of its 177 lines; the rest is in game/common/scripted_effects/pam_effects.txt from line 1188.
Where it is used
Every place in common/, events/ and history/ that calls pam_ai_personal_tenet_pulse_effect.
On actions (the game's own hooks) (1)
- five_year_playable_pulse
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.