Scripted effect
diplomacy_foreign_1150_successful_county_switch_effect
diplomacy_foreign_1150_successful_county_switch_effect = yesgame/common/scripted_effects/00_diplomacy_lifestyle_effects.txt, line 342 (94 lines). No parameters.
diplomacy_foreign_1150_successful_county_switch_effect is a scripted effect in Crusader Kings III, written at line 342 of its file. It takes no parameters: diplomacy_foreign_1150_successful_county_switch_effect = yes. The game's script calls it in 3 places, among them Tidying Borders (event diplomacy_foreign.1150), Tidying Borders (event diplomacy_foreign.1151) and Tidying Borders (event diplomacy_foreign.1153). Patch 1.20.1.2, from game/common/scripted_effects/00_diplomacy_lifestyle_effects.txt.
What it does
Otherwise
scope:neighbor_vassal:change_liege = { liege = scope:neighbor change = scope:change }
scope:ruler:add_diplomacy_lifestyle_xp = major_lifestyle_experience
- scope:neighbor: Opinion: Respect (+20)
• 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 (94 lines of game script)
diplomacy_foreign_1150_successful_county_switch_effect = {
# Give your county/vassal to the neighbor
if = {
limit = {
scope:county.holder = scope:neighbor
}
create_title_and_vassal_change = {
type = returned
save_scope_as = change
add_claim_on_loss = no
}
scope:county = {
change_title_holder = {
holder = scope:ruler
change = scope:change
}
}
resolve_title_and_vassal_change = scope:change
}
else_if = {
limit = {
scope:ruler_vassal = {
highest_held_title_tier = tier_county
}
}
create_title_and_vassal_change = {
type = returned
save_scope_as = change
add_claim_on_loss = no
}
scope:ruler_vassal = {
change_liege = {
liege = scope:ruler
change = scope:change
}
}
resolve_title_and_vassal_change = scope:change
}
else = {
create_title_and_vassal_change = {
type = returned
save_scope_as = change
add_claim_on_loss = no
}
scope:county = {
change_title_holder = {
holder = scope:ruler
change = scope:change
}
}
}
# The neighbor gives his county/vassal to you.
if = {
limit = {
scope:neighbor_county.holder = scope:ruler
}
create_title_and_vassal_change = {
type = returned
save_scope_as = change
add_claim_on_loss = no
}
scope:neighbor_county = {
change_title_holder = {
holder = scope:neighbor
change = scope:change
}
}
resolve_title_and_vassal_change = scope:change
}
else = {
create_title_and_vassal_change = {
type = returned
save_scope_as = change
add_claim_on_loss = no
}
scope:neighbor_vassal = {
change_liege = {
liege = scope:neighbor
change = scope:change
}
}
resolve_title_and_vassal_change = scope:change
}
# Add xp
scope:ruler = { add_diplomacy_lifestyle_xp = major_lifestyle_experience }
# Add positive opinion
scope:neighbor = {
add_opinion = {
modifier = respect_opinion
target = scope:ruler
opinion = low_positive_opinion
}
}
}As written in game/common/scripted_effects/00_diplomacy_lifestyle_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls diplomacy_foreign_1150_successful_county_switch_effect.
Events (3)
- Tidying Borders
diplomacy_foreign.1150 - Tidying Borders
diplomacy_foreign.1151 - Tidying Borders
diplomacy_foreign.1153
Source: game/common/scripted_effects/00_diplomacy_lifestyle_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.