Scripted effect · All Under Heaven files
spawn_earthquake_in_county_effect
spawn_earthquake_in_county_effect = { COUNTY = … }game/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt, line 73 (62 lines). Parameters: $COUNTY$.
spawn_earthquake_in_county_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 73 of its file. A call passes 1 parameter: COUNTY. The game's script calls it in 2 places, among them spawn_earthquake_in_region_effect (scripted effect) and Spawn Natural Disaster (interaction). Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt.
What it does
start_situation = { type = natural_disaster_earthquake save_scope_as = situation }scope:situation:set_situation_center_province = scope:epicenter_county.title_provincesituation_sub_region:disaster_area = { add_dejure_title_to_sub_region = scope:epicenter_county }- scope:epicenter_county › Every neighboring county:
scope:situation.situation_sub_region:disaster_area:add_dejure_title_to_sub_region = scope:neighbouring_county
clear_saved_scope = neighbouring_county
log_natural_disaster = started
• 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 (62 lines of game script)
spawn_earthquake_in_county_effect = {
$COUNTY$ = { save_scope_as = epicenter_county }
# Track globally for exclusivity and distribution
start_situation = {
type = natural_disaster_earthquake
save_scope_as = situation
}
scope:situation ?= {
set_situation_center_province = scope:epicenter_county.title_province
add_to_global_variable_list = {
name = ongoing_earthquakes
target = this
}
set_variable = {
name = fatalities
value = 0
}
save_scope_value_as = {
name = min_severity
value = scope:epicenter_county.title_province.natural_disaster_earthquake_min_severity
}
save_scope_value_as = {
name = max_severity
value = scope:epicenter_county.title_province.natural_disaster_earthquake_max_severity
}
set_variable = {
name = severity
value = {
add = {
fixed_range = {
min = 1
max = 3
}
min = scope:min_severity
max = scope:max_severity
}
}
}
set_variable = {
name = epicenter_county
value = scope:epicenter_county
}
situation_sub_region:disaster_area = { add_dejure_title_to_sub_region = scope:epicenter_county }
# Add neighbours to sub_region
scope:epicenter_county = {
every_neighboring_county = {
add_to_temporary_list = neighbouring_counties
save_temporary_scope_as = neighbouring_county
scope:situation.situation_sub_region:disaster_area = { add_dejure_title_to_sub_region = scope:neighbouring_county }
# Cleanup for simpler debugging
clear_saved_scope = neighbouring_county
}
}
log_natural_disaster = "started"
}
}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 spawn_earthquake_in_county_effect.
Character interactions (1)
- Spawn Natural Disaster
Scripted effects (1)
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.