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
$SECRET$ = { … }If
$SECRET$ = { secret_type = secret_deviant }
Then
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 }
Else if
$SECRET$ = { secret_type = secret_homosexual }relation_with_character_is_sodomy_in_my_or_lieges_rite_trigger = { CHARACTER = this }
Then
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 }
Else if
$SECRET$ = { secret_type = secret_cannibal }
Then
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 }
Else if
$SECRET$ = { secret_type = secret_non_believer }
Then
- Gains the modifier “Non-Believer” for 3650 days
If
One of these
- Number of personality traits less than 4
or
has_character_flag = non_believer_gained_cynical
Then
add_trait_only_force_tooltip_if_not_pov_effect = { TRAIT = cynical POV = $POV$ }
- Level of Devotion -1
Else if
$SECRET$ = { secret_type = secret_embezzler }
Then
- scope:secret_target: Opinion: Embezzled from Me
Else if
$SECRET$ = { secret_type = secret_siphoned_treasury }
Then
- scope:secret_target: Opinion: Siphoned Treasury
Else if
$SECRET$ = { secret_type = secret_incest }
Then
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 }
Else if
$SECRET$ = { secret_type = secret_witch }
Then
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 }
Else if
$SECRET$ = { secret_type = secret_lover }None of these
scope:exposed_secret_target:- Government uses the Mandala Capital Temple Complex Great Project and Great Building
- Their house:
has_house_aspiration_parameter = aspect_of_creation
Then
extramarital_sex_exposure_consequences_with_target_effect = { TARGET = scope:exposed_secret_target SPOUSE_EVENT = no }
Else if
$SECRET$ = { secret_type = secret_disputed_heritage }
Then
- scope:child: Gains the Trait Disputed Heritage
If
a check the game hides
Then
scope:mother:expose_lover_secret_or_run_consequence_effect = { TARGET = scope:real_father EXPOSER = $POV$ }
Else if
a check the game hides
Then
scope:real_father:expose_lover_secret_or_run_consequence_effect = { TARGET = scope:mother EXPOSER = $POV$ }
Else if
$SECRET$ = { secret_type = secret_unmarried_illegitimate_child }
Then
scope:child:set_father = scope:real_fatherset_parent_house_effect = yesremove_inherited_descendent_traits_effect = yes
scope:real_father:If
a check the game hides
Then
expose_lover_secret_or_run_consequence_effect = { TARGET = scope:mother EXPOSER = $POV$ }
Else if
$SECRET$ = { secret_type = secret_murder_attempt }
Then
If
root = scope:murderer
Then
- Dread +10
hostile_scheme_exposure_legitimacy_effect = yesattempted_murder_opinion_effect = { VICTIM = scope:victim MURDERER = scope:murderer }
Else if
$SECRET$ = { secret_type = secret_murder }
Then
murder_consequences_known_or_exposed_effect = { MURDERER = scope:murderer VICTIM = scope:victim POV = $POV$ }
Else if
$SECRET$ = { secret_type = secret_coup_plotter }
Then
- scope:secret_target: Opinion: Plotted to Overthrow Me
Else if
$SECRET$ = { secret_type = secret_request_incursion }
Then
If a check the game hides passes: the same again (1 line)
- scope:secret_target: Opinion: Requesting an Incursion Against My Realm
If
scope:secret_target != scope:secret_owner.top_liegescope:secret_owner.top_liege != scope:secret_owner
Then
- scope:secret_owner.top_liege: Opinion: Requesting an Incursion Against My Realm
scope:secret_owner:If
a check the game hides
Then
tgp_activate_catalyst_against_hegemon_effect = { HEGEMON = scope:secret_owner.top_liege CATALYST = catalyst_requested_incursion }
If
- … (more in the script below)
- … (more in the script below)
• 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)
- A Forbidden Conviction
secrets.5001 - A Secret Exposed
secret_bastard.3000 - It is Known
secret_bastard.2000 - My Faith Exposed
false_conversion.8000 - My Secret Exposed!
secrets.0001 - My Secret Exposed!
secrets.0003
12 more
- My Secret Exposed!
secrets.0004 - My Secret Exposed!
secrets.0005 - My Secret Exposed!
secrets.0006 - My Secret Exposed!
secrets.0007 - My Secret Exposed!
secrets.0008 - My Secret Exposed!
secrets.0115 - My Secret Exposed!
secrets.0117 - My Secret Exposed!
secrets.0121 - My Secret Exposed!
secrets.0131 - My Secret Exposed!
secrets.0141 - My True Heritage
secret_bastard.3001 - …: As … Made …
contest_events.3030
Scripted effects (1)
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.