Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- offer_concubine_concubine_harem = {
- category = interaction_category_diplomacy
- desc = offer_concubine_desc
- ai_targets = {
- ai_recipients = neighboring_rulers
- }
- ai_target_quick_trigger = {
- adult = yes
- }
- ai_frequency = 144
- greeting = positive
- notification_text = OFFER_CONCUBINE_NOTIFICATION
- #interface = concubine_list
- needs_recipient_to_open = yes
- populate_actor_list = {
- scope:actor = {
- every_courtier = {
- limit = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope: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:actor
- CHARACTER = scope:recipient
- }
- }
- add_to_list = characters
- }
- }
- }
- is_shown = {
- NOT = { scope:actor = scope:recipient }
- scope:actor = {
- faith = { has_doctrine = doctrine_concubine_harem }
- }
- scope:recipient = {
- allowed_concubines = yes
- is_adult = yes
- }
- }
- is_valid_showing_failures_only = {
- custom_description = {
- text = take_concubine_available_character_opp
- object = scope:recipient
- scope:actor = {
- OR = {
- any_courtier = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- any_prisoner = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- }
- }
- }
- custom_description = {
- text = take_concubine_allowed_more
- object = scope:recipient
- scope:recipient = {
- allowed_more_concubines = yes
- }
- }
- }
- can_be_picked = {
- is_adult = yes
- }
- can_send = {
- custom_description = {
- text = character_unavailable_to_be_offered_as_concubine
- object = scope:secondary_actor
- scope:secondary_actor = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- }
- }
- auto_accept = no
- ai_accept = {
- base = 50
- modifier = {
- add = {
- value = 50
- multiply = scope:secondary_actor.num_of_good_genetic_traits
- }
- scope:secondary_actor = {
- num_of_good_genetic_traits > 0
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_POSITIVE_TRAIT_REASON
- }
- modifier = {
- add = {
- value = 50
- }
- scope:secondary_actor = {
- is_lowborn = no
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_DYNASTY_PRESTIGE_REASON_NOBLE
- }
- modifier = {
- add = {
- value = -50
- multiply = scope:secondary_actor.num_of_bad_genetic_traits
- }
- scope:secondary_actor = {
- OR = {
- num_of_bad_genetic_traits > 0
- }
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_NEGATIVE_TRAIT_REASON
- }
- modifier = {
- add = {
- value = -50
- }
- scope:secondary_actor = {
- is_lowborn = yes
- num_of_good_genetic_traits = 0
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_DYNASTY_PRESTIGE_REASON_LOWBORN_NO_POSITIVE_TRAIT
- }
- opinion_modifier = { # Opinion of you
- who = scope:recipient
- opinion_target = scope:actor
- multiplier = 1.0
- desc = AI_OPINION_REASON
- }
- opinion_modifier = { # Opinion of concubine
- who = scope:recipient
- opinion_target = scope:secondary_actor
- multiplier = 0.25
- desc = AI_OPINION_REASON
- }
- compare_modifier = { # Recipient is reluctant to marry old women (procreation is a key factor)
- trigger = {
- scope:secondary_actor = {
- age > 29
- is_female = yes
- }
- }
- target = scope:secondary_actor
- 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_actor
- }
- 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_actor
- trigger_if = {
- limit = {
- NOT = {
- any_consort = {
- can_have_children_with = { CHARACTER = scope:recipient }
- fertility > 0.1
- }
- }
- }
- any_child = {
- is_player_heir_of_trigger = { CHARACTER = root }
- }
- }
- trigger_else = {
- always = no
- }
- }
- desc = AI_NO_FERTILITY_REASON
- }
- modifier = {
- add = 50
- scope:recipient = {
- is_attracted_to_gender_of = scope:secondary_actor
- }
- desc = AI_ATTRACTION_REASON
- }
- modifier = { # A Recipient is more likely to agree if you're their liege
- add = 40
- scope:recipient = {
- target_is_liege_or_above = scope:actor
- }
- desc = LIEGE_REASON
- }
- #More/Less likely based on difference in rank between actor and recipient
- modifier = {
- add = 20
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 1
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 30
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 2
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 40
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 3
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 50
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 4
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 60
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 5
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -20
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -1
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -30
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -2
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -40
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -3
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -50
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -4
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -60
- scope: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:actor
- has_dread_level_towards = {
- target = scope:actor
- level = 1
- }
- }
- desc = INTIMIDATED_REASON
- }
- modifier = {
- add = cowed_reason_value
- scope:recipient = {
- target_is_liege_or_above = scope:actor
- has_dread_level_towards = {
- target = scope:actor
- level = 2
- }
- }
- desc = COWED_REASON
- }
- modifier = {
- add = intimidated_external_reason_value
- scope:recipient = {
- NOT = { target_is_liege_or_above = scope:actor }
- has_dread_level_towards = {
- target = scope:actor
- level = 1
- }
- }
- desc = INTIMIDATED_REASON
- }
- modifier = {
- add = cowed_external_reason_value
- scope:recipient = {
- NOT = { target_is_liege_or_above = scope:actor }
- has_dread_level_towards = {
- target = scope:actor
- level = 2
- }
- }
- desc = COWED_REASON
- }
- modifier = {
- add = -250
- scope:secondary_actor = {
- has_std_trigger = yes
- }
- desc = AI_STD_REASON
- }
- modifier = {
- add = -250
- scope:secondary_actor = {
- has_epidemic_disease_trigger = yes
- }
- desc = AI_CONTAGIOUS_REASON
- }
- modifier = {
- add = -5000
- scope:secondary_actor = {
- fertility <= 0
- }
- desc = AI_FERTILITY_REASON
- }
- modifier = {
- scope:hook = yes
- add = 500
- scope:actor = { NOT = { has_strong_hook = scope:recipient } }
- desc = SCHEME_WEAK_HOOK_USED
- }
- modifier = {
- scope:hook = yes
- add = 1000
- scope:actor = { has_strong_hook = scope:recipient }
- desc = SCHEME_STRONG_HOOK_USED
- }
- }
- ai_potential = {
- is_adult = yes
- NOT = { has_trait = incapable }
- is_at_war = no
- NOR = {
- has_trait = greedy
- ai_greed > very_high_positive_ai_value
- }
- faith = { has_doctrine = doctrine_concubine_harem }
- }
- ai_will_do = {
- base = 0
- modifier = { # Basic Filtering
- add = 100
- scope:recipient = {
- number_of_concubines < number_of_desired_concubines
- }
- scope:secondary_actor = {
- trigger_if = {
- limit = {
- allowed_to_marry_same_sex_trigger = no
- }
- sex_opposite_of = scope:recipient
- }
- fertility > 0.2
- age < 36
- NOR = {
- is_councillor_of = scope:actor
- is_of_major_interest_trigger = {
- CHARACTER = scope:actor
- }
- is_concubine_of = scope:actor
- }
- }
- }
- modifier = { # If secondary_actor is close to actor, a good character, or if actor should take them as concubine
- add = -100
- scope:secondary_actor = {
- 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_actor could be an agent...
- add = 25
- any_scheme = {
- scheme_target = scope:recipient
- save_temporary_scope_as = scheme_check
- }
- scope:secondary_actor = {
- is_valid_as_agent_in_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 its 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_actor = {
- fertility > 0.2
- age < 36
- 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_actor
- NOT = { is_attracted_to_gender_of = scope:secondary_actor }
- }
- }
- 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_actor }
- }
- }
- 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_actor
- }
- }
- modifier = { # Incest Filtering: Hard NO!
- factor = 0
- scope:recipient = {
- relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
- NOR = {
- accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
- 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_faith_trigger = { CHARACTER = scope:secondary_actor }
- OR = {
- accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
- 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_actor = { # 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
- }
- on_decline = {
- scope:actor = {
- send_interface_toast = {
- type = event_generic_neutral
- title = msg_concubine_offer_rejected_title
- right_icon = scope:recipient
- left_icon = scope:secondary_actor
- custom_tooltip = msg_concubine_offer_rejected
- }
- }
- }
- send_options_exclusive = no
- send_option = {
- is_valid = {
- scope:actor = {
- has_usable_hook = scope:recipient
- }
- }
- flag = hook
- localization = SCHEME_HOOK
- }
- should_use_extra_icon = {
- scope:actor = { has_usable_hook = scope:recipient }
- }
- extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds"
- }
- offer_concubine_concubine_l = {
- category = interaction_category_diplomacy
- desc = offer_concubine_desc
- ai_targets = {
- ai_recipients = neighboring_rulers
- }
- ai_target_quick_trigger = {
- adult = yes
- }
- ai_frequency = 144
- greeting = positive
- notification_text = OFFER_CONCUBINE_NOTIFICATION
- #interface = concubine_list
- needs_recipient_to_open = yes
- populate_actor_list = {
- scope:actor = {
- every_courtier = {
- limit = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope: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:actor
- CHARACTER = scope:recipient
- }
- }
- add_to_list = characters
- }
- }
- }
- is_shown = {
- NOT = { scope:actor = scope:recipient }
- scope:actor = {
- faith = { has_doctrine = doctrine_concubine_l }
- }
- scope:recipient = {
- allowed_concubines = yes
- is_adult = yes
- }
- }
- is_valid_showing_failures_only = {
- custom_description = {
- text = take_concubine_available_character_opp
- object = scope:recipient
- scope:actor = {
- OR = {
- any_courtier = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- any_prisoner = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- }
- }
- }
- custom_description = {
- text = take_concubine_allowed_more
- object = scope:recipient
- scope:recipient = {
- allowed_more_concubines = yes
- }
- }
- }
- can_be_picked = {
- is_adult = yes
- }
- can_send = {
- custom_description = {
- text = character_unavailable_to_be_offered_as_concubine
- object = scope:secondary_actor
- scope:secondary_actor = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- }
- }
- auto_accept = no
- ai_accept = {
- base = 50
- modifier = {
- add = {
- value = 50
- multiply = scope:secondary_actor.num_of_good_genetic_traits
- }
- scope:secondary_actor = {
- num_of_good_genetic_traits > 0
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_POSITIVE_TRAIT_REASON
- }
- modifier = {
- add = {
- value = 50
- }
- scope:secondary_actor = {
- is_lowborn = no
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_DYNASTY_PRESTIGE_REASON_NOBLE
- }
- modifier = {
- add = {
- value = -50
- multiply = scope:secondary_actor.num_of_bad_genetic_traits
- }
- scope:secondary_actor = {
- OR = {
- num_of_bad_genetic_traits > 0
- }
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_NEGATIVE_TRAIT_REASON
- }
- modifier = {
- add = {
- value = -50
- }
- scope:secondary_actor = {
- is_lowborn = yes
- num_of_good_genetic_traits = 0
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_DYNASTY_PRESTIGE_REASON_LOWBORN_NO_POSITIVE_TRAIT
- }
- opinion_modifier = { # Opinion of you
- who = scope:recipient
- opinion_target = scope:actor
- multiplier = 1.0
- desc = AI_OPINION_REASON
- }
- opinion_modifier = { # Opinion of concubine
- who = scope:recipient
- opinion_target = scope:secondary_actor
- multiplier = 0.25
- desc = AI_OPINION_REASON
- }
- compare_modifier = { # Recipient is reluctant to marry old women (procreation is a key factor)
- trigger = {
- scope:secondary_actor = {
- age > 29
- is_female = yes
- }
- }
- target = scope:secondary_actor
- 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_actor
- }
- 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_actor
- trigger_if = {
- limit = {
- NOT = {
- any_consort = {
- can_have_children_with = { CHARACTER = scope:recipient }
- fertility > 0.1
- }
- }
- }
- any_child = {
- is_player_heir_of_trigger = { CHARACTER = root }
- }
- }
- trigger_else = {
- always = no
- }
- }
- desc = AI_NO_FERTILITY_REASON
- }
- modifier = {
- add = 50
- scope:recipient = {
- is_attracted_to_gender_of = scope:secondary_actor
- }
- desc = AI_ATTRACTION_REASON
- }
- modifier = { # A Recipient is more likely to agree if you're their liege
- add = 40
- scope:recipient = {
- target_is_liege_or_above = scope:actor
- }
- desc = LIEGE_REASON
- }
- #More/Less likely based on difference in rank between actor and recipient
- modifier = {
- add = 20
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 1
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 30
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 2
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 40
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 3
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 50
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 4
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 60
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 5
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -20
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -1
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -30
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -2
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -40
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -3
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -50
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -4
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -60
- scope: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:actor
- has_dread_level_towards = {
- target = scope:actor
- level = 1
- }
- }
- desc = INTIMIDATED_REASON
- }
- modifier = {
- add = cowed_reason_value
- scope:recipient = {
- target_is_liege_or_above = scope:actor
- has_dread_level_towards = {
- target = scope:actor
- level = 2
- }
- }
- desc = COWED_REASON
- }
- modifier = {
- add = intimidated_external_reason_value
- scope:recipient = {
- NOT = { target_is_liege_or_above = scope:actor }
- has_dread_level_towards = {
- target = scope:actor
- level = 1
- }
- }
- desc = INTIMIDATED_REASON
- }
- modifier = {
- add = cowed_external_reason_value
- scope:recipient = {
- NOT = { target_is_liege_or_above = scope:actor }
- has_dread_level_towards = {
- target = scope:actor
- level = 2
- }
- }
- desc = COWED_REASON
- }
- modifier = {
- add = -250
- scope:secondary_actor = {
- has_std_trigger = yes
- }
- desc = AI_STD_REASON
- }
- modifier = {
- add = -250
- scope:secondary_actor = {
- has_epidemic_disease_trigger = yes
- }
- desc = AI_CONTAGIOUS_REASON
- }
- modifier = {
- add = -5000
- scope:secondary_actor = {
- fertility <= 0
- }
- desc = AI_FERTILITY_REASON
- }
- modifier = {
- scope:hook = yes
- add = 500
- scope:actor = { NOT = { has_strong_hook = scope:recipient } }
- desc = SCHEME_WEAK_HOOK_USED
- }
- modifier = {
- scope:hook = yes
- add = 1000
- scope:actor = { has_strong_hook = scope:recipient }
- desc = SCHEME_STRONG_HOOK_USED
- }
- }
- ai_potential = {
- is_adult = yes
- NOT = { has_trait = incapable }
- is_at_war = no
- NOR = {
- has_trait = greedy
- ai_greed > very_high_positive_ai_value
- }
- faith = { has_doctrine = doctrine_concubine_l }
- }
- ai_will_do = {
- base = 0
- modifier = { # Basic Filtering
- add = 100
- scope:recipient = {
- number_of_concubines < number_of_desired_concubines
- }
- scope:secondary_actor = {
- trigger_if = {
- limit = {
- allowed_to_marry_same_sex_trigger = no
- }
- sex_opposite_of = scope:recipient
- }
- fertility > 0.2
- age < 36
- NOR = {
- is_councillor_of = scope:actor
- is_of_major_interest_trigger = {
- CHARACTER = scope:actor
- }
- is_concubine_of = scope:actor
- }
- }
- }
- modifier = { # If secondary_actor is close to actor, a good character, or if actor should take them as concubine
- add = -100
- scope:secondary_actor = {
- 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_actor could be an agent...
- add = 25
- any_scheme = {
- scheme_target = scope:recipient
- save_temporary_scope_as = scheme_check
- }
- scope:secondary_actor = {
- is_valid_as_agent_in_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 its 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_actor = {
- fertility > 0.2
- age < 36
- 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_actor
- NOT = { is_attracted_to_gender_of = scope:secondary_actor }
- }
- }
- 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_actor }
- }
- }
- 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_actor
- }
- }
- modifier = { # Incest Filtering: Hard NO!
- factor = 0
- scope:recipient = {
- relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
- NOR = {
- accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
- 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_faith_trigger = { CHARACTER = scope:secondary_actor }
- OR = {
- accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
- 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_actor = { # 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
- }
- on_decline = {
- scope:actor = {
- send_interface_toast = {
- type = event_generic_neutral
- title = msg_concubine_offer_rejected_title
- right_icon = scope:recipient
- left_icon = scope:secondary_actor
- custom_tooltip = msg_concubine_offer_rejected
- }
- }
- }
- send_options_exclusive = no
- send_option = {
- is_valid = {
- scope:actor = {
- has_usable_hook = scope:recipient
- }
- }
- flag = hook
- localization = SCHEME_HOOK
- }
- should_use_extra_icon = {
- scope:actor = { has_usable_hook = scope:recipient }
- }
- extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds"
- }
- offer_concubine_concubine_m = {
- category = interaction_category_diplomacy
- desc = offer_concubine_desc
- ai_targets = {
- ai_recipients = neighboring_rulers
- }
- ai_target_quick_trigger = {
- adult = yes
- }
- ai_frequency = 144
- greeting = positive
- notification_text = OFFER_CONCUBINE_NOTIFICATION
- #interface = concubine_list
- needs_recipient_to_open = yes
- populate_actor_list = {
- scope:actor = {
- every_courtier = {
- limit = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope: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:actor
- CHARACTER = scope:recipient
- }
- }
- add_to_list = characters
- }
- }
- }
- is_shown = {
- NOT = { scope:actor = scope:recipient }
- scope:actor = {
- faith = { has_doctrine = doctrine_concubine_m }
- }
- scope:recipient = {
- allowed_concubines = yes
- is_adult = yes
- }
- }
- is_valid_showing_failures_only = {
- custom_description = {
- text = take_concubine_available_character_opp
- object = scope:recipient
- scope:actor = {
- OR = {
- any_courtier = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- any_prisoner = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- }
- }
- }
- custom_description = {
- text = take_concubine_allowed_more
- object = scope:recipient
- scope:recipient = {
- allowed_more_concubines = yes
- }
- }
- }
- can_be_picked = {
- is_adult = yes
- }
- can_send = {
- custom_description = {
- text = character_unavailable_to_be_offered_as_concubine
- object = scope:secondary_actor
- scope:secondary_actor = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- }
- }
- auto_accept = no
- ai_accept = {
- base = 50
- modifier = {
- add = {
- value = 50
- multiply = scope:secondary_actor.num_of_good_genetic_traits
- }
- scope:secondary_actor = {
- num_of_good_genetic_traits > 0
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_POSITIVE_TRAIT_REASON
- }
- modifier = {
- add = {
- value = 50
- }
- scope:secondary_actor = {
- is_lowborn = no
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_DYNASTY_PRESTIGE_REASON_NOBLE
- }
- modifier = {
- add = {
- value = -50
- multiply = scope:secondary_actor.num_of_bad_genetic_traits
- }
- scope:secondary_actor = {
- OR = {
- num_of_bad_genetic_traits > 0
- }
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_NEGATIVE_TRAIT_REASON
- }
- modifier = {
- add = {
- value = -50
- }
- scope:secondary_actor = {
- is_lowborn = yes
- num_of_good_genetic_traits = 0
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_DYNASTY_PRESTIGE_REASON_LOWBORN_NO_POSITIVE_TRAIT
- }
- opinion_modifier = { # Opinion of you
- who = scope:recipient
- opinion_target = scope:actor
- multiplier = 1.0
- desc = AI_OPINION_REASON
- }
- opinion_modifier = { # Opinion of concubine
- who = scope:recipient
- opinion_target = scope:secondary_actor
- multiplier = 0.25
- desc = AI_OPINION_REASON
- }
- compare_modifier = { # Recipient is reluctant to marry old women (procreation is a key factor)
- trigger = {
- scope:secondary_actor = {
- age > 29
- is_female = yes
- }
- }
- target = scope:secondary_actor
- 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_actor
- }
- 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_actor
- trigger_if = {
- limit = {
- NOT = {
- any_consort = {
- can_have_children_with = { CHARACTER = scope:recipient }
- fertility > 0.1
- }
- }
- }
- any_child = {
- is_player_heir_of_trigger = { CHARACTER = root }
- }
- }
- trigger_else = {
- always = no
- }
- }
- desc = AI_NO_FERTILITY_REASON
- }
- modifier = {
- add = 50
- scope:recipient = {
- is_attracted_to_gender_of = scope:secondary_actor
- }
- desc = AI_ATTRACTION_REASON
- }
- modifier = { # A Recipient is more likely to agree if you're their liege
- add = 40
- scope:recipient = {
- target_is_liege_or_above = scope:actor
- }
- desc = LIEGE_REASON
- }
- #More/Less likely based on difference in rank between actor and recipient
- modifier = {
- add = 20
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 1
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 30
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 2
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 40
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 3
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 50
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 4
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 60
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 5
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -20
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -1
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -30
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -2
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -40
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -3
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -50
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -4
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -60
- scope: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:actor
- has_dread_level_towards = {
- target = scope:actor
- level = 1
- }
- }
- desc = INTIMIDATED_REASON
- }
- modifier = {
- add = cowed_reason_value
- scope:recipient = {
- target_is_liege_or_above = scope:actor
- has_dread_level_towards = {
- target = scope:actor
- level = 2
- }
- }
- desc = COWED_REASON
- }
- modifier = {
- add = intimidated_external_reason_value
- scope:recipient = {
- NOT = { target_is_liege_or_above = scope:actor }
- has_dread_level_towards = {
- target = scope:actor
- level = 1
- }
- }
- desc = INTIMIDATED_REASON
- }
- modifier = {
- add = cowed_external_reason_value
- scope:recipient = {
- NOT = { target_is_liege_or_above = scope:actor }
- has_dread_level_towards = {
- target = scope:actor
- level = 2
- }
- }
- desc = COWED_REASON
- }
- modifier = {
- add = -250
- scope:secondary_actor = {
- has_std_trigger = yes
- }
- desc = AI_STD_REASON
- }
- modifier = {
- add = -250
- scope:secondary_actor = {
- has_epidemic_disease_trigger = yes
- }
- desc = AI_CONTAGIOUS_REASON
- }
- modifier = {
- add = -5000
- scope:secondary_actor = {
- fertility <= 0
- }
- desc = AI_FERTILITY_REASON
- }
- modifier = {
- scope:hook = yes
- add = 500
- scope:actor = { NOT = { has_strong_hook = scope:recipient } }
- desc = SCHEME_WEAK_HOOK_USED
- }
- modifier = {
- scope:hook = yes
- add = 1000
- scope:actor = { has_strong_hook = scope:recipient }
- desc = SCHEME_STRONG_HOOK_USED
- }
- }
- ai_potential = {
- is_adult = yes
- NOT = { has_trait = incapable }
- is_at_war = no
- NOR = {
- has_trait = greedy
- ai_greed > very_high_positive_ai_value
- }
- faith = { has_doctrine = doctrine_concubine_m }
- }
- ai_will_do = {
- base = 0
- modifier = { # Basic Filtering
- add = 100
- scope:recipient = {
- number_of_concubines < number_of_desired_concubines
- }
- scope:secondary_actor = {
- trigger_if = {
- limit = {
- allowed_to_marry_same_sex_trigger = no
- }
- sex_opposite_of = scope:recipient
- }
- fertility > 0.2
- age < 36
- NOR = {
- is_councillor_of = scope:actor
- is_of_major_interest_trigger = {
- CHARACTER = scope:actor
- }
- is_concubine_of = scope:actor
- }
- }
- }
- modifier = { # If secondary_actor is close to actor, a good character, or if actor should take them as concubine
- add = -100
- scope:secondary_actor = {
- 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_actor could be an agent...
- add = 25
- any_scheme = {
- scheme_target = scope:recipient
- save_temporary_scope_as = scheme_check
- }
- scope:secondary_actor = {
- is_valid_as_agent_in_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 its 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_actor = {
- fertility > 0.2
- age < 36
- 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_actor
- NOT = { is_attracted_to_gender_of = scope:secondary_actor }
- }
- }
- 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_actor }
- }
- }
- 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_actor
- }
- }
- modifier = { # Incest Filtering: Hard NO!
- factor = 0
- scope:recipient = {
- relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
- NOR = {
- accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
- 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_faith_trigger = { CHARACTER = scope:secondary_actor }
- OR = {
- accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
- 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_actor = { # 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
- }
- on_decline = {
- scope:actor = {
- send_interface_toast = {
- type = event_generic_neutral
- title = msg_concubine_offer_rejected_title
- right_icon = scope:recipient
- left_icon = scope:secondary_actor
- custom_tooltip = msg_concubine_offer_rejected
- }
- }
- }
- send_options_exclusive = no
- send_option = {
- is_valid = {
- scope:actor = {
- has_usable_hook = scope:recipient
- }
- }
- flag = hook
- localization = SCHEME_HOOK
- }
- should_use_extra_icon = {
- scope:actor = { has_usable_hook = scope:recipient }
- }
- extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds"
- }
- offer_concubine_concubine_s = {
- category = interaction_category_diplomacy
- desc = offer_concubine_desc
- ai_targets = {
- ai_recipients = neighboring_rulers
- }
- ai_target_quick_trigger = {
- adult = yes
- }
- ai_frequency = 144
- greeting = positive
- notification_text = OFFER_CONCUBINE_NOTIFICATION
- #interface = concubine_list
- needs_recipient_to_open = yes
- populate_actor_list = {
- scope:actor = {
- every_courtier = {
- limit = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope: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:actor
- CHARACTER = scope:recipient
- }
- }
- add_to_list = characters
- }
- }
- }
- is_shown = {
- NOT = { scope:actor = scope:recipient }
- scope:actor = {
- faith = { has_doctrine = doctrine_concubine_s }
- }
- scope:recipient = {
- allowed_concubines = yes
- is_adult = yes
- }
- }
- is_valid_showing_failures_only = {
- custom_description = {
- text = take_concubine_available_character_opp
- object = scope:recipient
- scope:actor = {
- OR = {
- any_courtier = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- any_prisoner = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- }
- }
- }
- custom_description = {
- text = take_concubine_allowed_more
- object = scope:recipient
- scope:recipient = {
- allowed_more_concubines = yes
- }
- }
- }
- can_be_picked = {
- is_adult = yes
- }
- can_send = {
- custom_description = {
- text = character_unavailable_to_be_offered_as_concubine
- object = scope:secondary_actor
- scope:secondary_actor = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- }
- }
- auto_accept = no
- ai_accept = {
- base = 50
- modifier = {
- add = {
- value = 50
- multiply = scope:secondary_actor.num_of_good_genetic_traits
- }
- scope:secondary_actor = {
- num_of_good_genetic_traits > 0
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_POSITIVE_TRAIT_REASON
- }
- modifier = {
- add = {
- value = 50
- }
- scope:secondary_actor = {
- is_lowborn = no
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_DYNASTY_PRESTIGE_REASON_NOBLE
- }
- modifier = {
- add = {
- value = -50
- multiply = scope:secondary_actor.num_of_bad_genetic_traits
- }
- scope:secondary_actor = {
- OR = {
- num_of_bad_genetic_traits > 0
- }
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_NEGATIVE_TRAIT_REASON
- }
- modifier = {
- add = {
- value = -50
- }
- scope:secondary_actor = {
- is_lowborn = yes
- num_of_good_genetic_traits = 0
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_DYNASTY_PRESTIGE_REASON_LOWBORN_NO_POSITIVE_TRAIT
- }
- opinion_modifier = { # Opinion of you
- who = scope:recipient
- opinion_target = scope:actor
- multiplier = 1.0
- desc = AI_OPINION_REASON
- }
- opinion_modifier = { # Opinion of concubine
- who = scope:recipient
- opinion_target = scope:secondary_actor
- multiplier = 0.25
- desc = AI_OPINION_REASON
- }
- compare_modifier = { # Recipient is reluctant to marry old women (procreation is a key factor)
- trigger = {
- scope:secondary_actor = {
- age > 29
- is_female = yes
- }
- }
- target = scope:secondary_actor
- 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_actor
- }
- 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_actor
- trigger_if = {
- limit = {
- NOT = {
- any_consort = {
- can_have_children_with = { CHARACTER = scope:recipient }
- fertility > 0.1
- }
- }
- }
- any_child = {
- is_player_heir_of_trigger = { CHARACTER = root }
- }
- }
- trigger_else = {
- always = no
- }
- }
- desc = AI_NO_FERTILITY_REASON
- }
- modifier = {
- add = 50
- scope:recipient = {
- is_attracted_to_gender_of = scope:secondary_actor
- }
- desc = AI_ATTRACTION_REASON
- }
- modifier = { # A Recipient is more likely to agree if you're their liege
- add = 40
- scope:recipient = {
- target_is_liege_or_above = scope:actor
- }
- desc = LIEGE_REASON
- }
- #More/Less likely based on difference in rank between actor and recipient
- modifier = {
- add = 20
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 1
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 30
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 2
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 40
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 3
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 50
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 4
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 60
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 5
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -20
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -1
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -30
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -2
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -40
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -3
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -50
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -4
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -60
- scope: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:actor
- has_dread_level_towards = {
- target = scope:actor
- level = 1
- }
- }
- desc = INTIMIDATED_REASON
- }
- modifier = {
- add = cowed_reason_value
- scope:recipient = {
- target_is_liege_or_above = scope:actor
- has_dread_level_towards = {
- target = scope:actor
- level = 2
- }
- }
- desc = COWED_REASON
- }
- modifier = {
- add = intimidated_external_reason_value
- scope:recipient = {
- NOT = { target_is_liege_or_above = scope:actor }
- has_dread_level_towards = {
- target = scope:actor
- level = 1
- }
- }
- desc = INTIMIDATED_REASON
- }
- modifier = {
- add = cowed_external_reason_value
- scope:recipient = {
- NOT = { target_is_liege_or_above = scope:actor }
- has_dread_level_towards = {
- target = scope:actor
- level = 2
- }
- }
- desc = COWED_REASON
- }
- modifier = {
- add = -250
- scope:secondary_actor = {
- has_std_trigger = yes
- }
- desc = AI_STD_REASON
- }
- modifier = {
- add = -250
- scope:secondary_actor = {
- has_epidemic_disease_trigger = yes
- }
- desc = AI_CONTAGIOUS_REASON
- }
- modifier = {
- add = -5000
- scope:secondary_actor = {
- fertility <= 0
- }
- desc = AI_FERTILITY_REASON
- }
- modifier = {
- scope:hook = yes
- add = 500
- scope:actor = { NOT = { has_strong_hook = scope:recipient } }
- desc = SCHEME_WEAK_HOOK_USED
- }
- modifier = {
- scope:hook = yes
- add = 1000
- scope:actor = { has_strong_hook = scope:recipient }
- desc = SCHEME_STRONG_HOOK_USED
- }
- }
- ai_potential = {
- is_adult = yes
- NOT = { has_trait = incapable }
- is_at_war = no
- NOR = {
- has_trait = greedy
- ai_greed > very_high_positive_ai_value
- }
- faith = { has_doctrine = doctrine_concubine_s }
- }
- ai_will_do = {
- base = 0
- modifier = { # Basic Filtering
- add = 100
- scope:recipient = {
- number_of_concubines < number_of_desired_concubines
- }
- scope:secondary_actor = {
- trigger_if = {
- limit = {
- allowed_to_marry_same_sex_trigger = no
- }
- sex_opposite_of = scope:recipient
- }
- fertility > 0.2
- age < 36
- NOR = {
- is_councillor_of = scope:actor
- is_of_major_interest_trigger = {
- CHARACTER = scope:actor
- }
- is_concubine_of = scope:actor
- }
- }
- }
- modifier = { # If secondary_actor is close to actor, a good character, or if actor should take them as concubine
- add = -100
- scope:secondary_actor = {
- 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_actor could be an agent...
- add = 25
- any_scheme = {
- scheme_target = scope:recipient
- save_temporary_scope_as = scheme_check
- }
- scope:secondary_actor = {
- is_valid_as_agent_in_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 its 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_actor = {
- fertility > 0.2
- age < 36
- 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_actor
- NOT = { is_attracted_to_gender_of = scope:secondary_actor }
- }
- }
- 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_actor }
- }
- }
- 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_actor
- }
- }
- modifier = { # Incest Filtering: Hard NO!
- factor = 0
- scope:recipient = {
- relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
- NOR = {
- accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
- 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_faith_trigger = { CHARACTER = scope:secondary_actor }
- OR = {
- accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
- 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_actor = { # 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
- }
- on_decline = {
- scope:actor = {
- send_interface_toast = {
- type = event_generic_neutral
- title = msg_concubine_offer_rejected_title
- right_icon = scope:recipient
- left_icon = scope:secondary_actor
- custom_tooltip = msg_concubine_offer_rejected
- }
- }
- }
- send_options_exclusive = no
- send_option = {
- is_valid = {
- scope:actor = {
- has_usable_hook = scope:recipient
- }
- }
- flag = hook
- localization = SCHEME_HOOK
- }
- should_use_extra_icon = {
- scope:actor = { has_usable_hook = scope:recipient }
- }
- extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds"
- }
- offer_concubine_managed_harem = {
- category = interaction_category_diplomacy
- desc = offer_concubine_desc
- ai_targets = {
- ai_recipients = neighboring_rulers
- }
- ai_target_quick_trigger = {
- adult = yes
- }
- ai_frequency = 144
- greeting = positive
- notification_text = OFFER_CONCUBINE_NOTIFICATION
- #interface = concubine_list
- needs_recipient_to_open = yes
- populate_actor_list = {
- scope:actor = {
- every_courtier = {
- limit = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope: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:actor
- CHARACTER = scope:recipient
- }
- }
- add_to_list = characters
- }
- }
- }
- is_shown = {
- NOT = { scope:actor = scope:recipient }
- scope:actor = {
- faith = { has_doctrine = doctrine_concubine_managed_harem }
- }
- scope:recipient = {
- allowed_concubines = yes
- is_adult = yes
- }
- }
- is_valid_showing_failures_only = {
- custom_description = {
- text = take_concubine_available_character_opp
- object = scope:recipient
- scope:actor = {
- OR = {
- any_courtier = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- any_prisoner = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- }
- }
- }
- custom_description = {
- text = take_concubine_allowed_more
- object = scope:recipient
- scope:recipient = {
- allowed_more_concubines = yes
- }
- }
- }
- can_be_picked = {
- is_adult = yes
- }
- can_send = {
- custom_description = {
- text = character_unavailable_to_be_offered_as_concubine
- object = scope:secondary_actor
- scope:secondary_actor = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- }
- }
- auto_accept = no
- ai_accept = {
- base = 50
- modifier = {
- add = {
- value = 50
- multiply = scope:secondary_actor.num_of_good_genetic_traits
- }
- scope:secondary_actor = {
- num_of_good_genetic_traits > 0
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_POSITIVE_TRAIT_REASON
- }
- modifier = {
- add = {
- value = 50
- }
- scope:secondary_actor = {
- is_lowborn = no
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_DYNASTY_PRESTIGE_REASON_NOBLE
- }
- modifier = {
- add = {
- value = -50
- multiply = scope:secondary_actor.num_of_bad_genetic_traits
- }
- scope:secondary_actor = {
- OR = {
- num_of_bad_genetic_traits > 0
- }
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_NEGATIVE_TRAIT_REASON
- }
- modifier = {
- add = {
- value = -50
- }
- scope:secondary_actor = {
- is_lowborn = yes
- num_of_good_genetic_traits = 0
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_DYNASTY_PRESTIGE_REASON_LOWBORN_NO_POSITIVE_TRAIT
- }
- opinion_modifier = { # Opinion of you
- who = scope:recipient
- opinion_target = scope:actor
- multiplier = 1.0
- desc = AI_OPINION_REASON
- }
- opinion_modifier = { # Opinion of concubine
- who = scope:recipient
- opinion_target = scope:secondary_actor
- multiplier = 0.25
- desc = AI_OPINION_REASON
- }
- compare_modifier = { # Recipient is reluctant to marry old women (procreation is a key factor)
- trigger = {
- scope:secondary_actor = {
- age > 29
- is_female = yes
- }
- }
- target = scope:secondary_actor
- 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_actor
- }
- 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_actor
- trigger_if = {
- limit = {
- NOT = {
- any_consort = {
- can_have_children_with = { CHARACTER = scope:recipient }
- fertility > 0.1
- }
- }
- }
- any_child = {
- is_player_heir_of_trigger = { CHARACTER = root }
- }
- }
- trigger_else = {
- always = no
- }
- }
- desc = AI_NO_FERTILITY_REASON
- }
- modifier = {
- add = 50
- scope:recipient = {
- is_attracted_to_gender_of = scope:secondary_actor
- }
- desc = AI_ATTRACTION_REASON
- }
- modifier = { # A Recipient is more likely to agree if you're their liege
- add = 40
- scope:recipient = {
- target_is_liege_or_above = scope:actor
- }
- desc = LIEGE_REASON
- }
- #More/Less likely based on difference in rank between actor and recipient
- modifier = {
- add = 20
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 1
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 30
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 2
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 40
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 3
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 50
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 4
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 60
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 5
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -20
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -1
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -30
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -2
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -40
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -3
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -50
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -4
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -60
- scope: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:actor
- has_dread_level_towards = {
- target = scope:actor
- level = 1
- }
- }
- desc = INTIMIDATED_REASON
- }
- modifier = {
- add = cowed_reason_value
- scope:recipient = {
- target_is_liege_or_above = scope:actor
- has_dread_level_towards = {
- target = scope:actor
- level = 2
- }
- }
- desc = COWED_REASON
- }
- modifier = {
- add = intimidated_external_reason_value
- scope:recipient = {
- NOT = { target_is_liege_or_above = scope:actor }
- has_dread_level_towards = {
- target = scope:actor
- level = 1
- }
- }
- desc = INTIMIDATED_REASON
- }
- modifier = {
- add = cowed_external_reason_value
- scope:recipient = {
- NOT = { target_is_liege_or_above = scope:actor }
- has_dread_level_towards = {
- target = scope:actor
- level = 2
- }
- }
- desc = COWED_REASON
- }
- modifier = {
- add = -250
- scope:secondary_actor = {
- has_std_trigger = yes
- }
- desc = AI_STD_REASON
- }
- modifier = {
- add = -250
- scope:secondary_actor = {
- has_epidemic_disease_trigger = yes
- }
- desc = AI_CONTAGIOUS_REASON
- }
- modifier = {
- add = -5000
- scope:secondary_actor = {
- fertility <= 0
- }
- desc = AI_FERTILITY_REASON
- }
- modifier = {
- scope:hook = yes
- add = 500
- scope:actor = { NOT = { has_strong_hook = scope:recipient } }
- desc = SCHEME_WEAK_HOOK_USED
- }
- modifier = {
- scope:hook = yes
- add = 1000
- scope:actor = { has_strong_hook = scope:recipient }
- desc = SCHEME_STRONG_HOOK_USED
- }
- }
- ai_potential = {
- is_adult = yes
- NOT = { has_trait = incapable }
- is_at_war = no
- NOR = {
- has_trait = greedy
- ai_greed > very_high_positive_ai_value
- }
- faith = { has_doctrine = doctrine_concubine_managed_harem }
- }
- ai_will_do = {
- base = 0
- modifier = { # Basic Filtering
- add = 100
- scope:recipient = {
- number_of_concubines < number_of_desired_concubines
- }
- scope:secondary_actor = {
- trigger_if = {
- limit = {
- allowed_to_marry_same_sex_trigger = no
- }
- sex_opposite_of = scope:recipient
- }
- fertility > 0.2
- age < 36
- NOR = {
- is_councillor_of = scope:actor
- is_of_major_interest_trigger = {
- CHARACTER = scope:actor
- }
- is_concubine_of = scope:actor
- }
- }
- }
- modifier = { # If secondary_actor is close to actor, a good character, or if actor should take them as concubine
- add = -100
- scope:secondary_actor = {
- 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_actor could be an agent...
- add = 25
- any_scheme = {
- scheme_target = scope:recipient
- save_temporary_scope_as = scheme_check
- }
- scope:secondary_actor = {
- is_valid_as_agent_in_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 its 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_actor = {
- fertility > 0.2
- age < 36
- 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_actor
- NOT = { is_attracted_to_gender_of = scope:secondary_actor }
- }
- }
- 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_actor }
- }
- }
- 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_actor
- }
- }
- modifier = { # Incest Filtering: Hard NO!
- factor = 0
- scope:recipient = {
- relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
- NOR = {
- accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
- 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_faith_trigger = { CHARACTER = scope:secondary_actor }
- OR = {
- accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
- 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_actor = { # 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
- }
- on_decline = {
- scope:actor = {
- send_interface_toast = {
- type = event_generic_neutral
- title = msg_concubine_offer_rejected_title
- right_icon = scope:recipient
- left_icon = scope:secondary_actor
- custom_tooltip = msg_concubine_offer_rejected
- }
- }
- }
- send_options_exclusive = no
- send_option = {
- is_valid = {
- scope:actor = {
- has_usable_hook = scope:recipient
- }
- }
- flag = hook
- localization = SCHEME_HOOK
- }
- should_use_extra_icon = {
- scope:actor = { has_usable_hook = scope:recipient }
- }
- extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds"
- }
- offer_concubine_managed_l = {
- category = interaction_category_diplomacy
- desc = offer_concubine_desc
- ai_targets = {
- ai_recipients = neighboring_rulers
- }
- ai_target_quick_trigger = {
- adult = yes
- }
- ai_frequency = 144
- greeting = positive
- notification_text = OFFER_CONCUBINE_NOTIFICATION
- #interface = concubine_list
- needs_recipient_to_open = yes
- populate_actor_list = {
- scope:actor = {
- every_courtier = {
- limit = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope: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:actor
- CHARACTER = scope:recipient
- }
- }
- add_to_list = characters
- }
- }
- }
- is_shown = {
- NOT = { scope:actor = scope:recipient }
- scope:actor = {
- faith = { has_doctrine = doctrine_concubine_managed_l }
- }
- scope:recipient = {
- allowed_concubines = yes
- is_adult = yes
- }
- }
- is_valid_showing_failures_only = {
- custom_description = {
- text = take_concubine_available_character_opp
- object = scope:recipient
- scope:actor = {
- OR = {
- any_courtier = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- any_prisoner = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- }
- }
- }
- custom_description = {
- text = take_concubine_allowed_more
- object = scope:recipient
- scope:recipient = {
- allowed_more_concubines = yes
- }
- }
- }
- can_be_picked = {
- is_adult = yes
- }
- can_send = {
- custom_description = {
- text = character_unavailable_to_be_offered_as_concubine
- object = scope:secondary_actor
- scope:secondary_actor = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- }
- }
- auto_accept = no
- ai_accept = {
- base = 50
- modifier = {
- add = {
- value = 50
- multiply = scope:secondary_actor.num_of_good_genetic_traits
- }
- scope:secondary_actor = {
- num_of_good_genetic_traits > 0
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_POSITIVE_TRAIT_REASON
- }
- modifier = {
- add = {
- value = 50
- }
- scope:secondary_actor = {
- is_lowborn = no
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_DYNASTY_PRESTIGE_REASON_NOBLE
- }
- modifier = {
- add = {
- value = -50
- multiply = scope:secondary_actor.num_of_bad_genetic_traits
- }
- scope:secondary_actor = {
- OR = {
- num_of_bad_genetic_traits > 0
- }
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_NEGATIVE_TRAIT_REASON
- }
- modifier = {
- add = {
- value = -50
- }
- scope:secondary_actor = {
- is_lowborn = yes
- num_of_good_genetic_traits = 0
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_DYNASTY_PRESTIGE_REASON_LOWBORN_NO_POSITIVE_TRAIT
- }
- opinion_modifier = { # Opinion of you
- who = scope:recipient
- opinion_target = scope:actor
- multiplier = 1.0
- desc = AI_OPINION_REASON
- }
- opinion_modifier = { # Opinion of concubine
- who = scope:recipient
- opinion_target = scope:secondary_actor
- multiplier = 0.25
- desc = AI_OPINION_REASON
- }
- compare_modifier = { # Recipient is reluctant to marry old women (procreation is a key factor)
- trigger = {
- scope:secondary_actor = {
- age > 29
- is_female = yes
- }
- }
- target = scope:secondary_actor
- 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_actor
- }
- 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_actor
- trigger_if = {
- limit = {
- NOT = {
- any_consort = {
- can_have_children_with = { CHARACTER = scope:recipient }
- fertility > 0.1
- }
- }
- }
- any_child = {
- is_player_heir_of_trigger = { CHARACTER = root }
- }
- }
- trigger_else = {
- always = no
- }
- }
- desc = AI_NO_FERTILITY_REASON
- }
- modifier = {
- add = 50
- scope:recipient = {
- is_attracted_to_gender_of = scope:secondary_actor
- }
- desc = AI_ATTRACTION_REASON
- }
- modifier = { # A Recipient is more likely to agree if you're their liege
- add = 40
- scope:recipient = {
- target_is_liege_or_above = scope:actor
- }
- desc = LIEGE_REASON
- }
- #More/Less likely based on difference in rank between actor and recipient
- modifier = {
- add = 20
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 1
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 30
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 2
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 40
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 3
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 50
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 4
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 60
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 5
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -20
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -1
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -30
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -2
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -40
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -3
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -50
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -4
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -60
- scope: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:actor
- has_dread_level_towards = {
- target = scope:actor
- level = 1
- }
- }
- desc = INTIMIDATED_REASON
- }
- modifier = {
- add = cowed_reason_value
- scope:recipient = {
- target_is_liege_or_above = scope:actor
- has_dread_level_towards = {
- target = scope:actor
- level = 2
- }
- }
- desc = COWED_REASON
- }
- modifier = {
- add = intimidated_external_reason_value
- scope:recipient = {
- NOT = { target_is_liege_or_above = scope:actor }
- has_dread_level_towards = {
- target = scope:actor
- level = 1
- }
- }
- desc = INTIMIDATED_REASON
- }
- modifier = {
- add = cowed_external_reason_value
- scope:recipient = {
- NOT = { target_is_liege_or_above = scope:actor }
- has_dread_level_towards = {
- target = scope:actor
- level = 2
- }
- }
- desc = COWED_REASON
- }
- modifier = {
- add = -250
- scope:secondary_actor = {
- has_std_trigger = yes
- }
- desc = AI_STD_REASON
- }
- modifier = {
- add = -250
- scope:secondary_actor = {
- has_epidemic_disease_trigger = yes
- }
- desc = AI_CONTAGIOUS_REASON
- }
- modifier = {
- add = -5000
- scope:secondary_actor = {
- fertility <= 0
- }
- desc = AI_FERTILITY_REASON
- }
- modifier = {
- scope:hook = yes
- add = 500
- scope:actor = { NOT = { has_strong_hook = scope:recipient } }
- desc = SCHEME_WEAK_HOOK_USED
- }
- modifier = {
- scope:hook = yes
- add = 1000
- scope:actor = { has_strong_hook = scope:recipient }
- desc = SCHEME_STRONG_HOOK_USED
- }
- }
- ai_potential = {
- is_adult = yes
- NOT = { has_trait = incapable }
- is_at_war = no
- NOR = {
- has_trait = greedy
- ai_greed > very_high_positive_ai_value
- }
- faith = { has_doctrine = doctrine_concubine_managed_l }
- }
- ai_will_do = {
- base = 0
- modifier = { # Basic Filtering
- add = 100
- scope:recipient = {
- number_of_concubines < number_of_desired_concubines
- }
- scope:secondary_actor = {
- trigger_if = {
- limit = {
- allowed_to_marry_same_sex_trigger = no
- }
- sex_opposite_of = scope:recipient
- }
- fertility > 0.2
- age < 36
- NOR = {
- is_councillor_of = scope:actor
- is_of_major_interest_trigger = {
- CHARACTER = scope:actor
- }
- is_concubine_of = scope:actor
- }
- }
- }
- modifier = { # If secondary_actor is close to actor, a good character, or if actor should take them as concubine
- add = -100
- scope:secondary_actor = {
- 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_actor could be an agent...
- add = 25
- any_scheme = {
- scheme_target = scope:recipient
- save_temporary_scope_as = scheme_check
- }
- scope:secondary_actor = {
- is_valid_as_agent_in_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 its 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_actor = {
- fertility > 0.2
- age < 36
- 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_actor
- NOT = { is_attracted_to_gender_of = scope:secondary_actor }
- }
- }
- 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_actor }
- }
- }
- 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_actor
- }
- }
- modifier = { # Incest Filtering: Hard NO!
- factor = 0
- scope:recipient = {
- relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
- NOR = {
- accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
- 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_faith_trigger = { CHARACTER = scope:secondary_actor }
- OR = {
- accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
- 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_actor = { # 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
- }
- on_decline = {
- scope:actor = {
- send_interface_toast = {
- type = event_generic_neutral
- title = msg_concubine_offer_rejected_title
- right_icon = scope:recipient
- left_icon = scope:secondary_actor
- custom_tooltip = msg_concubine_offer_rejected
- }
- }
- }
- send_options_exclusive = no
- send_option = {
- is_valid = {
- scope:actor = {
- has_usable_hook = scope:recipient
- }
- }
- flag = hook
- localization = SCHEME_HOOK
- }
- should_use_extra_icon = {
- scope:actor = { has_usable_hook = scope:recipient }
- }
- extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds"
- }
- offer_concubine_managed_m = {
- category = interaction_category_diplomacy
- desc = offer_concubine_desc
- ai_targets = {
- ai_recipients = neighboring_rulers
- }
- ai_target_quick_trigger = {
- adult = yes
- }
- ai_frequency = 144
- greeting = positive
- notification_text = OFFER_CONCUBINE_NOTIFICATION
- #interface = concubine_list
- needs_recipient_to_open = yes
- populate_actor_list = {
- scope:actor = {
- every_courtier = {
- limit = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope: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:actor
- CHARACTER = scope:recipient
- }
- }
- add_to_list = characters
- }
- }
- }
- is_shown = {
- NOT = { scope:actor = scope:recipient }
- scope:actor = {
- faith = { has_doctrine = doctrine_concubine_managed_m }
- }
- scope:recipient = {
- allowed_concubines = yes
- is_adult = yes
- }
- }
- is_valid_showing_failures_only = {
- custom_description = {
- text = take_concubine_available_character_opp
- object = scope:recipient
- scope:actor = {
- OR = {
- any_courtier = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- any_prisoner = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- }
- }
- }
- custom_description = {
- text = take_concubine_allowed_more
- object = scope:recipient
- scope:recipient = {
- allowed_more_concubines = yes
- }
- }
- }
- can_be_picked = {
- is_adult = yes
- }
- can_send = {
- custom_description = {
- text = character_unavailable_to_be_offered_as_concubine
- object = scope:secondary_actor
- scope:secondary_actor = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- }
- }
- auto_accept = no
- ai_accept = {
- base = 50
- modifier = {
- add = {
- value = 50
- multiply = scope:secondary_actor.num_of_good_genetic_traits
- }
- scope:secondary_actor = {
- num_of_good_genetic_traits > 0
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_POSITIVE_TRAIT_REASON
- }
- modifier = {
- add = {
- value = 50
- }
- scope:secondary_actor = {
- is_lowborn = no
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_DYNASTY_PRESTIGE_REASON_NOBLE
- }
- modifier = {
- add = {
- value = -50
- multiply = scope:secondary_actor.num_of_bad_genetic_traits
- }
- scope:secondary_actor = {
- OR = {
- num_of_bad_genetic_traits > 0
- }
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_NEGATIVE_TRAIT_REASON
- }
- modifier = {
- add = {
- value = -50
- }
- scope:secondary_actor = {
- is_lowborn = yes
- num_of_good_genetic_traits = 0
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_DYNASTY_PRESTIGE_REASON_LOWBORN_NO_POSITIVE_TRAIT
- }
- opinion_modifier = { # Opinion of you
- who = scope:recipient
- opinion_target = scope:actor
- multiplier = 1.0
- desc = AI_OPINION_REASON
- }
- opinion_modifier = { # Opinion of concubine
- who = scope:recipient
- opinion_target = scope:secondary_actor
- multiplier = 0.25
- desc = AI_OPINION_REASON
- }
- compare_modifier = { # Recipient is reluctant to marry old women (procreation is a key factor)
- trigger = {
- scope:secondary_actor = {
- age > 29
- is_female = yes
- }
- }
- target = scope:secondary_actor
- 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_actor
- }
- 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_actor
- trigger_if = {
- limit = {
- NOT = {
- any_consort = {
- can_have_children_with = { CHARACTER = scope:recipient }
- fertility > 0.1
- }
- }
- }
- any_child = {
- is_player_heir_of_trigger = { CHARACTER = root }
- }
- }
- trigger_else = {
- always = no
- }
- }
- desc = AI_NO_FERTILITY_REASON
- }
- modifier = {
- add = 50
- scope:recipient = {
- is_attracted_to_gender_of = scope:secondary_actor
- }
- desc = AI_ATTRACTION_REASON
- }
- modifier = { # A Recipient is more likely to agree if you're their liege
- add = 40
- scope:recipient = {
- target_is_liege_or_above = scope:actor
- }
- desc = LIEGE_REASON
- }
- #More/Less likely based on difference in rank between actor and recipient
- modifier = {
- add = 20
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 1
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 30
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 2
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 40
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 3
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 50
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 4
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 60
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 5
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -20
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -1
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -30
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -2
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -40
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -3
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -50
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -4
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -60
- scope: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:actor
- has_dread_level_towards = {
- target = scope:actor
- level = 1
- }
- }
- desc = INTIMIDATED_REASON
- }
- modifier = {
- add = cowed_reason_value
- scope:recipient = {
- target_is_liege_or_above = scope:actor
- has_dread_level_towards = {
- target = scope:actor
- level = 2
- }
- }
- desc = COWED_REASON
- }
- modifier = {
- add = intimidated_external_reason_value
- scope:recipient = {
- NOT = { target_is_liege_or_above = scope:actor }
- has_dread_level_towards = {
- target = scope:actor
- level = 1
- }
- }
- desc = INTIMIDATED_REASON
- }
- modifier = {
- add = cowed_external_reason_value
- scope:recipient = {
- NOT = { target_is_liege_or_above = scope:actor }
- has_dread_level_towards = {
- target = scope:actor
- level = 2
- }
- }
- desc = COWED_REASON
- }
- modifier = {
- add = -250
- scope:secondary_actor = {
- has_std_trigger = yes
- }
- desc = AI_STD_REASON
- }
- modifier = {
- add = -250
- scope:secondary_actor = {
- has_epidemic_disease_trigger = yes
- }
- desc = AI_CONTAGIOUS_REASON
- }
- modifier = {
- add = -5000
- scope:secondary_actor = {
- fertility <= 0
- }
- desc = AI_FERTILITY_REASON
- }
- modifier = {
- scope:hook = yes
- add = 500
- scope:actor = { NOT = { has_strong_hook = scope:recipient } }
- desc = SCHEME_WEAK_HOOK_USED
- }
- modifier = {
- scope:hook = yes
- add = 1000
- scope:actor = { has_strong_hook = scope:recipient }
- desc = SCHEME_STRONG_HOOK_USED
- }
- }
- ai_potential = {
- is_adult = yes
- NOT = { has_trait = incapable }
- is_at_war = no
- NOR = {
- has_trait = greedy
- ai_greed > very_high_positive_ai_value
- }
- faith = { has_doctrine = doctrine_concubine_managed_m }
- }
- ai_will_do = {
- base = 0
- modifier = { # Basic Filtering
- add = 100
- scope:recipient = {
- number_of_concubines < number_of_desired_concubines
- }
- scope:secondary_actor = {
- trigger_if = {
- limit = {
- allowed_to_marry_same_sex_trigger = no
- }
- sex_opposite_of = scope:recipient
- }
- fertility > 0.2
- age < 36
- NOR = {
- is_councillor_of = scope:actor
- is_of_major_interest_trigger = {
- CHARACTER = scope:actor
- }
- is_concubine_of = scope:actor
- }
- }
- }
- modifier = { # If secondary_actor is close to actor, a good character, or if actor should take them as concubine
- add = -100
- scope:secondary_actor = {
- 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_actor could be an agent...
- add = 25
- any_scheme = {
- scheme_target = scope:recipient
- save_temporary_scope_as = scheme_check
- }
- scope:secondary_actor = {
- is_valid_as_agent_in_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 its 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_actor = {
- fertility > 0.2
- age < 36
- 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_actor
- NOT = { is_attracted_to_gender_of = scope:secondary_actor }
- }
- }
- 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_actor }
- }
- }
- 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_actor
- }
- }
- modifier = { # Incest Filtering: Hard NO!
- factor = 0
- scope:recipient = {
- relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
- NOR = {
- accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
- 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_faith_trigger = { CHARACTER = scope:secondary_actor }
- OR = {
- accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
- 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_actor = { # 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
- }
- on_decline = {
- scope:actor = {
- send_interface_toast = {
- type = event_generic_neutral
- title = msg_concubine_offer_rejected_title
- right_icon = scope:recipient
- left_icon = scope:secondary_actor
- custom_tooltip = msg_concubine_offer_rejected
- }
- }
- }
- send_options_exclusive = no
- send_option = {
- is_valid = {
- scope:actor = {
- has_usable_hook = scope:recipient
- }
- }
- flag = hook
- localization = SCHEME_HOOK
- }
- should_use_extra_icon = {
- scope:actor = { has_usable_hook = scope:recipient }
- }
- extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds"
- }
- offer_concubine_managed_s = {
- category = interaction_category_diplomacy
- desc = offer_concubine_desc
- ai_targets = {
- ai_recipients = neighboring_rulers
- }
- ai_target_quick_trigger = {
- adult = yes
- }
- ai_frequency = 144
- greeting = positive
- notification_text = OFFER_CONCUBINE_NOTIFICATION
- #interface = concubine_list
- needs_recipient_to_open = yes
- populate_actor_list = {
- scope:actor = {
- every_courtier = {
- limit = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope: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:actor
- CHARACTER = scope:recipient
- }
- }
- add_to_list = characters
- }
- }
- }
- is_shown = {
- NOT = { scope:actor = scope:recipient }
- scope:actor = {
- faith = { has_doctrine = doctrine_concubine_managed_s }
- }
- scope:recipient = {
- allowed_concubines = yes
- is_adult = yes
- }
- }
- is_valid_showing_failures_only = {
- custom_description = {
- text = take_concubine_available_character_opp
- object = scope:recipient
- scope:actor = {
- OR = {
- any_courtier = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- any_prisoner = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- }
- }
- }
- custom_description = {
- text = take_concubine_allowed_more
- object = scope:recipient
- scope:recipient = {
- allowed_more_concubines = yes
- }
- }
- }
- can_be_picked = {
- is_adult = yes
- }
- can_send = {
- custom_description = {
- text = character_unavailable_to_be_offered_as_concubine
- object = scope:secondary_actor
- scope:secondary_actor = {
- can_be_offered_as_concubine_to_character_trigger = {
- GIVER = scope:actor
- CHARACTER = scope:recipient
- }
- }
- }
- }
- auto_accept = no
- ai_accept = {
- base = 50
- modifier = {
- add = {
- value = 50
- multiply = scope:secondary_actor.num_of_good_genetic_traits
- }
- scope:secondary_actor = {
- num_of_good_genetic_traits > 0
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_POSITIVE_TRAIT_REASON
- }
- modifier = {
- add = {
- value = 50
- }
- scope:secondary_actor = {
- is_lowborn = no
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_DYNASTY_PRESTIGE_REASON_NOBLE
- }
- modifier = {
- add = {
- value = -50
- multiply = scope:secondary_actor.num_of_bad_genetic_traits
- }
- scope:secondary_actor = {
- OR = {
- num_of_bad_genetic_traits > 0
- }
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_NEGATIVE_TRAIT_REASON
- }
- modifier = {
- add = {
- value = -50
- }
- scope:secondary_actor = {
- is_lowborn = yes
- num_of_good_genetic_traits = 0
- trigger_if = {
- limit = {
- is_female = yes
- }
- age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
- }
- }
- desc = AI_DYNASTY_PRESTIGE_REASON_LOWBORN_NO_POSITIVE_TRAIT
- }
- opinion_modifier = { # Opinion of you
- who = scope:recipient
- opinion_target = scope:actor
- multiplier = 1.0
- desc = AI_OPINION_REASON
- }
- opinion_modifier = { # Opinion of concubine
- who = scope:recipient
- opinion_target = scope:secondary_actor
- multiplier = 0.25
- desc = AI_OPINION_REASON
- }
- compare_modifier = { # Recipient is reluctant to marry old women (procreation is a key factor)
- trigger = {
- scope:secondary_actor = {
- age > 29
- is_female = yes
- }
- }
- target = scope:secondary_actor
- 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_actor
- }
- 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_actor
- trigger_if = {
- limit = {
- NOT = {
- any_consort = {
- can_have_children_with = { CHARACTER = scope:recipient }
- fertility > 0.1
- }
- }
- }
- any_child = {
- is_player_heir_of_trigger = { CHARACTER = root }
- }
- }
- trigger_else = {
- always = no
- }
- }
- desc = AI_NO_FERTILITY_REASON
- }
- modifier = {
- add = 50
- scope:recipient = {
- is_attracted_to_gender_of = scope:secondary_actor
- }
- desc = AI_ATTRACTION_REASON
- }
- modifier = { # A Recipient is more likely to agree if you're their liege
- add = 40
- scope:recipient = {
- target_is_liege_or_above = scope:actor
- }
- desc = LIEGE_REASON
- }
- #More/Less likely based on difference in rank between actor and recipient
- modifier = {
- add = 20
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 1
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 30
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 2
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 40
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 3
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 50
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 4
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = 60
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = 5
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -20
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -1
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -30
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -2
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -40
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -3
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -50
- scope:actor = {
- tier_difference = {
- target = scope:recipient
- value = -4
- }
- }
- desc = AI_RANK_DIFF
- }
- modifier = {
- add = -60
- scope: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:actor
- has_dread_level_towards = {
- target = scope:actor
- level = 1
- }
- }
- desc = INTIMIDATED_REASON
- }
- modifier = {
- add = cowed_reason_value
- scope:recipient = {
- target_is_liege_or_above = scope:actor
- has_dread_level_towards = {
- target = scope:actor
- level = 2
- }
- }
- desc = COWED_REASON
- }
- modifier = {
- add = intimidated_external_reason_value
- scope:recipient = {
- NOT = { target_is_liege_or_above = scope:actor }
- has_dread_level_towards = {
- target = scope:actor
- level = 1
- }
- }
- desc = INTIMIDATED_REASON
- }
- modifier = {
- add = cowed_external_reason_value
- scope:recipient = {
- NOT = { target_is_liege_or_above = scope:actor }
- has_dread_level_towards = {
- target = scope:actor
- level = 2
- }
- }
- desc = COWED_REASON
- }
- modifier = {
- add = -250
- scope:secondary_actor = {
- has_std_trigger = yes
- }
- desc = AI_STD_REASON
- }
- modifier = {
- add = -250
- scope:secondary_actor = {
- has_epidemic_disease_trigger = yes
- }
- desc = AI_CONTAGIOUS_REASON
- }
- modifier = {
- add = -5000
- scope:secondary_actor = {
- fertility <= 0
- }
- desc = AI_FERTILITY_REASON
- }
- modifier = {
- scope:hook = yes
- add = 500
- scope:actor = { NOT = { has_strong_hook = scope:recipient } }
- desc = SCHEME_WEAK_HOOK_USED
- }
- modifier = {
- scope:hook = yes
- add = 1000
- scope:actor = { has_strong_hook = scope:recipient }
- desc = SCHEME_STRONG_HOOK_USED
- }
- }
- ai_potential = {
- is_adult = yes
- NOT = { has_trait = incapable }
- is_at_war = no
- NOR = {
- has_trait = greedy
- ai_greed > very_high_positive_ai_value
- }
- faith = { has_doctrine = doctrine_concubine_managed_s }
- }
- ai_will_do = {
- base = 0
- modifier = { # Basic Filtering
- add = 100
- scope:recipient = {
- number_of_concubines < number_of_desired_concubines
- }
- scope:secondary_actor = {
- trigger_if = {
- limit = {
- allowed_to_marry_same_sex_trigger = no
- }
- sex_opposite_of = scope:recipient
- }
- fertility > 0.2
- age < 36
- NOR = {
- is_councillor_of = scope:actor
- is_of_major_interest_trigger = {
- CHARACTER = scope:actor
- }
- is_concubine_of = scope:actor
- }
- }
- }
- modifier = { # If secondary_actor is close to actor, a good character, or if actor should take them as concubine
- add = -100
- scope:secondary_actor = {
- 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_actor could be an agent...
- add = 25
- any_scheme = {
- scheme_target = scope:recipient
- save_temporary_scope_as = scheme_check
- }
- scope:secondary_actor = {
- is_valid_as_agent_in_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 its 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_actor = {
- fertility > 0.2
- age < 36
- 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_actor
- NOT = { is_attracted_to_gender_of = scope:secondary_actor }
- }
- }
- 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_actor }
- }
- }
- 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_actor
- }
- }
- modifier = { # Incest Filtering: Hard NO!
- factor = 0
- scope:recipient = {
- relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
- NOR = {
- accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
- 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_faith_trigger = { CHARACTER = scope:secondary_actor }
- OR = {
- accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
- 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_actor = { # 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
- }
- on_decline = {
- scope:actor = {
- send_interface_toast = {
- type = event_generic_neutral
- title = msg_concubine_offer_rejected_title
- right_icon = scope:recipient
- left_icon = scope:secondary_actor
- custom_tooltip = msg_concubine_offer_rejected
- }
- }
- }
- send_options_exclusive = no
- send_option = {
- is_valid = {
- scope:actor = {
- has_usable_hook = scope:recipient
- }
- }
- flag = hook
- localization = SCHEME_HOOK
- }
- should_use_extra_icon = {
- scope:actor = { has_usable_hook = scope:recipient }
- }
- extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement