Scripted effect · All Under Heaven files
natural_disaster_ruler_start_effect
natural_disaster_ruler_start_effect = yesgame/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt, line 261 (48 lines). No parameters.
natural_disaster_ruler_start_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 261 of its file. It takes no parameters: natural_disaster_ruler_start_effect = yes. The game's script calls it in 2 places, among them … Earthquake (situation) and … Flood (situation). 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
Requires the following scopes: this = character scope:situation scope:situation_sub_region
What it does
tgp_activate_catalyst_against_hegemon_effect = { HEGEMON = scope:ruler.top_liege CATALYST = catalyst_hegemon_natural_disaster }- scope:situation › Depending on situation type:
- When situation type is natural disaster earthquake › scope:ruler:
natural_disaster_start_great_project_effect = { TYPE = earthquake }
- When situation type is natural disaster flood › scope:ruler:
natural_disaster_start_great_project_effect = { TYPE = flood }
- When situation type is natural disaster earthquake › scope:ruler:
• 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 (48 lines of game script)
natural_disaster_ruler_start_effect = {
save_scope_as = ruler
scope:situation.situation_center_province ?= {
if = {
limit = { scope:ruler = county.holder.top_liege }
save_scope_as = disaster_province
}
}
if = {
limit = { NOT = { exists = scope:disaster_province } }
scope:situation_sub_region = {
random_situation_sub_region_county = {
limit = { scope:ruler = holder.top_liege }
title_province = {
save_scope_as = disaster_province
}
}
}
}
tgp_activate_catalyst_against_hegemon_effect = {
HEGEMON = scope:ruler.top_liege
CATALYST = catalyst_hegemon_natural_disaster
}
scope:situation = {
switch = {
trigger = situation_type
natural_disaster_earthquake = {
scope:ruler = { natural_disaster_start_great_project_effect = { TYPE = earthquake } }
}
natural_disaster_flood = {
scope:ruler = { natural_disaster_start_great_project_effect = { TYPE = flood } }
}
}
}
scope:great_project ?= {
set_variable = {
name = situation
value = scope:situation
}
scope:situation = { # Nested to prevent errors from non-existence
add_to_variable_list = {
name = great_projects
target = scope:great_project
}
}
}
}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 natural_disaster_ruler_start_effect.
Situations (2)
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.