### # SPECIAL NOTE # # When evaluating whether or not the AI can send this interaction to the # player, the AI will use the ai_accept value and send a proposal to the # player IF AND ONLY IF the player, as an AI actor, would have positive # ai_accept value. This is a special case for this specific interaction, # and is being calculated specifically in code. # arrange_marriage_interaction = { icon = icon_marriage category = interaction_category_diplomacy common_interaction = yes filter_tags = { ceremonial_liege } override_background = { reference = relaxing_room } special_interaction = arrange_marriage_interaction interface = marriage use_diplomatic_range = { trigger_if = { limit = { exists = scope:secondary_actor.betrothed } NOT = { scope:secondary_actor = { betrothed = scope:secondary_recipient } } } } recipient_recieve_cooldown = { years = marriage_recieve_proposal_cooldown } ignore_recipient_recieve_cooldown = { AND = { is_ai = no scope:recipient = { is_ai = no } } } desc = { first_valid = { triggered_desc = { trigger = { scope:puppet_or_actor = scope:recipient } desc = arrange_marriage_interaction_desc_ruler_at_own_court } triggered_desc = { trigger = { scope:puppet_or_actor = { can_marry_character_trigger = { CHARACTER = scope:recipient } } scope:recipient = { is_ruler = yes } } desc = arrange_marriage_interaction_desc_both_rulers_can_marry } triggered_desc = { trigger = { scope:recipient = { is_ruler = yes can_marry_trigger = yes } } desc = arrange_marriage_interaction_desc_both_rulers_recipient_only_can_marry } triggered_desc = { trigger = { scope:recipient = { is_ruler = yes } } desc = arrange_marriage_interaction_desc_both_rulers_recipient_neither_can_marry } triggered_desc = { trigger = { scope:puppet_or_actor = { can_marry_character_trigger = { CHARACTER = scope:recipient } } } desc = arrange_marriage_interaction_desc_one_ruler_can_marry } desc = arrange_marriage_interaction_desc_recipient_one_ruler_cannot_marry } } redirect = { # If the define MARRIAGE_OWNER_IS_MATCHMAKER is set to yes, the actor must end up as the "matchmaker" link for courtiers scope:puppet_or_actor = { if = { limit = { exists = matchmaker NOT = { this = matchmaker } } save_scope_as = secondary_actor matchmaker = { save_scope_as = actor save_scope_as = puppet_or_actor } } if = { limit = { is_betrothed = yes betrothed = scope:recipient } save_scope_as = secondary_actor } } scope:recipient = { if = { limit = { is_betrothed = yes betrothed.matchmaker = scope:puppet_or_actor is_adult = yes betrothed = { is_adult = yes } } save_scope_as = secondary_recipient matchmaker = { save_scope_as = recipient } betrothed = { save_scope_as = secondary_actor } } # marriage interactions are special, and code sets scopes in an unusual way # secondary recipient must always be set for marriage script, # but marriage UI only sets primary recipient # make sure redirect solves this issue if = { limit = { exists = matchmaker this = matchmaker NOT = { exists = scope:secondary_recipient } } save_scope_as = secondary_recipient } if = { limit = { exists = matchmaker NOT = { this = matchmaker } } save_scope_as = secondary_recipient matchmaker = { save_scope_as = recipient } } } } populate_actor_list = { scope:puppet_or_actor = { if = { limit = { trigger_if = { limit = { exists = scope:secondary_recipient } can_marry_character_trigger = { CHARACTER = scope:secondary_recipient } } } add_to_list = characters } every_courtier = { limit = { trigger_if = { limit = { is_concubine = yes } is_concubine_of = scope:puppet_or_actor } trigger_if = { limit = { exists = scope:secondary_recipient } can_marry_character_trigger = { CHARACTER = scope:secondary_recipient } } } add_to_list = characters } every_courtier_away = { limit = { trigger_if = { limit = { is_concubine = yes } is_concubine_of = scope:puppet_or_actor } trigger_if = { limit = { exists = scope:secondary_recipient } can_marry_character_trigger = { CHARACTER = scope:secondary_recipient } } } add_to_list = characters } every_child = { even_if_dead = yes if = { limit = { is_alive = yes NOT = { is_in_list = characters } trigger_if = { limit = { is_concubine = yes } is_concubine_of = scope:puppet_or_actor } trigger_if = { limit = { exists = scope:secondary_recipient } can_marry_character_trigger = { CHARACTER = scope:secondary_recipient } } } add_to_list = characters } every_child = { even_if_dead = yes if = { limit = { is_alive = yes NOT = { is_in_list = characters } OR = { top_liege = scope:puppet_or_actor house.house_head = scope:puppet_or_actor dynasty.dynast = scope:puppet_or_actor } trigger_if = { limit = { is_concubine = yes } is_concubine_of = scope:puppet_or_actor } trigger_if = { limit = { exists = scope:secondary_recipient } can_marry_character_trigger = { CHARACTER = scope:secondary_recipient } } } add_to_list = characters } every_child = { if = { limit = { is_alive = yes NOT = { is_in_list = characters } OR = { top_liege = scope:puppet_or_actor house.house_head = scope:puppet_or_actor dynasty.dynast = scope:puppet_or_actor } trigger_if = { limit = { is_concubine = yes } is_concubine_of = scope:puppet_or_actor } trigger_if = { limit = { exists = scope:secondary_recipient } can_marry_character_trigger = { CHARACTER = scope:secondary_recipient } } } add_to_list = characters } } } } } } populate_recipient_list = { scope:recipient = { if = { limit = { trigger_if = { limit = { exists = scope:secondary_actor } can_marry_character_trigger = { CHARACTER = scope:secondary_actor } } } add_to_list = characters } every_courtier = { limit = { trigger_if = { limit = { exists = scope:secondary_actor } can_marry_character_trigger = { CHARACTER = scope:secondary_actor } } } add_to_list = characters } every_courtier_away = { limit = { trigger_if = { limit = { exists = scope:secondary_actor } can_marry_character_trigger = { CHARACTER = scope:secondary_actor } } } add_to_list = characters } every_child = { limit = { NOT = { is_in_list = characters } trigger_if = { limit = { exists = scope:secondary_actor } can_marry_character_trigger = { CHARACTER = scope:secondary_actor } } } add_to_list = characters } } } interface_priority = 60 cost = { prestige = { value = 0 if = { limit = { exists = scope:puppet_or_actor exists = scope:recipient exists = scope:secondary_recipient exists = scope:secondary_actor scope:secondary_actor = { is_close_family_of = scope:puppet_or_actor } scope:recipient = { OR = { AND = { vassal_contract_has_flag = vassal_contract_marriage_favor is_allied_to = scope:puppet_or_actor } NOT = { vassal_contract_has_flag = vassal_contract_marriage_favor} } } } add = { scope:puppet_or_actor = { every_vassal = { limit = { vassal_contract_has_flag = vassal_contract_marriage_favor NOT = { is_allied_to = scope:puppet_or_actor } NOR = { this = scope:recipient this = scope:secondary_recipient } } add = medium_prestige_value } } desc = VASSAL_WITH_MARRIAGE_FAVOR } } } # piety = { # value = 0 # if = { # limit = { scope:piety_cost_reduction = yes } # add = scope:puppet_or_actor.medium_piety_value # desc = STRUGGLE_MARRIAGE_ACCEPTANCE_USING_PIETY_AS_CURRENCY # } # if = { # limit = { # exists = scope:puppet_or_actor # exists = scope:recipient # exists = scope:secondary_recipient # exists = scope:secondary_actor # scope:secondary_actor = { # faith != scope:secondary_recipient.faith # } # scope:puppet_or_actor = { # any_character_struggle = { # has_struggle_phase_parameter = interfaith_marriages_between_involved_characters_costs_piety # } # } # } # add = { # value = major_piety_value # desc = CB_STRUGGLE_PHASE_SURCHARGE # } # } # } influence = { value = 0 if = { limit = { scope:influence_send_option = yes } add = scope:puppet_or_actor.medium_influence_value desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION } } } # actor, recipient ... characters arranging the marriage # secondary_actor, secondary_recipient ... characters that should marry is_shown = { scope:puppet_or_actor ?= { OR = { is_ruler = yes #Can arrange marriages for others #You're just a courtier? Only use the interaction on characters you can marry can_marry_character_trigger = { CHARACTER = scope:recipient } } } # Block further marriage proposals for people who have a pending grand wedding NOR = { scope:secondary_actor ?= { has_been_promised_grand_wedding = yes } scope:secondary_recipient ?= { has_been_promised_grand_wedding = yes } } #If you're interacting with someone who isn't their own matchmaker, only show the interaction if they can get married. (If someone isn't their own matchmaker, they will be set as secondary_recipient by code and their matchmaker becomes recipient) trigger_if = { limit = { exists = scope:secondary_recipient scope:secondary_recipient.matchmaker != scope:secondary_recipient } scope:secondary_recipient = { OR = { marriage_interaction_can_be_picked_trigger = yes #Can marry anyone AND = { ready_to_marry_betrothed_trigger = yes OR = { betrothed ?= scope:secondary_actor trigger_if = { limit = { exists = betrothed.liege } betrothed.liege = scope:puppet_or_actor } } } } #To account for a person marrying their concubines trigger_if = { limit = { is_concubine = yes } is_concubine_of = scope:puppet_or_actor can_marry_character_trigger = { CHARACTER = scope:puppet_or_actor } } } } #allow landless adventurers to marry only within their camp, or with Contact list courtiers (after using request_marriage option in contact_list_request_interaction), or prieviously betrothed characters trigger_if = { limit = { scope:puppet_or_actor = { government_has_flag = government_is_landless_adventurer } } trigger_if = { limit = { OR = { scope:puppet_or_actor ?= { is_target_in_variable_list = { name = contact_list_marriage target = scope:recipient } } scope:recipient = { is_betrothed = yes betrothed ?= { OR = { scope:puppet_or_actor ?= this scope:secondary_actor ?= this } } } scope:secondary_recipient ?= { is_betrothed = yes betrothed ?= { OR = { scope:puppet_or_actor ?= this scope:secondary_actor ?= this } } } } } always = yes } trigger_else = { scope:recipient = scope:puppet_or_actor } } } is_valid_showing_failures_only = { pam_ai_marriage_respects_clerical_restraint_trigger = yes #If we're opening this interaction through the interaction menu (i.e. not all scopes exist yet) #This was giving double-warnings about a marry-able character existing so it's commented out for now #custom_description = { # text = character_to_marry_exists # object = scope:recipient # scope:recipient = { # OR = { # any_courtier = { # is_at_home = yes # marriage_interaction_can_be_picked_trigger= yes # } # any_child = { # marriage_interaction_can_be_picked_trigger= yes # } # } # } #} trigger_if = { limit = { NAND = { exists = scope:secondary_actor exists = scope:secondary_recipient } } #There is an available marriage custom_description = { text = "basic_can_marry_check_recipient" subject = scope:puppet_or_actor object = scope:recipient scope:recipient = { OR = { AND = { #Recipient can marry can_marry_trigger = yes #To account for a person marrying their concubines trigger_if = { limit = { is_concubine = yes } is_concubine_of = scope:puppet_or_actor can_marry_character_trigger = { CHARACTER = scope:puppet_or_actor } } } AND = { is_ruler = yes #(Following are only for rulers) OR = { any_child = { matchmaker = scope:puppet_or_actor OR = { #Any of recipient's children can marry AND = { can_marry_trigger = yes #To account for a person marrying their concubines trigger_if = { limit = { is_concubine = yes } is_concubine_of = scope:puppet_or_actor } } #Any of recipient's children are ready to marry their betrothed AND = { ready_to_marry_betrothed_trigger = yes betrothed.matchmaker = scope:puppet_or_actor } } } any_courtier = { OR = { #Any of recipient's courtiers can marry AND = { can_marry_trigger = yes #To account for a person marrying their concubines trigger_if = { limit = { is_concubine = yes } is_concubine_of = scope:puppet_or_actor } } #Any of recipient's courtiers are ready to marry their betrothed AND = { ready_to_marry_betrothed_trigger = yes betrothed.matchmaker = scope:puppet_or_actor } } } } } } } } } #Diplomatic availability & prison scope:recipient = { is_imprisoned = no } NOT = { scope:puppet_or_actor = { is_at_war_with = scope:recipient } } trigger_if = { #(must be here because secondary_recipient can be set at the start) limit = { exists = scope:secondary_recipient scope:secondary_recipient != scope:recipient } scope:secondary_recipient = { is_imprisoned = no bp2_valid_for_standard_interactions_trigger = yes } } trigger_if = { #(must be here because secondary_recipient can be set at the start) limit = { exists = scope:secondary_actor scope:secondary_actor != scope:puppet_or_actor } scope:secondary_actor = { is_imprisoned = no bp2_valid_for_standard_interactions_trigger = yes } } # Account for regents being bolshy. marriage_interaction_non_loyal_diarchs_refuse_secondary_marriage_trigger = { TARGET = secondary_actor } marriage_interaction_non_loyal_diarchs_refuse_secondary_marriage_trigger = { TARGET = secondary_recipient } marriage_interaction_non_loyal_diarchs_refuse_secondary_marriage_trigger = { TARGET = puppet_or_actor } marriage_interaction_non_loyal_diarchs_refuse_secondary_marriage_trigger = { TARGET = recipient } } # whether a character can be picked for the interaction, interface only (e.g. picking the first character in the marriage interaction) # in character scope, actor and recipient event targets can be used, but not the secondary characters (because none exist yet) can_be_picked = { OR = { marriage_interaction_can_be_picked_trigger = yes AND = { exists = scope:secondary_actor exists = scope:secondary_recipient scope:secondary_actor.betrothed = scope:secondary_recipient } } } #Is evaluated only after secondary_recipient and secondary_actor are both chosen has_valid_target_showing_failures_only = { marriage_interaction_valid_target_trigger = yes #Checks marriage status, betrothed, gender, consanguinity, faith hostility etc. #Blocks AI from marrying player guests scope:secondary_recipient = { trigger_if = { limit = { is_pool_guest = yes host = { is_ai = no this != scope:puppet_or_actor } } NOT = { is_pool_guest_of = host } } } #Blocks most AI's from marrying Evil faiths trigger_if = { limit = { scope:puppet_or_actor = { is_ai = yes NOT = { has_trait = cynical } #AI should honor betrothal even if faiths change scope:secondary_actor.betrothed != scope:secondary_recipient } } scope:recipient.faith = { faith_hostility_level = { target = scope:puppet_or_actor.faith value < faith_hostility_prevents_marriage_level } } } #Blocks AI from marrying single mayors in their area unless they are also mayors trigger_if = { limit = { scope:puppet_or_actor = { is_ai = yes NOT = { government_has_flag = government_is_republic } } } NOT = { scope:recipient = { government_has_flag = government_is_republic } } } trigger_if = { # Cultural Traditions, for AI limit = { scope:puppet_or_actor = { is_ai = yes culture = { has_cultural_parameter = dislikes_marrying_outside_of_culture } } } OR = { scope:puppet_or_actor.culture = scope:recipient.culture scope:puppet_or_actor.culture = scope:secondary_recipient.culture } } trigger_if = { # Pastoral Isolation personal tenet, for AI limit = { scope:puppet_or_actor = { is_ai = yes has_personal_tenet_flag = tenet_pastoral_isolation_endogamy } } OR = { scope:puppet_or_actor.faith = scope:recipient.faith scope:puppet_or_actor.faith = scope:secondary_recipient.faith } } } pre_auto_accept = { if = { limit = { NOR = { scope:recipient = scope:puppet_or_actor scope:secondary_actor = { has_been_promised_grand_wedding = yes } scope:secondary_recipient = { has_been_promised_grand_wedding = yes } } } scope:recipient = { if = { limit = { scope:secondary_actor.betrothed = scope:secondary_recipient } send_interface_toast = { type = msg_betrothal_fulfilled left_icon = scope:secondary_actor right_icon = scope:secondary_recipient } } else = { send_interface_toast = { type = msg_marriage_forced left_icon = scope:secondary_actor right_icon = scope:secondary_recipient } } } } } on_send = { if = { limit = { scope:grand_wedding_promise = yes } scope:puppet_or_actor = { set_variable = { name = grand_wedding_promise_pending days = 10 } if = { limit = { is_ai = yes } remove_short_term_gold = ai_wedding_promise_gold_actor } #if = { # Activity count debugging, left in for QA purposes # limit = { # NOT = { # exists = global_var:wedding_promise # } # } # set_global_variable = { # name = wedding_promise # value = 1 # } #} #else = { # change_global_variable = { # name = wedding_promise # add = 1 # } #} } } } on_accept = { marriage_interaction_on_accept_effect = yes scope:puppet_or_actor = { if = { limit = { scope:herd_send_option = yes } pay_herd = { target = scope:recipient value = scope:puppet_or_actor.domicile.medium_herd_value } } if = { limit = { has_variable = grand_wedding_promise_pending } remove_variable = grand_wedding_promise_pending } if = { limit = { is_target_in_variable_list = { name = contact_list_marriage target = scope:recipient } } remove_list_variable = { name = contact_list_marriage target = scope:recipient } } } } on_decline = { scope:puppet_or_actor = { if = { limit = { this != scope:recipient } trigger_event = marriage_interaction.0011 } if = { limit = { has_variable = grand_wedding_promise_pending } remove_variable = grand_wedding_promise_pending } } scope:secondary_actor = { add_character_flag = { flag = player_declined_marriage years = 5 } } } auto_accept = { marriage_interaction_auto_accept_trigger = yes #Strong hook conditions } ai_accept = { base = 0 marriage_ai_accept_modifier = yes } # If you want the AI to set these options then it needs to be hooked into the code as well send_option = { flag = grand_wedding_promise localization = GRAND_WEDDING_PROMISE is_shown = { scope:puppet_or_actor = { #Can organize a Grand Wedding highest_held_title_tier > tier_barony is_landed_or_landless_administrative_or_theocratic = yes trigger_if = { limit = { is_ai = yes } is_at_war = no } # DLC locked has_dlc_feature = tours_and_tournaments has_dlc_feature = advanced_activities } } current_description = { desc = "GRAND_WEDDING_PROMISE_INFO" } is_valid = { scope:puppet_or_actor = { gold >= real_wedding_cost_actor_scope is_available = yes custom_tooltip = { text = grand_wedding_already_promised_tt NOR = { var:promised_grand_wedding_marriage_countdown ?= { is_alive = yes } has_variable = grand_wedding_promise_pending } } } trigger_if = { limit = { exists = scope:secondary_actor } custom_tooltip = { text = grand_wedding_only_dominant_side trigger_if = { limit = { scope:secondary_actor ?= { is_female = yes } } OR = { scope:secondary_actor ?= { matrilinear_betrothal = yes } scope:matrilineal = yes } } trigger_else = { NOR = { scope:secondary_actor ?= { matrilinear_betrothal = yes } scope:matrilineal = yes } } } custom_tooltip = { text = grand_wedding_only_family scope:secondary_actor ?= { is_close_or_extended_family_of = scope:puppet_or_actor } } # Cannot promise grand weddings with regents due to regency and travel limitations custom_tooltip = { text = grand_wedding_secondary_regent NOT = { scope:secondary_actor.liege = { diarch = scope:secondary_actor has_active_diarchy = yes } } } } # Safety check because players shouldn't be spouse_2 trigger_if = { limit = { has_multiple_players = yes } custom_tooltip = { text = grand_wedding_mp_ai trigger_if = { limit = { OR = { scope:puppet_or_actor = { is_ai = no } scope:secondary_actor ?= { is_ai = no } } } scope:secondary_recipient ?= { is_ai = yes } } } } trigger_if = { limit = { scope:secondary_recipient.liege ?= { diarch = scope:secondary_recipient has_active_diarchy = yes } } # Cannot promise grand weddings with regents due to regency and travel limitations custom_tooltip = { text = grand_wedding_secondary_regent NOT = { scope:secondary_recipient.liege = { diarch = scope:secondary_recipient has_active_diarchy = yes } } } } } } send_option = { flag = matrilineal localization = MATRILINEAL_OFFER is_shown = { NAND = { scope:secondary_actor ?= { is_male = yes } scope:secondary_recipient ?= { is_male = yes } } } current_description = { triggered_desc = { trigger = { scope:secondary_actor ?= { betrothed = scope:secondary_recipient matrilinear_betrothal = yes } } desc = "MATRILINEAL_OFFER_BETROTHAL_INFO" } } can_be_changed = { trigger_if = { limit = { exists = scope:secondary_actor } OR = { NOT = { exists = scope:secondary_recipient } scope:secondary_actor = { betrothed != scope:secondary_recipient } } } # so they can use grand wedding... NAND = { scope:secondary_actor ?= { is_female = yes } scope:secondary_recipient ?= { is_female = yes } } } starts_enabled = { trigger_if = { limit = { scope:secondary_actor ?= { betrothed = scope:secondary_recipient } } scope:secondary_actor = { matrilinear_betrothal = yes } } trigger_else_if = { limit = { scope:secondary_actor ?= scope:puppet_or_actor scope:puppet_or_actor = { is_female = yes is_ai = no } } always = yes } trigger_else = { scope:puppet_or_actor = { OR = { rite = { rite_has_doctrine = doctrine_gender_female_dominated } AND = { this = scope:recipient scope:secondary_recipient ?= { is_female = yes } rite = { rite_has_doctrine = doctrine_gender_equal } } AND = { scope:secondary_actor ?= this is_female = yes is_ai = no } AND = { scope:secondary_actor ?= { is_female = yes } scope:secondary_recipient ?= { is_female = yes } } } } } } } send_option = { is_shown = { scope:secondary_actor = { betrothed != scope:secondary_recipient } } is_valid = { scope:puppet_or_actor = { has_usable_hook = scope:recipient } } flag = hook localization = MARRIAGE_HOOK } # send_option = { # FP3 # is_shown = { # scope:puppet_or_actor = { # any_character_struggle = { # is_struggle_type = persian_struggle # has_struggle_phase_parameter = can_trade_piety_for_marriage_acceptance # } # } # } # is_valid = { # scope:puppet_or_actor = { # any_character_struggle = { # involvement = involved # is_struggle_type = persian_struggle # } # } # scope:recipient = { # any_character_struggle = { # involvement = involved # is_struggle_type = persian_struggle # } # } # } # flag = piety_cost_reduction # localization = TRADE_PIETY_FOR_BETTER_AI_ACCEPTANCE # } send_option = { # EP3 Influence is_shown = { # Actor must have a government that uses influence scope:puppet_or_actor = { government_has_flag = government_has_influence } } is_valid = { # Actor has enough influence scope:puppet_or_actor = { influence >= medium_influence_value } # Both characters are within the same top realm custom_tooltip = { text = not_same_realm_tt scope:recipient.top_liege = scope:puppet_or_actor.top_liege } } flag = influence_send_option localization = TRADE_INFLUENCE_FOR_BETTER_AI_ACCEPTANCE } send_option = { # MPO Herd is_shown = { # Actor must have a government that uses Herd scope:puppet_or_actor = { government_has_flag = government_is_nomadic is_ai = no } # Recipient must care about Herd scope:recipient = { government_has_flag = government_is_nomadic } } is_valid = { # Actor has enough Herd scope:puppet_or_actor = { domicile.herd >= domicile.medium_herd_value } } flag = herd_send_option localization = TRADE_HERD_FOR_BETTER_AI_ACCEPTANCE } should_use_extra_icon = { scope:puppet_or_actor = { has_usable_hook = scope:recipient } } extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" send_options_exclusive = no show_effects_in_notification = no greeting = positive notification_text = { first_valid = { triggered_desc = { trigger = { scope:secondary_actor = { is_adult = yes } scope:secondary_recipient = { is_adult = yes } NOR = { scope:secondary_actor = { has_been_promised_grand_wedding = yes } scope:secondary_recipient = { has_been_promised_grand_wedding = yes } } } desc = { first_valid = { triggered_desc = { trigger = { scope:matrilineal = yes scope:secondary_actor = scope:puppet_or_actor scope:secondary_recipient = scope:recipient } desc = MARRIAGE_NOTIFICATION_BOTH_PERSONAL_MATRI } triggered_desc = { trigger = { scope:matrilineal = yes scope:secondary_actor = scope:puppet_or_actor } desc = MARRIAGE_NOTIFICATION_ACTOR_PERSONAL_MATRI } triggered_desc = { trigger = { scope:matrilineal = yes scope:secondary_recipient = scope:recipient } desc = MARRIAGE_NOTIFICATION_RECIPIENT_PERSONAL_MATRI } triggered_desc = { trigger = { scope:matrilineal = yes } desc = MARRIAGE_NOTIFICATION_MATRI } triggered_desc = { trigger = { scope:secondary_actor = scope:puppet_or_actor scope:secondary_recipient = scope:recipient } desc = MARRIAGE_NOTIFICATION_BOTH_PERSONAL } triggered_desc = { trigger = { scope:secondary_actor = scope:puppet_or_actor } desc = MARRIAGE_NOTIFICATION_ACTOR_PERSONAL } triggered_desc = { trigger = { scope:secondary_recipient = scope:recipient } desc = MARRIAGE_NOTIFICATION_RECIPIENT_PERSONAL } desc = MARRIAGE_NOTIFICATION } } } desc = { first_valid = { triggered_desc = { trigger = { scope:matrilineal = yes scope:secondary_actor = scope:puppet_or_actor scope:secondary_recipient = scope:recipient } desc = BETROTHAL_NOTIFICATION_BOTH_PERSONAL_MATRI } triggered_desc = { trigger = { scope:matrilineal = yes scope:secondary_actor = scope:puppet_or_actor } desc = BETROTHAL_NOTIFICATION_ACTOR_PERSONAL_MATRI } triggered_desc = { trigger = { scope:matrilineal = yes scope:secondary_recipient = scope:recipient } desc = BETROTHAL_NOTIFICATION_RECIPIENT_PERSONAL_MATRI } triggered_desc = { trigger = { scope:matrilineal = yes } desc = BETROTHAL_NOTIFICATION_MATRI } triggered_desc = { trigger = { scope:secondary_actor = scope:puppet_or_actor scope:secondary_recipient = scope:recipient } desc = BETROTHAL_NOTIFICATION_BOTH_PERSONAL } triggered_desc = { trigger = { scope:secondary_actor = scope:puppet_or_actor } desc = BETROTHAL_NOTIFICATION_ACTOR_PERSONAL } triggered_desc = { trigger = { scope:secondary_recipient = scope:recipient } desc = BETROTHAL_NOTIFICATION_RECIPIENT_PERSONAL } desc = BETROTHAL_NOTIFICATION } } } } } #This interaction is referenced in code! If it's renamed you have to ping a coder marry_off_interaction = { icon = icon_marriage category = interaction_category_diplomacy common_interaction = yes desc = marry_off_interaction_desc send_name = marry_off_send needs_recipient_to_open = no special_interaction = arrange_marriage_interaction interface = marriage redirect = { if = { limit = { exists = scope:secondary_actor } scope:recipient = { save_scope_as = secondary_recipient matchmaker = { save_scope_as = recipient } } } else = { scope:recipient = { save_scope_as = secondary_actor } clear_saved_scope = recipient } } populate_recipient_list = { #populate only with your courtiers or children/grandchildren if you are a landless adventurer if = { limit = { scope:puppet_or_actor = { has_government = landless_adventurer_government } } scope:secondary_actor = { if = { limit = { scope:puppet_or_actor != this } add_to_list = characters } every_courtier = { limit = { trigger_if = { limit = { is_concubine = yes } is_concubine_of = scope:puppet_or_actor can_marry_character_trigger = { CHARACTER = scope:puppet_or_actor } } } add_to_list = characters } every_courtier_away = { limit = { trigger_if = { limit = { is_concubine = yes } is_concubine_of = scope:puppet_or_actor can_marry_character_trigger = { CHARACTER = scope:puppet_or_actor } } } add_to_list = characters } every_child = { even_if_dead = yes if = { limit = { is_alive = yes NOT = { is_in_list = characters } trigger_if = { limit = { is_concubine = yes } is_concubine_of = scope:puppet_or_actor can_marry_character_trigger = { CHARACTER = scope:puppet_or_actor } } } add_to_list = characters } every_child = { even_if_dead = yes if = { limit = { is_alive = yes NOT = { is_in_list = characters } trigger_if = { limit = { is_concubine = yes } is_concubine_of = scope:puppet_or_actor can_marry_character_trigger = { CHARACTER = scope:puppet_or_actor } } } add_to_list = characters } every_child = { if = { limit = { is_alive = yes NOT = { is_in_list = characters } trigger_if = { limit = { is_concubine = yes } is_concubine_of = scope:puppet_or_actor can_marry_character_trigger = { CHARACTER = scope:puppet_or_actor } } } add_to_list = characters } } } } } } #otherwise, populate with anyone eligible else = { scope:secondary_actor = { if = { limit = { culture = { has_cultural_parameter = reduced_marriage_acceptance_distant_realms } } every_opposite_sex_spouse_candidate = { limit = { top_liege.culture = scope:secondary_actor.top_liege.culture } add_to_list = characters } if = { limit = { allowed_to_marry_same_sex_trigger = yes } every_same_sex_spouse_candidate = { limit = { scope:secondary_actor != this top_liege.culture = scope:secondary_actor.top_liege.culture } add_to_list = characters } } } else = { every_opposite_sex_spouse_candidate = { add_to_list = characters } if = { limit = { allowed_to_marry_same_sex_trigger = yes } every_same_sex_spouse_candidate = { limit = { scope:secondary_actor != this } add_to_list = characters } } } } } } cost = { prestige = { value = 0 if = { limit = { exists = scope:puppet_or_actor exists = scope:recipient exists = scope:secondary_recipient exists = scope:secondary_actor scope:secondary_actor = { is_close_family_of = scope:puppet_or_actor } scope:recipient = { OR = { AND = { vassal_contract_has_flag = vassal_contract_marriage_favor is_allied_to = scope:puppet_or_actor } NOT = { vassal_contract_has_flag = vassal_contract_marriage_favor} } } } add = { scope:puppet_or_actor = { every_vassal = { limit = { vassal_contract_has_flag = vassal_contract_marriage_favor NOT = { is_allied_to = scope:puppet_or_actor } NOR = { this = scope:recipient this = scope:secondary_recipient } } add = medium_prestige_value } } desc = VASSAL_WITH_MARRIAGE_FAVOR } } } influence = { value = 0 if = { limit = { scope:influence_send_option = yes } add = scope:puppet_or_actor.medium_influence_value desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION } } # piety = { # value = 0 # if = { # limit = { # exists = scope:puppet_or_actor # exists = scope:recipient # exists = scope:secondary_recipient # exists = scope:secondary_actor # scope:secondary_actor = { # faith != scope:secondary_recipient.faith # } # scope:puppet_or_actor = { # any_character_struggle = { # has_struggle_phase_parameter = interfaith_marriages_between_involved_characters_costs_piety # } # } # } # add = { # value = major_piety_value # desc = CB_STRUGGLE_PHASE_SURCHARGE # } # } # } } interface_priority = 60 # actor, recipient ... characters arranging the marriage # secondary_actor, secondary_recipient ... characters that should marry is_shown = { # Enable only for yourself if you're a landless adventurer trigger_if = { limit = { scope:puppet_or_actor = { has_government = landless_adventurer_government } } scope:secondary_actor = { scope:puppet_or_actor = this } } scope:secondary_actor ?= { #Is this someone I can marry off? OR = { is_courtier_of = scope:puppet_or_actor AND = { is_child_of = scope:puppet_or_actor target_is_liege_or_above = scope:puppet_or_actor } scope:puppet_or_actor ?= this } #They can be married can_marry_trigger = yes #To account for a person marrying their concubines trigger_if = { limit = { is_concubine = yes } is_concubine_of = scope:puppet_or_actor can_marry_character_trigger = { CHARACTER = scope:puppet_or_actor } } } # Block further marriage proposals for people who have a pending grand wedding NOR = { scope:secondary_actor ?= { has_been_promised_grand_wedding = yes } scope:secondary_recipient ?= { has_been_promised_grand_wedding = yes } } } is_valid_showing_failures_only = { #Diplomatic availability & prison scope:secondary_actor = { is_imprisoned = no bp2_valid_for_standard_interactions_trigger = yes } marriage_interaction_non_loyal_diarchs_refuse_secondary_marriage_trigger = { TARGET = secondary_actor } trigger_if = { limit = { scope:secondary_actor != scope:secondary_recipient } marriage_interaction_non_loyal_diarchs_refuse_secondary_marriage_trigger = { TARGET = secondary_recipient } } marriage_interaction_non_loyal_diarchs_refuse_secondary_marriage_trigger = { TARGET = puppet_or_actor } marriage_interaction_non_loyal_diarchs_refuse_secondary_marriage_trigger = { TARGET = recipient } } has_valid_target_showing_failures_only = { marriage_interaction_valid_target_trigger = yes #Checks marriage status, betrothed, gender, consanguinity, faith hostility etc. #Diplomatic availability & prison (located here because these will never be set at the start) scope:recipient = { is_imprisoned = no } NOT = { scope:puppet_or_actor = { is_at_war_with = scope:recipient } } trigger_if = { limit = { scope:recipient != scope:secondary_recipient } scope:secondary_recipient = { is_imprisoned = no bp2_valid_for_standard_interactions_trigger = yes } } #secondary_actor is checked above because they are always available #Blocks AI from marrying player guests scope:secondary_recipient = { trigger_if = { limit = { is_pool_guest = yes host = { is_ai = no this != scope:puppet_or_actor } } NOT = { is_pool_guest_of = host } } } } on_send = { if = { limit = { scope:grand_wedding_promise = yes } scope:puppet_or_actor = { set_variable = { name = grand_wedding_promise_pending days = 10 } if = { limit = { is_ai = yes } remove_short_term_gold = ai_wedding_promise_gold_actor } #if = { # Activity count debugging, left in for QA purposes # limit = { # NOT = { # exists = global_var:wedding_promise # } # } # set_global_variable = { # name = wedding_promise # value = 1 # } #} #else = { # change_global_variable = { # name = wedding_promise # add = 1 # } #} } } } on_accept = { marriage_interaction_on_accept_effect = yes # If we're a clan this interaction affects unity add_clan_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_gain DESC = clan_unity_marry_off.desc REVERSE_NON_HOUSE_TARGET = no } scope:puppet_or_actor = { if = { limit = { scope:herd_send_option = yes } pay_herd = { target = scope:recipient value = scope:puppet_or_actor.domicile.medium_herd_value } } if = { limit = { has_variable = grand_wedding_promise_pending } remove_variable = grand_wedding_promise_pending } } } on_decline = { scope:puppet_or_actor = { if = { limit = { this != scope:recipient } trigger_event = marriage_interaction.0011 } if = { limit = { has_variable = grand_wedding_promise_pending } remove_variable = grand_wedding_promise_pending } } # If we're a clan this interaction affects unity add_clan_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_loss DESC = clan_unity_marry_off_decline.desc REVERSE_NON_HOUSE_TARGET = no } } auto_accept = { marriage_interaction_auto_accept_trigger = yes #Strong hook conditions } ai_accept = { base = 0 # Should be 0 for all interactions marriage_ai_accept_modifier = yes # Unity modifiers evaluate_action_increasing_house_unity = { VALUE = 100 } } send_option = { flag = grand_wedding_promise localization = GRAND_WEDDING_PROMISE is_shown = { scope:puppet_or_actor = { #Can organize a Grand Wedding highest_held_title_tier > tier_barony is_landed_or_landless_administrative_or_theocratic = yes trigger_if = { limit = { is_ai = yes } is_at_war = no } # DLC locked has_dlc_feature = tours_and_tournaments has_dlc_feature = advanced_activities } } current_description = { desc = "GRAND_WEDDING_PROMISE_INFO" } is_valid = { scope:puppet_or_actor = { gold >= real_wedding_cost_actor_scope is_available = yes custom_tooltip = { text = grand_wedding_already_promised_tt NOR = { AND = { has_variable = promised_grand_wedding_marriage_countdown var:promised_grand_wedding_marriage_countdown = { is_alive = yes } } has_variable = grand_wedding_promise_pending } } } custom_tooltip = { text = grand_wedding_only_dominant_side trigger_if = { limit = { scope:secondary_actor ?= { is_female = yes } } OR = { scope:secondary_actor ?= { matrilinear_betrothal = yes } scope:matrilineal = yes } } trigger_else = { NOR = { scope:secondary_actor ?= { matrilinear_betrothal = yes } scope:matrilineal = yes } } } custom_tooltip = { text = grand_wedding_only_family scope:secondary_actor ?= { is_close_or_extended_family_of = scope:puppet_or_actor } } } } send_option = { flag = matrilineal localization = "MATRILINEAL_OFFER" is_shown = { NAND = { scope:secondary_actor ?= { is_male = yes } scope:secondary_recipient ?= { is_male = yes } } } starts_enabled = { scope:puppet_or_actor = { OR = { rite = { rite_has_doctrine = doctrine_gender_female_dominated } AND = { scope:secondary_actor ?= { is_female = yes } rite = { rite_has_doctrine = doctrine_gender_equal } } AND = { scope:secondary_actor ?= this is_female = yes is_ai = no } AND = { scope:secondary_actor ?= { is_female = yes } scope:secondary_recipient ?= { is_female = yes } } } } } # so they can use grand wedding... can_be_changed = { NAND = { scope:secondary_actor ?= { is_female = yes } scope:secondary_recipient ?= { is_female = yes } } } } send_option = { is_valid = { scope:puppet_or_actor = { has_usable_hook = scope:recipient } } flag = hook localization = MARRIAGE_HOOK } #This option cannot be linked with the hook icon, because recipient isn't known in the right-click menu send_option = { # EP3 Influence is_shown = { # Actor must have a government that uses influence scope:puppet_or_actor = { government_has_flag = government_has_influence } } is_valid = { # Actor has enough influence scope:puppet_or_actor = { influence >= medium_influence_value } # Both characters are within the same top realm custom_tooltip = { text = not_same_realm_tt scope:recipient.top_liege = scope:puppet_or_actor.top_liege } } flag = influence_send_option localization = TRADE_INFLUENCE_FOR_BETTER_AI_ACCEPTANCE } send_option = { # MPO Herd is_shown = { # Actor must have a government that uses Herd scope:puppet_or_actor = { government_has_flag = government_is_nomadic is_ai = no } # Recipient must care about Herd scope:recipient = { government_has_flag = government_is_nomadic } } is_valid = { # Actor has enough Herd scope:puppet_or_actor = { domicile.herd >= domicile.medium_herd_value } } flag = herd_send_option localization = TRADE_HERD_FOR_BETTER_AI_ACCEPTANCE } send_options_exclusive = no show_effects_in_notification = no greeting = positive notification_text = { first_valid = { triggered_desc = { trigger = { scope:secondary_actor = { is_adult = yes } scope:secondary_recipient = { is_adult = yes } NOR = { scope:secondary_actor = { has_been_promised_grand_wedding = yes } scope:secondary_recipient = { has_been_promised_grand_wedding = yes } } } desc = { first_valid = { triggered_desc = { trigger = { scope:matrilineal = yes scope:secondary_actor = scope:puppet_or_actor scope:secondary_recipient = scope:recipient } desc = MARRIAGE_NOTIFICATION_BOTH_PERSONAL_MATRI } triggered_desc = { trigger = { scope:matrilineal = yes scope:secondary_actor = scope:puppet_or_actor } desc = MARRIAGE_NOTIFICATION_ACTOR_PERSONAL_MATRI } triggered_desc = { trigger = { scope:matrilineal = yes scope:secondary_recipient = scope:recipient } desc = MARRIAGE_NOTIFICATION_RECIPIENT_PERSONAL_MATRI } triggered_desc = { trigger = { scope:matrilineal = yes } desc = MARRIAGE_NOTIFICATION_MATRI } triggered_desc = { trigger = { scope:secondary_actor = scope:puppet_or_actor scope:secondary_recipient = scope:recipient } desc = MARRIAGE_NOTIFICATION_BOTH_PERSONAL } triggered_desc = { trigger = { scope:secondary_actor = scope:puppet_or_actor } desc = MARRIAGE_NOTIFICATION_ACTOR_PERSONAL } triggered_desc = { trigger = { scope:secondary_recipient = scope:recipient } desc = MARRIAGE_NOTIFICATION_RECIPIENT_PERSONAL } desc = MARRIAGE_NOTIFICATION } } } desc = { first_valid = { triggered_desc = { trigger = { scope:matrilineal = yes scope:secondary_actor = scope:puppet_or_actor scope:secondary_recipient = scope:recipient } desc = BETROTHAL_NOTIFICATION_BOTH_PERSONAL_MATRI } triggered_desc = { trigger = { scope:matrilineal = yes scope:secondary_actor = scope:puppet_or_actor } desc = BETROTHAL_NOTIFICATION_ACTOR_PERSONAL_MATRI } triggered_desc = { trigger = { scope:matrilineal = yes scope:secondary_recipient = scope:recipient } desc = BETROTHAL_NOTIFICATION_RECIPIENT_PERSONAL_MATRI } triggered_desc = { trigger = { scope:matrilineal = yes } desc = BETROTHAL_NOTIFICATION_MATRI } triggered_desc = { trigger = { scope:secondary_actor = scope:puppet_or_actor scope:secondary_recipient = scope:recipient } desc = BETROTHAL_NOTIFICATION_BOTH_PERSONAL } triggered_desc = { trigger = { scope:secondary_actor = scope:puppet_or_actor } desc = BETROTHAL_NOTIFICATION_ACTOR_PERSONAL } triggered_desc = { trigger = { scope:secondary_recipient = scope:recipient } desc = BETROTHAL_NOTIFICATION_RECIPIENT_PERSONAL } desc = BETROTHAL_NOTIFICATION } } } } } break_betrothal_interaction = { category = interaction_category_diplomacy special_interaction = break_betrothal_interaction use_diplomatic_range = no icon = icon_marriage interface_priority = 30 is_shown = { OR = { #Actor breaking their betrothal to recipient or recipient's courtier/vassal child scope:puppet_or_actor.betrothed ?= { break_betrothal_valid_target_trigger = { CHARACTER = scope:recipient } } #Actor breaking the betrothal of their courtier/vassal child scope:recipient = { break_betrothal_valid_target_trigger = { CHARACTER = scope:puppet_or_actor } } #Break recipient's betrothal with actor, or actor's vassal child/courtier scope:recipient.betrothed ?= { break_betrothal_valid_target_trigger = { CHARACTER = scope:puppet_or_actor } } } } populate_actor_list = { # breaking your own betrothal to recipient or their courtier or unplayable child if = { limit = { betrothed ?= { break_betrothal_valid_target_trigger = { CHARACTER = scope:recipient } } } add_to_list = characters } scope:recipient = { if = { limit = { betrothed ?= { is_ai = yes break_betrothal_valid_target_trigger = { CHARACTER = scope:puppet_or_actor } } } add_to_list = characters } } every_courtier = { limit = { is_ai = yes is_betrothed = yes betrothed ?= { break_betrothal_valid_target_trigger = { CHARACTER = scope:recipient } } OR = { is_playable_character = no any_parent = { this = scope:puppet_or_actor } } } add_to_list = characters } } redirect = { # secondary_actor is the one under actor's control, could be actor if = { limit = { scope:puppet_or_actor.betrothed ?= { break_betrothal_valid_target_trigger = { CHARACTER = scope:recipient } } } scope:puppet_or_actor = { save_scope_as = secondary_actor } } else_if = { limit = { scope:recipient = { break_betrothal_valid_target_trigger = { CHARACTER = scope:puppet_or_actor } } } scope:recipient = { save_scope_as = secondary_actor } } else = { scope:recipient.betrothed ?= { save_scope_as = secondary_actor } } } is_valid_showing_failures_only = { scope:recipient = { NOT = { has_strong_hook = scope:puppet_or_actor } } # Recipient is the betrothed custom_description = { text = break_betrothal_hook_used object = scope:recipient trigger_if = { limit = { scope:recipient.betrothed ?= { break_betrothal_valid_target_trigger = { CHARACTER = scope:puppet_or_actor } } exists = scope:recipient.var:hook_used_for_betrothal } scope:recipient.var:hook_used_for_betrothal = { this != scope:recipient.betrothed } } } custom_description = { text = break_betrothal_hook_used object = scope:recipient trigger_if = { limit = { scope:recipient.betrothed ?= { break_betrothal_valid_target_trigger = { CHARACTER = scope:puppet_or_actor } } exists = scope:recipient.betrothed.var:hook_used_for_betrothal } scope:recipient.betrothed.var:hook_used_for_betrothal = { this != scope:recipient } } } # Secondary Recipient is the betrothed custom_description = { text = break_betrothal_hook_used object = scope:recipient trigger_if = { limit = { scope:recipient = { OR = { #Check for courtiers any_courtier = { is_betrothed = yes betrothed = scope:puppet_or_actor liege = scope:recipient var:hook_used_for_betrothal ?= { this = scope:puppet_or_actor } } #Check for vassal children any_child = { is_betrothed = yes betrothed = scope:puppet_or_actor OR = { is_playable_character = no target_is_liege_or_above = scope:recipient } NOT = { matchmaker = { is_parent_of = prev this != scope:puppet_or_actor } } var:hook_used_for_betrothal ?= { this = scope:puppet_or_actor } } } } } always = no } } # Secondary Actor and Recipient were promised a Grand Wedding, and the Activity has already been organized and is ongoing custom_description = { text = break_betrothal_gwedding_ongoing trigger_if = { limit = { OR = { scope:recipient = { has_been_promised_grand_wedding = yes } scope:recipient.betrothed ?= { has_been_promised_grand_wedding = yes } } } NOR = { scope:recipient.involved_activity ?= { has_activity_type = activity_wedding OR = { special_guest:spouse_1 ?= scope:recipient special_guest:spouse_2 ?= scope:recipient special_guest:spouse_1 ?= scope:recipient.betrothed special_guest:spouse_2 ?= scope:recipient.betrothed } } scope:recipient.betrothed.involved_activity ?= { has_activity_type = activity_wedding OR = { special_guest:spouse_1 ?= scope:recipient special_guest:spouse_2 ?= scope:recipient special_guest:spouse_1 ?= scope:recipient.betrothed special_guest:spouse_2 ?= scope:recipient.betrothed } } } } } } on_accept = { #Identifies the "injured party" # rejected_betrothed NEVER actor scope:secondary_actor = { save_scope_as = rejecting_betrothed betrothed = { save_scope_as = rejected_betrothed } } # If it was a Grand Wedding, find the host scope:rejecting_betrothed.var:promised_grand_wedding_by ?= { save_scope_as = promising_host } scope:recipient = { trigger_event = marriage_interaction.0020 } #Tooltip for betrothal breakage show_as_tooltip = { scope:rejected_betrothed = { break_betrothal = scope:rejecting_betrothed } } #Figures out if the liege of rejected_betrothed cares scope:rejected_betrothed = { if = { limit = { #The liege matter when assigning prestige/opinion hits matchmaker = { this != scope:rejected_betrothed is_close_or_extended_family_of = scope:rejected_betrothed } } matchmaker = { save_scope_as = rejected_betrothal_owner } } else = { #The liege doesn't matter, only the betrothed save_scope_as = rejected_betrothal_owner } } if = { limit = { #Only if you had no reason to break the betrothal has_proper_reason_to_break_betrothal_trigger = no NOR = { # Prestige loss for Grand Weddings is handled below in the specific effect scope:rejecting_betrothed = { has_been_promised_grand_wedding = yes } scope:rejected_betrothed = { has_been_promised_grand_wedding = yes } } } #Prestige penalty if = { limit = { OR = { scope:rejected_betrothed = { highest_held_title_tier > tier_empire } scope:rejected_betrothal_owner = { highest_held_title_tier > tier_empire } } #Only applied for relevant characters cost_prestige_for_break_betrothal_trigger = yes } scope:puppet_or_actor = { add_prestige = monumental_prestige_loss } } else_if = { limit = { OR = { scope:rejected_betrothed = { highest_held_title_tier = tier_empire } scope:rejected_betrothal_owner = { highest_held_title_tier = tier_empire } } #Only applied for relevant characters cost_prestige_for_break_betrothal_trigger = yes } scope:puppet_or_actor = { add_prestige = massive_prestige_loss } } else_if = { limit = { OR = { scope:rejected_betrothed = { highest_held_title_tier = tier_kingdom } scope:rejected_betrothal_owner = { highest_held_title_tier = tier_kingdom } } #Only applied for relevant characters cost_prestige_for_break_betrothal_trigger = yes } scope:puppet_or_actor = { add_prestige = major_prestige_loss } } else_if = { limit = { OR = { scope:rejected_betrothed = { highest_held_title_tier = tier_duchy } scope:rejected_betrothal_owner = { highest_held_title_tier = tier_duchy } } #Only applied for relevant characters cost_prestige_for_break_betrothal_trigger = yes } scope:puppet_or_actor = { add_prestige = medium_prestige_loss } } else_if = { limit = { OR = { scope:rejected_betrothed = { highest_held_title_tier = tier_county } scope:rejected_betrothal_owner = { highest_held_title_tier = tier_county } } #Only applied for relevant characters cost_prestige_for_break_betrothal_trigger = yes } scope:puppet_or_actor = { add_prestige = minor_prestige_loss } } else_if = { limit = { OR = { scope:rejected_betrothed = { highest_held_title_tier = tier_barony } scope:rejected_betrothal_owner = { highest_held_title_tier = tier_barony } } #Only applied for relevant characters cost_prestige_for_break_betrothal_trigger = yes } scope:puppet_or_actor = { add_prestige = miniscule_prestige_loss } } } ############################################ # EP2 - Breaking a Grand Wedding Betrothal # ############################################ if = { limit = { # There is no forced reason for breaking the betrothal has_proper_reason_to_break_betrothal_trigger = no # A Grand Wedding was promised OR = { scope:rejecting_betrothed = { has_been_promised_grand_wedding = yes } scope:rejected_betrothed = { has_been_promised_grand_wedding = yes } } } scope:puppet_or_actor = { break_grand_wedding_betrothal_effect = yes } } ###################################### # Opinion hits & notification events # ###################################### #Personal opinion hit for the rejected_betrothed else = { if = { limit = { has_proper_reason_to_break_betrothal_trigger = no } scope:rejected_betrothed = { show_as_tooltip = { add_opinion = { target = scope:puppet_or_actor modifier = broke_betrothal_opinion } } } if = { limit = { scope:puppet_or_actor != scope:rejected_betrothal_owner scope:rejected_betrothal_owner != scope:rejected_betrothed } scope:rejected_betrothal_owner = { show_as_tooltip = { add_opinion = { target = scope:puppet_or_actor modifier = broke_betrothal_opinion } } } } } if = { limit = { scope:puppet_or_actor != scope:rejected_betrothal_owner } scope:rejected_betrothal_owner = { trigger_event = marriage_interaction.0001 } } else = { hidden_effect = { scope:rejecting_betrothed = { break_betrothal = scope:rejected_betrothed } } } } #Personal opinion hit for other relative if = { limit = { has_proper_reason_to_break_betrothal_trigger = no } #Opinion hit for close relatives of the rejected_betrothed (that are not rejected_betrothed_owner) if = { limit = { scope:rejected_betrothed != scope:puppet_or_actor scope:rejected_betrothed = { any_close_or_extended_family_member = { this != scope:rejected_betrothal_owner count >= 1 } } } if = { limit = { OR = { scope:rejected_betrothed = { has_been_promised_grand_wedding = yes } scope:rejecting_betrothed = { has_been_promised_grand_wedding = yes } } } scope:rejected_betrothed = { every_close_or_extended_family_member = { limit = { this != scope:rejected_betrothal_owner } custom = all_family_members add_opinion = { target = scope:puppet_or_actor modifier = broke_betrothal_grand_wedding_opinion opinion = -50 } } } } else = { scope:rejected_betrothed = { every_close_or_extended_family_member = { limit = { this != scope:rejected_betrothal_owner } custom = all_family_members add_opinion = { target = scope:puppet_or_actor modifier = broke_betrothal_opinion } } } } } #Opinion hit for close relatives of the rejecting_betrothed (that are not also close relatives to rejected_betrothed) if = { limit = { scope:rejecting_betrothed != scope:puppet_or_actor scope:rejected_betrothed != scope:puppet_or_actor scope:rejecting_betrothed = { any_close_or_extended_family_member = { NOR = { is_close_or_extended_family_of = scope:rejected_betrothed this = scope:rejected_betrothal_owner this = scope:rejected_betrothed } count >= 1 } } } if = { limit = { OR = { scope:rejected_betrothed = { has_been_promised_grand_wedding = yes } scope:rejecting_betrothed = { has_been_promised_grand_wedding = yes } } } scope:rejecting_betrothed = { every_close_or_extended_family_member = { limit = { NOR = { is_close_or_extended_family_of = scope:rejected_betrothed this = scope:rejected_betrothal_owner this = scope:rejected_betrothed this = scope:puppet_or_actor } } custom = all_family_members add_opinion = { target = scope:puppet_or_actor modifier = broke_betrothal_grand_wedding_opinion opinion = -50 } } } } else = { scope:rejecting_betrothed = { every_close_or_extended_family_member = { limit = { NOR = { is_close_or_extended_family_of = scope:rejected_betrothed this = scope:rejected_betrothal_owner this = scope:rejected_betrothed this = scope:puppet_or_actor } } custom = all_family_members add_opinion = { target = scope:puppet_or_actor modifier = broke_betrothal_opinion } } } } } } scope:puppet_or_actor = { # Was the marriage of relevence to the player? if = { limit = { scope:rejecting_betrothed = { is_child_of = scope:puppet_or_actor } } hidden_effect = { send_interface_toast = { type = msg_break_betrothal_player_heir title = msg_break_betrothal_player_heir left_icon = scope:rejecting_betrothed right_icon = scope:rejected_betrothed custom_tooltip = break_betrothal_hook_toast_desc } } } else_if = { limit = { scope:puppet_or_actor != scope:rejecting_betrothed } hidden_effect = { send_interface_message = { type = msg_break_betrothal title = msg_break_betrothal left_icon = scope:rejecting_betrothed right_icon = scope:rejected_betrothed custom_tooltip = break_betrothal_hook_toast_desc } } } #Was the marriage promised to a vassal? if = { limit = { var:promised_to_marry_1 ?= { this = scope:rejected_betrothed any_parent = { is_vassal_of = scope:puppet_or_actor } } var:promised_to_marry_2 ?= { this = scope:rejecting_betrothed is_close_family_of = scope:puppet_or_actor } } remove_variable = promised_to_marry_1 remove_variable = promised_to_marry_2 trigger_event = clan.1002 } } # If we're a clan this interaction affects unity add_clan_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = major_unity_loss DESC = clan_unity_betrothal_breakage.desc REVERSE_NON_HOUSE_TARGET = no } } auto_accept = yes } # Stripped down version of make_concubine_interaction for the AI # Avoids redirection logic and recipient list building to improve performance ai_make_concubine_interaction = { hidden = yes ai_targets = { ai_recipients = prisoners } ai_targets = { ai_recipients = courtiers max = 10 } ai_target_quick_trigger = { adult = yes owner_attracted = yes # Not optimal, but saves a lot of performance } ai_frequency_by_tier = { barony = 0 county = 60 duchy = 12 kingdom = 12 empire = 12 hegemony = 3 } is_available = { trigger_if = { limit = { is_ai = yes } allowed_more_concubines = yes is_playable_character = yes NOR = { has_trait = chaste has_sexuality = asexual has_trait = celibate } fertility > 0 is_adult = yes } } is_shown = { make_concubine_is_shown_trigger = yes } is_valid_showing_failures_only = { make_concubine_is_valid_trigger = yes } auto_accept = yes ai_will_do = { base = 0 modifier = { # Basic Filtering add = 100 scope:actor = { number_of_concubines < number_of_desired_concubines } scope:recipient = { can_have_children_with = { CHARACTER = scope:actor } # Only if you can have kids since this is about fertility and genetic traits fertility > 0.2 is_young_character = yes } } modifier = { add = 100 scope:recipient = { is_imprisoned_by = scope:actor can_have_children_with = { CHARACTER = scope:actor } # Only if you can have kids since this is about fertility and genetic traits OR = { is_lowborn = no num_of_good_genetic_traits > 0 } fertility > 0.1 trigger_if = { limit = { is_female = yes } is_aging_character = no } } } modifier = { add = 100 scope:actor = { allowed_to_marry_same_sex_trigger = yes sex_same_as = scope:recipient is_attracted_to_gender_of = scope:recipient OR = { #If they're not in need of kids, or someone who they can have kids with any_child = { count >= 2 } any_consort = { can_have_children_with = { CHARACTER = scope:actor } fertility > 0.1 } } } } modifier = { #Even if you're allowed to take same-sex concubines we don't want the AI to do so without a good reason if they're not attracted to the person add = -200 scope:actor = { allowed_to_marry_same_sex_trigger = yes sex_same_as = scope:recipient NOT = { is_attracted_to_gender_of = scope:recipient } } } modifier = { # If they don't have a batch of kids and opposite sex consorts to handle that situation add = -200 scope:actor = { allowed_to_marry_same_sex_trigger = yes sex_same_as = scope:recipient NOT = { any_child = { count >= 2 } } NOT = { any_consort = { can_have_children_with = { CHARACTER = scope:actor } fertility > 0.1 } } } } # Unity modifiers evaluate_action_increasing_house_unity = { VALUE = 100 } modifier = { # Incest Filtering: Hard NO! factor = 0 scope:actor = { relation_with_character_is_incestuous_in_my_rite_trigger = { CHARACTER = scope:recipient } NOR = { accepts_incest_with_trigger = { CHARACTER = scope:recipient } sexually_liberal_trigger = yes AND = { primary_heir ?= { dynasty != root.dynasty } NOT = { primary_title = { any_title_heir = { dynasty = root.dynasty } } } } } } } modifier = { # Incest Filtering: Not likely, but keep the door open... factor = 0.2 scope:actor = { relation_with_character_is_incestuous_in_my_rite_trigger = { CHARACTER = scope:recipient } OR = { accepts_incest_with_trigger = { CHARACTER = scope:recipient } sexually_liberal_trigger = yes AND = { primary_heir ?= { dynasty != root.dynasty } NOT = { primary_title = { any_title_heir = { dynasty = root.dynasty } } } } } } } modifier = { # Less likely if married to a player and the target is the player heir factor = 0.4 scope:actor = { any_spouse = { is_ai = no scope:recipient = { OR = { is_primary_heir_of = prev is_heir_of = prev } } } } } } on_accept = { scope:actor = { save_scope_as = secondary_actor } scope:recipient = { save_scope_as = secondary_recipient } concubine_on_accept_effect = yes # If we're a clan this interaction affects unity add_clan_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = minor_unity_gain DESC = clan_unity_concubinage.desc REVERSE_NON_HOUSE_TARGET = no } } } make_concubine_interaction = { category = interaction_category_diplomacy icon = concubine_icon desc = make_concubine_interaction_desc interface = concubine_list redirect = { # The UI will open to the already filled left and right first if we don't tell it we've got both sides filled scope:puppet_or_actor = { save_scope_as = secondary_actor } scope:recipient = { save_scope_as = secondary_recipient } } populate_recipient_list = { scope:puppet_or_actor = { every_courtier = { limit = { can_become_concubine_of_character_trigger = { CHARACTER = scope:puppet_or_actor } } add_to_list = characters } every_prisoner = { limit = { NOT = { is_in_list = characters } can_become_concubine_of_character_trigger = { CHARACTER = scope:puppet_or_actor } } add_to_list = characters } } } is_shown = { make_concubine_is_shown_trigger = yes } is_valid_showing_failures_only = { make_concubine_is_valid_trigger = yes } auto_accept = yes on_accept = { scope:puppet_or_actor = { save_scope_as = secondary_actor } concubine_on_accept_effect = yes # If we're a clan this interaction affects unity add_clan_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_gain DESC = clan_unity_concubinage.desc REVERSE_NON_HOUSE_TARGET = no } } } find_concubine = { category = interaction_category_diplomacy icon = concubine_icon desc = find_concubine_desc interface = concubine_list needs_recipient_to_open = no redirect = { scope:puppet_or_actor = { # The UI will open to the already filled left first if we don't tell it we've got "our side" actor which is always ourselves save_scope_as = secondary_actor } if = { limit = { # This is needed for the UI to function properly. Initially UI opens with player as both actor and recipient # After UI opens with empty recipient, player can click on a candidate # When candidate is selected both primary and secondary recipient must be set for the interaction to work scope:puppet_or_actor != scope:recipient } scope:recipient = { save_scope_as = secondary_recipient } } } populate_recipient_list = { scope:puppet_or_actor = { every_courtier = { limit = { can_become_concubine_of_character_trigger = { CHARACTER = scope:puppet_or_actor } } add_to_list = characters } every_prisoner = { limit = { NOT = { is_in_list = characters } can_become_concubine_of_character_trigger = { CHARACTER = scope:puppet_or_actor } } add_to_list = characters } } } is_shown = { scope:puppet_or_actor ?= { allowed_concubines = yes is_adult = yes trigger_if = { #So that we show the recipient list, but can also only use this on ourselves, we have to do this check in the beginning limit = { NOT = { exists = scope:secondary_recipient } } scope:puppet_or_actor = scope:recipient } } trigger_if = { limit = { scope:puppet_or_actor != scope:recipient } scope:puppet_or_actor ?= { trigger_if = { limit = { allowed_to_marry_same_sex_trigger = no } sex_opposite_of = scope:recipient } NOT = { relation_with_character_is_incestuous_in_my_rite_trigger = { CHARACTER = scope:recipient } } } scope:recipient = { can_become_concubine_of_character_trigger = { CHARACTER = scope:puppet_or_actor } is_adult = yes OR = { is_imprisoned_by = scope:puppet_or_actor is_courtier_of = scope:puppet_or_actor } } } } is_valid_showing_failures_only = { custom_description = { text = take_concubine_allowed_more object = scope:recipient scope:puppet_or_actor = { allowed_more_concubines = yes } } custom_description = { text = take_concubine_available_character_opp object = scope:puppet_or_actor scope:puppet_or_actor = { OR = { any_courtier = { can_become_concubine_of_character_trigger = { CHARACTER = scope:puppet_or_actor } } any_prisoner = { can_become_concubine_of_character_trigger = { CHARACTER = scope:puppet_or_actor } } } } } trigger_if = { limit = { scope:puppet_or_actor != scope:recipient } scope:recipient = { can_become_concubine_of_character_trigger = { CHARACTER = scope:puppet_or_actor } } } } can_be_picked = { is_adult = yes } auto_accept = yes ai_will_do = { base = 0 } on_accept = { concubine_on_accept_effect = yes # If we're a clan this interaction affects unity add_clan_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_gain DESC = clan_unity_concubinage.desc REVERSE_NON_HOUSE_TARGET = no } } } offer_concubine = { category = interaction_category_diplomacy icon = concubine_icon desc = offer_concubine_desc ai_targets = { ai_recipients = neighboring_rulers ai_recipients = suzerain ai_recipients = liege max = 5 } ai_target_quick_trigger = { adult = yes } ai_frequency_by_tier = { barony = 0 county = 36 duchy = 36 kingdom = 0 empire = 0 hegemony = 0 } greeting = positive notification_text = OFFER_CONCUBINE_NOTIFICATION #interface = concubine_list populate_recipient_list = { scope:puppet_or_actor = { every_courtier = { limit = { can_be_offered_as_concubine_to_character_trigger = { GIVER = scope:puppet_or_actor CHARACTER = scope:recipient } } add_to_list = characters } every_prisoner = { limit = { NOT = { is_in_list = characters } can_be_offered_as_concubine_to_character_trigger = { GIVER = scope:puppet_or_actor CHARACTER = scope:recipient } } add_to_list = characters } } } is_available = { trigger_if = { limit = { is_ai = yes } allowed_concubines = yes NOR = { has_trait = greedy ai_greed > very_high_positive_ai_value } is_adult = yes is_at_war = no is_incapable = no } } is_shown = { scope:puppet_or_actor != scope:recipient scope:recipient = { NOT = { government_has_flag = government_is_herder } allowed_concubines = yes is_adult = yes } } is_valid_showing_failures_only = { custom_description = { text = take_concubine_available_character_opp object = scope:recipient scope:puppet_or_actor = { OR = { any_courtier = { can_be_offered_as_concubine_to_character_trigger = { GIVER = scope:puppet_or_actor CHARACTER = scope:recipient } } any_prisoner = { can_be_offered_as_concubine_to_character_trigger = { GIVER = scope:puppet_or_actor CHARACTER = scope:recipient } } } } } custom_description = { text = take_concubine_allowed_more object = scope:recipient scope:recipient = { allowed_more_concubines = yes } } trigger_if = { #Landless adventurers check range limit = { scope:puppet_or_actor = { is_landless_adventurer = yes } } ep3_laamp_diplo_range_trigger = { TARGET = scope:recipient LAAMP = scope:puppet_or_actor } } } can_be_picked = { is_adult = yes } can_send = { custom_description = { text = character_unavailable_to_be_offered_as_concubine object = scope:secondary_recipient scope:secondary_recipient = { can_be_offered_as_concubine_to_character_trigger = { GIVER = scope:puppet_or_actor CHARACTER = scope:recipient } } } } auto_accept = no ai_accept = { base = 50 modifier = { add = { value = 50 multiply = scope:secondary_recipient.num_of_good_genetic_traits } scope:secondary_recipient = { num_of_good_genetic_traits > 0 trigger_if = { limit = { is_female = yes } is_aging_character = no } } desc = AI_POSITIVE_TRAIT_REASON } modifier = { add = { value = 50 } scope:secondary_recipient = { is_lowborn = no trigger_if = { limit = { is_female = yes } is_aging_character = no } } desc = AI_DYNASTY_PRESTIGE_REASON_NOBLE } modifier = { add = { value = -50 multiply = scope:secondary_recipient.num_of_bad_genetic_traits } scope:secondary_recipient = { num_of_bad_genetic_traits > 0 trigger_if = { limit = { is_female = yes } is_aging_character = no } } desc = AI_NEGATIVE_TRAIT_REASON } modifier = { add = { value = -50 } scope:secondary_recipient = { is_lowborn = yes num_of_good_genetic_traits = 0 trigger_if = { limit = { is_female = yes } is_aging_character = no } } desc = AI_DYNASTY_PRESTIGE_REASON_LOWBORN_NO_POSITIVE_TRAIT } opinion_modifier = { # Opinion of you who = scope:recipient opinion_target = scope:puppet_or_actor multiplier = 1.0 desc = AI_OPINION_REASON } opinion_modifier = { # Opinion of concubine who = scope:recipient opinion_target = scope:secondary_recipient multiplier = 0.25 desc = AI_OPINION_REASON } compare_modifier = { # Recipient is reluctant to marry old women (procreation is a key factor) trigger = { scope:secondary_recipient = { is_young_character = no is_female = yes } } target = scope:secondary_recipient value = age multiplier = -5.0 step = 1 offset = -29 desc = MARRY_AGE } modifier = { # A Recipient is unwilling to take a same-sex concubine if their faith doesn't support it add = -1000 scope:recipient = { allowed_to_marry_same_sex_trigger = no sex_same_as = scope:secondary_recipient } desc = SAME_SEX_MARRIAGE_FAITH_REASON_RECIPIENT } modifier = { # Unwilling if they don't have a batch of kids and opposite sex consorts to handle that situation add = -200 scope:recipient = { allowed_to_marry_same_sex_trigger = yes sex_same_as = scope:secondary_recipient trigger_if = { limit = { NOT = { any_consort = { can_have_children_with = { CHARACTER = scope:recipient } fertility > 0.1 } } } any_child = { is_player_heir_of = root } } trigger_else = { always = no } } desc = AI_NO_FERTILITY_REASON } modifier = { add = 50 scope:recipient = { is_attracted_to_gender_of = scope:secondary_recipient } desc = AI_ATTRACTION_REASON } modifier = { # A Recipient is more likely to agree if you're their liege add = 40 scope:puppet_or_actor = { is_landed = yes } scope:recipient = { is_landed = yes target_is_liege_or_above = scope:puppet_or_actor } desc = LIEGE_REASON } #More/Less likely based on difference in rank between actor and recipient modifier = { add = 20 scope:puppet_or_actor = { tier_difference = { target = scope:recipient value = 1 } } desc = AI_RANK_DIFF } modifier = { add = 30 scope:puppet_or_actor = { tier_difference = { target = scope:recipient value = 2 } } desc = AI_RANK_DIFF } modifier = { add = 40 scope:puppet_or_actor = { tier_difference = { target = scope:recipient value = 3 } } desc = AI_RANK_DIFF } modifier = { add = 50 scope:puppet_or_actor = { tier_difference = { target = scope:recipient value = 4 } } desc = AI_RANK_DIFF } modifier = { add = 60 scope:puppet_or_actor = { tier_difference = { target = scope:recipient value = 5 } } desc = AI_RANK_DIFF } modifier = { add = -20 scope:puppet_or_actor = { tier_difference = { target = scope:recipient value = -1 } } desc = AI_RANK_DIFF } modifier = { add = -30 scope:puppet_or_actor = { tier_difference = { target = scope:recipient value = -2 } } desc = AI_RANK_DIFF } modifier = { add = -40 scope:puppet_or_actor = { tier_difference = { target = scope:recipient value = -3 } } desc = AI_RANK_DIFF } modifier = { add = -50 scope:puppet_or_actor = { tier_difference = { target = scope:recipient value = -4 } } desc = AI_RANK_DIFF } modifier = { add = -60 scope:puppet_or_actor = { tier_difference = { target = scope:recipient value = -5 } } desc = AI_RANK_DIFF } modifier = { add = intimidated_reason_value scope:recipient = { target_is_liege_or_above = scope:puppet_or_actor has_dread_level_towards = { target = scope:puppet_or_actor level = 1 } } desc = INTIMIDATED_REASON } modifier = { add = cowed_reason_value scope:recipient = { target_is_liege_or_above = scope:puppet_or_actor has_dread_level_towards = { target = scope:puppet_or_actor level = 2 } } desc = COWED_REASON } modifier = { add = intimidated_external_reason_value scope:recipient = { NOT = { target_is_liege_or_above = scope:puppet_or_actor } has_dread_level_towards = { target = scope:puppet_or_actor level = 1 } } desc = INTIMIDATED_REASON } modifier = { add = cowed_external_reason_value scope:recipient = { NOT = { target_is_liege_or_above = scope:puppet_or_actor } has_dread_level_towards = { target = scope:puppet_or_actor level = 2 } } desc = COWED_REASON } modifier = { add = -250 scope:secondary_recipient = { has_std_trigger = yes } desc = AI_STD_REASON } modifier = { add = -250 scope:secondary_recipient = { has_trait_with_flag = epidemic_disease } desc = AI_CONTAGIOUS_REASON } modifier = { add = -5000 scope:secondary_recipient = { fertility <= 0 } desc = AI_FERTILITY_REASON } modifier = { scope:hook = yes add = 500 scope:puppet_or_actor = { NOT = { has_strong_hook = scope:recipient } } desc = SCHEME_WEAK_HOOK_USED } modifier = { scope:hook = yes add = 1000 scope:puppet_or_actor = { has_strong_hook = scope:recipient } desc = SCHEME_STRONG_HOOK_USED } # Unity modifiers evaluate_action_increasing_house_unity = { VALUE = 100 } } ai_will_do = { base = 0 modifier = { # Basic Filtering add = 100 scope:recipient = { number_of_concubines < number_of_desired_concubines } scope:secondary_recipient = { trigger_if = { limit = { allowed_to_marry_same_sex_trigger = no } sex_opposite_of = scope:recipient } fertility > 0.2 is_young_character = yes NOR = { is_councillor_of = scope:actor is_of_major_interest_trigger = { CHARACTER = scope:actor } is_concubine_of = scope:actor } } } modifier = { # If secondary_recipient is close to actor, a good character, or if actor should take them as concubine add = -100 scope:secondary_recipient = { is_of_minor_interest_trigger = { CHARACTER = scope:actor } AND = { can_become_concubine_of_character_trigger = { CHARACTER = scope:actor } scope:actor = { number_of_concubines < number_of_desired_concubines } } } } modifier = { # If secondary_recipient could be an agent... add = 25 scope:actor = { any_scheme = { scheme_target_character ?= scope:recipient save_temporary_scope_as = scheme_check } } scope:secondary_recipient = { char_can_fit_into_scheme_trigger = { SCHEME = scope:scheme_check } } } modifier = { # More likely if it's a neighboring ruler that you want to like you add = 50 scope:recipient = { any_neighboring_top_liege_realm_owner = { this = scope:actor } max_military_strength > scope:actor.max_military_strength } } modifier = { # More likely if it's your friend and it's a nice concubine add = 50 scope:recipient = { OR = { has_relation_friend = scope:actor has_relation_best_friend = scope:actor } } scope:secondary_recipient = { fertility > 0.2 is_young_character = yes OR = { has_trait = lustful num_of_good_genetic_traits > 0 } } } modifier = { #Even if they're allowed to take same-sex concubines we don't want the AI to suggest it without a good reason if they're not attracted to the person add = -200 scope:recipient = { allowed_to_marry_same_sex_trigger = yes sex_same_as = scope:secondary_recipient NOT = { is_attracted_to_gender_of = scope:secondary_recipient } } } # Unity modifiers evaluate_action_increasing_house_unity = { VALUE = 100 } modifier = { # No if it's a same-sex concubinage and actor isn't accepting of it factor = 0 scope:actor = { allowed_to_marry_same_sex_trigger = no scope:recipient = { sex_same_as = scope:secondary_recipient } } } modifier = { # No if it's a same-sex concubinage and recipient isn't accepting of it factor = 0 scope:recipient = { allowed_to_marry_same_sex_trigger = no sex_same_as = scope:secondary_recipient } } modifier = { # Age considerations factor = 0 scope:recipient = { OR = { age >= scope:secondary_actor.age_plus_10 age <= scope:secondary_actor.age_minus_10 scope:secondary_actor.age >= 30 # Concubines are meant to be young... } } } modifier = { # Incest Filtering: Hard NO! factor = 0 scope:recipient = { relation_with_character_is_incestuous_in_my_rite_trigger = { CHARACTER = scope:secondary_recipient } NOR = { accepts_incest_with_trigger = { CHARACTER = scope:secondary_recipient } sexually_liberal_trigger = yes } } } modifier = { # Incest Filtering: Not likely, but keep the door open... factor = 0.2 scope:recipient = { relation_with_character_is_incestuous_in_my_rite_trigger = { CHARACTER = scope:secondary_recipient } OR = { accepts_incest_with_trigger = { CHARACTER = scope:secondary_recipient } sexually_liberal_trigger = yes } } } modifier = { # Faith considerations factor = 0 scope:recipient = { faith = { faith_hostility_level = { target = scope:actor.faith value >= faith_hostile_level } } NOR = { has_relation_friend = scope:actor has_relation_best_friend = scope:actor } } } } on_send = { scope:secondary_recipient = { # to block the same character from being offered twice add_character_flag = { flag = has_been_offered_as_concubine days = 5 } } } on_accept = { concubine_offer_on_accept_effect = yes # If we're a clan this interaction affects unity add_clan_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_gain DESC = clan_unity_concubinage_offer.desc REVERSE_NON_HOUSE_TARGET = no } } on_decline = { scope:puppet_or_actor = { send_interface_toast = { type = event_toast_effect_bad title = msg_concubine_offer_rejected_title right_icon = scope:recipient left_icon = scope:secondary_recipient custom_tooltip = msg_concubine_offer_rejected } } # If we're a clan this interaction affects unity add_clan_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_loss DESC = clan_unity_concubinage_offer_decline.desc REVERSE_NON_HOUSE_TARGET = no } } send_options_exclusive = no send_option = { is_valid = { scope:puppet_or_actor = { has_usable_hook = scope:recipient } } flag = hook localization = SCHEME_HOOK } should_use_extra_icon = { scope:puppet_or_actor = { has_usable_hook = scope:recipient } } extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" } dismiss_concubine_interaction = { category = interaction_category_diplomacy use_diplomatic_range = no icon = concubine_icon is_shown = { scope:recipient = { is_concubine_of = scope:puppet_or_actor } } is_valid_showing_failures_only = { scope:recipient = { NOT = { has_strong_hook = scope:puppet_or_actor } } scope:puppet_or_actor = { custom_tooltip = { NOT = { var:family_widow_forbidden_divorce ?= scope:recipient } text = BOUND_TO_FAMILY_WIDOW } } } auto_accept = yes on_accept = { scope:puppet_or_actor = { stress_and_fulfillment_impact = { compassionate = minor_stress_impact_gain } hidden_effect = { send_interface_toast = { type = event_toast_effect_neutral title = msg_concubine_dismissed_title right_icon = scope:recipient remove_concubine = scope:recipient } } } scope:recipient = { # No point in sending a notification since the player can't be an unlanded concubine in any case # trigger_event = marriage_interaction.0050 # Being thrown aside is humiliating, even if you didn't want to be a concubine in the first place. add_opinion = { modifier = set_me_aside_opinion target = scope:puppet_or_actor } if = { limit = { scope:puppet_or_actor = { has_relation_lover = scope:recipient } } lover_breakup_effect = { BREAKER = scope:puppet_or_actor LOVER = scope:recipient } } # Figure out where we should go now that we're no longer a concubine. if = { limit = { is_councillor_of = scope:puppet_or_actor } # Then they should remain in court } else_if = { #Dismiss to relevant court, or to pool limit = { any_close_family_member = { is_landed_or_landless_administrative_or_theocratic = yes } } random_close_family_member = { limit = { is_child_of = scope:recipient is_landed_or_landless_administrative_or_theocratic = yes } alternative_limit = { is_parent_of = scope:recipient is_landed_or_landless_administrative_or_theocratic = yes } alternative_limit = { is_landed_or_landless_administrative_or_theocratic = yes } add_courtier = scope:recipient } } else = { move_to_pool = yes } } # If we're a clan this interaction affects unity add_clan_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_loss DESC = clan_unity_concubinage_dismissal.desc REVERSE_NON_HOUSE_TARGET = no } } } divorce_character_interaction = { category = interaction_category_diplomacy use_diplomatic_range = no icon = icon_marriage desc = divorce_character_interaction_desc cost = { piety = { value = divorce_cost if = { limit = { scope:is_puppet_action ?= yes } multiply = 0 } } } is_shown = { # A clerical ruler holds that religious authority themselves, so no approval is sought trigger_if = { limit = { scope:puppet_or_actor ?= { pam_grants_own_divorce_trigger = no } } # We are not required to seek approval of a spiritual HoF NAND = { scope:puppet_or_actor.rite ?= { rite_has_doctrine = doctrine_divorce_approval } scope:puppet_or_actor.faith ?= { has_doctrine = doctrine_spiritual_head exists = religious_head } } } # We are not required to seek approval of a house head NAND = { scope:puppet_or_actor.rite ?= { rite_has_doctrine = doctrine_divorce_approval } exists = scope:puppet_or_actor.house exists = scope:puppet_or_actor.house.house_head scope:puppet_or_actor = { is_house_head = no } } exists = scope:puppet_or_actor scope:recipient = { is_spouse_of = scope:puppet_or_actor is_concubine = no # Can set aside Concubines at any time } } is_valid_showing_failures_only = { trigger_if = { limit = { scope:actor = scope:puppet_or_actor } custom_tooltip = { NOT = { scope:puppet_or_actor.culture = { has_cultural_parameter = cannot_divorce } } text = CULTURE_FORBIDS_DIVORCE } } trigger_else = { custom_tooltip = { NOT = { scope:puppet_or_actor.culture = { has_cultural_parameter = cannot_divorce } } text = CULTURE_FORBIDS_DIVORCE_puppeteer } } OR = { NOT = { scope:puppet_or_actor.rite = { rite_has_doctrine = doctrine_divorce_disallowed } } AND = { scope:puppet_or_actor.rite = { rite_has_parameter = tenet_be_fruitful_and_multiply_low_fertility_divorce } scope:recipient = { fertility < 0.1 } } } scope:recipient = { NOT = { has_strong_hook = scope:puppet_or_actor } } scope:puppet_or_actor = { trigger_if = { limit = { scope:actor = scope:puppet_or_actor } custom_tooltip = { NOT = { var:family_widow_forbidden_divorce ?= scope:recipient } text = BOUND_TO_FAMILY_WIDOW } } trigger_else = { custom_tooltip = { NOT = { var:family_widow_forbidden_divorce ?= scope:recipient } text = BOUND_TO_FAMILY_WIDOW_puppeteer } } } trigger_if = { limit = { scope:is_puppet_action ?= yes } scope:puppet_or_actor = { piety >= divorce_cost } } } auto_accept = yes on_accept = { if = { limit = { scope:is_puppet_action ?= yes } scope:puppet_or_actor = { add_piety = { value = { add = divorce_cost max = piety multiply = -1 } } } } scope:puppet_or_actor = { divorce_effect = { DIVORCER = scope:puppet_or_actor DIVORCEE = scope:recipient } if = { limit = { allowed_concubines = yes } if = { limit = { scope:actor = scope:puppet_or_actor } custom_tooltip = divorce_cannot_concubine_ex_wife } else = { custom_tooltip = divorce_cannot_concubine_ex_wife_puppeteer } } } scope:recipient = { trigger_event = marriage_interaction.0030 } # If we're a clan this interaction affects unity add_clan_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = major_unity_loss DESC = clan_unity_divorce.desc REVERSE_NON_HOUSE_TARGET = no } } # AI ai_targets = { ai_recipients = spouses } ai_frequency_by_tier = { barony = 0 county = 72 duchy = 36 kingdom = 36 empire = 36 hegemony = 36 } ai_will_do = { base = 0 modifier = { # The AI wants to divorce should they not have an heir that is their own child, and their spouse is infertile add = 100 scope:puppet_or_actor = { fertility > 0.1 NOT = { any_child = { is_heir_of = scope:puppet_or_actor } } } scope:recipient = { is_ai = yes fertility < 0.1 } } modifier = { # The AI will divorce if they're in a same-sex marriage and their faith changes its stance on the topic add = 100 scope:puppet_or_actor = { sex_same_as = scope:recipient allowed_to_marry_same_sex_trigger = no } } } } divorce_character_house_head_interaction = { category = interaction_category_diplomacy use_diplomatic_range = no icon = icon_marriage cost = { piety = { value = divorce_cost if = { limit = { scope:is_puppet_action ?= yes } multiply = 0 } } } redirect = { scope:recipient = { save_scope_as = secondary_recipient } if = { limit = { exists = scope:puppet_or_actor.house.house_head } scope:puppet_or_actor.house.house_head = { save_scope_as = recipient } } } greeting = positive notification_text = ASK_FOR_DIVORCE_NOTIFICATION is_shown = { scope:puppet_or_actor.rite ?= { rite_has_doctrine = doctrine_divorce_approval } exists = scope:puppet_or_actor.house.house_head scope:puppet_or_actor != scope:puppet_or_actor.house.house_head # no need to ask yourself # A clerical ruler needs no religious blessing, so their house head is the only approval left to seek trigger_if = { limit = { scope:puppet_or_actor ?= { pam_grants_own_divorce_trigger = no } } NAND = { exists = scope:puppet_or_actor.faith.religious_head scope:puppet_or_actor.faith = { has_doctrine = doctrine_spiritual_head } } } scope:secondary_recipient ?= { is_spouse_of = scope:puppet_or_actor is_concubine = no # Can set aside Concubines at any time } } is_valid_showing_failures_only = { trigger_if = { limit = { scope:actor = scope:puppet_or_actor } custom_tooltip = { NOT = { scope:puppet_or_actor.culture = { has_cultural_parameter = cannot_divorce } } text = CULTURE_FORBIDS_DIVORCE } } trigger_else = { custom_tooltip = { NOT = { scope:puppet_or_actor.culture = { has_cultural_parameter = cannot_divorce } } text = CULTURE_FORBIDS_DIVORCE_puppeteer } } NOT = { scope:secondary_recipient = { has_strong_hook = scope:puppet_or_actor } } scope:puppet_or_actor = { trigger_if = { limit = { scope:actor = scope:puppet_or_actor } custom_tooltip = { NOT = { var:family_widow_forbidden_divorce ?= scope:secondary_recipient } text = BOUND_TO_FAMILY_WIDOW } } trigger_else = { custom_tooltip = { NOT = { var:family_widow_forbidden_divorce ?= scope:secondary_recipient } text = BOUND_TO_FAMILY_WIDOW_puppeteer } } } trigger_if = { limit = { scope:is_puppet_action ?= yes } scope:puppet_or_actor = { piety >= divorce_cost } } } ai_accept = { base = 0 # Should be 0 for all interactions divorce_character_ai_accept_modifier = yes modifier = { # Infertility add = 20 desc = DIVORCE_INFERTILE scope:puppet_or_actor = { fertility > 0.1 } scope:secondary_recipient = { fertility < 0.1 is_eunuch_trigger = no NOT = { any_child = { is_child_of = scope:puppet_or_actor } } } } modifier = { # Negative for having given you children add = -50 desc = DIVORCE_GIVEN_CHILDREN scope:secondary_recipient = { any_child = { count >= 3 is_child_of = scope:puppet_or_actor dynasty ?= scope:puppet_or_actor.dynasty } } } modifier = { # They are of the same dynasty as the House Head trigger = { scope:recipient != scope:secondary_recipient } add = -10 desc = THEY_ARE_MY_DYNASTY_MEMBER scope:recipient = { is_lowborn = no exists = dynasty NOR = { is_cousin_of = scope:secondary_recipient is_close_or_extended_family_of = scope:secondary_recipient } dynasty = scope:secondary_recipient.dynasty NOR = { house = scope:secondary_recipient.house is_close_or_extended_family_of = scope:puppet_or_actor is_cousin_of = scope:puppet_or_actor is_child_of = scope:puppet_or_actor AND = { exists = scope:puppet_or_actor.dynasty scope:recipient.dynasty = scope:puppet_or_actor.dynasty } } } } modifier = { # They are of the same house as the House Head trigger = { scope:recipient != scope:secondary_recipient } add = -20 desc = THEY_ARE_MY_HOUSE_MEMBER scope:recipient = { is_lowborn = no NOR = { is_cousin_of = scope:secondary_recipient is_close_or_extended_family_of = scope:secondary_recipient } house = scope:secondary_recipient.house NOR = { house = scope:puppet_or_actor.house is_close_or_extended_family_of = scope:puppet_or_actor is_cousin_of = scope:puppet_or_actor is_child_of = scope:puppet_or_actor scope:recipient.house = scope:puppet_or_actor.house } } } modifier = { # They are close kin to the House Head trigger = { scope:recipient != scope:secondary_recipient } add = -35 desc = THEY_ARE_MY_CLOSE_KIN scope:recipient = { OR = { is_cousin_of = scope:secondary_recipient is_close_or_extended_family_of = scope:secondary_recipient } } } modifier = { add = intimidated_reason_value scope:recipient = { target_is_liege_or_above = scope:puppet_or_actor has_dread_level_towards = { target = scope:puppet_or_actor level = 1 } } desc = INTIMIDATED_REASON } modifier = { add = cowed_reason_value scope:recipient = { target_is_liege_or_above = scope:puppet_or_actor has_dread_level_towards = { target = scope:puppet_or_actor level = 2 } } desc = COWED_REASON } modifier = { add = intimidated_external_reason_value scope:recipient = { NOT = { target_is_liege_or_above = scope:puppet_or_actor } has_dread_level_towards = { target = scope:puppet_or_actor level = 1 } } desc = INTIMIDATED_REASON } modifier = { add = cowed_external_reason_value scope:recipient = { NOT = { target_is_liege_or_above = scope:puppet_or_actor } has_dread_level_towards = { target = scope:puppet_or_actor level = 2 } } desc = COWED_REASON } modifier = { # You're in a same-sex marriage and your faith doesn't allow it add = 100 desc = SAME_SEX_MARRIAGE_FAITH_REASON_ACTOR scope:puppet_or_actor.faith = scope:recipient.faith scope:puppet_or_actor = { sex_same_as = scope:secondary_recipient allowed_to_marry_same_sex_trigger = no } } modifier = { # You're in a same-sex marriage and their faith doesn't allow it add = 100 desc = SAME_SEX_MARRIAGE_FAITH_REASON scope:secondary_recipient.faith = scope:recipient.faith scope:secondary_recipient = { sex_same_as = scope:puppet_or_actor allowed_to_marry_same_sex_trigger = no } } # Unity modifiers evaluate_action_decreasing_house_unity = { VALUE = 100 } } auto_accept = { custom_description = { text = "spending_hook" subject = scope:puppet_or_actor object = scope:recipient scope:divorce_hook = yes } } send_option = { is_shown = { scope:puppet_or_actor != scope:recipient } is_valid = { scope:puppet_or_actor = { has_usable_hook = scope:recipient } } flag = divorce_hook localization = GENERIC_SPEND_A_HOOK } should_use_extra_icon = { scope:puppet_or_actor = { has_usable_hook = scope:recipient } } extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" send_options_exclusive = no ai_min_reply_days = 1 ai_max_reply_days = 5 on_accept = { if = { limit = { always = scope:divorce_hook } scope:puppet_or_actor = { if = { limit = { has_usable_hook = scope:recipient } use_hook = scope:recipient } } } if = { limit = { scope:is_puppet_action ?= yes } scope:puppet_or_actor = { add_piety = { value = { add = divorce_cost max = piety multiply = -1 } } } scope:actor = { send_interface_toast = { type = event_toast_effect_neutral title = divorce_interaction_notification_puppeteer left_icon = scope:puppet_or_actor right_icon = scope:secondary_recipient } } } if = { limit = { scope:puppet_or_actor = scope:puppet_or_actor.house.house_head } scope:puppet_or_actor = { divorce_effect = { DIVORCER = scope:puppet_or_actor DIVORCEE = scope:secondary_recipient } } } else = { show_as_tooltip = { scope:puppet_or_actor = { divorce_effect = { DIVORCER = scope:puppet_or_actor DIVORCEE = scope:secondary_recipient } } } scope:puppet_or_actor = { trigger_event = religious_interaction.2 } } # If we're a clan this interaction affects unity add_clan_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = major_unity_loss DESC = clan_unity_divorce_grant.desc REVERSE_NON_HOUSE_TARGET = no } } on_decline = { scope:puppet_or_actor = { send_interface_toast = { type = event_toast_effect_bad title = divorce_character_rel_head_interaction_decline_notification right_icon = scope:puppet_or_actor.house.house_head } } # If we're a clan this interaction affects unity add_clan_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_loss DESC = clan_unity_divorce_grant_refusal.desc REVERSE_NON_HOUSE_TARGET = no } } # AI ai_targets = { ai_recipients = spouses } ai_frequency_by_tier = { barony = 0 county = 72 duchy = 36 kingdom = 36 empire = 36 hegemony = 36 } ai_will_do = { base = 0 modifier = { # The AI wants to divorce should they not have an heir that is their own child, and their spouse is infertile add = 100 scope:puppet_or_actor = { fertility > 0.1 NOT = { any_child = { is_heir_of = scope:puppet_or_actor } } } scope:secondary_recipient = { is_ai = yes fertility < 0.1 } } modifier = { # The AI will only use a Hook if they couldn't otherwise do this scope:divorce_hook = yes add = -1 } modifier = { # You're in a same-sex marriage and your faith doesn't allow it add = 100 scope:puppet_or_actor = { sex_same_as = scope:secondary_recipient allowed_to_marry_same_sex_trigger = no } } } } divorce_character_rel_head_interaction = { category = interaction_category_diplomacy use_diplomatic_range = no icon = icon_marriage cost = { piety = { value = divorce_cost if = { limit = { scope:is_puppet_action ?= yes } multiply = 0 } } } redirect = { scope:recipient = { save_scope_as = secondary_recipient } #Recipient should be cleric or hof if = { limit = { scope:puppet_or_actor = { government_has_flag = government_is_theocracy exists = superior } } scope:puppet_or_actor.superior = { save_scope_as = recipient } } #Redirect to bishop superior of court chaplain else_if = { limit = { OR = { scope:puppet_or_actor.highest_held_title_tier < tier_kingdom scope:puppet_or_actor.faith = { NOR = { has_doctrine = doctrine_spiritual_head exists = scope:faith.religious_head } } } scope:puppet_or_actor.cp:councillor_court_chaplain ?= { highest_held_title_tier < tier_duchy superior ?= { highest_held_title_tier >= tier_duchy is_clergy = yes } } } scope:puppet_or_actor.cp:councillor_court_chaplain.superior = { save_scope_as = recipient } } #Redirect to bishop else_if = { limit = { OR = { scope:puppet_or_actor.highest_held_title_tier < tier_kingdom scope:puppet_or_actor.faith = { NOR = { has_doctrine = doctrine_spiritual_head exists = scope:faith.religious_head } } } scope:puppet_or_actor.cp:councillor_court_chaplain ?= { highest_held_title_tier >= tier_duchy is_clergy = yes } } scope:puppet_or_actor.cp:councillor_court_chaplain = { save_scope_as = recipient } } else = { scope:puppet_or_actor.faith.religious_head ?= { save_scope_as = recipient } } } greeting = positive notification_text = { desc = ASK_FOR_DIVORCE_NOTIFICATION first_valid = { triggered_desc = { trigger = { scope:puppet_or_actor = { faith = scope:recipient.faith sex_same_as = scope:secondary_recipient allowed_to_marry_same_sex_trigger = no } } desc = ASK_FOR_DIVORCE_NOTIFICATION_SAME_SEX } triggered_desc = { trigger = { scope:puppet_or_actor = { relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_recipient } } } desc = ASK_FOR_DIVORCE_NOTIFICATION_INCESTUOUS } triggered_desc = { trigger = { scope:secondary_recipient = { any_relation = { type = lover NOR = { this = scope:puppet_or_actor this = scope:recipient } relation_with_character_is_incestuous_in_my_rite_trigger = { CHARACTER = scope:secondary_recipient } } } } desc = ASK_FOR_DIVORCE_NOTIFICATION_INCESTUOUS_LOVER } triggered_desc = { trigger = { scope:secondary_recipient = { is_female = no is_eunuch_trigger = yes } } desc = ASK_FOR_DIVORCE_NOTIFICATION_EUNUCH } triggered_desc = { trigger = { scope:puppet_or_actor = { has_opinion_modifier = { modifier = attempted_murder_me_crime target = scope:secondary_recipient } } } desc = ASK_FOR_DIVORCE_NOTIFICATION_ATTEMPTED_MURDER } triggered_desc = { trigger = { scope:secondary_recipient = { has_character_modifier = wedding_accused_impotency_modifier } } desc = ASK_FOR_DIVORCE_NOTIFICATION_IMPOTENCE } triggered_desc = { trigger = { scope:puppet_or_actor = { any_consort = { is_alive = yes this != scope:secondary_recipient } any_consort = { this = scope:secondary_recipient } } scope:secondary_recipient = { culture = { NOT = { has_cultural_tradition = tradition_polygamous } } rite = { NOT = { rite_has_doctrine = doctrine_polygamy } } } } desc = ASK_FOR_DIVORCE_NOTIFICATION_MULTIPLE_CONSORTS } triggered_desc = { trigger = { scope:secondary_recipient.faith = { faith_hostility_level = { target = scope:recipient.faith value >= faith_hostile_level } } } desc = ASK_FOR_DIVORCE_NOTIFICATION_HOSTILE_FAITH } triggered_desc = { trigger = { scope:secondary_recipient = { exposed_cheating_on_spouse_trigger = { SPOUSE = scope:puppet_or_actor } } } desc = ASK_FOR_DIVORCE_NOTIFICATION_EXPOSED_CHEATING } triggered_desc = { trigger = { scope:secondary_recipient = { fertility < 0.1 NOT = { any_child = { any_parent = { this = scope:puppet_or_actor } } } } } desc = ASK_FOR_DIVORCE_NOTIFICATION_INFERTILITY } triggered_desc = { trigger = { scope:secondary_recipient = { has_trait = adulterer } } desc = ASK_FOR_DIVORCE_NOTIFICATION_ADULTERY_TRAIT } triggered_desc = { trigger = { scope:puppet_or_actor = { opinion = { target = scope:secondary_recipient value < -50 } } } desc = ASK_FOR_DIVORCE_NOTIFICATION_HATRED } desc = ASK_FOR_DIVORCE_NOTIFICATION_NOT_JUSTIFIED } } is_available = { trigger_if = { limit = { is_ai = yes } NOT = { has_character_modifier = rekindled_marriage_modifier } } } is_shown = { scope:puppet_or_actor.rite ?= { rite_has_doctrine = doctrine_divorce_approval } # A clerical ruler grants their own divorce and never petitions for one, least of all themselves scope:puppet_or_actor ?= { pam_grants_own_divorce_trigger = no } scope:puppet_or_actor ?= { OR = { faith ?= { has_doctrine = doctrine_spiritual_head exists = religious_head } cp:councillor_court_chaplain ?= { highest_held_title_tier >= tier_duchy is_clergy = yes } AND = { government_has_flag = government_is_theocracy exists = superior } cp:councillor_court_chaplain.superior ?= { highest_held_title_tier >= tier_duchy is_clergy = yes } } } scope:secondary_recipient ?= { is_spouse_of = scope:puppet_or_actor is_concubine = no # Can set aside Concubines at any time } } is_valid_showing_failures_only = { scope:puppet_or_actor = { NOT = { has_trait = excommunicated } } trigger_if = { limit = { scope:actor = scope:puppet_or_actor } custom_tooltip = { NOT = { scope:puppet_or_actor.culture = { has_cultural_parameter = cannot_divorce } } text = CULTURE_FORBIDS_DIVORCE } } trigger_else = { custom_tooltip = { NOT = { scope:puppet_or_actor.culture = { has_cultural_parameter = cannot_divorce } } text = CULTURE_FORBIDS_DIVORCE_puppeteer } } NOT = { scope:secondary_recipient = { has_strong_hook = scope:puppet_or_actor } } scope:puppet_or_actor = { trigger_if = { limit = { scope:actor = scope:puppet_or_actor } custom_tooltip = { NOT = { var:family_widow_forbidden_divorce ?= scope:secondary_recipient } text = BOUND_TO_FAMILY_WIDOW } } trigger_else = { custom_tooltip = { NOT = { var:family_widow_forbidden_divorce ?= scope:secondary_recipient } text = BOUND_TO_FAMILY_WIDOW_puppeteer } } } scope:puppet_or_actor = { NOT = { has_character_modifier = promised_pilgrimage_to_clergy_modifier } } trigger_if = { limit = { scope:is_puppet_action ?= yes } scope:puppet_or_actor = { piety >= divorce_cost } } } ai_accept = { base = 0 # Should be 0 for all interactions divorce_character_ai_accept_modifier = yes modifier = { # Divine Family is part of the faith add = -100 desc = DIVORCE_INCESTUOUS scope:puppet_or_actor = { is_close_or_extended_family_of = scope:secondary_recipient rite = { rite_has_tenet = tenet_divine_marriage } } } modifier = { # More likely if the marriage is incestuous, unless Divine Family is part of the faith add = 100 desc = DIVORCE_INCESTUOUS scope:puppet_or_actor = { relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_recipient } } } modifier = { # They are of the same dynasty as the Head of Faith add = -5 desc = THEY_ARE_MY_DYNASTY_MEMBER scope:recipient = { is_lowborn = no exists = dynasty exists = scope:secondary_recipient.dynasty dynasty = scope:secondary_recipient.dynasty NOR = { house = scope:secondary_recipient.house is_close_or_extended_family_of = scope:puppet_or_actor is_cousin_of = scope:puppet_or_actor is_child_of = scope:puppet_or_actor scope:recipient.dynasty = scope:puppet_or_actor.dynasty } } } modifier = { # You are of the same dynasty as the Head of Faith add = 5 desc = YOU_ARE_MY_DYNASTY_MEMBER scope:recipient = { is_lowborn = no exists = dynasty exists = scope:puppet_or_actor.dynasty dynasty = scope:puppet_or_actor.dynasty NOR = { is_close_or_extended_family_of = scope:puppet_or_actor is_cousin_of = scope:puppet_or_actor is_child_of = scope:puppet_or_actor scope:recipient.dynasty = scope:secondary_recipient.dynasty } } } modifier = { # They are of the same house as the Head of Faith add = -10 desc = THEY_ARE_MY_HOUSE_MEMBER scope:recipient = { is_lowborn = no exists = house exists = scope:secondary_recipient.house house = scope:secondary_recipient.house NOR = { house = scope:puppet_or_actor.house is_close_or_extended_family_of = scope:puppet_or_actor is_cousin_of = scope:puppet_or_actor is_child_of = scope:puppet_or_actor scope:recipient.house = scope:puppet_or_actor.house } } } modifier = { # You are of the same house as the Head of Faith add = 10 desc = YOU_ARE_MY_HOUSE_MEMBER scope:recipient = { is_lowborn = no exists = house exists = scope:puppet_or_actor.house house = scope:puppet_or_actor.house NOR = { is_close_or_extended_family_of = scope:puppet_or_actor is_cousin_of = scope:puppet_or_actor is_child_of = scope:puppet_or_actor scope:recipient.house = scope:secondary_recipient.house } } } modifier = { # Related to the Head of Faith add = 25 desc = YOU_ARE_MY_RELATIVE scope:recipient = { OR = { is_close_or_extended_family_of = scope:puppet_or_actor is_cousin_of = scope:puppet_or_actor } NOT = { is_child_of = scope:puppet_or_actor } } } modifier = { # Parent of the Head of Faith add = 50 desc = PARENTS #YOU_ARE_MY_PARENT scope:recipient = { is_child_of = scope:puppet_or_actor } } modifier = { add = { add = 10 multiply = scope:puppet_or_actor.num_virtuous_traits } scope:puppet_or_actor.num_virtuous_traits > 0 desc = I_AM_VIRTUOUS } modifier = { add = { add = -10 multiply = scope:secondary_recipient.num_virtuous_traits } scope:secondary_recipient.num_virtuous_traits > 0 desc = THEY_ARE_VIRTUOUS } modifier = { add = { add = -10 multiply = scope:puppet_or_actor.num_sinful_traits } scope:puppet_or_actor.num_sinful_traits > 0 desc = I_AM_SINFUL } modifier = { add = { add = 10 multiply = scope:secondary_recipient.num_sinful_traits } scope:secondary_recipient.num_sinful_traits > 0 desc = THEY_ARE_SINFUL } modifier = { # You're in a same-sex marriage and your faith doesn't allow it add = 100 desc = SAME_SEX_MARRIAGE_FAITH_REASON_ACTOR scope:puppet_or_actor.faith = scope:recipient.faith scope:puppet_or_actor = { sex_same_as = scope:secondary_recipient allowed_to_marry_same_sex_trigger = no } } modifier = { # You're in a same-sex marriage and their faith doesn't allow it add = 100 desc = SAME_SEX_MARRIAGE_FAITH_REASON scope:secondary_recipient.faith = scope:recipient.faith scope:secondary_recipient = { sex_same_as = scope:puppet_or_actor allowed_to_marry_same_sex_trigger = no } } modifier = { # You have denounced them as impotent (ep2_wedding.1061) add = 30 desc = THEY_ARE_ACCUSED_IMPOTENCY scope:secondary_recipient = { has_character_modifier = wedding_accused_impotency_modifier } } # Unity modifiers evaluate_action_decreasing_house_unity = { VALUE = 100 } modifier = { add = 100 scope:puppet_or_actor.puppet:theological_agent_puppet ?= scope:recipient desc = IS_YOUR_PUPPET } modifier = { add = { value = 25 if = { limit = { pam_actor_rite_has_core_simony_trigger = yes } multiply = 5 } } scope:donate_faith ?= yes scope:puppet_or_actor.major_gold_value < scope:recipient.minor_gold_value desc = DONATE_FAITH_INTERACTION_OPTION_REASON } modifier = { add = { value = 50 if = { limit = { pam_actor_rite_has_core_simony_trigger = yes } multiply = 5 } } scope:donate_faith ?= yes scope:puppet_or_actor.major_gold_value < scope:recipient.major_gold_value scope:puppet_or_actor.major_gold_value >= scope:recipient.minor_gold_value desc = DONATE_FAITH_INTERACTION_OPTION_REASON } modifier = { add = { value = 75 if = { limit = { pam_actor_rite_has_core_simony_trigger = yes } multiply = 5 } } scope:donate_faith ?= yes scope:puppet_or_actor.major_gold_value >= scope:recipient.major_gold_value scope:puppet_or_actor.major_gold_value < scope:recipient.monumental_gold_value desc = DONATE_FAITH_INTERACTION_OPTION_REASON } modifier = { add = { value = 100 if = { limit = { pam_actor_rite_has_core_simony_trigger = yes } multiply = 5 } } scope:donate_faith ?= yes scope:puppet_or_actor.major_gold_value >= scope:recipient.monumental_gold_value desc = DONATE_FAITH_INTERACTION_OPTION_REASON } modifier = { add = 25 scope:divorce_justified ?= yes desc = JUSTIFY_DIVORCE_REASON } modifier = { add = { value = 20 if = { limit = { scope:puppet_or_actor.highest_held_title_tier > scope:recipient.highest_held_title_tier } multiply = { value = scope:puppet_or_actor.highest_held_title_tier subtract = scope:recipient.highest_held_title_tier add = 1 } } else_if = { limit = { scope:puppet_or_actor.highest_held_title_tier < scope:recipient.highest_held_title_tier_minus_one } multiply = 0.25 } else_if = { limit = { scope:puppet_or_actor.highest_held_title_tier < scope:recipient.highest_held_title_tier } multiply = 0.5 } if = { limit = { OR = { is_liege_or_above_of = scope:recipient liege ?= scope:recipient.liege capital_county.holder ?= { OR = { this = scope:puppet_or_actor any_liege_or_above = { this = scope:puppet_or_actor } } } } } multiply = 3 } else_if = { limit = { scope:recipient = { OR = { any_neighboring_top_liege_realm_owner = { this = scope:puppet_or_actor } capital_county = { any_neighboring_county = { OR = { holder = scope:puppet_or_actor holder = { any_liege_or_above = { this = scope:puppet_or_actor } } } } } } } } multiply = 2 } } scope:threaten_priest = yes desc = THREATEN_PRIEST_INTERACTION_OPTION_REASON } modifier = { add = pam_offer_pilgrimage_acceptance_value scope:offer_pilgrimage = yes desc = OFFER_PILGRIMAGE_INTERACTION_OPTION_REASON } secular_to_ecclesiastical_pam_factors_acceptance_modifier = yes } auto_accept = { custom_description = { text = "spending_hook" subject = scope:puppet_or_actor object = scope:recipient scope:divorce_hook = yes } } options_heading = DIVORCE_INDUCEMENTS send_option = { is_valid = { scope:puppet_or_actor = { custom_tooltip = { text = divorce_justified_tt divorce_is_justified_trigger = { DIVORCER = scope:puppet_or_actor } } } } flag = divorce_justified localization = JUSTIFY_DIVORCE_INTERACTION_OPTION } send_option = { is_valid = { scope:puppet_or_actor = { dread >= medium_dread_value current_military_strength > scope:recipient.current_military_strength custom_tooltip = { text = must_neighbor_recipient_tt OR = { any_vassal_or_below = { this = scope:recipient } any_sub_realm_county = { OR = { clerical_region_title ?= { holder ?= scope:recipient } any_neighboring_county = { holder = { OR = { this = scope:recipient any_liege_or_above = { this = scope:recipient } } } } } } } } } scope:recipient = { NOR = { has_trait = stubborn has_trait = brave has_trait = arrogant has_trait = ambitious } } } flag = threaten_priest localization = THREATEN_PRIEST_INTERACTION_OPTION } send_option = { is_valid = { scope:puppet_or_actor = { trigger_if = { limit = { scope:actor = { is_ai = yes } } short_term_gold >= monumental_gold_value } trigger_else = { gold >= major_gold_value } } } flag = donate_faith localization = DONATE_TO_THE_FAITH_INTERACTION_OPTION } send_option = { is_valid = { scope:puppet_or_actor = { has_usable_hook = scope:recipient } } flag = divorce_hook localization = GENERIC_SPEND_A_HOOK } send_option = { is_shown = { has_pam_dlc_trigger = yes pam_offer_pilgrimage_option_shown_trigger = { ACTOR = scope:puppet_or_actor } } is_valid = { pam_offer_pilgrimage_option_valid_trigger = { ACTOR = scope:puppet_or_actor } } flag = offer_pilgrimage localization = OFFER_PILGRIMAGE_INTERACTION_OPTION } should_use_extra_icon = { scope:puppet_or_actor = { has_usable_hook = scope:recipient } } extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" send_options_exclusive = no ai_min_reply_days = 1 ai_max_reply_days = 5 on_send = { #Make sure AI always justifies divorce when valid scope:puppet_or_actor = { if = { limit = { scope:actor = { is_ai = yes } divorce_is_justified_trigger = { DIVORCER = scope:puppet_or_actor } NOT = { scope:divorce_justified ?= yes } } save_scope_as = ai_divorce_justified } } } on_accept = { scope:puppet_or_actor = { save_scope_as = divorcer } if = { limit = { scope:is_puppet_action ?= yes } scope:actor = { scope:puppet_or_actor = { add_piety = { value = { add = divorce_cost max = piety multiply = -1 } } } send_interface_toast = { type = event_toast_effect_neutral title = divorce_interaction_notification_puppeteer left_icon = scope:puppet_or_actor right_icon = scope:secondary_recipient } } } scope:recipient = { if = { limit = { #No inducement given NOR = { scope:divorce_hook ?= yes scope:donate_faith ?= yes scope:divorce_justified ?= yes exists = scope:ai_divorce_justified scope:threaten_priest ?= yes scope:offer_pilgrimage ?= yes } #One of the methods is possible OR = { divorce_can_cause_house_feud_trigger = yes divorce_can_cause_holy_order_lease_trigger = yes divorce_can_cause_hook_trigger = yes divorce_can_put_spouse_in_monastery_trigger = yes } } custom_tooltip = cleric_divorce_fuckery_tt if = { limit = { divorce_can_cause_house_feud_trigger = yes } custom_tooltip = cleric_cause_house_feud_tt } if = { limit = { divorce_can_cause_holy_order_lease_trigger = yes } custom_tooltip = cleric_force_holy_order_lease_tt } if = { limit = { divorce_can_cause_hook_trigger = yes } custom_tooltip = cleric_get_hook_tt } if = { limit = { divorce_can_put_spouse_in_monastery_trigger = yes } custom_tooltip = cleric_put_spouse_in_monastery_tt } save_scope_as = no_inducement } } if = { limit = { always = scope:divorce_hook } scope:puppet_or_actor = { if = { limit = { has_usable_hook = scope:recipient } use_hook = scope:recipient } } } pam_offer_pilgrimage_effect = { ACTOR = scope:puppet_or_actor CLERIC = scope:recipient } show_as_tooltip = { scope:divorcer = { divorce_effect = { DIVORCER = scope:divorcer DIVORCEE = scope:secondary_recipient } } } if = { limit = { NOR = { scope:divorce_justified ?= yes exists = scope:ai_divorce_justified } } if = { limit = { scope:recipient = { is_ai = no } } scope:recipient = { change_spiritual_fulfillment = minor_spiritual_fulfillment_loss } } else = { hidden_effect = { scope:recipient = { change_spiritual_fulfillment = miniscule_spiritual_fulfillment_loss } } } } else = { scope:recipient = { add_piety = minor_piety_gain } } scope:puppet_or_actor = { if = { limit = { scope:donate_faith ?= yes } pay_short_term_gold = { target = scope:recipient gold = scope:puppet_or_actor.major_gold_value } } } #Recipient is free to fuck with the divorce if = { limit = { exists = scope:no_inducement } scope:recipient = { trigger_event = pam_interactions_events.0060 } } #Divorcer (the puppet when puppeted) gets confirmation directly else = { scope:divorcer = { trigger_event = religious_interaction.1 } } # If we're a clan this interaction affects unity add_clan_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = major_unity_loss DESC = clan_unity_alliance.desc REVERSE_NON_HOUSE_TARGET = no } } on_decline = { scope:puppet_or_actor = { send_interface_toast = { type = event_toast_effect_bad title = divorce_character_rel_head_interaction_decline_notification right_icon = scope:puppet_or_actor.faith.religious_head clerical_interaction_refusal_minor_effect = yes } } if = { limit = { scope:recipient = { is_ai = no } scope:actor = { is_ai = yes } } scope:recipient = { if = { limit = { learning > extremely_high_skill_rating scope:actor = { is_ai = yes } NOR = { rite = { trait_is_virtue_rite = lustful } rite = { trait_is_sin_rite = chaste } scope:puppet_or_actor = { has_trait = lustful } } } custom_tooltip = refuse_divorce_celibacy_tt } if = { limit = { scope:puppet_or_actor = { is_imprisoned = no is_incapable = no } scope:secondary_recipient = { is_imprisoned = no is_incapable = no } } custom_tooltip = refuse_divorce_comfort_tt } custom_tooltip = refuse_divorce_condemn_tt trigger_event = { id = pam_interactions_events.0050 days = 1 } #Gain stress for ignoring threat from actor if = { limit = { scope:threaten_priest ?= yes } if = { limit = { ai_boldness < 0 } add_stress = major_stress_gain } else = { add_stress = medium_stress_gain } } } } # If we're a clan this interaction affects unity add_clan_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_loss DESC = clan_unity_alliance.desc REVERSE_NON_HOUSE_TARGET = no } } # AI ai_targets = { ai_recipients = spouses } ai_frequency_by_tier = { barony = 0 county = 72 duchy = 36 kingdom = 36 empire = 36 hegemony = 36 } ai_will_do = { base = 0 modifier = { # The AI wants to divorce should they not have an heir that is their own child, and their spouse is infertile add = 100 scope:puppet_or_actor = { fertility > 0.1 NOT = { any_child = { is_heir_of = scope:puppet_or_actor } } } scope:secondary_recipient = { is_ai = yes fertility < 0.1 } } modifier = { # The AI will only use a Hook if they couldn't otherwise do this scope:divorce_hook = yes add = -1 } modifier = { # You're in a same-sex marriage and your faith doesn't allow it add = 100 scope:puppet_or_actor = { sex_same_as = scope:secondary_recipient allowed_to_marry_same_sex_trigger = no } } modifier = { add = -66 scope:puppet_or_actor = { NOT = { divorce_is_justified_trigger = { DIVORCER = scope:puppet_or_actor } } } } } } divorce_character_dynast_request_interaction = { category = interaction_category_diplomacy use_diplomatic_range = no icon = icon_dynasty desc = divorce_character_dynast_request_interaction_desc cost = { piety = { value = divorce_cost if = { limit = { scope:is_puppet_action ?= yes } multiply = 0 } } renown = { value = scope:puppet_or_actor.dynasty.minor_dynasty_prestige_value if = { limit = { scope:is_puppet_action ?= yes } multiply = 0 } } } redirect = { scope:recipient = { save_scope_as = secondary_actor } if = { limit = { exists = scope:recipient.primary_spouse } scope:recipient.primary_spouse = { save_scope_as = recipient } } } is_shown = { scope:secondary_actor != scope:puppet_or_actor scope:puppet_or_actor ?= { pam_grants_own_divorce_trigger = no } scope:secondary_actor.dynasty.dynast ?= scope:puppet_or_actor # We are not required to seek approval of a spiritual HoF NAND = { scope:puppet_or_actor.rite = { rite_has_doctrine = doctrine_divorce_approval } scope:puppet_or_actor.faith = { has_doctrine = doctrine_spiritual_head exists = religious_head } } OR = { AND = { scope:puppet_or_actor.faith != scope:secondary_actor.faith # They are not required to seek approval of a spiritual HoF of the Dynasty Member scope:secondary_actor.rite ?= { NOT = { rite_has_doctrine = doctrine_divorce_approval } } } scope:puppet_or_actor.faith ?= scope:secondary_actor.faith } scope:recipient = { is_spouse_of = scope:secondary_actor is_concubine = no # Can set aside Concubines at any time } } is_valid_showing_failures_only = { trigger_if = { limit = { scope:actor = scope:puppet_or_actor } custom_tooltip = { NOT = { scope:puppet_or_actor.culture = { has_cultural_parameter = cannot_divorce } } text = CULTURE_FORBIDS_DIVORCE } } trigger_else = { custom_tooltip = { NOT = { scope:puppet_or_actor.culture = { has_cultural_parameter = cannot_divorce } } text = CULTURE_FORBIDS_DIVORCE_puppeteer } } NOT = { scope:puppet_or_actor.rite = { rite_has_doctrine = doctrine_divorce_disallowed } } scope:puppet_or_actor.dynasty = { dynasty_prestige >= minor_dynasty_prestige_value } NOT = { scope:secondary_actor.rite = { rite_has_doctrine = doctrine_divorce_disallowed } } scope:secondary_actor = { NOT = { has_strong_hook = scope:puppet_or_actor } } trigger_if = { limit = { scope:secondary_actor = { NOR = { is_child_of = scope:puppet_or_actor is_grandchild_of = scope:puppet_or_actor is_great_grandchild_of = scope:puppet_or_actor } } } custom_description = { scope:secondary_actor.top_liege = scope:puppet_or_actor.top_liege subject = scope:puppet_or_actor text = "same_realm_as" } } scope:puppet_or_actor = { trigger_if = { limit = { scope:actor = scope:puppet_or_actor } custom_tooltip = { NOT = { var:family_widow_forbidden_divorce ?= scope:recipient } text = BOUND_TO_FAMILY_WIDOW } } trigger_else = { custom_tooltip = { NOT = { var:family_widow_forbidden_divorce ?= scope:recipient } text = BOUND_TO_FAMILY_WIDOW_puppeteer } } } } auto_accept = yes on_accept = { if = { limit = { scope:is_puppet_action ?= yes } scope:puppet_or_actor = { add_piety = { value = { add = divorce_cost max = piety multiply = -1 } } dynasty ?= { add_dynasty_prestige = { value = { add = scope:puppet_or_actor.dynasty.minor_dynasty_prestige_value multiply = -1 } } } } } scope:puppet_or_actor = { send_interface_toast = { type = event_toast_effect_good title = divorce_character_dynast_request_interaction_title custom_tooltip = divorce_character_dynast_request_interaction_desc left_icon = scope:secondary_actor right_icon = scope:recipient } } scope:secondary_actor = { divorce_effect = { DIVORCER = scope:secondary_actor DIVORCEE = scope:recipient } add_opinion = { modifier = forced_divorce_opinion target = scope:puppet_or_actor } } if = { limit = { scope:recipient != scope:puppet_or_actor } scope:recipient = { trigger_event = marriage_interaction.0030 add_opinion = { modifier = forced_divorce_opinion target = scope:puppet_or_actor } } } } # AI ai_targets = { ai_recipients = dynasty max = 10 } ai_frequency_by_tier = { barony = 0 county = 144 duchy = 72 kingdom = 72 empire = 72 hegemony = 72 } ai_will_do = { base = 0 modifier = { # The AI wants to force a divorce if their heir is not from their dynasty and current marriage within the dynasty are not promising add = 100 scope:secondary_actor = { fertility > 0.1 } scope:recipient = { is_ai = yes fertility < 0.1 } exists = scope:puppet_or_actor.primary_heir exists = scope:puppet_or_actor.primary_heir.dynasty scope:puppet_or_actor.primary_heir.dynasty != this.dynasty } #Players should not be targeted modifier = { add = -1000 OR = { scope:secondary_actor = { is_ai = no } scope:recipient = { is_ai = no } } } } } divorce_character_dynast_request_rel_head_interaction = { category = interaction_category_diplomacy use_diplomatic_range = no icon = icon_dynasty desc = divorce_character_dynast_request_interaction_desc cost = { piety = { value = divorce_cost if = { limit = { scope:is_puppet_action ?= yes } multiply = 0 } } renown = { value = scope:puppet_or_actor.dynasty.minor_dynasty_prestige_value if = { limit = { scope:is_puppet_action ?= yes } multiply = 0 } } } redirect = { scope:recipient = { save_scope_as = secondary_actor } if = { limit = { exists = scope:recipient.primary_spouse } scope:recipient.primary_spouse = { save_scope_as = secondary_recipient } } #Recipient should be cleric or hof if = { limit = { scope:puppet_or_actor = { government_has_flag = government_is_theocracy exists = superior } } scope:puppet_or_actor.superior = { save_scope_as = recipient } } #Redirect to bishop superior of court chaplain else_if = { limit = { OR = { scope:puppet_or_actor.highest_held_title_tier < tier_kingdom scope:puppet_or_actor.faith = { NOR = { has_doctrine = doctrine_spiritual_head exists = scope:faith.religious_head } } } scope:puppet_or_actor.cp:councillor_court_chaplain ?= { highest_held_title_tier < tier_duchy superior ?= { highest_held_title_tier >= tier_duchy is_clergy = yes } } } scope:puppet_or_actor.cp:councillor_court_chaplain.superior = { save_scope_as = recipient } } #Redirect to bishop else_if = { limit = { OR = { scope:puppet_or_actor.highest_held_title_tier < tier_kingdom scope:puppet_or_actor.faith = { NOR = { has_doctrine = doctrine_spiritual_head exists = scope:faith.religious_head } } } scope:puppet_or_actor.cp:councillor_court_chaplain ?= { highest_held_title_tier >= tier_duchy is_clergy = yes } } scope:puppet_or_actor.cp:councillor_court_chaplain = { save_scope_as = recipient } } else = { scope:puppet_or_actor.faith.religious_head ?= { save_scope_as = recipient } } } greeting = positive notification_text = { desc = ASK_FOR_DIVORCE_THIRD_PERSON_NOTIFICATION first_valid = { triggered_desc = { trigger = { scope:secondary_actor = { faith = scope:recipient.faith sex_same_as = scope:secondary_recipient allowed_to_marry_same_sex_trigger = no } } desc = ASK_FOR_DIVORCE_NOTIFICATION_SAME_SEX_SECONDARY } triggered_desc = { trigger = { scope:secondary_actor = { relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_recipient } } } desc = ASK_FOR_DIVORCE_NOTIFICATION_INCESTUOUS_SECONDARY } triggered_desc = { trigger = { scope:secondary_recipient = { any_relation = { type = lover NOR = { this = scope:secondary_actor this = scope:recipient } relation_with_character_is_incestuous_in_my_rite_trigger = { CHARACTER = scope:secondary_recipient } } } } desc = ASK_FOR_DIVORCE_NOTIFICATION_INCESTUOUS_LOVER_SECONDARY } triggered_desc = { trigger = { scope:secondary_recipient = { is_female = no is_eunuch_trigger = yes } } desc = ASK_FOR_DIVORCE_NOTIFICATION_EUNUCH_SECONDARY } triggered_desc = { trigger = { scope:secondary_actor = { has_opinion_modifier = { modifier = attempted_murder_me_crime target = scope:secondary_recipient } } } desc = ASK_FOR_DIVORCE_NOTIFICATION_ATTEMPTED_MURDER_SECONDARY } triggered_desc = { trigger = { scope:secondary_recipient = { has_character_modifier = wedding_accused_impotency_modifier } } desc = ASK_FOR_DIVORCE_NOTIFICATION_IMPOTENCE_SECONDARY } triggered_desc = { trigger = { scope:secondary_actor = { any_consort = { is_alive = yes this != scope:secondary_recipient } any_consort = { this = scope:secondary_recipient } } scope:secondary_recipient = { culture = { NOT = { has_cultural_tradition = tradition_polygamous } } rite = { NOT = { rite_has_doctrine = doctrine_polygamy } } } } desc = ASK_FOR_DIVORCE_NOTIFICATION_MULTIPLE_CONSORTS_SECONDARY } triggered_desc = { trigger = { scope:secondary_recipient.faith = { faith_hostility_level = { target = scope:recipient.faith value >= faith_hostile_level } } } desc = ASK_FOR_DIVORCE_NOTIFICATION_HOSTILE_FAITH_SECONDARY } triggered_desc = { trigger = { scope:secondary_recipient = { exposed_cheating_on_spouse_trigger = { SPOUSE = scope:secondary_actor } } } desc = ASK_FOR_DIVORCE_NOTIFICATION_EXPOSED_CHEATING_SECONDARY } triggered_desc = { trigger = { scope:secondary_recipient = { fertility < 0.1 NOT = { any_child = { any_parent = { this = scope:secondary_actor } } } } } desc = ASK_FOR_DIVORCE_NOTIFICATION_INFERTILITY_SECONDARY } triggered_desc = { trigger = { scope:secondary_recipient = { has_trait = adulterer } } desc = ASK_FOR_DIVORCE_NOTIFICATION_ADULTERY_TRAIT_SECONDARY } triggered_desc = { trigger = { scope:secondary_actor = { opinion = { target = scope:secondary_recipient value < -50 } } } desc = ASK_FOR_DIVORCE_NOTIFICATION_HATRED_SECONDARY } desc = ASK_FOR_DIVORCE_NOTIFICATION_NOT_JUSTIFIED_SECONDARY } } is_shown = { scope:puppet_or_actor.rite ?= { rite_has_doctrine = doctrine_divorce_approval } scope:puppet_or_actor ?= { pam_grants_own_divorce_trigger = no } scope:puppet_or_actor ?= { OR = { faith ?= { has_doctrine = doctrine_spiritual_head exists = religious_head } cp:councillor_court_chaplain ?= { highest_held_title_tier >= tier_duchy is_clergy = yes } AND = { government_has_flag = government_is_theocracy exists = superior } cp:councillor_court_chaplain.superior ?= { highest_held_title_tier >= tier_duchy is_clergy = yes } } } scope:secondary_actor != scope:puppet_or_actor scope:secondary_actor.dynasty.dynast ?= scope:puppet_or_actor NOT = { scope:secondary_actor = { is_spouse_of = scope:puppet_or_actor } } exists = scope:secondary_recipient scope:puppet_or_actor.faith ?= scope:secondary_actor.faith } is_valid_showing_failures_only = { scope:puppet_or_actor = { NOT = { has_character_modifier = promised_pilgrimage_to_clergy_modifier } } trigger_if = { limit = { scope:actor = scope:puppet_or_actor } custom_tooltip = { NOT = { scope:puppet_or_actor.culture = { has_cultural_parameter = cannot_divorce } } text = CULTURE_FORBIDS_DIVORCE } } trigger_else = { custom_tooltip = { NOT = { scope:puppet_or_actor.culture = { has_cultural_parameter = cannot_divorce } } text = CULTURE_FORBIDS_DIVORCE_puppeteer } } scope:secondary_actor = { NOT = { has_strong_hook = scope:puppet_or_actor } } trigger_if = { limit = { scope:secondary_actor = { NOR = { is_child_of = scope:puppet_or_actor is_grandchild_of = scope:puppet_or_actor is_great_grandchild_of = scope:puppet_or_actor } } } custom_description = { scope:secondary_actor.top_liege = scope:puppet_or_actor.top_liege subject = scope:puppet_or_actor text = "same_realm_as" } } scope:puppet_or_actor = { trigger_if = { limit = { scope:actor = scope:puppet_or_actor } custom_tooltip = { NOT = { var:family_widow_forbidden_divorce ?= scope:secondary_recipient } text = BOUND_TO_FAMILY_WIDOW } } trigger_else = { custom_tooltip = { NOT = { var:family_widow_forbidden_divorce ?= scope:secondary_recipient } text = BOUND_TO_FAMILY_WIDOW_puppeteer } } } trigger_if = { limit = { scope:is_puppet_action ?= yes } scope:puppet_or_actor = { piety >= divorce_cost } } trigger_if = { limit = { scope:is_puppet_action ?= yes } scope:puppet_or_actor = { dynasty ?= { dynasty_prestige >= scope:puppet_or_actor.dynasty.minor_dynasty_prestige_value } } } } ai_accept = { base = 0 # Should be 0 for all interactions divorce_character_ai_accept_modifier = yes modifier = { # Divine Family is part of the faith add = -100 desc = DIVORCE_INCESTUOUS scope:secondary_actor = { is_close_or_extended_family_of = scope:secondary_recipient rite = { rite_has_tenet = tenet_divine_marriage } } } modifier = { # More likely if the marriage is incestuous, unless Divine Family is part of the faith add = 100 desc = DIVORCE_INCESTUOUS scope:secondary_actor = { relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_recipient } } } modifier = { # You are of the same dynasty as the Head of Faith add = 5 desc = YOU_ARE_MY_DYNASTY_MEMBER scope:recipient = { is_lowborn = no dynasty = scope:puppet_or_actor.dynasty NOR = { is_close_or_extended_family_of = scope:puppet_or_actor is_cousin_of = scope:puppet_or_actor is_child_of = scope:puppet_or_actor scope:recipient.dynasty = scope:secondary_recipient.dynasty } } } modifier = { # You are of the same house as the Head of Faith add = 10 desc = YOU_ARE_MY_HOUSE_MEMBER scope:recipient = { is_lowborn = no house = scope:puppet_or_actor.house NOR = { is_close_or_extended_family_of = scope:puppet_or_actor is_cousin_of = scope:puppet_or_actor is_child_of = scope:puppet_or_actor scope:recipient.house = scope:secondary_recipient.house } } } modifier = { # Related to the Head of Faith add = 25 desc = YOU_ARE_MY_RELATIVE scope:recipient = { OR = { is_close_or_extended_family_of = scope:puppet_or_actor is_cousin_of = scope:puppet_or_actor } NOT = { is_child_of = scope:puppet_or_actor } } } modifier = { # Parent of the Head of Faith add = 50 desc = PARENTS #YOU_ARE_MY_PARENT scope:recipient = { is_child_of = scope:puppet_or_actor } } modifier = { add = { add = 10 multiply = scope:puppet_or_actor.num_virtuous_traits } scope:puppet_or_actor.num_virtuous_traits > 0 desc = I_AM_VIRTUOUS } modifier = { add = { add = -10 multiply = scope:secondary_recipient.num_virtuous_traits } scope:secondary_recipient.num_virtuous_traits > 0 desc = THEY_ARE_VIRTUOUS } modifier = { add = { add = -10 multiply = scope:puppet_or_actor.num_sinful_traits } scope:puppet_or_actor.num_sinful_traits > 0 desc = I_AM_SINFUL } modifier = { add = { add = 10 multiply = scope:secondary_recipient.num_sinful_traits } scope:secondary_recipient.num_sinful_traits > 0 desc = THEY_ARE_SINFUL } modifier = { add = 100 scope:puppet_or_actor.puppet:theological_agent_puppet ?= scope:recipient desc = IS_YOUR_PUPPET } modifier = { add = { value = 25 if = { limit = { pam_actor_rite_has_core_simony_trigger = yes } multiply = 5 } } scope:donate_faith ?= yes scope:puppet_or_actor.major_gold_value < scope:recipient.minor_gold_value desc = DONATE_FAITH_INTERACTION_OPTION_REASON } modifier = { add = { value = 50 if = { limit = { pam_actor_rite_has_core_simony_trigger = yes } multiply = 5 } } scope:donate_faith ?= yes scope:puppet_or_actor.major_gold_value < scope:recipient.major_gold_value scope:puppet_or_actor.major_gold_value >= scope:recipient.minor_gold_value desc = DONATE_FAITH_INTERACTION_OPTION_REASON } modifier = { add = { value = 75 if = { limit = { pam_actor_rite_has_core_simony_trigger = yes } multiply = 5 } } scope:donate_faith ?= yes scope:puppet_or_actor.major_gold_value >= scope:recipient.major_gold_value scope:puppet_or_actor.major_gold_value < scope:recipient.monumental_gold_value desc = DONATE_FAITH_INTERACTION_OPTION_REASON } modifier = { add = { value = 100 if = { limit = { pam_actor_rite_has_core_simony_trigger = yes } multiply = 5 } } scope:donate_faith ?= yes scope:puppet_or_actor.major_gold_value >= scope:recipient.monumental_gold_value desc = DONATE_FAITH_INTERACTION_OPTION_REASON } modifier = { add = 25 scope:divorce_justified ?= yes desc = JUSTIFY_DIVORCE_REASON } modifier = { add = { value = 20 if = { limit = { scope:puppet_or_actor.highest_held_title_tier > scope:recipient.highest_held_title_tier } multiply = { value = scope:puppet_or_actor.highest_held_title_tier subtract = scope:recipient.highest_held_title_tier add = 1 } } else_if = { limit = { scope:puppet_or_actor.highest_held_title_tier < scope:recipient.highest_held_title_tier_minus_one } multiply = 0.25 } else_if = { limit = { scope:puppet_or_actor.highest_held_title_tier < scope:recipient.highest_held_title_tier } multiply = 0.5 } if = { limit = { OR = { is_liege_or_above_of = scope:recipient liege ?= scope:recipient.liege capital_county.holder ?= { OR = { this = scope:puppet_or_actor any_liege_or_above = { this = scope:puppet_or_actor } } } } } multiply = 3 } else_if = { limit = { scope:recipient = { OR = { any_neighboring_top_liege_realm_owner = { this = scope:puppet_or_actor } capital_county = { any_neighboring_county = { OR = { holder = scope:puppet_or_actor holder = { any_liege_or_above = { this = scope:puppet_or_actor } } } } } } } } multiply = 2 } } scope:threaten_priest = yes desc = THREATEN_PRIEST_INTERACTION_OPTION_REASON } modifier = { add = pam_offer_pilgrimage_acceptance_value scope:offer_pilgrimage = yes desc = OFFER_PILGRIMAGE_INTERACTION_OPTION_REASON } secular_to_ecclesiastical_pam_factors_acceptance_modifier = yes } auto_accept = { custom_description = { text = "spending_hook" subject = scope:puppet_or_actor object = scope:recipient scope:divorce_hook = yes } } options_heading = DIVORCE_INDUCEMENTS send_option = { is_valid = { scope:secondary_actor = { custom_tooltip = { text = divorce_justified_secondary_tt divorce_is_justified_trigger = { DIVORCER = scope:secondary_actor } } } } flag = divorce_justified localization = JUSTIFY_DIVORCE_INTERACTION_OPTION } send_option = { is_valid = { scope:puppet_or_actor = { dread >= medium_dread_value current_military_strength > scope:recipient.current_military_strength custom_tooltip = { text = must_neighbor_recipient_tt OR = { any_vassal_or_below = { this = scope:recipient } any_sub_realm_county = { OR = { clerical_region_title ?= { holder ?= scope:recipient } any_neighboring_county = { holder = { OR = { this = scope:recipient any_liege_or_above = { this = scope:recipient } } } } } } } } } scope:recipient = { NOR = { has_trait = stubborn has_trait = brave has_trait = arrogant has_trait = ambitious } } } flag = threaten_priest localization = THREATEN_PRIEST_INTERACTION_OPTION } send_option = { is_valid = { scope:puppet_or_actor = { trigger_if = { limit = { scope:actor = { is_ai = yes } } short_term_gold >= massive_gold_value } trigger_else = { gold >= medium_gold_value } } } flag = donate_faith localization = DONATE_TO_THE_FAITH_INTERACTION_OPTION } send_option = { is_valid = { scope:puppet_or_actor = { has_usable_hook = scope:recipient } } flag = divorce_hook localization = GENERIC_SPEND_A_HOOK } send_option = { is_shown = { has_pam_dlc_trigger = yes pam_offer_pilgrimage_option_shown_trigger = { ACTOR = scope:puppet_or_actor } } is_valid = { pam_offer_pilgrimage_option_valid_trigger = { ACTOR = scope:puppet_or_actor } } flag = offer_pilgrimage localization = OFFER_PILGRIMAGE_INTERACTION_OPTION } should_use_extra_icon = { scope:puppet_or_actor = { has_usable_hook = scope:recipient } } extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" send_options_exclusive = no ai_min_reply_days = 1 ai_max_reply_days = 5 on_send = { #Make sure AI always justifies divorce when valid scope:puppet_or_actor = { if = { limit = { scope:actor = { is_ai = yes } scope:secondary_actor = { divorce_is_justified_trigger = { DIVORCER = scope:secondary_actor } } NOT = { scope:divorce_justified ?= yes } } save_scope_as = ai_divorce_justified } } } on_accept = { if = { limit = { scope:is_puppet_action ?= yes } scope:puppet_or_actor = { add_piety = { value = { add = divorce_cost max = piety multiply = -1 } } dynasty ?= { add_dynasty_prestige = { value = { add = scope:puppet_or_actor.dynasty.minor_dynasty_prestige_value multiply = -1 } } } } } scope:secondary_actor = { save_scope_as = divorcer } scope:puppet_or_actor = { save_scope_as = forcing_divorce } scope:recipient = { if = { limit = { #No inducement given NOR = { scope:divorce_hook ?= yes scope:donate_faith ?= yes scope:divorce_justified ?= yes exists = scope:ai_divorce_justified scope:threaten_priest ?= yes scope:offer_pilgrimage ?= yes } #One of the methods is possible OR = { divorce_can_cause_house_feud_trigger = yes divorce_can_cause_holy_order_lease_trigger = yes divorce_can_cause_hook_trigger = yes divorce_can_put_spouse_in_monastery_trigger = yes } } custom_tooltip = cleric_divorce_fuckery_tt if = { limit = { divorce_can_cause_house_feud_trigger = yes } custom_tooltip = cleric_cause_house_feud_tt } if = { limit = { divorce_can_cause_holy_order_lease_trigger = yes } custom_tooltip = cleric_force_holy_order_lease_tt } if = { limit = { divorce_can_cause_hook_trigger = yes } custom_tooltip = cleric_get_hook_forcer_tt } if = { limit = { divorce_can_put_spouse_in_monastery_trigger = yes } custom_tooltip = cleric_put_spouse_in_monastery_tt } save_scope_as = no_inducement } } show_as_tooltip = { scope:secondary_actor = { divorce_effect = { DIVORCER = scope:secondary_actor DIVORCEE = scope:secondary_recipient } } } if = { limit = { always = scope:divorce_hook } scope:puppet_or_actor = { if = { limit = { has_usable_hook = scope:recipient } use_hook = scope:recipient } } } scope:puppet_or_actor = { if = { limit = { scope:donate_faith ?= yes } pay_short_term_gold = { target = scope:recipient gold = scope:puppet_or_actor.medium_gold_value } } } pam_offer_pilgrimage_effect = { ACTOR = scope:puppet_or_actor CLERIC = scope:recipient } if = { limit = { NOR = { scope:divorce_justified ?= yes exists = scope:ai_divorce_justified } } if = { limit = { scope:recipient = { is_ai = no } } scope:recipient = { change_spiritual_fulfillment = minor_spiritual_fulfillment_loss } } else = { hidden_effect = { scope:recipient = { change_spiritual_fulfillment = miniscule_spiritual_fulfillment_loss } } } } else = { scope:recipient = { add_piety = minor_piety_gain } } scope:secondary_actor = { add_opinion = { modifier = forced_divorce_opinion target = scope:puppet_or_actor } } scope:secondary_recipient = { add_opinion = { modifier = forced_divorce_opinion target = scope:puppet_or_actor } } #For follow-up event scope:secondary_actor = { save_scope_as = actor save_scope_as = puppet_or_actor } #Recipient is free to fuck with the divorce if = { limit = { exists = scope:no_inducement } scope:recipient = { trigger_event = pam_interactions_events.0060 } } #Actor just gets confirmation directly else = { scope:forcing_divorce = { trigger_event = religious_interaction.6 } } } on_decline = { scope:puppet_or_actor = { send_interface_toast = { type = event_toast_effect_bad title = divorce_character_dynast_request_rel_head_interaction_decline_notification right_icon = scope:recipient clerical_interaction_refusal_minor_effect = yes } } if = { limit = { scope:recipient = { is_ai = no } scope:actor = { is_ai = yes } } scope:secondary_actor = { save_scope_as = actor save_scope_as = puppet_or_actor } scope:recipient = { if = { limit = { learning > extremely_high_skill_rating scope:actor = { is_ai = yes } NOR = { rite = { trait_is_virtue_rite = lustful } rite = { trait_is_sin_rite = chaste } scope:puppet_or_actor = { has_trait = lustful } } } custom_tooltip = refuse_divorce_celibacy_tt } if = { limit = { scope:puppet_or_actor = { is_imprisoned = no is_incapable = no } scope:secondary_recipient = { is_imprisoned = no is_incapable = no } } custom_tooltip = refuse_divorce_comfort_tt } custom_tooltip = refuse_divorce_condemn_tt trigger_event = { id = pam_interactions_events.0050 days = 1 } #Gain stress for ignoring threat from actor if = { limit = { scope:threaten_priest ?= yes } if = { limit = { ai_boldness < 0 } add_stress = major_stress_gain } else = { add_stress = medium_stress_gain } } } } } # AI ai_targets = { ai_recipients = dynasty max = 10 } ai_frequency_by_tier = { barony = 0 county = 144 duchy = 72 kingdom = 72 empire = 72 hegemony = 72 } ai_will_do = { base = 0 modifier = { # The AI wants to force a divorce if their heir is not from their dynasty and current marriage within the dynasty are not promising add = 100 scope:secondary_actor = { fertility > 0.1 } scope:secondary_recipient = { is_ai = yes fertility < 0.1 } exists = scope:puppet_or_actor.primary_heir exists = scope:puppet_or_actor.primary_heir.dynasty scope:puppet_or_actor.primary_heir.dynasty != this.dynasty } modifier = { # The AI will only use a Hook if they couldn't otherwise do this scope:divorce_hook = yes add = -1 } #Players should not be targeted modifier = { add = -1000 OR = { scope:secondary_actor = { is_ai = no } scope:secondary_recipient = { is_ai = no } } } modifier = { add = -66 scope:secondary_actor = { NOT = { divorce_is_justified_trigger = { DIVORCER = scope:secondary_actor } } } } } } elope_interaction = { icon = icon_scheme_elope category = interaction_category_friendly scheme = elope desc = elope_interaction_desc notification_text = elope_interaction_notification ai_targets = { ai_recipients = realm_characters chance = 0.25 } ai_target_quick_trigger = { adult = yes attracted_to_owner = yes owner_attracted = yes } ai_frequency_by_tier = { barony = 0 county = 144 duchy = 36 kingdom = 0 empire = 0 hegemony = 0 } redirect = { scope:recipient = { save_scope_as = secondary_recipient } } is_available = { trigger_if = { limit = { is_ai = yes } OR = { any_relation = { type = lover } any_relation = { type = soulmate } } NOR = { has_trait = celibate scheme_generic_ai_blocker_trigger = yes } is_adult = yes } } is_shown = { scope:actor = { OR = { has_relation_lover = scope:recipient has_relation_soulmate = scope:recipient AND = { has_perk = accomplished_forger_perk has_government = landless_adventurer_government } } } scope:recipient = { is_adult = yes is_courtier = yes NOR = { is_courtier_of = scope:actor is_consort_of = scope:actor } could_marry_character_trigger = { CHARACTER = scope:actor } } } is_valid_showing_failures_only = { scope:actor = { can_start_scheme = { type = elope target_character = scope:recipient } } trigger_if = { #For landless adventurers we check range. limit = { scope:actor = { is_landless_adventurer = yes } } ep3_laamp_diplo_range_trigger = { TARGET = scope:recipient LAAMP = scope:actor } } } ai_accept = { base = 0 elopment_ai_accept_modifier = yes } ai_min_reply_days = 1 ai_max_reply_days = 3 on_send = { scope:actor = { if = { limit = { OR = { has_character_modifier = pam_granted_indulgences_modifier has_character_modifier = pam_granted_indulgences_modifier_small } } change_spiritual_fulfillment = medium_spiritual_fulfillment_loss } } } on_accept = { scope:actor = { stress_and_fulfillment_impact = { honest = minor_stress_impact_gain just = minor_stress_impact_gain } show_as_tooltip = { elope_success_effect = { TARGET = scope:recipient OWNER = scope:actor } } } hidden_effect = { scope:actor = { send_interface_toast = { type = event_toast_effect_good title = elope_interaction_notification left_icon = scope:actor right_icon = scope:recipient begin_scheme_basic_effect = { SCHEME_TYPE = elope TARGET_TYPE = target_character TARGET_SCOPE = scope:recipient } show_as_tooltip = { stress_and_fulfillment_impact = { honest = minor_stress_impact_gain just = minor_stress_impact_gain } } } } } } on_decline = { scope:actor = { send_interface_toast = { type = event_toast_effect_bad title = elope_interaction_decline_toast left_icon = scope:recipient } } } ai_will_do = { base = 100 #Promised to abstain from sin modifier = { OR = { has_character_modifier = pam_granted_indulgences_modifier has_character_modifier = pam_granted_indulgences_modifier_small } factor = 0.1 } } }