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_exposure_consequences_effect

extramarital_sex_exposure_consequences_effect = { SPOUSE_EVENT = … }

game/common/scripted_effects/00_adultery_effects.txt, line 169 (128 lines). Parameters: $SPOUSE_EVENT$.

extramarital_sex_exposure_consequences_effect is a scripted effect in Crusader Kings III, written at line 169 of its file. A call passes 1 parameter: SPOUSE_EVENT. The game's script calls it in 3 places, among them extramarital_sex_attempt_exposure_consequences_with_target_effect (scripted effect), extramarital_sex_exposure_consequences_with_had_recent_sex_var_effect (scripted effect) and extramarital_sex_exposure_consequences_with_target_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_adultery_effects.txt.

What it does

• 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 (120 lines of game script)
extramarital_sex_exposure_consequences_effect = {
	save_temporary_scope_as = sex_character
	save_temporary_scope_value_as = {
		name = spouse_event
		value = $SPOUSE_EVENT$
	}

	#APPLY TRAITS & REMOVE PIETY LEVELS
	add_adulterer_fornicator_trait_or_nothing_effect = yes
	remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = trait:adulterer } #Fornicator falls under same doctrine
	if = {
		limit = {
			OR = {
				AND = {
					exists = scope:sex_partner
					relation_with_character_is_sodomy_in_my_or_lieges_rite_trigger = { CHARACTER = scope:sex_partner }
				}
				AND = {
					exists = scope:unknown_sex_partner
					relation_with_character_is_sodomy_in_my_or_lieges_rite_trigger = { CHARACTER = scope:unknown_sex_partner }
				}
			}
		}
		add_trait = sodomite
		remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = trait:sodomite }
	}
	if = {
		limit = {
			exists = scope:sex_partner
			relation_with_character_is_incestuous_in_my_or_lieges_rite_trigger = { CHARACTER = scope:sex_partner }
		}
		add_trait = incestuous
		remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = trait:incestuous }
	}
	#Family Feud
	house_feud_lover_exposure_effect = yes

	#APPLY UNFAITHFUL OPINIONS TOWARDS SPOUSES AND LOVERS (only visible for directly relevant exposure)
	if = {
		limit = {
			always = yes
		}
		every_relation = {
			type = soulmate
			limit = {
				soulmate_relation_is_exclusive_trigger = yes
				NOT = { #So we don't add it both at discovery and exposure
					has_opinion_modifier = {
						target = scope:sex_character
						modifier = betrayed_our_promise
					}
				}
			}
			add_opinion = {
				target = scope:sex_character
				modifier = betrayed_our_promise
			}
		}

		every_spouse = {
			if = {
				limit = { accepts_adultery_without_penalty_trigger = no }
				add_opinion = {
					target = scope:sex_character
					modifier = unfaithful_spouse_exposed_opinion
				}
			}
		}
	}
	else = {
		hidden_effect = {
			every_relation = {
				type = soulmate
				limit = {
					soulmate_relation_is_exclusive_trigger = yes
					NOT = { #So we don't add it both at discovery and exposure
						has_opinion_modifier = {
							target = scope:sex_character
							modifier = betrayed_our_promise
						}
					}
				}
				add_opinion = {
					target = scope:sex_character
					modifier = betrayed_our_promise
				}
			}

			every_spouse = {
				if = {
					limit = { accepts_adultery_without_penalty_trigger = no }
					add_opinion = {
						target = scope:sex_character
						modifier = unfaithful_spouse_exposed_opinion
					}
				}
			}
		}
	}
	every_spouse = {
		hidden_effect = {
			#Remove duplicate opinion from discovery
			if = {
				limit = {
					has_opinion_modifier = {
						target = scope:sex_character
						modifier = unfaithful_spouse_discovered_opinion
					}
				}
				remove_opinion = {
					target = scope:sex_character
					modifier = unfaithful_spouse_discovered_opinion
				}
			}
		}

		#NOTIFY SPOUSE (SHOULD ALWAYS BE "NO" IF EFFECT IS USED ON SECRET EXPOSURE)
		if = {
			limit = {
				scope:spouse_event = yes

As written in game/common/scripted_effects/00_adultery_effects.txt.

The first 120 of its 128 lines; the rest is in game/common/scripted_effects/00_adultery_effects.txt from line 169.

Where it is used

Every place in common/, events/ and history/ that calls extramarital_sex_exposure_consequences_effect.

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?