Scripted effect
start_infidelity_confrontation_story_discovery_effect
start_infidelity_confrontation_story_discovery_effect = { DISCOVERER = … LOVER_1 = … LOVER_2 = … }game/common/scripted_effects/00_secret_effects.txt, line 1863 (118 lines). Parameters: $DISCOVERER$, $LOVER_1$, $LOVER_2$.
start_infidelity_confrontation_story_discovery_effect is a scripted effect in Crusader Kings III, written at line 1863 of its file. A call passes 3 parameters: DISCOVERER, LOVER_1 and LOVER_2. The game's script calls it in 1 place, among them Lover (secret types). Patch 1.20.1.2, from game/common/scripted_effects/00_secret_effects.txt.
The comment above it in the file
Creates a story about confrontations/choices after discovered infidelity (lover secret discovery)
What it does
If
NOT = { $DISCOVERER$ = $LOVER_2$ }NOT = { $DISCOVERER$ = $LOVER_1$ }$DISCOVERER$ = { … }NOT = { $LOVER_1$ = { … } }NOT = { $LOVER_2$ = { … } }
Then
infidelity_confrontation_story_creation_effect = { LOVER_1 = $LOVER_1$ LOVER_2 = $LOVER_2$ }If
$DISCOVERER$ = { is_ai = no }
Then
$LOVER_1$ = { … }$LOVER_2$ = { … }
• 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 (118 lines of game script)
start_infidelity_confrontation_story_discovery_effect = {
if = {
limit = {
NOR = {
$DISCOVERER$ = $LOVER_2$
$DISCOVERER$ = $LOVER_1$
}
$DISCOVERER$ = {
OR = {
has_relation_lover = $LOVER_1$
is_spouse_of = $LOVER_1$
has_relation_lover = $LOVER_2$
is_spouse_of = $LOVER_2$
}
}
NOR = {
$LOVER_1$ = {
any_owned_story = {
type = story_cycle_infidelty_confronter
var:lover_2 = $LOVER_2$ #var:lover_2 is the secret target i.e. the other person
}
}
$LOVER_2$ = {
any_owned_story = {
type = story_cycle_infidelty_confronter
var:lover_2 = $LOVER_1$ #var:lover_2 is the secret target i.e. the other person
}
}
}
#Exempt marriages to polyamorous spouses.
NOR = {
$LOVER_1$ = {
OR = {
any_spouse = {
count = all
accepts_adultery_without_penalty_trigger = yes
}
has_character_flag = block_infidelity_flag
}
}
$LOVER_2$ = {
OR = {
any_spouse = {
count = all
accepts_adultery_without_penalty_trigger = yes
}
has_character_flag = block_infidelity_flag
}
}
}
}
infidelity_confrontation_story_creation_effect = { LOVER_1 = $LOVER_1$ LOVER_2 = $LOVER_2$ }
scope:infidelity_story = {
add_to_variable_list = {
name = confronting_partners
target = $DISCOVERER$
}
}
#Certain changes to desc in event if the secret was revealed through investigation
if = {
limit = { $DISCOVERER$ = { is_ai = no } } #Text changes are only relevant to players
#Save the secrets so we can check them
$LOVER_1$ = {
random_secret = {
type = secret_lover
limit = {
secret_target = $LOVER_2$
}
add_to_temporary_list = secrets_for_desc
}
}
$LOVER_2$ = {
random_secret = {
type = secret_lover
limit = {
secret_target = $LOVER_1$
}
add_to_temporary_list = secrets_for_desc
}
}
#infidelity_confrontation_1000_investigation_desc
if = {
limit = {
any_in_list = {
list = secrets_for_desc
exists = var:revealed_through_investigation_by_desc
var:revealed_through_investigation_by_desc = $DISCOVERER$
}
}
scope:infidelity_story = {
set_variable = {
name = infidelity_confrontation_1000_investigation_desc
value = yes
}
}
}
#revealed_through_confession_to_desc
if = {
limit = {
any_in_list = {
list = secrets_for_desc
exists = var:revealed_through_confession_to_desc
var:revealed_through_confession_to_desc = $DISCOVERER$
}
}
scope:infidelity_story = {
set_variable = {
name = infidelity_confrontation_1000_confession_desc
value = yes
}
}
}
}
}
}As written in game/common/scripted_effects/00_secret_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls start_infidelity_confrontation_story_discovery_effect.
Secret types (1)
- Lover
Source: game/common/scripted_effects/00_secret_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.