Scripted effect · Silk and Silver files
gdp_improve_trade_scheme_route_destroyed_effect
gdp_improve_trade_scheme_route_destroyed_effect = yesgame/common/scripted_effects/gdp_trade_scheme_effects.txt, line 49 (37 lines). No parameters.
gdp_improve_trade_scheme_route_destroyed_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 49 of its file. It takes no parameters: gdp_improve_trade_scheme_route_destroyed_effect = yes. The game's script calls it in 1 place, among them on_trade_route_destroyed (on action). Its body carries 3 texts of the game's own for the player. Patch 1.21.0, from game/common/scripted_effects/gdp_trade_scheme_effects.txt.
The comment above it in the file
end_scheme runs no invalidation effects, so the toast is sent here. Run in scheme scope.
What it does
If
scheme_type = gdp_improve_trade_capacity
Then
- scope:owner: The Trade Route … chose to work on no longer exists
Else if
scheme_type = gdp_improve_trade_competitiveness
Then
- scope:owner: The Trade Route … chose to work on no longer exists
Else if
scheme_type = gdp_improve_trade_expertise
Then
- scope:owner: The Trade Route … chose to work on no longer exists
end_scheme = yes
• 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 (37 lines of game script)
gdp_improve_trade_scheme_route_destroyed_effect = {
scheme_owner = { save_scope_as = owner }
if = {
limit = { scheme_type = gdp_improve_trade_capacity }
scope:owner = {
send_interface_toast = {
type = event_toast_effect_neutral
title = gdp_improve_trade_capacity_invalidated_title
left_icon = scope:owner
custom_tooltip = gdp_improve_trade_routes_focused_route_gone
}
}
}
else_if = {
limit = { scheme_type = gdp_improve_trade_competitiveness }
scope:owner = {
send_interface_toast = {
type = event_toast_effect_neutral
title = gdp_improve_trade_competitiveness_invalidated_title
left_icon = scope:owner
custom_tooltip = gdp_improve_trade_routes_focused_route_gone
}
}
}
else_if = {
limit = { scheme_type = gdp_improve_trade_expertise }
scope:owner = {
send_interface_toast = {
type = event_toast_effect_neutral
title = gdp_improve_trade_expertise_invalidated_title
left_icon = scope:owner
custom_tooltip = gdp_improve_trade_routes_focused_route_gone
}
}
}
end_scheme = yes
}As written in game/common/scripted_effects/gdp_trade_scheme_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls gdp_improve_trade_scheme_route_destroyed_effect.
On actions (the game's own hooks) (1)
- on_trade_route_destroyed
Source: game/common/scripted_effects/gdp_trade_scheme_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.21.0.