Scripted effect · All Under Heaven files
natural_disaster_insurance_effect
natural_disaster_insurance_effect = yesgame/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt, line 310 (99 lines). No parameters.
natural_disaster_insurance_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 310 of its file. It takes no parameters: natural_disaster_insurance_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.
What it does
- Every situation participant:
- Where › Any sub realm county:
- The county has the modifier “Natural Disaster Insurance”
- Any county situation:
If
a check the game hides
Then
scope:minister:pay_short_term_treasury = { target = scope:insured_holder treasury = conduct_census_natural_disaster_payout_value }- scope:insured_holder › Every sub realm county:
- Where: The county has the modifier “Natural Disaster Insurance” · Any county situation:
- The county loses the modifier “Natural Disaster Insurance”
Otherwise
- Treasury +1,000
- Every sub realm county:
- Where: The county has the modifier “Natural Disaster Insurance” · Any county situation:
- The county loses the modifier “Natural Disaster Insurance”
- Where › Any sub realm county:
• 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 (99 lines of game script)
natural_disaster_insurance_effect = {
if = {
limit = {
title:e_minister_of_revenue.holder ?= {
treasury > conduct_census_natural_disaster_payout_value
}
}
title:e_minister_of_revenue.holder = {
save_scope_as = minister
}
}
else_if = {
limit = {
any_situation_participant = {
any_liege_or_above = {
is_ai = yes
treasury > conduct_census_natural_disaster_payout_value
}
}
}
random_situation_participant = {
limit = {
any_liege_or_above = {
is_ai = yes
treasury > conduct_census_natural_disaster_payout_value
}
}
ordered_liege_or_above = {
order_by = {
value = highest_held_title_tier
multiply = -1
}
limit = {
is_ai = yes
treasury > conduct_census_natural_disaster_payout_value
}
save_scope_as = minister
}
}
}
every_situation_participant = {
limit = {
any_sub_realm_county = {
has_county_modifier = tgp_minister_project_conduct_census_natural_disaster_insurance_modifier
any_county_situation = {
this = scope:situation
}
}
}
save_temporary_scope_as = insured_holder
send_interface_message = {
type = event_toast_effect_good
title = great_project_natural_disaster_insurance_received_t
left_icon = title:e_minister_of_revenue
right_icon = scope:minister
if = {
limit = {
exists = scope:minister
this != scope:minister
}
scope:minister = {
send_interface_message = {
type = event_toast_effect_good
title = great_project_natural_disaster_insurance_paid_t
left_icon = title:e_minister_of_revenue
right_icon = scope:insured_holder
pay_short_term_treasury = {
target = scope:insured_holder
treasury = conduct_census_natural_disaster_payout_value
}
scope:insured_holder = {
every_sub_realm_county = {
limit = {
has_county_modifier = tgp_minister_project_conduct_census_natural_disaster_insurance_modifier
any_county_situation = {
this = scope:situation
}
}
remove_county_modifier = tgp_minister_project_conduct_census_natural_disaster_insurance_modifier
}
}
}
}
}
else = {
add_treasury = conduct_census_natural_disaster_payout_value
every_sub_realm_county = {
limit = {
has_county_modifier = tgp_minister_project_conduct_census_natural_disaster_insurance_modifier
any_county_situation = {
this = scope:situation
}
}
remove_county_modifier = tgp_minister_project_conduct_census_natural_disaster_insurance_modifier
}
}
}
}
}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_insurance_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.