Want a good example of the problem? Here's some of the code from the yearly.0003 event, wherein you learn that one of your children is in an incestuous relationship. Specifically, the part where the event chooses the child in question:
Code:
#Picks the child
random_child = {
limit = {
save_temporary_scope_as = child
any_relation = {
type = lover
relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = scope:child FAITH = root.faith }
}
yearly_0003_valid_child = yes
any_close_or_extended_family_member = {
yearly_0003_valid_relative = yes
}
}
alternative_limit = {
yearly_0003_valid_child = yes
save_temporary_scope_as = child
any_close_or_extended_family_member = {
yearly_0003_valid_relative = yes
}
}
weight = {
base = 10
modifier = {
add = 30
has_trait = lustful
}
modifier = {
add = 70
OR = {
has_trait = deviant
}
any_secret = {
secret_type = secret_deviant
}
}
#More dramatic if your heir is one of the partipants.
modifier = {
add = 50
is_player_heir_of_trigger = { CHARACTER = root }
}
}
save_scope_as = child
Specifically, if you already have a child in an incestuous relationship, the event picks that child; otherwise, it picks a child that fulfills the "yearly_0003_valid_child" criteria. What is that, you ask?
Code:
scripted_trigger yearly_0003_valid_child = {
is_available_ai_adult = yes
#So we can imprison them
any_liege_or_above = { this = root }
save_temporary_scope_as = this_child
NOR = {
# Child must be able to be in a relationship.
has_trait = celibate
has_sexuality = asexual
# Child must not already be in or have been in a (known) incestuous relationship.
has_trait = incestuous
AND = {
any_secret = {
secret_type = secret_lover
is_known_by = root
secret_target = {
relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:this_child }
}
}
}
}
}
They just have to be an adult with a sex drive. The yearly_0003_valid_relative is similarly permissive; it just makes sure the relative is in your court and is sexually compatible with the target child.
In short, if the event fires, and you don't already have any secret incest in your family, the game picks a random adult child and
forces them into an incestuous relationship. It does not care if your child is a chaste zealot with 100 opinion of their spouse and soulmate. It even adds a ton of extra likelihood to picking your heir, for "drama."