Scripted effect · All Under Heaven files
natural_disaster_death_damage_roll_effect
natural_disaster_death_damage_roll_effect = yesgame/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt, line 550 (228 lines). No parameters.
natural_disaster_death_damage_roll_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 550 of its file. It takes no parameters: natural_disaster_death_damage_roll_effect = yes. The game's script calls it in 1 place, among them natural_disaster.9011 (event). Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt.
What it does
- Every player: Event natural_disaster.5101
- Every in list › scope:message_receiver_temp › If any character situation: Event natural_disaster.5102
- Every in list:
army_commander ?= { … }
- Every in list:
- Where:
None of these
army_commander = { is_in_list = informees }save_temporary_scope_as = army_temp- Any in list:
knight_army ?= scope:army_temp
army_owner = { … }
- Where:
- Every in list:
- Where: Is played by the AI
natural_disaster_death_effect = { VICTIM = scope:victim_temp }
- Every in list:
• 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 (120 lines of game script)
natural_disaster_death_damage_roll_effect = {
save_scope_as = situation
every_situation_county = {
every_county_province = {
every_character_in_location = { add_to_list = killable_characters }
every_army_in_location = { add_to_list = damageable_armies }
}
}
# Risk of characters to die or their armies to get damaged
every_in_list = {
list = killable_characters
if = {
limit = { is_pool_character = yes }
add_to_list = killed_characters
commanding_army ?= { add_to_list = damaged_armies }
knight_army ?= { add_to_list = damaged_armies }
}
else = {
random = {
chance = natural_disaster_base_death_chance_value
add_to_list = killed_characters
commanding_army ?= { add_to_list = damaged_armies }
knight_army ?= { add_to_list = damaged_armies }
}
}
}
# Risk of armies to get damaged if they weren't already from their leader commander/knight dying
every_in_list = {
list = damageable_armies
limit = {
NOT = { is_in_list = damaged_armies }
}
random = { # 25% to 50% base risk of getting damaged depending on size, plus more from type and severity
chance = 25
modifier = {
add = {
value = army_size
divide = 1000
max = 25
}
}
modifier = { # Earthquakes are more deadly
scope:situation = { situation_type = natural_disaster_earthquake }
factor = 1.5
}
modifier = { # Earthquake epicenters are more deadly
scope:situation.var:epicenter_county ?= location.county
factor = 1.5
}
add_to_list = damaged_armies
}
}
# EVENTS
# Inform players they may die.
every_player = {
limit = { is_in_list = killed_characters }
add_to_list = informees
trigger_event = natural_disaster.5101
}
# Otherwise inform players of any deaths.
every_in_list = {
list = killed_characters
save_scope_as = killed_character
every_player = {
if = {
limit = {
scope:killed_character = { is_travelling = yes }
this = current_travel_plan.travel_plan_owner
}
save_scope_as = message_receiver_temp
}
else_if = {
limit = {
scope:killed_character = { is_in_army = yes }
this = knight_army.army_commander
}
save_scope_as = message_receiver_temp
}
else_if = {
limit = {
scope:killed_character = { exists = involved_activity }
involved_activity ?= scope:killed_character.involved_activity
}
save_scope_as = message_receiver_temp
}
else_if = {
limit = {
scope:killed_character = { liege_or_court_owner = prev }
}
save_scope_as = message_receiver_temp
}
else_if = {
limit = {
OR = {
is_of_major_interest_trigger = { CHARACTER = scope:killed_character }
is_of_minor_interest_trigger = { CHARACTER = scope:killed_character }
}
}
save_scope_as = message_receiver_temp
}
}
scope:message_receiver_temp ?= {
if = {
limit = {
any_character_situation = { this = scope:situation } # we literally do not care if we aren't subject to the disaster
NOT = { is_in_list = informees }
}
add_to_list = informees
if = {
limit = {
any_in_list = {
list = killed_characters
location = prev.location
}
}
save_scope_as = local_death
}As written in game/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt.
The first 120 of its 228 lines; the rest is in game/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt from line 550.
Where it is used
Every place in common/, events/ and history/ that calls natural_disaster_death_damage_roll_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.