Scripted effect
setup_tributary_truces_effect
setup_tributary_truces_effect = { SUZERAIN = … TRIBUTARY = … }game/common/scripted_effects/00_interaction_effects.txt, line 3024 (47 lines). Parameters: $SUZERAIN$, $TRIBUTARY$.
setup_tributary_truces_effect is a scripted effect in Crusader Kings III, written at line 3024 of its file. A call passes 2 parameters: SUZERAIN and TRIBUTARY. The game's script calls it in 1 place, among them start_tributary_interaction_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_interaction_effects.txt.
What it does
If a check the game hides passes: the same again (1 line)
$TRIBUTARY$ = { … }
Otherwise
$TRIBUTARY$ = { … }
• 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 (47 lines of game script)
setup_tributary_truces_effect = {
# Setup truces depending on how the tributary relationship was created
$TRIBUTARY$ = { save_scope_as = tributary_loc }
$SUZERAIN$ = { save_scope_as = suzerain_loc }
if = {
limit = { exists = scope:tributary_war } # this will exist if invoked from start_tributary_from_war_effect
$TRIBUTARY$ = {
if = {
limit = { should_be_mandala_tributary_trigger = { SUZERAIN = $SUZERAIN$ TRIBUTARY = $TRIBUTARY$ } }
add_truce_one_way = {
character = $SUZERAIN$
years = @truce_duration_war_mandala
war = scope:tributary_war
result = defeat
}
}
else = {
add_truce_one_way = {
character = $SUZERAIN$
years = @truce_duration_war_default
war = scope:tributary_war
result = defeat
}
}
}
}
else = {
$TRIBUTARY$ = {
if = {
limit = { $SUZERAIN$ = { government_has_flag = government_is_celestial } }
add_truce_both_ways = {
character = $SUZERAIN$
years = @truce_duration_negotiated_celestial
name = TRUCE_TRIBUTARY
}
}
else = {
add_truce_both_ways = {
character = $SUZERAIN$
years = @truce_duration_negotiated_default
name = TRUCE_TRIBUTARY
}
}
}
}
}As written in game/common/scripted_effects/00_interaction_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls setup_tributary_truces_effect.
Scripted effects (1)
Source: game/common/scripted_effects/00_interaction_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.