Scripted effect · Silk and Silver files
gg_change_side_to_guelph_effect
gg_change_side_to_guelph_effect = { REASON = … }game/common/scripted_effects/00_gdp_guelph_ghibelline_scripted_effects.txt, line 584 (107 lines). Parameters: $REASON$.
gg_change_side_to_guelph_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 584 of its file. A call passes 1 parameter: REASON. The game's script calls it in 7 places, among them Determine Alignment (decision), Join the Guelphs (decision) and Recruit Partisan (interaction). 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.
What it does
If
$REASON$ = flag:schemed
Then
If
is_ghibelline_trigger = yes
Then
gg_untargeted_catalyst_effect = { CATALYST = catalyst_gg_partisan_poached }
Else if
is_gg_undecided_trigger = yes
Then
gg_untargeted_catalyst_effect = { CATALYST = catalyst_gg_undecided_aligned }
- … becomes a member of the Guelph Supporter Participant Group
If
$REASON$ = flag:decision
Then
- …:
- Every Ghibelline Leader and Ghibelline Supporter:
- Where:
is_ghibelline_trigger = yes
- Opinion: Joined Guelphs (-40)
- Where:
- Every Guelph Leader and Guelph Supporter:
- Where:
is_guelph_trigger = yes
- Opinion: Joined Guelphs (+20)
- Where:
- Every situation participant:
- Where:
is_ghibelline_trigger = yes
If
has_relation_potential_rival = scope:affected_character
Then
progress_towards_rival_effect = { REASON = rival_swapped_to_guelphs CHARACTER = scope:affected_character OPINION = 0 }
- Where:
- Every Ghibelline Leader and Ghibelline Supporter:
If
$REASON$ = flag:schemed
Then
- …:
- Every Ghibelline Leader and Ghibelline Supporter:
- Where:
is_ghibelline_trigger = yes
- Opinion: Joined Guelphs (-20)
- Where:
- Every Guelph Leader and Guelph Supporter:
- Where:
is_guelph_trigger = yes
- Opinion: Joined Guelphs (+20)
- Where:
- Every Ghibelline Leader and Ghibelline Supporter:
• 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 (107 lines of game script)
gg_change_side_to_guelph_effect = {
save_scope_as = affected_character
if = {
limit = { $REASON$ = flag:schemed }
if = {
limit = { is_ghibelline_trigger = yes }
gg_untargeted_catalyst_effect = { CATALYST = catalyst_gg_partisan_poached }
}
else_if = {
limit = { is_gg_undecided_trigger = yes }
gg_untargeted_catalyst_effect = { CATALYST = catalyst_gg_undecided_aligned }
}
}
remove_variable = ghibelline_member_override
remove_variable = undecided_override #Remember to account for force_undecided
set_variable = guelph_member_override
custom_tooltip = {
text = change_to_guelph_tt
recalculate_participant_group = situation:guelph_ghibelline
}
if = {
limit = { $REASON$ = flag:decision }
set_variable = {
name = changed_to_guelph
years = 40
}
situation:guelph_ghibelline ?= {
every_situation_participant = {
custom = custom.every_ghibelline_member
limit = {
is_ghibelline_trigger = yes
NOT = { this = scope:affected_character }
}
add_opinion = {
target = scope:affected_character
modifier = joined_guelphs_opinion
opinion = -40
}
}
every_situation_participant = {
custom = custom.every_guelph_member
limit = {
is_guelph_trigger = yes
NOT = { this = scope:affected_character }
}
add_opinion = {
target = scope:affected_character
modifier = joined_guelphs_opinion
opinion = 20
}
}
#To make the tooltip more sensible
every_situation_participant = {
limit = {
is_ghibelline_trigger = yes
NOT = { this = scope:affected_character }
}
if = {
limit = { has_relation_potential_rival = scope:affected_character }
progress_towards_rival_effect = {
REASON = rival_swapped_to_guelphs
CHARACTER = scope:affected_character
OPINION = 0
}
}
}
}
}
if = {
limit = { $REASON$ = flag:schemed }
set_variable = {
name = schemed_to_guelph
years = 15
}
situation:guelph_ghibelline ?= {
every_situation_participant = {
custom = custom.every_ghibelline_member
limit = {
is_ghibelline_trigger = yes
NOT = { this = scope:affected_character }
}
add_opinion = {
target = scope:affected_character
modifier = joined_guelphs_opinion
opinion = -20
}
}
every_situation_participant = {
custom = custom.every_guelph_member
limit = {
is_guelph_trigger = yes
NOT = { this = scope:affected_character }
}
add_opinion = {
target = scope:affected_character
modifier = joined_guelphs_opinion
opinion = 20
}
}
}
}
}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_change_side_to_guelph_effect.
Decisions (2)
Character interactions (2)
- Recruit Partisan
- Make Guelph or Ghibelline
Events (3)
- …: Success
scheme_critical_moments.1262 - …: Success
scheme_critical_moments.1282 - Aligning the Houses
yearly_republic.1014
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.