Scripted effect · All Under Heaven files
tgp_treasury_raided_effect
tgp_treasury_raided_effect = yesgame/common/scripted_effects/10_dlc_tgp_dynastic_cycle_scripted_effects.txt, line 728 (31 lines). No parameters.
tgp_treasury_raided_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 728 of its file. It takes no parameters: tgp_treasury_raided_effect = yes. The game's script calls it in 2 places, among them on_raid_action_completion (on action) and on_siege_looting (on action). Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_dynastic_cycle_scripted_effects.txt.
What it does
If
- scope:county › Their holder:
- Has Treasury
- Treasury more than 0
Then
If
is_raid_army = yes
Then
add_loot = treasury_raided_loot_value
title:h_china.holder:remove_treasury = treasury_raided_loot_valueadd_legitimacy_effect = { LEGITIMACY = medium_legitimacy_loss }
- Dynastic Cycle › If the current phase counts “Imperial Treasury Lost Dynastic Cycle Catalyst”: Counts toward the situation's next phase: “Imperial Treasury Lost Dynastic Cycle Catalyst”
- scope:county › Their holder:
• 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 (31 lines of game script)
tgp_treasury_raided_effect = {
if = {
limit = {
exists = title:h_china
scope:county = {
this = title:h_china.title_capital_county
holder ?= {
has_treasury = yes
treasury > 0
}
}
}
# Only raiders get loot, and a besieger still empties the vault and costs the holder legitimacy
if = {
limit = { is_raid_army = yes }
add_loot = treasury_raided_loot_value
}
title:h_china.holder = {
remove_treasury = treasury_raided_loot_value
add_legitimacy_effect = { LEGITIMACY = medium_legitimacy_loss }
}
situation:dynastic_cycle ?= {
if = {
limit = {
situation_top_has_catalyst = catalyst_imperial_treasury_raided
}
trigger_situation_catalyst = catalyst_imperial_treasury_raided
}
}
}
}As written in game/common/scripted_effects/10_dlc_tgp_dynastic_cycle_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls tgp_treasury_raided_effect.
On actions (the game's own hooks) (2)
- on_raid_action_completion
- on_siege_looting
Source: game/common/scripted_effects/10_dlc_tgp_dynastic_cycle_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.