Scripted effect
ep3_frankokratia_form_byzantine_kingdoms_effect
ep3_frankokratia_form_byzantine_kingdoms_effect = yesgame/common/scripted_effects/07_frankokratia_scripted_effects.txt, line 4066 (732 lines). No parameters.
ep3_frankokratia_form_byzantine_kingdoms_effect is a scripted effect in Crusader Kings III, written at line 4066 of its file. It takes no parameters: ep3_frankokratia_form_byzantine_kingdoms_effect = yes. The game's script calls it in 1 place, among them ep3_frankokratia_events.0050 (event). Patch 1.20.1.2, from game/common/scripted_effects/07_frankokratia_scripted_effects.txt.
What it does
- Every vassal or below:
- Only some of them (the filter is in the script below)
create_character_memory = { type = frankokratia_byz_independent_memory }- scope:player_byz_kingdom: Gains the … Title (player byz king)
- Every vassal:
- Where:
- Has “frankokratia gaining vassal” (a variable the game's script sets)
var:frankokratia_gaining_vassal:NOT = { is_vassal_or_below_of = prev }
var:frankokratia_gaining_vassal:change_liege = { liege = scope:new_daddy change = scope:change }
- Where:
- Every vassal or below:
- Where:
assign_feudal_governments_effect = yescreate_character_memory = { type = frankokratia_byz_independent_memory }becomes_independent = { change = scope:change }
If
- Any vassal:
- Highest held Title is at most Duchy Rank
- they has administrative government mechanic
- Their capital county › Their kingdom’s holder:
One of these
is_in_list = byz_vassalsor
this = title:e_byzantium.holder
- Any sub realm county › Any neighboring county › Their holder:
One of these
this = scope:prime_title.kingdom.holderor
Any liege or above:this = scope:prime_title.kingdom.holder
Then
while = { … }
- Any vassal:
- Every vassal:
- Only some of them (the filter is in the script below)
- Their house:
set_house_head = prev
- Their domicile:
move_domicile = prev.capital_province
- Every vassal:
- Every vassal or below:
• 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_frankokratia_form_byzantine_kingdoms_effect = {
every_vassal = {
limit = {
is_landless_ruler = yes
is_ai = yes
highest_held_title_tier < tier_kingdom
}
add_to_list = byz_landless
}
every_vassal = {
limit = {
is_ai = yes
is_landed = yes
NOT = {
government_has_flag = government_is_theocracy
}
}
add_to_list = byz_vassals
}
#Create player kings and kings for players
every_vassal_or_below = {
limit = {
OR = {
has_variable = frankokratia_becoming_king
AND = {
has_variable = frankokratia_gaining_vassal
highest_held_title_tier < tier_kingdom
capital_county = {
kingdom = {
NOT = {
exists = holder
}
}
}
highest_held_title_tier >= tier_duchy
#Must be free of any liege that isn't the emperor
NOT = {
liege = {
highest_held_title_tier < tier_empire
}
}
OR = {
is_powerful_vassal_of = title:e_byzantium.holder
house ?= { is_powerful_family = yes }
#Let's just always let Nikaea do this, they special
capital_county = {
kingdom = title:k_nikaea
NOT = {
exists = title:k_nikaea.holder
}
}
}
}
}
}
save_scope_as = player_byz_king
capital_county.kingdom = {
save_scope_as = player_byz_kingdom
}
create_character_memory = {
type = frankokratia_byz_independent_memory
}
create_title_and_vassal_change = {
type = created
save_scope_as = change
add_claim_on_loss = no
}
scope:player_byz_kingdom = {
change_title_holder = {
holder = scope:player_byz_king
change = scope:change
}
}
resolve_title_and_vassal_change = scope:change
}
#Move players under their kings
every_vassal = {
limit = {
has_variable = frankokratia_gaining_vassal
var:frankokratia_gaining_vassal = {
NOT = {
is_vassal_or_below_of = prev
}
}
}
save_scope_as = new_daddy
var:frankokratia_gaining_vassal = {
create_title_and_vassal_change = {
type = granted
save_scope_as = change
add_claim_on_loss = no
}
change_liege = {
liege = scope:new_daddy
change = scope:change
}
resolve_title_and_vassal_change = scope:change
}
}
#Make players independent
every_vassal_or_below = {
limit = {
has_variable = frankokratia_independent
NOT = {
liege = title:e_byzantium.holder
}
highest_held_title_tier < tier_kingdom
}
assign_feudal_governments_effect = yes
create_character_memory = {
type = frankokratia_byz_independent_memory
}
create_title_and_vassal_change = {
type = independency
save_scope_as = change
}
becomes_independent = { change = scope:change }
resolve_title_and_vassal_change = scope:change
}As written in game/common/scripted_effects/07_frankokratia_scripted_effects.txt.
The first 120 of its 732 lines; the rest is in game/common/scripted_effects/07_frankokratia_scripted_effects.txt from line 4066.
Where it is used
Every place in common/, events/ and history/ that calls ep3_frankokratia_form_byzantine_kingdoms_effect.
Events (1)
Source: game/common/scripted_effects/07_frankokratia_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.