Scripted effect · Roads to Power files
ep3_become_landed_transfer_effect
ep3_become_landed_transfer_effect = { ENNOBLED_ADVENTURER = … REASON = … TITLE_LIST = … TITLE_RECEIVER = … TYPE = … }game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt, line 898 (359 lines). Parameters: $ENNOBLED_ADVENTURER$, $REASON$, $TITLE_LIST$, $TITLE_RECEIVER$, $TYPE$.
ep3_become_landed_transfer_effect is a scripted effect in Crusader Kings III, in the Roads to Power files, written at line 898 of its file. A call passes 5 parameters: ENNOBLED_ADVENTURER, REASON, TITLE_LIST, TITLE_RECEIVER and TYPE. The game's script calls it in 12 places, among them Another Regal Audience (event ep3_laamps.7004), ep3_interactions_events.0112 (event) and Fork in the Road (event ep3_laamps.0800). Its body carries 7 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt.
What it does
$TITLE_RECEIVER$ = { … }If
NOT = { scope:ascended_throne_value = flag:purchased }
Then
- scope:new_primary_title › Every de jure county:
- Where:
If
a check the game hides
Then
holder.top_liege ?= scope:defender.top_liege
If
a check the game hides
Then
holder.top_liege ?= scope:new_liege.top_liege
change_title_holder_include_vassals = { holder = $TITLE_RECEIVER$ change = scope:title_change take_baronies = no }
- Where:
- Every in list:
- Only some of them (the filter is in the script below)
change_title_holder_include_vassals = { holder = $TITLE_RECEIVER$ change = scope:title_change take_baronies = no }
If
If
a check the game hides
Then
NOT = { scope:ascended_throne_value = flag:conquest }NOT = { scope:ascended_throne_value = flag:conquest_claim }
Then
$TITLE_RECEIVER$ = { … }
- Else, if an Independent Ruler:
$TITLE_RECEIVER$ = { … }
If
$REASON$ = flag:purchased- Any in list:
always = yes
Then
- Every in list:
change_liege = { liege = $TITLE_RECEIVER$ change = scope:purchase_land_vassal_change }
destroy_laamp_effect = { ADVENTURER = $TITLE_RECEIVER$ }
• 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 (120 lines of game script)
ep3_become_landed_transfer_effect = {
ordered_in_list = {
list = $TITLE_LIST$
order_by = tier
save_scope_as = new_primary_title
}
hidden_effect = {
# Liquidate camp
$TITLE_RECEIVER$ = { laamp_clear_domicile_buildings_liquidator_effect = yes }
}
$TITLE_RECEIVER$ = {
if = {
limit = { character:90028 ?= this }
custom_tooltip = ep3_story_cycle_harrying.3053.b.tt
add_character_flag = hereward_settled_flag
}
set_variable = {
name = ascended_throne_reason
value = $REASON$
weeks = 1
}
save_scope_value_as = {
name = ascended_throne_value
value = $REASON$
}
set_variable = { # Used to prevent invalid NF creation
name = laamp_invasion_flag
value = scope:new_primary_title
days = 1
}
}
create_title_and_vassal_change = {
type = $TYPE$
add_claim_on_loss = yes
save_scope_as = title_change
}
scope:new_primary_title.holder ?= { save_scope_as = old_holder }
if = {
limit = { NOT = { exists = scope:old_holder } }
scope:new_primary_title = {
ordered_de_jure_county = {
limit = { holder.top_liege = scope:defender.top_liege }
order_by = development_level
holder = { save_scope_as = old_holder }
}
}
}
scope:supporter ?= { save_scope_as = government_giver }
if = {
limit = { NOT = { exists = scope:government_giver } }
scope:old_holder = { save_scope_as = government_giver }
}
scope:government_giver.government_type ?= {
save_scope_as = old_government
}
if = {
limit = {
NOT = { exists = scope:new_capital }
}
ordered_in_list = {
list = $TITLE_LIST$
limit = { tier = tier_county }
order_by = development_level
save_scope_as = new_capital
}
}
if = {
limit = {
NOT = { exists = scope:new_capital }
}
scope:new_primary_title ?= {
ordered_de_jure_county = {
limit = { holder = scope:old_holder }
alternative_limit = { holder.top_liege = scope:old_holder.top_liege }
order_by = development_level
save_scope_as = new_capital
}
}
}
$TITLE_RECEIVER$ = {
if = {
limit = {
exists = scope:new_primary_title
highest_held_title_tier > scope:new_primary_title.tier
primary_title = { is_landless_type_title = no }
}
primary_title = { save_scope_as = new_primary_title }
}
else = {
scope:new_primary_title ?= {
change_title_holder_include_vassals = {
holder = $TITLE_RECEIVER$
change = scope:title_change
take_baronies = no
}
}
}
}
if = {
limit = {
NOT = { scope:ascended_throne_value = flag:purchased }
}
scope:new_primary_title ?= {
every_de_jure_county = {
limit = {
NOT = { is_in_list = $TITLE_LIST$ }
trigger_if = {
limit = { exists = scope:defender }
holder.top_liege ?= scope:defender.top_liege
}
trigger_if = {
limit = { exists = scope:new_liege }
holder.top_liege ?= scope:new_liege.top_liege
}
}
change_title_holder_include_vassals = {
holder = $TITLE_RECEIVER$
change = scope:title_change
take_baronies = no
}As written in game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt.
The first 120 of its 359 lines; the rest is in game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt from line 898.
Where it is used
Every place in common/, events/ and history/ that calls ep3_become_landed_transfer_effect.
Events (7)
- Another Regal Audience
ep3_laamps.7004 - ep3_interactions_events.0112
- Fork in the Road
ep3_laamps.0800 - Negotiate Joining Wars
ep3_interactions_events.0111 - Restoration: An Honorable Man
cid.2020 - Restoration: Mio Cid
cid.4010
1 more
- The Champion of the …
ep3_decisions_event.6001
Source: game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.