Scripted effect
notify_faith_of_holy_site_change_effect
notify_faith_of_holy_site_change_effect = { MESSAGE = … MESSAGE_BY_ACTOR = … }game/common/scripted_effects/00_religion_effects.txt, line 1428 (30 lines). Parameters: $MESSAGE$, $MESSAGE_BY_ACTOR$.
notify_faith_of_holy_site_change_effect is a scripted effect in Crusader Kings III, written at line 1428 of its file. A call passes 2 parameters: MESSAGE and MESSAGE_BY_ACTOR. The game's script calls it in 3 places, among them on_faith_holy_site_added (on action), on_faith_holy_site_eminence_changed (on action) and on_faith_holy_site_removed (on action). Patch 1.20.1.2, from game/common/scripted_effects/00_religion_effects.txt.
The comment above it in the file
on_faith_holy_site_* provides holy_site, title, and actor $MESSAGE$ and $MESSAGE_BY_ACTOR$ are the loc keys Toast only reaches the local player Loc keys must be lowercase
What it does
- Every player:
- Where:
faith = scope:notified_faith
If
a check the game hides
Then
localization_values = { notified_faith = scope:notified_faith changed_holy_site = scope:holy_site holy_site_actor = scope:actor }
Otherwise
localization_values = { notified_faith = scope:notified_faith changed_holy_site = scope:holy_site }
- 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 (30 lines of game script)
notify_faith_of_holy_site_change_effect = {
save_temporary_scope_as = notified_faith
every_player = {
limit = { faith = scope:notified_faith }
if = {
limit = { exists = scope:actor }
send_interface_toast = {
type = $MESSAGE_BY_ACTOR$
left_icon = scope:actor
right_icon = scope:title
localization_values = {
notified_faith = scope:notified_faith
changed_holy_site = scope:holy_site
holy_site_actor = scope:actor
}
}
}
else = {
send_interface_toast = {
type = $MESSAGE$
left_icon = scope:notified_faith
right_icon = scope:title
localization_values = {
notified_faith = scope:notified_faith
changed_holy_site = scope:holy_site
}
}
}
}
}As written in game/common/scripted_effects/00_religion_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls notify_faith_of_holy_site_change_effect.
On actions (the game's own hooks) (3)
- on_faith_holy_site_added
- on_faith_holy_site_eminence_changed
- on_faith_holy_site_removed
Source: game/common/scripted_effects/00_religion_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.