Scripted effect · Silk and Silver files
gdp_trade_league_proclaim_commune_effect
gdp_trade_league_proclaim_commune_effect = { COUNTY = … LEAGUE_HEAD = … }game/common/scripted_effects/gdp_republic_effects.txt, line 352 (87 lines). Parameters: $COUNTY$, $LEAGUE_HEAD$.
gdp_trade_league_proclaim_commune_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 352 of its file. A call passes 2 parameters: COUNTY and LEAGUE_HEAD. The game's script calls it in 1 place, among them Proclaim a Commune (casus belli). Its body carries 2 texts of the game's own for the player. Patch 1.21.0, from game/common/scripted_effects/gdp_republic_effects.txt.
The comment above it in the file
New independent republic in $COUNTY$, enrolled in $LEAGUE_HEAD$'s league after gdp_found_a_republic_effect creates the primary title
What it does
- The burghers of … proclaim a commune under a local Patrician, founding an independent Republic
- The new Republic joins your Trade League
• 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 (87 lines of game script)
gdp_trade_league_proclaim_commune_effect = {
$COUNTY$ = { save_scope_as = commune_county }
$LEAGUE_HEAD$ = { save_scope_as = commune_patron }
# Tooltip is written by hand: the new ruler does not exist in preview
custom_tooltip = league_commune_cb_proclaimed_tt
custom_tooltip = league_commune_cb_joins_league_tt
hidden_effect = {
create_character = {
location = scope:commune_county.title_province
template = burgher_faction_leader_template
faith = scope:commune_county.faith
culture = scope:commune_county.culture
gender_female_chance = {
if = {
limit = {
scope:commune_county.rite = {
rite_has_doctrine = doctrine_gender_male_dominated
}
}
add = 0
}
else_if = {
limit = {
scope:commune_county.rite = {
rite_has_doctrine = doctrine_gender_female_dominated
}
}
add = 100
}
else = {
add = 50
}
}
save_scope_as = commune_patrician
}
if = {
limit = { exists = scope:commune_patrician }
scope:commune_patrician = {
set_character_rite = scope:commune_county.rite
}
create_title_and_vassal_change = {
type = conquest
save_scope_as = commune_change
add_claim_on_loss = yes
}
scope:commune_county = {
change_title_holder = {
holder = scope:commune_patrician
change = scope:commune_change
}
}
# Grant independence: create_character leaves them in the old owner's court
scope:commune_patrician = {
becomes_independent = { change = scope:commune_change }
}
resolve_title_and_vassal_change = scope:commune_change
burgher_found_city_republic_effect = { RULER = scope:commune_patrician }
scope:commune_county = {
if = {
limit = { NOT = { has_variable = civic_league_charter } }
set_variable = civic_league_charter
}
}
scope:commune_patron.confederation ?= {
add_confederation_member_title = scope:commune_patrician.primary_title
}
scope:commune_patrician = {
add_opinion = {
modifier = league_commune_founder_opinion
target = scope:commune_patron
}
}
}
}
}As written in game/common/scripted_effects/gdp_republic_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls gdp_trade_league_proclaim_commune_effect.
Casus belli (1)
Source: game/common/scripted_effects/gdp_republic_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.21.0.