Scripted effect
remove_laamp_from_exiled_county_automatically_effect
remove_laamp_from_exiled_county_automatically_effect = { LAAMP = … PROVINCE = … }game/common/scripted_effects/00_laamp_effects.txt, line 1681 (110 lines). Parameters: $LAAMP$, $PROVINCE$.
remove_laamp_from_exiled_county_automatically_effect is a scripted effect in Crusader Kings III, written at line 1681 of its file. A call passes 2 parameters: LAAMP and PROVINCE. The game's script calls it in 4 places, among them Imprison (interaction), on_travel_plan_abort (on action) and on_travel_plan_complete (on action). Patch 1.20.1.2, from game/common/scripted_effects/00_laamp_effects.txt.
What it does
If
is_laamp_exiled_from_province_trigger = { PROVINCE = scope:province_effect LAAMP = scope:laamp_effect }
Then
scope:laamp_effect:domicile.domicile_location.county.holder = { … }If a check the game hides passes: the same again (1 line)
domicile.domicile_location.county.holder = { … }
- If played by the AI:
- Gains the modifier “Well Fed Travelers”
- Provisions Use -80%
- Gains the modifier “Well Fed Travelers”
- Sets out on a journey (a travel plan)
• 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 (110 lines of game script)
remove_laamp_from_exiled_county_automatically_effect = {
$PROVINCE$ = { save_scope_as = province_effect }
$LAAMP$ = { save_scope_as = laamp_effect }
if = {
limit = {
exists = domicile.domicile_location.county.holder # Safety check
is_laamp_exiled_from_province_trigger = {
PROVINCE = scope:province_effect
LAAMP = scope:laamp_effect
}
}
scope:laamp_effect = {
# Grab any valid destination to shift to.
## Try somewhere more sensible if we're a player (which is less performant).
domicile.domicile_location.county.holder = { # (is_laamp_exiled_from_province_trigger actually checks county holder)
every_neighboring_and_across_water_top_liege_realm_owner = {
limit = {
this != scope:laamp_effect
}
every_realm_border_county = {
limit = {
exists = holder
NOT = {
holder = {
is_laamp_exiled_from_holder_or_liege_trigger = { LAAMP = scope:laamp_effect }
}
}
}
add_to_list = reroute_counties_list
}
}
ordered_in_list = {
list = reroute_counties_list
order_by = {
value = "title_province.squared_distance(scope:laamp_effect.location)"
multiply = -1
}
save_scope_as = exile_reroute
}
}
## Otherwise, try to grab anywhere valid.
if = {
limit = {
NOT = { exists = scope:exile_reroute }
}
domicile.domicile_location.county.holder = { # (is_laamp_exiled_from_province_trigger actually checks county holder)
random_neighboring_and_across_water_top_liege_realm_owner = {
random_realm_county = {
limit = {
exists = holder
NOT = {
holder = {
is_laamp_exiled_from_holder_or_liege_trigger = { LAAMP = scope:laamp_effect }
}
}
}
save_scope_as = exile_reroute
}
}
}
}
## If we got nothing (which is very unlikely), prep a backup.
if = {
limit = {
NOT = { exists = scope:exile_reroute }
}
scope:province_effect = { save_scope_as = province_to_exit }
ordered_empire = {
limit = {
any_de_jure_county = {
exists = holder
NOT = {
holder = {
is_laamp_exiled_from_holder_or_liege_trigger = { LAAMP = scope:laamp_effect }
}
}
}
}
order_by = {
title_capital_county = { add = "squared_distance(scope:province_to_exit)" }
multiply = -1
}
random_de_jure_county = {
limit = {
exists = holder
NOT = {
holder = {
is_laamp_exiled_from_holder_or_liege_trigger = { LAAMP = scope:laamp_effect }
}
}
}
save_scope_as = exile_reroute
}
}
}
# If we're an AI, give us some relief for our (likely) poor choice of destination.
if = {
limit = { is_ai = yes }
add_character_modifier = laamp_provisions_forgiveness_travel_modifier
}
# Begin travelling.
start_travel_plan = {
destination = scope:exile_reroute.title_province
travel_with_domicile = yes
return_trip = no
players_use_planner = no
}
}
}
}As written in game/common/scripted_effects/00_laamp_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls remove_laamp_from_exiled_county_automatically_effect.
Character interactions (1)
On actions (the game's own hooks) (2)
- on_travel_plan_abort
- on_travel_plan_complete
Scripted effects (1)
Source: game/common/scripted_effects/00_laamp_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.