Scripted effect
sound_foundations_skill_gain_effect
sound_foundations_skill_gain_effect = yesgame/common/scripted_effects/00_diplomacy_perk_effects.txt, line 7 (94 lines). No parameters.
sound_foundations_skill_gain_effect is a scripted effect in Crusader Kings III, written at line 7 of its file. It takes no parameters: sound_foundations_skill_gain_effect = yes. The game's script calls it in 2 places, among them Sound Foundations (lifestyle perk) and on_birth_child (on action). Patch 1.20.1.2, from game/common/scripted_effects/00_diplomacy_perk_effects.txt.
What it does
If
- Current sound foundations value less than sound foundations max
- Any in list:
Then
- If government uses the Mandala Capital Temple Complex Great Project and Great Building › 1 of 5 things will happen:
- 20%:
- Gains the modifier “Sound Foundations”
- Martial +1
- Monthly Piety +2%
- Gains the modifier “Sound Foundations”
- 20%:
- Gains the modifier “Sound Foundations”
- Diplomacy +1
- Monthly Piety +2%
- Gains the modifier “Sound Foundations”
- 20%:
- Gains the modifier “Sound Foundations”
- Intrigue +1
- Monthly Piety +2%
- Gains the modifier “Sound Foundations”
- 20%:
- Gains the modifier “Sound Foundations”
- Stewardship +1
- Monthly Piety +2%
- Gains the modifier “Sound Foundations”
- 20%:
- Gains the modifier “Sound Foundations”
- Learning +1
- Monthly Piety +2%
- Gains the modifier “Sound Foundations”
- 20%:
- Otherwise › 1 of 5 things will happen:
- 20%:
- Gains the modifier “Sound Foundations”
- Martial +1
- Gains the modifier “Sound Foundations”
- 20%:
- Gains the modifier “Sound Foundations”
- Diplomacy +1
- Gains the modifier “Sound Foundations”
- 20%:
- Gains the modifier “Sound Foundations”
- Intrigue +1
- Gains the modifier “Sound Foundations”
- 20%:
- Gains the modifier “Sound Foundations”
- Stewardship +1
- Gains the modifier “Sound Foundations”
- 20%:
- Gains the modifier “Sound Foundations”
- Learning +1
- Gains the modifier “Sound Foundations”
- 20%:
• 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 (94 lines of game script)
sound_foundations_skill_gain_effect = {
if = {
limit = {
NOT = { has_variable = current_sound_foundations_value }
}
set_variable = {
name = current_sound_foundations_value # Number of applied modifiers
value = 0
}
}
every_child = {
add_to_temporary_list = current_amount_of_children
}
if = {
limit = {
exists = var:current_sound_foundations_value
save_temporary_scope_as = affected_parent
var:current_sound_foundations_value < sound_foundations_max
any_in_list = {
list = current_amount_of_children
count > scope:affected_parent.var:current_sound_foundations_value
}
}
if = {
limit = { government_has_flag = government_is_mandala }
random_list = {
1 = {
add_character_modifier = {
modifier = mandala_sound_foundations_martial_gain
}
}
1 = {
add_character_modifier = {
modifier = mandala_sound_foundations_diplomacy_gain
}
}
1 = {
add_character_modifier = {
modifier = mandala_sound_foundations_intrigue_gain
}
}
1 = {
add_character_modifier = {
modifier = mandala_sound_foundations_stewardship_gain
}
}
1 = {
add_character_modifier = {
modifier = mandala_sound_foundations_learning_gain
}
}
}
change_variable = {
name = current_sound_foundations_value
add = 1
}
}
else = {
random_list = {
1 = {
add_character_modifier = {
modifier = sound_foundations_martial_gain
}
}
1 = {
add_character_modifier = {
modifier = sound_foundations_diplomacy_gain
}
}
1 = {
add_character_modifier = {
modifier = sound_foundations_intrigue_gain
}
}
1 = {
add_character_modifier = {
modifier = sound_foundations_stewardship_gain
}
}
1 = {
add_character_modifier = {
modifier = sound_foundations_learning_gain
}
}
}
change_variable = {
name = current_sound_foundations_value
add = 1
}
}
}
}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 sound_foundations_skill_gain_effect.
Lifestyle perks (1)
On actions (the game's own hooks) (1)
- on_birth_child
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.