Scripted effect
mother_of_young_child_has_lover_variable_effect
mother_of_young_child_has_lover_variable_effect = { LOVER_1 = … LOVER_2 = … SPOUSE = … }game/common/scripted_effects/00_adultery_effects.txt, line 362 (37 lines). Parameters: $LOVER_1$, $LOVER_2$, $SPOUSE$.
mother_of_young_child_has_lover_variable_effect is a scripted effect in Crusader Kings III, written at line 362 of its file. A call passes 3 parameters: LOVER_1, LOVER_2 and SPOUSE. The game's script calls it in 3 places, among them Someone Else (event adultery.0006), Someone Else (event adultery.0007) and Lover (secret types). Patch 1.20.1.2, from game/common/scripted_effects/00_adultery_effects.txt.
What it does
If
$LOVER_1$ = { sex_opposite_of = $LOVER_2$ }
Then
$SPOUSE$ = { … }
• 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 (37 lines of game script)
mother_of_young_child_has_lover_variable_effect = {
if = {
limit = {
$LOVER_1$ = { sex_opposite_of = $LOVER_2$ }
}
#Who is the woman?
if = {
limit = { $LOVER_1$ = { is_female = yes } }
$LOVER_1$ = { save_temporary_scope_as = mother_check }
}
else = {
$LOVER_2$ = { save_temporary_scope_as = mother_check }
}
#Is SPOUSE the woman's spouse, and do they have a young child together?
$SPOUSE$ = {
if = {
limit = {
is_spouse_of = scope:mother_check
any_child = {
is_child_of = scope:mother_check
NOR = {
has_trait = bastard
has_trait = legitimized_bastard
}
age <= 5
}
}
set_variable = {
name = mother_of_young_child_has_lover
value = scope:mother_check
}
}
}
}
}As written in game/common/scripted_effects/00_adultery_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls mother_of_young_child_has_lover_variable_effect.
Events (2)
- Someone Else
adultery.0006 - Someone Else
adultery.0007
Secret types (1)
- Lover
Source: game/common/scripted_effects/00_adultery_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.