Scripted effect
marriage_interaction_on_accept_effect
marriage_interaction_on_accept_effect = yesgame/common/scripted_effects/00_marriage_interaction_effects.txt, line 1 (451 lines). No parameters.
marriage_interaction_on_accept_effect is a scripted effect in Crusader Kings III, written at line 1 of its file. It takes no parameters: marriage_interaction_on_accept_effect = yes. The game's script calls it in 2 places, among them Arrange Marriage (interaction) and Find Spouse (interaction). Its body carries 2 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/00_marriage_interaction_effects.txt.
What it does
- If never › scope:puppet_or_actor:
use_hook = scope:recipient
scope:puppet_or_actor:If
- scope:secondary_recipient: Is Lowborn
Then
vassals_dislike_marry_lowborn_effect = { SPOUSE = scope:secondary_recipient RULER = scope:puppet_or_actor }If
is_valid_for_legitimacy_change = yesNone of these
- Their rite: The rite has Rulers gain Piety from marrying Lowborn Characters, and lose no Legitimacy for doing so
- Does not have “lowborn legitimacy cooldown” (a variable the game's script sets)
One of these
NOT = { exists = primary_spouse }or
primary_spouse ?= scope:secondary_recipient
Then
- If played by a person:
add_legitimacy = { value = medium_legitimacy_loss multiply = scope:puppet_or_actor.primary_title.tier }
- Otherwise:
add_legitimacy = { value = minor_legitimacy_loss }
Else if
- scope:secondary_recipient: Not: Is Lowborn
is_valid_for_nomadic_legitimacy_change = yes- scope:recipient: Government is Nomadic
mpo_lower_nomad_authority_trigger = { CHARACTER = scope:recipient }
Then
- Gains 100 Legitimacy
scope:recipient:If
- scope:secondary_actor: Is Lowborn
Then
vassals_dislike_marry_lowborn_effect = { SPOUSE = scope:secondary_actor RULER = scope:recipient }If
is_valid_for_legitimacy_change = yesNone of these
- Their rite: The rite has Rulers gain Piety from marrying Lowborn Characters, and lose no Legitimacy for doing so
- Does not have “lowborn legitimacy cooldown” (a variable the game's script sets)
One of these
NOT = { exists = primary_spouse }or
primary_spouse ?= scope:secondary_actor
Then
- If played by a person:
add_legitimacy = { value = medium_legitimacy_loss multiply = scope:recipient.primary_title.tier }
- Otherwise:
add_legitimacy = { value = minor_legitimacy_loss }
Else if
- scope:secondary_actor: Not: Is Lowborn
is_valid_for_nomadic_legitimacy_change = yes- scope:puppet_or_actor: Government is Nomadic
mpo_lower_nomad_authority_trigger = { CHARACTER = scope:puppet_or_actor }
Then
- Gains 100 Legitimacy
If
scope:secondary_recipient:- Is landed
- Government is unplayable
Then
- scope:puppet_or_actor › Depending on has government:
- When has government is Feudal › scope:secondary_recipient: Adopts Feudal Government
- When has government is Tribal › scope:secondary_recipient: Adopts Tribal Government
- When has government is Clan › scope:secondary_recipient: Adopts Clan Government
- When has government is Nomadic › scope:secondary_recipient: Adopts Nomadic Government
- When has government is Administrative › scope:secondary_recipient: Adopts Administrative Government
- When has government is Adventurer › scope:secondary_recipient: Adopts Adventurer Government
If
- scope:secondary_recipient: Is Concubine
Then
- scope:secondary_recipient › One random consort:
- Where: Any concubine:
remove_concubine = scope:secondary_recipient
If
- scope:secondary_actor: Is Concubine
Then
- scope:secondary_actor › One random consort:
- Where: Any concubine:
remove_concubine = scope:secondary_actor
scope:secondary_recipient:If
- Is an Adult
- Is played by the AI
- … (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)
marriage_interaction_on_accept_effect = {
#Use hook
if = {
limit = { always = scope:hook }
scope:puppet_or_actor = {
use_hook = scope:recipient
}
#To make sure betrothals can't be broken if a hook was used
if = {
limit = {
OR = {
scope:secondary_actor = { is_adult = no }
scope:secondary_recipient = { is_adult = no }
}
}
scope:secondary_actor = {
set_variable = {
name = hook_used_for_betrothal
value = scope:secondary_recipient
}
}
}
}
#Penalties for marrying a lowborn
scope:puppet_or_actor = {
if = {
limit = {
this = scope:secondary_actor # We check that you're marrying them yourself
scope:secondary_recipient = { is_lowborn = yes }
}
# Vassal dispositions get aggy.
## Actual effect applied in the on_marriage on_action.
show_as_tooltip = {
vassals_dislike_marry_lowborn_effect = {
SPOUSE = scope:secondary_recipient
RULER = scope:puppet_or_actor
}
}
#Legitimacy loss for marrying a lowborn
if = {
limit = {
is_valid_for_legitimacy_change = yes
NOT = { rite = { rite_has_parameter = piety_from_marrying_lowborn_active } }
NOT = { has_variable = lowborn_legitimacy_cooldown }
OR = {
NOT = { exists = primary_spouse }
primary_spouse ?= scope:secondary_recipient
}
}
if = {
limit = { is_ai = no }
send_interface_toast = {
type = event_toast_effect_neutral
title = married_lowborn_toast
left_icon = scope:puppet_or_actor
add_legitimacy = {
value = medium_legitimacy_loss
multiply = scope:puppet_or_actor.primary_title.tier
}
}
}
else = { # To avoid destroying polygamy AIs
send_interface_toast = {
type = event_toast_effect_neutral
title = married_lowborn_toast
left_icon = scope:puppet_or_actor
add_legitimacy = { value = minor_legitimacy_loss }
}
hidden_effect = {
set_variable = {
name = lowborn_legitimacy_cooldown
years = 10
}
}
}
}
}
else_if = { # If they're not a lowborn AND you and the recipient are both Nomad we may give you some Legitimacy
limit = {
this = scope:secondary_actor # We check that you're marrying them yourself
scope:secondary_recipient = { is_lowborn = no }
is_valid_for_nomadic_legitimacy_change = yes
scope:recipient = { government_has_flag = government_is_nomadic }
mpo_lower_nomad_authority_trigger = { CHARACTER = scope:recipient } # Only if recipient has higher Dominance than you
}
add_legitimacy = medium_legitimacy_gain
}
}
scope:recipient = {
if = {
limit = {
this = scope:secondary_recipient # We check that you're marrying them yourself
scope:secondary_actor = { is_lowborn = yes }
}
# Vassal dispositions get aggy.
## Actual effect applied in the on_marriage on_action.
show_as_tooltip = {
vassals_dislike_marry_lowborn_effect = {
SPOUSE = scope:secondary_actor
RULER = scope:recipient
}
}
#Legitimacy loss for marrying a lowborn
if = {
limit = {
is_valid_for_legitimacy_change = yes
NOT = { rite = { rite_has_parameter = piety_from_marrying_lowborn_active } }
NOT = { has_variable = lowborn_legitimacy_cooldown }
OR = {
NOT = { exists = primary_spouse }
primary_spouse ?= scope:secondary_actor
}
}
if = {
limit = { is_ai = no }
send_interface_toast = {
type = event_toast_effect_neutral
title = married_lowborn_toast
left_icon = scope:recipientAs written in game/common/scripted_effects/00_marriage_interaction_effects.txt.
The first 120 of its 451 lines; the rest is in game/common/scripted_effects/00_marriage_interaction_effects.txt from line 1.
Where it is used
Every place in common/, events/ and history/ that calls marriage_interaction_on_accept_effect.
Character interactions (2)
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.