Scripted effect
remove_piety_level_for_shunned_or_criminal_trait_effect
remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = … }game/common/scripted_effects/00_secret_effects.txt, line 1316 (32 lines). Parameters: $TRAIT$.
remove_piety_level_for_shunned_or_criminal_trait_effect is a scripted effect in Crusader Kings III, written at line 1316 of its file. A call passes 1 parameter: TRAIT. The game's script calls it in 3 places, among them add_kinslayer_trait_or_nothing_effect (scripted effect), extramarital_sex_exposure_consequences_effect (scripted effect) and secret_exposed_owner_effects_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_secret_effects.txt.
What it does
If
One of these
trait_is_shunned_in_rite_trigger = { TRAIT = $TRAIT$ RITE = scope:piety_character.rite GENDER_CHARACTER = scope:piety_character }or
trait_is_criminal_in_rite_trigger = { TRAIT = $TRAIT$ RITE = scope:piety_character.rite GENDER_CHARACTER = scope:piety_character }
Then
- Level of Devotion -1
If
Then
If
trait_is_shunned_in_rite_trigger = { TRAIT = $TRAIT$ RITE = scope:piety_character.rite GENDER_CHARACTER = scope:piety_character }
Then
- Loses 50 Legitimacy
Otherwise
- Loses 100 Legitimacy
• 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 (32 lines of game script)
remove_piety_level_for_shunned_or_criminal_trait_effect = {
save_temporary_scope_as = piety_character
if = {
limit = {
OR = {
trait_is_shunned_in_rite_trigger = { TRAIT = $TRAIT$ RITE = scope:piety_character.rite GENDER_CHARACTER = scope:piety_character }
trait_is_criminal_in_rite_trigger = { TRAIT = $TRAIT$ RITE = scope:piety_character.rite GENDER_CHARACTER = scope:piety_character }
}
}
add_piety_level = -1
# LEGITIMACY LOSS FROM CRIME EXPOSURE
if = {
limit = {
is_valid_for_legitimacy_change = yes
NOT = { exists = scope:suppress_legitimacy_from_crime }
}
if = {
limit = {
trait_is_shunned_in_rite_trigger = { TRAIT = $TRAIT$ RITE = scope:piety_character.rite GENDER_CHARACTER = scope:piety_character }
}
add_legitimacy = minor_legitimacy_loss
}
else = { add_legitimacy = medium_legitimacy_loss }
# Flag that we might not always want to apply future legitimacy losses down the line.
save_scope_value_as = {
name = suppress_legitimacy_from_crime
value = yes
}
}
}
}As written in game/common/scripted_effects/00_secret_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls remove_piety_level_for_shunned_or_criminal_trait_effect.
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.