Scripted effect · Silk and Silver files
gg_become_independent_effect
gg_become_independent_effect = { TITLE = … }game/common/scripted_effects/00_gdp_guelph_ghibelline_scripted_effects.txt, line 2047 (54 lines). Parameters: $TITLE$.
gg_become_independent_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 2047 of its file. A call passes 1 parameter: TITLE. The game's script calls it in 2 places, among them actual_add_to_lombard_league_effect (scripted effect) and create_lombard_league_effect (scripted effect). Patch 1.21.0, from game/common/scripted_effects/00_gdp_guelph_ghibelline_scripted_effects.txt.
What it does
If
scope:independency_title.holder.primary_title != scope:independency_titlescope:independency_title.holder.primary_title.tier > scope:independency_title.tier
Then
create_character = { template = gg_ruler_template location = scope:target_title.title_province save_scope_as = new_holder }- scope:independency_title: Gains the … Title (new holder)
scope:new_holder:becomes_independent = { change = scope:change }
Otherwise
- scope:independency_title.holder › If is not an Independent Ruler:
becomes_independent = { change = scope:change }
• 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 (54 lines of game script)
gg_become_independent_effect = {
$TITLE$ = { save_scope_as = independency_title }
#Is the title not the primary title of the holder? Invent someone to take over!
if = {
limit = {
#The title isn't the holder's primary title (i.e. it goes in under a duchy or similar)
scope:independency_title.holder.primary_title != scope:independency_title
#You shouldn't already be the count of a neighboring county (e.g. Friuli / Treviso)
scope:independency_title.holder.primary_title.tier > scope:independency_title.tier
}
create_title_and_vassal_change = {
type = independency
save_scope_as = change
add_claim_on_loss = yes
}
scope:independency_title = { save_scope_as = target_title }
#Create character
create_character = {
template = gg_ruler_template
location = scope:target_title.title_province
save_scope_as = new_holder
}
scope:independency_title = {
change_title_holder = {
holder = scope:new_holder
change = scope:change
}
}
scope:new_holder = {
becomes_independent = { change = scope:change }
save_scope_as = became_independent
}
resolve_title_and_vassal_change = scope:change
}
else = {
scope:independency_title.holder = {
#Otherwise just your regular independency
if = {
limit = { is_independent_ruler = no }
create_title_and_vassal_change = {
type = independency
save_scope_as = change
add_claim_on_loss = yes
}
becomes_independent = { change = scope:change }
resolve_title_and_vassal_change = scope:change
if = {
limit = { scope:league_creator ?= scope:independency_title.holder }
save_scope_as = became_independent
}
}
}
}
}As written in game/common/scripted_effects/00_gdp_guelph_ghibelline_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls gg_become_independent_effect.
Scripted effects (2)
Source: game/common/scripted_effects/00_gdp_guelph_ghibelline_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.21.0.