Scripted effect
update_confidants_effect
update_confidants_effect = yesgame/common/scripted_effects/00_diplomacy_perk_effects.txt, line 938 (43 lines). No parameters.
update_confidants_effect is a scripted effect in Crusader Kings III, written at line 938 of its file. It takes no parameters: update_confidants_effect = yes. The game's script calls it in 2 places, among them Confidants (lifestyle perk) and on_set_relation_friend (on action). Patch 1.20.1.2, from game/common/scripted_effects/00_diplomacy_perk_effects.txt.
What it does
- If has the Confidants Perk:
remove_all_character_modifier_instances = confidants_perk_modifierIf
a check the game hides
Then
- Every in list › scope:confidant_scope › If current confidants perk value less than confidants max:
- Gains the modifier “Confidants”
- Stress Gain -5%
- Gains the modifier “Confidants”
- Every in list › scope:confidant_scope › If current confidants perk value less than confidants max:
• 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 (43 lines of game script)
update_confidants_effect = {
if = {
limit = {
has_perk = confidants_perk
}
remove_all_character_modifier_instances = confidants_perk_modifier
save_temporary_scope_as = confidant_scope
set_variable = {
name = current_confidants_perk_value
value = 0
}
if = {
limit = {
exists = var:current_confidants_perk_value
}
every_relation = {
type = friend
add_to_temporary_list = confidant_friend_list
}
every_in_list = {
list = confidant_friend_list
scope:confidant_scope = {
if = {
limit = {
exists = var:current_confidants_perk_value
var:current_confidants_perk_value < confidants_max
}
change_variable = {
name = current_confidants_perk_value
add = 1
}
add_character_modifier = {
modifier = confidants_perk_modifier
}
}
}
}
remove_variable = current_confidants_perk_value
}
}
}As written in game/common/scripted_effects/00_diplomacy_perk_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls update_confidants_effect.
Lifestyle perks (1)
On actions (the game's own hooks) (1)
- on_set_relation_friend
Source: game/common/scripted_effects/00_diplomacy_perk_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.