Scripted effect
apply_clan_unity_interaction_effect
apply_clan_unity_interaction_effect = { CHARACTER = … DESC = … TARGET = … VALUE = … VALUE_REVERSED = … }game/common/scripted_effects/00_interaction_effects.txt, line 5209 (44 lines). Parameters: $CHARACTER$, $DESC$, $TARGET$, $VALUE$, $VALUE_REVERSED$.
apply_clan_unity_interaction_effect is a scripted effect in Crusader Kings III, written at line 5209 of its file. A call passes 5 parameters: CHARACTER, DESC, TARGET, VALUE and VALUE_REVERSED. The game's script calls it in 3 places, among them Adopt Clan Ways through House (decision), House Customs (event fp3_misc_decisions.0051) and add_clan_unity_interaction_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_interaction_effects.txt.
What it does
$CHARACTER$.house = { … }If
If
$VALUE$ >= 0
Then
$VALUE$ >= major_unity_value
Otherwise
$VALUE$ <= major_unity_value
Then
notify_players_about_unity_change_effect = { CHARACTER = $CHARACTER$ TARGET = $TARGET$ DESC = $DESC$ }
• 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 (44 lines of game script)
apply_clan_unity_interaction_effect = {
# Save scopes for localisation
$CHARACTER$ = { save_scope_as = unity_character }
$TARGET$ = { save_scope_as = unity_target }
$CHARACTER$.house = {
save_scope_as = character_house
add_unity_value = {
value = {
value = $VALUE$
if = { # House heads have a larger impact on unity
limit = { house_head = $CHARACTER$ }
multiply = unity_house_head_multiplier_value
}
if = {
limit = { $VALUE_REVERSED$ = yes }
multiply = -1
}
}
character = $CHARACTER$
desc = $DESC$
}
}
# Notify human players if they are not involved!
if = {
limit = {
trigger_if = {
limit = { $VALUE$ >= 0 }
$VALUE$ >= major_unity_value
}
trigger_else = {
$VALUE$ <= major_unity_value
}
}
# Notify human players if they are not involved!
notify_players_about_unity_change_effect = {
CHARACTER = $CHARACTER$
TARGET = $TARGET$
DESC = $DESC$
}
}
}As written in game/common/scripted_effects/00_interaction_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls apply_clan_unity_interaction_effect.
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.