Scripted effect
expose_lover_secret_or_run_consequence_effect
expose_lover_secret_or_run_consequence_effect = { EXPOSER = … TARGET = … }game/common/scripted_effects/00_adultery_effects.txt, line 579 (61 lines). Parameters: $EXPOSER$, $TARGET$.
expose_lover_secret_or_run_consequence_effect is a scripted effect in Crusader Kings III, written at line 579 of its file. A call passes 2 parameters: EXPOSER and TARGET. The game's script calls it in 9 places, among them … Consequences (event lover.8102), A Familiar Favor (event tournament_events.1254) and A Sneaking Suspicion (event adultery.1004). Patch 1.20.1.2, from game/common/scripted_effects/00_adultery_effects.txt.
What it does
If
a check the game hides
Then
scope:lover_secret_to_expose:expose_secret = $EXPOSER$
Otherwise
If
is_spouse_of = $EXPOSER$
Then
extramarital_sex_exposure_consequences_with_target_effect = { TARGET = $TARGET$ SPOUSE_EVENT = no }
Otherwise
extramarital_sex_exposure_consequences_with_target_effect = { TARGET = $TARGET$ SPOUSE_EVENT = yes }
If
$TARGET$ = { is_alive = yes }
Then
$TARGET$ = { … }
• 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 (61 lines of game script)
expose_lover_secret_or_run_consequence_effect = {
# TARGET = lover to be checked
# EXPOSER = secret_exposer in case of a Secret reveal
# Look for a Lover Secret and save it if one exists
if = {
limit = {
$TARGET$ = { is_alive = yes} # Check whether the other party is still alive
any_secret = {
type = secret_lover
secret_target = $TARGET$
}
}
random_secret = {
type = secret_lover
limit = {
secret_target = $TARGET$
}
save_scope_as = lover_secret_to_expose
}
}
# Expose the Secret if it exists
if = {
limit = {
exists = scope:lover_secret_to_expose
}
scope:lover_secret_to_expose = {
expose_secret = $EXPOSER$
}
}
# Otherwise run the expose effects
else = {
if = {
limit = {
is_spouse_of = $EXPOSER$
}
extramarital_sex_exposure_consequences_with_target_effect = {
TARGET = $TARGET$
SPOUSE_EVENT = no
}
}
else = {
extramarital_sex_exposure_consequences_with_target_effect = {
TARGET = $TARGET$
SPOUSE_EVENT = yes
}
}
save_scope_as = this_character
if = {
limit = { $TARGET$ = { is_alive = yes } } # Check whether the other party is still alive
$TARGET$ = {
extramarital_sex_exposure_consequences_with_target_effect = {
TARGET = scope:this_character
SPOUSE_EVENT = yes
}
}
}
}
}As written in game/common/scripted_effects/00_adultery_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls expose_lover_secret_or_run_consequence_effect.
Events (8)
- … Consequences
lover.8102 - A Familiar Favor
tournament_events.1254 - A Sneaking Suspicion
adultery.1004 - By Another
pregnancy.2050 - By Another Man
pregnancy.2002 - Fresh Competition
ep2_wedding.3410
2 more
- Our Blood
pregnancy.5002 - Out of Wedlock
pregnancy.2001
Scripted effects (1)
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.