Scripted effect · By God Alone files
pam_tenet_popularity_on_county_faith_change_effect
pam_tenet_popularity_on_county_faith_change_effect = yesgame/common/scripted_effects/pam_effects.txt, line 8731 (42 lines). No parameters.
pam_tenet_popularity_on_county_faith_change_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 8731 of its file. It takes no parameters: pam_tenet_popularity_on_county_faith_change_effect = yes. The game's script calls it in 1 place, among them on_county_faith_change (on action). Patch 1.20.1.2, from game/common/scripted_effects/pam_effects.txt.
The comment above it in the file
on_county_faith_change sets root as the county and scope:old_faith as the previous faith var:tp_popularity_rite remembers the last credited rite so the old faith can be uncredited
What it does
If a check the game hides passes: the same again (3 lines)
If
scope:old_faith:
Then
- scope:tp_old_rite › Every rite tenet:
status = core- scope:old_faith: Popularity of a tenet changes
If
scope:tp_new_faith:
Then
- scope:tp_new_rite › Every rite tenet:
status = core- scope:tp_new_faith: Popularity of a tenet changes
• 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 (42 lines of game script)
pam_tenet_popularity_on_county_faith_change_effect = {
faith = { save_scope_as = tp_new_faith }
rite = { save_scope_as = tp_new_rite }
if = {
limit = { exists = var:tp_popularity_rite }
var:tp_popularity_rite = { save_scope_as = tp_old_rite }
if = {
limit = { scope:old_faith = { has_tenet_popularity_trigger = yes } }
scope:tp_old_rite = {
every_rite_tenet = {
status = core
save_scope_as = tp_tenet
scope:old_faith = {
change_tenet_popularity = {
target = scope:tp_tenet
change = miniscule_tenet_popularity_loss
}
}
}
}
}
}
if = {
limit = { scope:tp_new_faith = { has_tenet_popularity_trigger = yes } }
scope:tp_new_rite = {
every_rite_tenet = {
status = core
save_scope_as = tp_tenet
scope:tp_new_faith = {
change_tenet_popularity = {
target = scope:tp_tenet
change = miniscule_tenet_popularity_gain
}
}
}
}
}
set_variable = {
name = tp_popularity_rite
value = rite
}
}As written in game/common/scripted_effects/pam_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls pam_tenet_popularity_on_county_faith_change_effect.
On actions (the game's own hooks) (1)
- on_county_faith_change
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.