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

Scripted effect

secret_exposed_owner_effects_effect

secret_exposed_owner_effects_effect = { POV = … SECRET = … }

game/common/scripted_effects/00_secret_effects.txt, line 1372 (391 lines). Parameters: $POV$, $SECRET$.

secret_exposed_owner_effects_effect is a scripted effect in Crusader Kings III, written at line 1372 of its file. A call passes 2 parameters: POV and SECRET. The game's script calls it in 23 places, among them A Forbidden Conviction (event secrets.5001), A Secret Exposed (event secret_bastard.3000) and It is Known (event secret_bastard.2000). Patch 1.20.1.2, from game/common/scripted_effects/00_secret_effects.txt.

The comment above it in the file

applies traits etc. when a secret is revealed
SECRET = secret in question, POV = point of view i.e. who get this event

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)
secret_exposed_owner_effects_effect = {

	$SECRET$ = {
		if = {
			limit = { #Checks to make sure the right target gets saved. Confusion might arise from the secret's "on_expose" effect since it sends the same event (secrets.0008) for both target and owner.
				exists = secret_target
				exists = scope:target
				scope:target = secret_owner
				NOT = { secret_owner = $POV$ } #To not mess up tooltips (in e.g. secrets.0108)
			}
			secret_owner = { save_scope_as = exposed_secret_target }
		}
		else_if = {
			limit = {
				exists = secret_target
			}
			secret_target = { save_scope_as = exposed_secret_target }
		}

		secret_owner = { save_scope_as = local_secret_owner }
	}

	###DEVIANT###
	if = {
		limit = { $SECRET$ = { secret_type = secret_deviant } }
		add_trait_only_force_tooltip_if_not_pov_effect = { TRAIT = trait:deviant POV = $POV$ }
		remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = trait:deviant }
	}
	###SODOMITE###
	else_if = {
		limit = {
			$SECRET$ = { secret_type = secret_homosexual }
			relation_with_character_is_sodomy_in_my_or_lieges_rite_trigger = { CHARACTER = this } #To check your own gender
		}
		add_trait_only_force_tooltip_if_not_pov_effect = { TRAIT = trait:sodomite POV = $POV$ }
		remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = trait:sodomite }
	}
	###CANNIBAL###
	else_if = {
		limit = { $SECRET$ = { secret_type = secret_cannibal } }
		add_trait_only_force_tooltip_if_not_pov_effect = { TRAIT = cannibal POV = $POV$ }
		remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = trait:cannibal }
	}
	###NON-BELIEVER###
	else_if = {
		limit = { $SECRET$ = { secret_type = secret_non_believer } }
		add_character_modifier = {
			modifier = known_non_believer
			days = 3650
		}
		if = {
			limit = {
				OR = {
					has_trait = zealous
					has_character_flag = non_believer_lost_zealous
				}
			}
			remove_trait_only_force_tooltip_if_not_root_effect = { TRAIT = zealous }
			add_character_flag = {
				flag = non_believer_lost_zealous
				days = 5
			}
		}
		if = {
			limit = {
				OR = {
					number_of_personality_traits < personality_trait_limit
					has_character_flag =  non_believer_gained_cynical
				}
			}
			add_trait_only_force_tooltip_if_not_pov_effect = { TRAIT = cynical POV = $POV$ }
			add_character_flag = {
				flag = non_believer_gained_cynical
				days = 5
			}
		}
		add_piety_level = -1
	}
	###EMBEZZLER###
	else_if = {
		limit = {
			$SECRET$ = { secret_type = secret_embezzler }
			scope:secret_target = { is_alive = yes }
		}
		scope:secret_target = {
			# Apply appropriate criminal opinion.
			add_opinion = {
				target = scope:secret_owner
				modifier = embezzled_opinion
			}
		}
	}
	else_if = {
		limit = {
			$SECRET$ = { secret_type = secret_siphoned_treasury }
			scope:secret_target = { is_alive = yes }
		}
		scope:secret_target = {
			add_opinion = {
				target = scope:secret_owner
				modifier = siphoned_treasury_crime
			}
		}
	}
	###INCEST###
	else_if = {
		limit = { $SECRET$ = { secret_type = secret_incest } }
		add_trait_only_force_tooltip_if_not_pov_effect = { TRAIT = incestuous POV = $POV$ }
		remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = trait:incestuous }
	}
	###WITCH###
	else_if = {
		limit = { $SECRET$ = { secret_type = secret_witch } }
		add_trait_only_force_tooltip_if_not_pov_effect = { TRAIT = trait:witch POV = $POV$ }
		remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = trait:witch }
	}
	###LOVER###
	else_if = {
		limit = { 
			$SECRET$ = { secret_type = secret_lover }

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

The first 120 of its 391 lines; the rest is in game/common/scripted_effects/00_secret_effects.txt from line 1372.

Where it is used

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

Events (18)

12 more

Secret types (4)

  • Child's Heritage
  • Disputed Heritage
  • Lover
  • Murder

Source: game/common/scripted_effects/00_secret_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?