Scripted effect · All Under Heaven files
spawn_flood_in_region_effect
spawn_flood_in_region_effect = { REGION = … }game/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt, line 136 (47 lines). Parameters: $REGION$.
spawn_flood_in_region_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 136 of its file. A call passes 1 parameter: REGION. The game's script calls it in 1 place, among them natural_disaster.9912 (event). Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt.
What it does
- One random county in region:
- Where: Development level at least 10
region = $REGION$spawn_flood_in_county_effect = { COUNTY = this }
• 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 (47 lines of game script)
spawn_flood_in_region_effect = {
$REGION$ = { save_scope_as = river_region }
random_county_in_region = {
region = $REGION$
limit = { development_level >= 10 }
alternative_limit = { development_level >= 5 }
alternative_limit = { development_level >= 2 }
weight = {
base = 1
modifier = {
any_county_province = { terrain = farmlands }
add = 1
}
modifier = {
any_county_province = { terrain = plains }
add = 1
}
# Distribution
modifier = {
save_temporary_scope_as = county_temp
any_in_global_list = {
variable = ongoing_floods
var:epicenter_county.kingdom ?= scope:county_temp.kingdom
}
factor = 0.5
}
modifier = {
save_temporary_scope_as = county_temp
any_in_global_list = {
variable = ongoing_floods
var:epicenter_county.duchy ?= scope:county_temp.duchy
}
factor = 0.5
}
modifier = {
save_temporary_scope_as = county_temp
any_in_global_list = {
variable = ongoing_floods
var:epicenter_county ?= scope:county_temp
}
factor = 0.1
}
}
spawn_flood_in_county_effect = { COUNTY = this }
}
}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_flood_in_region_effect.
Events (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.