Scripted effect · All Under Heaven files
tenet_benevolent_governance_disaster_relief_effect
tenet_benevolent_governance_disaster_relief_effect = { AMOUNT = … TIER = … }game/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt, line 1082 (45 lines). Parameters: $AMOUNT$, $TIER$.
tenet_benevolent_governance_disaster_relief_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 1082 of its file. A call passes 2 parameters: AMOUNT and TIER. The game's script calls it in 2 places, among them great_project_earthquake (great project) and great_project_flood (great project). Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt.
The comment above it in the file
Called from on_contribution_funded of every natural disaster contribution, root is the contributor. AMOUNT: spiritual fulfillment gained, scaled to whether the contribution was mandatory or voluntary.
What it does
If
- The Personal Tenets unlock tenet benevolent governance disaster relief fulfillment
scope:great_project:NOT = { is_target_in_variable_list = { name = benevolent_governance_relief_rewarded_$TIER$ target = scope:benevolent_governance_contributor } }
Then
- If played by a person: Spiritual fulfillment changes
- Otherwise: Spiritual fulfillment 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 (45 lines of game script)
tenet_benevolent_governance_disaster_relief_effect = {
save_temporary_scope_as = benevolent_governance_contributor
# Recorded regardless of tenet, so a later adopter is not reproached for a disaster they did fund
if = {
limit = { this = scope:owner }
scope:great_project ?= {
set_variable = {
name = benevolent_governance_relief_funded
value = yes
}
}
}
if = {
limit = {
has_personal_tenet_flag = tenet_benevolent_governance_disaster_relief_fulfillment
exists = scope:great_project
scope:great_project = {
NOT = {
is_target_in_variable_list = {
name = benevolent_governance_relief_rewarded_$TIER$
target = scope:benevolent_governance_contributor
}
}
}
}
scope:great_project = {
add_to_variable_list = {
name = benevolent_governance_relief_rewarded_$TIER$
target = scope:benevolent_governance_contributor
}
}
if = {
limit = { is_ai = no }
send_interface_toast = {
type = event_generic_good
title = benevolent_governance_disaster_relief_fulfillment_toast
left_icon = root
change_spiritual_fulfillment = $AMOUNT$
}
}
else = {
change_spiritual_fulfillment = $AMOUNT$
}
}
}As written in game/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls tenet_benevolent_governance_disaster_relief_effect.
Great projects (2)
- great_project_earthquake
- great_project_flood
Source: game/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.