Scripted effect · All Under Heaven files
spawn_natural_disaster_contract_effect
spawn_natural_disaster_contract_effect = yesgame/common/scripted_effects/10_dlc_tgp_scripted_effects.txt, line 335 (74 lines). No parameters.
spawn_natural_disaster_contract_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 335 of its file. It takes no parameters: spawn_natural_disaster_contract_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_scripted_effects.txt.
What it does
If
is_governor = yes- If played by the AI:
is_available = yes
Then
- 1 of 3 things will happen:
- 50%: Nothing else happens
- 33% (base chance; changed in play): Nothing else happens
- 17% (base chance; changed in play): Nothing else happens
trigger_event = { on_action = spawn_natural_disaster_contract_on_action }
• 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 (74 lines of game script)
spawn_natural_disaster_contract_effect = {
if = {
limit = {
is_governor = yes
trigger_if = {
limit = { is_ai = yes }
is_available = yes
}
}
save_scope_as = governor
# Select the Contract Tier (somewhat randomized, based on your experience as a governor)
random_list = {
30 = {
save_scope_value_as = {
name = governance_task_contract_tier
value = define:NTaskContract|LOW_TASK_CONTRACT_TIER
}
}
20 = {
save_scope_value_as = {
name = governance_task_contract_tier
value = define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER
}
modifier = {
add = 10
has_trait = governor
}
modifier = {
add = 10
has_trait = governor
has_trait_xp = {
trait = governor
value >= 40
}
}
}
10 = {
save_scope_value_as = {
name = governance_task_contract_tier
value = define:NTaskContract|HIGH_TASK_CONTRACT_TIER
}
modifier = {
add = 10
has_trait = governor
}
modifier = {
add = 10
has_trait = governor
has_trait_xp = {
trait = governor
value >= 40
}
}
modifier = {
add = 20
has_trait = governor
has_trait_xp = {
trait = governor
value >= 80
}
}
}
}
# Select which contract to create
trigger_event = {
on_action = spawn_natural_disaster_contract_on_action
}
play_sound_effect = "event:/DLC/EP4/SFX/UI/domicile_buildings/tgp_ui_domicile_building_archives_japanese"
}
}As written in game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls spawn_natural_disaster_contract_effect.
Situations (2)
Source: game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.