Scripted effect · All Under Heaven files
great_projects_ensure_unique_disaster_recovery_projects_effect
great_projects_ensure_unique_disaster_recovery_projects_effect = yesgame/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt, line 432 (33 lines). No parameters.
great_projects_ensure_unique_disaster_recovery_projects_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 432 of its file. It takes no parameters: great_projects_ensure_unique_disaster_recovery_projects_effect = yes. The game's script calls it in 1 place, among them on_title_gain (on action). Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt.
What it does
- Every character situation:
- Where:
- Every in list:
cancel_great_project = this
- Every in list:
remove_from_list = recovery_projects
• 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 (33 lines of game script)
great_projects_ensure_unique_disaster_recovery_projects_effect = {
save_scope_as = title_holder
every_character_situation = {
limit = { tgp_natural_disaster_situation_is_disaster_trigger = yes }
every_great_project = {
limit = {
OR = {
great_project_type = great_project_earthquake
great_project_type = great_project_flood
}
great_project_owner = scope:title_holder
var:situation = prev
}
add_to_list = recovery_projects
}
random_in_list = { # find the one to keep
list = recovery_projects
limit = { great_project_founder = scope:title_holder }
alternative_limit = { great_project_founder.house = scope:title_holder.house }
alternative_limit = { always = yes } # basically random
save_scope_as = project_to_keep
}
every_in_list = { # destroy the rest
list = recovery_projects
limit = { this != scope:project_to_keep }
cancel_great_project = this
}
every_in_list = { # clear list for next situation
list = recovery_projects
remove_from_list = recovery_projects
}
}
}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 great_projects_ensure_unique_disaster_recovery_projects_effect.
On actions (the game's own hooks) (1)
- on_title_gain
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.