Scripted effect
extramarital_sex_exposure_consequences_with_target_effect
extramarital_sex_exposure_consequences_with_target_effect = { SPOUSE_EVENT = … TARGET = … }game/common/scripted_effects/00_adultery_effects.txt, line 38 (103 lines). Parameters: $SPOUSE_EVENT$, $TARGET$.
extramarital_sex_exposure_consequences_with_target_effect is a scripted effect in Crusader Kings III, written at line 38 of its file. A call passes 2 parameters: SPOUSE_EVENT and TARGET. The game's script calls it in 5 places, among them Discovered (event adultery.0008), Someone Else (event adultery.0006) and Someone Else (event adultery.0007). Patch 1.20.1.2, from game/common/scripted_effects/00_adultery_effects.txt.
What it does
If
None of these
scope:sex_character:is_consort_of = scope:sex_partner
Then
If
None of these
- Their culture: The Culture has the Characters with the Adulterer and Fornicator Traits are always fully accepted Tradition
Then
extramarital_sex_exposure_consequences_effect = { SPOUSE_EVENT = $SPOUSE_EVENT$ }- scope:sex_partner › Every 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 (103 lines of game script)
extramarital_sex_exposure_consequences_with_target_effect = { #Note: only adds stuff for one of the sex partners, it must be run twice! It is intentionally kept this way so you can apply it in two different places in an event chain etc.
save_temporary_scope_as = sex_character
#Applies traits, piety level loss, unfaithfulness opinions
$TARGET$ = { save_scope_as = sex_partner }
if = { # Check to make absolutely sure it's extramarital
limit = {
NOT = { scope:sex_character = { is_consort_of = scope:sex_partner } }
}
if = { # Check to make sure your culture isn't A-okay with this
limit = {
NOT = {
culture = { has_cultural_parameter = adultery_always_accepted }
}
}
extramarital_sex_exposure_consequences_effect = { SPOUSE_EVENT = $SPOUSE_EVENT$ }
#Slept with spouse opinions & potential rivalry
scope:sex_partner = {
every_spouse = {
limit = { this != scope:sex_character } #Extra safety
save_scope_as = sex_partner_spouse
hidden_effect = {
#Remove duplicate opinion from discovery
if = {
limit = {
has_opinion_modifier = {
target = scope:sex_character
modifier = slept_with_spouse_discovered_opinion
}
}
remove_opinion = {
target = scope:sex_character
modifier = slept_with_spouse_discovered_opinion
}
}
}
if = {
limit = { accepts_adultery_without_penalty_trigger = no }
if = { #(only visible for directly relevant exposure)
limit = {
always = yes
}
add_opinion = {
target = scope:sex_character
modifier = slept_with_spouse_exposed_opinion
}
}
else = {
hidden_effect = {
add_opinion = {
target = scope:sex_character
modifier = slept_with_spouse_exposed_opinion
}
}
}
hidden_effect = {
#Rivalry
if = {
limit = {
is_ai = yes
scope:sex_character = { is_ai = yes }
ai_vengefulness >= medium_positive_ai_value
can_set_relation_nemesis_trigger = { CHARACTER = scope:sex_character }
}
set_relation_nemesis = {
reason = nemesis_extramarital_sex_exposure
copy_reason = rival
target = scope:sex_character
involved_character = scope:sex_partner
}
}
else = {
scope:sex_partner = { save_scope_as = relationship_reason_involved_character }
progress_towards_rival_effect = { CHARACTER = scope:sex_character OPINION = 0 REASON = rival_slept_with_spouse }
clear_saved_scope = relationship_reason_involved_character
}
# HOUSE RELATIONS
if = {
limit = {
exists = house
exists = scope:sex_character.house
}
house = {
change_house_relation_effect = {
HOUSE = scope:sex_character.house
VALUE = house_relation_damage_medium_value
REASON = cuckoldry
CHAR = scope:sex_character
TARGET_CHAR = scope:sex_partner_spouse
TITLE = scope:dummy_gender
}
}
}
}
}
}
}
}
}
}As written in game/common/scripted_effects/00_adultery_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls extramarital_sex_exposure_consequences_with_target_effect.
Events (3)
- Discovered
adultery.0008 - Someone Else
adultery.0006 - Someone Else
adultery.0007
Scripted effects (2)
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.