Scripted trigger
bastard_secret_is_shunned
bastard_secret_is_shunned = { PARTICIPANT = … TARGET = … }game/common/scripted_triggers/00_bastard_triggers.txt, line 125 (95 lines). Parameters: $PARTICIPANT$, $TARGET$.
bastard_secret_is_shunned is a scripted trigger in Crusader Kings III, written at line 125 of its file. A call passes 2 parameters: PARTICIPANT and TARGET. The game's script calls it in 2 places, among them Child's Heritage (secret types) and Disputed Heritage (secret types). Patch 1.20.1.2, from game/common/scripted_triggers/00_bastard_triggers.txt.
What it checks
assert_if = { … }$TARGET$ = { save_temporary_scope_as = bastard }$PARTICIPANT$ = { save_temporary_scope_as = participant }One of these
scope:participant = scope:bastardor
scope:participant:One of these
trait_is_shunned_in_rite_trigger = { RITE = rite TRAIT = trait:adulterer GENDER_CHARACTER = scope:participant }or
Any liege or above:trait_is_shunned_in_rite_trigger = { RITE = rite TRAIT = trait:adulterer GENDER_CHARACTER = scope:participant }
or
All of these
exists = scope:bastard.real_fatherexists = scope:bastard.motherscope:participant:One of these
this = scope:bastard.motheror
this = scope:bastard.real_father
If a check the game hides passes: the same again (1 line)
scope:bastard.real_father:save_temporary_scope_as = other_parent
Otherwise
scope:bastard.mother:save_temporary_scope_as = other_parent
relation_with_character_is_incestuous_in_rite_trigger = { CHARACTER = scope:other_parent RITE = scope:participant.rite }- Any liege or above:
save_temporary_scope_as = liege_or_abovescope:participant:relation_with_character_is_incestuous_in_rite_trigger = { CHARACTER = scope:other_parent RITE = scope:liege_or_above.rite }
NOT = { bastard_secret_is_criminal = { TARGET = scope:bastard PARTICIPANT = scope:participant } }
• 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 (95 lines of game script)
bastard_secret_is_shunned = {
assert_if = {
limit = { NOT = { exists = $TARGET$ } }
text = "Empty TARGET was passed to bastard_secret_is_shunned!"
}
assert_if = {
limit = { NOT = { exists = $TARGET$ } }
text = "Empty PARTICIPANT was passed to bastard_secret_is_shunned!"
}
#Saving bastard & other parent scope
$TARGET$ = { save_temporary_scope_as = bastard }
$PARTICIPANT$ = { save_temporary_scope_as = participant }
assert_if = {
limit = { NOT = { exists = scope:bastard } }
text = "scope:bastard does not exist in bastard_secret_is_shunned!"
}
assert_if = {
limit = { NOT = { exists = scope:participant } }
text = "scope:participant does not exist in bastard_secret_is_shunned!"
}
assert_if = {
limit = { NOT = { exists = scope:bastard.mother } }
text = "scope:bastard.mother does not exist in bastard_secret_is_shunned!"
}
assert_if = {
limit = { NOT = { exists = scope:bastard.real_father } }
text = "scope:bastard.real_father does not exist in bastard_secret_is_shunned!"
}
OR = {
#Bastard child: always shunned, never criminal
scope:participant = scope:bastard
#Adultery is shunned
scope:participant = {
OR = {
trait_is_shunned_in_rite_trigger = {
RITE = rite
TRAIT = trait:adulterer
GENDER_CHARACTER = scope:participant
}
any_liege_or_above = {
trait_is_shunned_in_rite_trigger = {
RITE = rite
TRAIT = trait:adulterer
GENDER_CHARACTER = scope:participant
}
}
}
}
#Either parent if incest is shunned
AND = {
# Can't have incest with only one parent!
exists = scope:bastard.real_father
exists = scope:bastard.mother
# Also the secret participant has to be one of the parents
scope:participant = {
OR = {
this = scope:bastard.mother
this = scope:bastard.real_father
}
trigger_if = {
limit = { this = scope:bastard.mother }
scope:bastard.real_father = { save_temporary_scope_as = other_parent }
}
trigger_else = {
scope:bastard.mother = { save_temporary_scope_as = other_parent }
}
# Check if the relation would be incestuous in my faith or my liege's faith
relation_with_character_is_incestuous_in_rite_trigger = {
CHARACTER = scope:other_parent
RITE = scope:participant.rite
}
any_liege_or_above = {
save_temporary_scope_as = liege_or_above
scope:participant = {
relation_with_character_is_incestuous_in_rite_trigger = {
CHARACTER = scope:other_parent
RITE = scope:liege_or_above.rite
}
}
}
}
}
}
NOT = {
bastard_secret_is_criminal = {
TARGET = scope:bastard
PARTICIPANT = scope:participant
}
}
}As written in game/common/scripted_triggers/00_bastard_triggers.txt.
Where it is used
Every place in common/, events/ and history/ that calls bastard_secret_is_shunned.
Secret types (2)
- Child's Heritage
- Disputed Heritage
Source: game/common/scripted_triggers/00_bastard_triggers.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.