Scripted effect · By God Alone files
pam_harmonious_society_five_bonds_effect
pam_harmonious_society_five_bonds_effect = yesgame/common/scripted_effects/pam_effects.txt, line 14228 (52 lines). No parameters.
pam_harmonious_society_five_bonds_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 14228 of its file. It takes no parameters: pam_harmonious_society_five_bonds_effect = yes. The game's script calls it in 1 place, among them yearly_playable_pulse (on action). Patch 1.20.1.2, from game/common/scripted_effects/pam_effects.txt.
The comment above it in the file
Character scope. Runs from yearly_playable_pulse The modifier stacks, so remove-all first
What it does
remove_all_character_modifier_instances = tenet_harmonious_society_five_bonds_modifier- If five bonds change more than 0:
- Else, if five bonds change less than 0:
• 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 (52 lines of game script)
pam_harmonious_society_five_bonds_effect = {
remove_all_character_modifier_instances = tenet_harmonious_society_five_bonds_modifier
set_local_variable = {
name = five_bonds_tally
value = pam_five_bonds_tally_value
}
set_local_variable = {
name = five_bonds_change
value = local_var:five_bonds_tally
}
if = {
limit = { has_variable = pam_five_bonds_tally_var }
change_local_variable = {
name = five_bonds_change
subtract = var:pam_five_bonds_tally_var
}
}
# The pulse runs every year; only say something when the tally has actually moved.
if = {
limit = { local_var:five_bonds_change > 0 }
send_interface_toast = {
type = event_toast_effect_good
title = pam_harmonious_society_five_bonds_toast
desc = pam_harmonious_society_five_bonds_toast_desc
left_icon = root
pam_harmonious_society_apply_five_bonds_effect = yes
}
}
else_if = {
limit = { local_var:five_bonds_change < 0 }
send_interface_toast = {
type = event_toast_effect_bad
title = pam_harmonious_society_five_bonds_toast
desc = pam_harmonious_society_five_bonds_toast_desc
left_icon = root
pam_harmonious_society_apply_five_bonds_effect = yes
}
}
else = {
hidden_effect = {
pam_harmonious_society_apply_five_bonds_effect = yes
}
}
set_variable = {
name = pam_five_bonds_tally_var
value = local_var:five_bonds_tally
}
}As written in game/common/scripted_effects/pam_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls pam_harmonious_society_five_bonds_effect.
On actions (the game's own hooks) (1)
- yearly_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.