Scripted effect
update_active_consort_opinion_effect
update_active_consort_opinion_effect = { PARTNER = … }game/common/scripted_effects/00_marriage_interaction_effects.txt, line 1388 (93 lines). Parameters: $PARTNER$.
update_active_consort_opinion_effect is a scripted effect in Crusader Kings III, written at line 1388 of its file. A call passes 1 parameter: PARTNER. The game's script calls it in 6 places, among them death_management.0095 (event), faith_conversion.0005 (event) and on_concubinage (on action). Patch 1.20.1.2, from game/common/scripted_effects/00_marriage_interaction_effects.txt.
The comment above it in the file
When you take spouses/concubines whose Faith does not permit that union, they will gain opinion penalties. This effect adds/updates/replaces/removes those opinion penalties, as approprite to the current situation.
What it does
downgrade_invalid_consort_opinions_effect = { PARTNER = $PARTNER$ }If
a check the game hides
Then
If
is_concubine_of = $PARTNER$None of these
- Their rite: Has the Concubines Doctrine
None of these
- Their culture: The culture has the tradition Concubines
Then
Else if
is_spouse_of = $PARTNER$$PARTNER$ = { … }None of these
- Their rite: Has the Concubines Doctrine
None of these
- Their rite: The rite has the tenet Polyamory
None of these
- Their culture: The culture has the tradition Concubines
Then
If
$PARTNER$ = { … }
Then
- Opinion: Your Concubines Are Blaspheming Our Marriage
remove_opinion = { target = $PARTNER$ modifier = spouse_does_not_believe_in_former_concubines_opinion }
Else if
None of these
- Their culture: The culture has the tradition Polygamous
- Their rite: Has the Polygamous Doctrine
Then
- Opinion: Not in a Monogamous Marriage
If
allowed_to_marry_same_sex_trigger = nosex_same_as = $PARTNER$
Then
- Opinion: Forced to Be in a Same-sex Relation
• 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 (93 lines of game script)
update_active_consort_opinion_effect = {
# If we currently have any existing consort opinion modifiers, check if they should be downgraded from permanent modifiers to decaying modifiers.
downgrade_invalid_consort_opinions_effect = { PARTNER = $PARTNER$ }
if = {
# If this opinion change was triggered by being divorced/set-aside, we may still technically be married/joined to PARTNER at this moment, but we won't be very shortly and should skip this step.
limit = {
NOR = {
exists = scope:is_being_divorced
exists = scope:is_being_set_aside
}
}
# Oterwise, apply any new consort opinion effects that are applicable.
if = {
# Characters who do not believe in concubinage, but are forced into it, have the harshest opinion penalties.
limit = {
is_concubine_of = $PARTNER$
NOT = { rite = { rite_has_doctrine = doctrine_concubines }}
NOT = { culture = { has_cultural_tradition = tradition_concubines } }
}
if = {
# Harshest opinion penalty if they are a concubine but believe in monogamy
limit = { rite = { rite_has_doctrine = doctrine_monogamy }}
add_opinion = {
target = $PARTNER$
modifier = concubine_with_monogamous_faith_opinion
}
}
else_if = {
# Lesser-but-still-harsh opinion penalty if they are a concubine but believe in polygamy
limit = {
OR = {
culture = { has_cultural_tradition = tradition_polygamous }
rite = { rite_has_doctrine = doctrine_polygamy }
}
}
add_opinion = {
target = $PARTNER$
modifier = concubine_with_polygamous_faith_opinion
}
}
}
else_if = {
# Characters who are legitimate spouses of their partner, but do not approve of their partner's other spouses/concubines, will have milder opinion penalties.
limit = {
is_spouse_of = $PARTNER$
$PARTNER$ = { any_consort = { count >= 2 }}
NOT = { rite = { rite_has_doctrine = doctrine_concubines }}
NOT = { rite = { rite_has_tenet = tenet_polyamory }}
NOT = { culture = { has_cultural_tradition = tradition_concubines } }
}
if = {
limit = {
$PARTNER$ = { any_concubine = { }}
}
add_opinion = {
target = $PARTNER$
modifier = spouse_does_not_believe_in_concubines_opinion
}
#Remove the opinion modifier if you flip-flop and go get concubines after getting rid of them all...
remove_opinion = {
target = $PARTNER$
modifier = spouse_does_not_believe_in_former_concubines_opinion
}
}
else_if = {
limit = {
NOR = {
culture = { has_cultural_tradition = tradition_polygamous }
rite = { rite_has_doctrine = doctrine_polygamy }
}
}
add_opinion = {
target = $PARTNER$
modifier = polygamous_marriage_opinion
}
}
}
#Same-sex not accepted penalty
if = {
limit = {
allowed_to_marry_same_sex_trigger = no
sex_same_as = $PARTNER$
}
add_opinion = {
target = $PARTNER$
modifier = same_sex_with_no_acceptance_opinion
}
}
}
}As written in game/common/scripted_effects/00_marriage_interaction_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls update_active_consort_opinion_effect.
On actions (the game's own hooks) (4)
- on_concubinage
- on_concubinage_end
- on_divorce
- on_marriage
Source: game/common/scripted_effects/00_marriage_interaction_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.