Scripted effect · Silk and Silver files
try_to_add_to_lombard_league_effect
try_to_add_to_lombard_league_effect = { TITLE = … }game/common/scripted_effects/00_gdp_guelph_ghibelline_scripted_effects.txt, line 2483 (40 lines). Parameters: $TITLE$.
try_to_add_to_lombard_league_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 2483 of its file. A call passes 1 parameter: TITLE. The game's script calls it in 1 place, among them create_lombard_league_effect (scripted effect). Its body carries 1 text of the game's own for the player. Patch 1.21.0, from game/common/scripted_effects/00_gdp_guelph_ghibelline_scripted_effects.txt.
The comment above it in the file
This is in the confederation scope
What it does
If
scope:title_to_check:Otherwise
- Their holder:
Then
If
One of these
- scope:title_to_check.holder: Is played by the AI
or
If
scope:title_to_check.holder.primary_title != scope:title_to_check
Then
scope:title_to_check.holder.primary_title.tier > scope:title_to_check.tier
Then
actual_add_to_lombard_league_effect = { TITLE = scope:title_to_check }
Otherwise
- … is a player and gets to decide whether to join the Lombard 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 (40 lines of game script)
try_to_add_to_lombard_league_effect = {
$TITLE$ = { save_scope_as = title_to_check }
#First check that the title is still relevant for the HRE, whether the holder is the Count of Friuli or Matilda
if = {
limit = {
scope:title_to_check = {
trigger_if = {
limit = { this = title:k_venice }
holder ?= { is_either_hre_vassal_or_independent_king_trigger = yes }
}
trigger_else = {
holder ?= { is_either_hre_vassal_or_independent_duke_or_less_trigger = yes }
}
}
}
if = {
limit = {
OR = {
#Then check if the holder is AI
scope:title_to_check.holder = { is_ai = yes }
#If Matilda is a player, the counts leave regardless
trigger_if = {
limit = { scope:title_to_check.holder.primary_title != scope:title_to_check }
#We also account for counts who hold two counties, such as Friuli and Treviso
scope:title_to_check.holder.primary_title.tier > scope:title_to_check.tier
}
}
}
actual_add_to_lombard_league_effect = { TITLE = scope:title_to_check }
}
else = {
#For the tooltip
scope:title_to_check = { save_scope_as = potential_league_title }
custom_tooltip = {
text = potential_league_title_is_human.tt
scope:title_to_check.holder = { trigger_event = gdp_guelph_ghibelline.7005 }
}
}
}
}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 try_to_add_to_lombard_league_effect.
Scripted effects (1)
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.