CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

Scripted effect

extramarital_sex_discovery_consequences_with_target_effect

extramarital_sex_discovery_consequences_with_target_effect = { DISCOVERER = … TARGET = … }

game/common/scripted_effects/00_adultery_effects.txt, line 298 (58 lines). Parameters: $DISCOVERER$, $TARGET$.

extramarital_sex_discovery_consequences_with_target_effect is a scripted effect in Crusader Kings III, written at line 298 of its file. A call passes 2 parameters: DISCOVERER and TARGET. 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_adultery_effects.txt.

What it does

  • If

    • One of these

      • is_consort_of = $DISCOVERER$
      • or

        has_relation_lover = $DISCOVERER$
      • or

        has_relation_soulmate = $DISCOVERER$

    Then

    • $DISCOVERER$ = { … }
  • If

    • $TARGET$ = { is_consort_of = $DISCOVERER$ }

    Then

    • $DISCOVERER$ = { … }

• 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 (58 lines of game script)
extramarital_sex_discovery_consequences_with_target_effect = {
	save_temporary_scope_as = sex_character

	# If the discoverer is my partner
	if = {
		limit = {
			OR = {
				is_consort_of = $DISCOVERER$
				has_relation_lover = $DISCOVERER$
				has_relation_soulmate = $DISCOVERER$
			}
		}

		#Spouse and lover opinions
		$DISCOVERER$ = {
			if = {
				limit = {
					has_relation_soulmate = scope:sex_character
					soulmate_relation_is_exclusive_trigger = yes
					NOT = { $TARGET$ = $DISCOVERER$ }
				}
				add_opinion = {
					target = scope:sex_character
					modifier = betrayed_our_promise
				}
			}

			if = {
				limit = {
					is_consort_of = scope:sex_character
					accepts_adultery_without_penalty_trigger = no
				}
				add_opinion = {
					target = scope:sex_character
					modifier = unfaithful_spouse_discovered_opinion
				}
			}
		}
	}

	# If the discoverer is my sex partner's spouse
	if = {
		limit = {
			$TARGET$ = {
				is_consort_of = $DISCOVERER$
			}
		}
		$DISCOVERER$ = {
			if = {
				limit = { accepts_adultery_without_penalty_trigger = no }
				add_opinion = {
					target = scope:sex_character
					modifier = slept_with_spouse_discovered_opinion
				}
			}
		}
	}
}

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_discovery_consequences_with_target_effect.

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.

Spotted a mistake on this page?