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

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

• 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)

2 more

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?