Scripted effect · All Under Heaven files
great_project_reward_contribution_completion_actual_reward_effect
great_project_reward_contribution_completion_actual_reward_effect = { EXTRA_EFFECT = … GOVERNANCE_GAIN = … INFLUENCE_GAIN = … LEGITIMACY_GAIN = … MERIT_GAIN = … PIETY_GAIN = … PRESTIGE_GAIN_FALLBACK = … PRESTIGE_GAIN_WITH_GOVERNANCE = … }game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt, line 278 (49 lines). Parameters: $EXTRA_EFFECT$, $GOVERNANCE_GAIN$, $INFLUENCE_GAIN$, $LEGITIMACY_GAIN$, $MERIT_GAIN$, $PIETY_GAIN$, $PRESTIGE_GAIN_FALLBACK$, $PRESTIGE_GAIN_WITH_GOVERNANCE$.
great_project_reward_contribution_completion_actual_reward_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 278 of its file. A call passes 8 parameters: EXTRA_EFFECT, GOVERNANCE_GAIN, INFLUENCE_GAIN, LEGITIMACY_GAIN, MERIT_GAIN, PIETY_GAIN, PRESTIGE_GAIN_FALLBACK and PRESTIGE_GAIN_WITH_GOVERNANCE. The game's script calls it in 2 places, among them great_project_contribution_completion_reward_major_effect (scripted effect) and great_project_contribution_completion_reward_minor_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt.
What it does
• 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 (49 lines of game script)
great_project_reward_contribution_completion_actual_reward_effect = {
# A great project outlives some of its contributors, and the dead take no reward
if = {
limit = {
is_alive = yes
is_valid_for_legitimacy_change = yes
}
add_legitimacy = {
value = $LEGITIMACY_GAIN$
if = {
limit = {
any_character_situation = {
situation_type = dynastic_cycle
has_situation_top_phase_parameter = dynastic_cycle_great_projects_increased_legitimacy
}
}
multiply = 2
}
}
}
else_if = {
limit = { is_alive = yes }
if = {
limit = { government_has_flag = government_has_influence }
change_influence = $INFLUENCE_GAIN$
}
if = {
limit = { is_governor = yes }
increase_governance_effect = { VALUE = $GOVERNANCE_GAIN$ }
add_prestige = $PRESTIGE_GAIN_WITH_GOVERNANCE$
}
else_if = {
limit = { is_clergy = yes }
add_piety = $PIETY_GAIN$
}
else = {
add_prestige = $PRESTIGE_GAIN_FALLBACK$
}
if = {
limit = {
government_allows = merit
this != title:h_china.holder # Chinese Emperor does not "use" merit
}
change_merit = $MERIT_GAIN$
}
}
$EXTRA_EFFECT$ = yes
}As written in game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls great_project_reward_contribution_completion_actual_reward_effect.
Source: game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.