diff --git a/common/activities/activity_types/camp_party.txt b/common/activities/activity_types/camp_party.txt new file mode 100644 index 00000000..caa94110 --- /dev/null +++ b/common/activities/activity_types/camp_party.txt @@ -0,0 +1,887 @@ +activity_camp_party = { + is_shown = { + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + is_adult = yes + #Every other activity must be blocked until an uncrowned AI crowns themselves + trigger_if = { + limit = { + is_ai = yes + } + NOT = { + has_realm_law = uncrowned + } + } + } + + can_start_showing_failures_only = { + NOT = { is_activity_type_on_cooldown = activity_camp_party } + is_available = yes + age >= 16 + } + + is_valid = { + scope:host = { + is_alive = yes + is_imprisoned = no + has_government = landless_adventurer_government + NOT = { is_incapable = yes } + } + } + + on_invalidated = { + # Host becomes incapable + if = { + limit = { + scope:host = { is_incapable = yes } + } + scope:activity = { + activity_type = { save_scope_as = activity_type } + } + scope:host = { + trigger_event = activity_system.0330 + } + every_attending_character = { + limit = { this != scope:host } + trigger_event = activity_system.0331 + } + } + } + + province_filter = domicile_domain + ai_province_filter = domicile_domain + + max_province_icons = 1 + allow_zero_guest_invites = no + open_invite = no + + province_description = { + desc = activity_camp_party_province_desc + } + + province_score = { + add = camp_party_province_reference_value + } + + cost = { + gold = { + add = { + add = { + value = standard_camp_party_activity_cost + desc = hunt_base_cost + } + if = { + limit = { + has_character_modifier = journey_communal_modifier + } + multiply = { + value = 0.8 + desc = journey_communal_modifier + } + } + } + } + } + + ui_predicted_cost = { + gold = { + # Base Cost + value = standard_camp_party_activity_cost + # Make it a multiple of 5 (rounded up) + divide = 5 + ceiling = yes + multiply = 5 + } + } + + cooldown = { years = standard_camp_party_cooldown_time } + + ################### + # PHASES AND OPTIONS + ################### + + phases = { + phase_camp_party = { + is_predefined = yes + location_source = pickable + + ai_will_do = { + value = 0 + add = { + value = 30 + desc = "Base test value" + } + } + + on_phase_active = { + if = { + limit = { this = scope:host } + + scope:host = { + trigger_event = { + id = ep3_camp_party.0009 + days = 89 + } + } + + scope:activity = { + #Phase progression + progress_activity_phase_after = { days = 90 } + #Loc + activity_location = { save_scope_as = location } + } + #Arrival event + trigger_event = ep3_camp_party.0001 + } + } + + on_monthly_pulse = { + if = { + limit = { this = scope:host } + trigger_event = { on_action = camp_party_destination_events } + } + } + } + } + + options = { + #Food options: upgrades locked behind Supply Tent + camp_party_option_food = { + camp_party_food_none = { #Default + default = yes + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_cheap_expense_value + # Quantity preference. + add = activity_option_food_prefers_small_volume_value + } + } + camp_party_food_simple = { #locked behind Supply Tent + is_shown = { always = yes } + + is_valid = { + custom_tooltip = { + text = camp_party_food_options_invalid + domicile ?= { + has_domicile_parameter = camp_unlocks_camp_party_food_option + } + } + } + + cost = { + gold = { + add = { + desc = camp_party_food_simple + add = { + value = 5 + desc = camp_party_food_simple + } + add = { + value = 5 + multiply = activity_cost_scale_by_tier + subtract = 5 + desc = activity_cost_scale_by_tier_desc + } + add = { + value = 5 + multiply = activity_cost_scale_by_era + subtract = 5 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = 5 + add = { + value = 5 + multiply = activity_cost_scale_by_tier + subtract = 5 + } + add = { + value = 5 + multiply = activity_cost_scale_by_era + subtract = 5 + } + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + min = 0 + } + } + } + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_middling_expense_value + # Quantity preference. + ## We just use slightly reduced quantity prefs here. + add = { + value = activity_option_prefers_large_volume_value + multiply = 0.3 + } + } + } + camp_party_food_lavish = { + is_shown = { always = yes } + + is_valid = { + custom_tooltip = { + text = camp_party_food_options_invalid + domicile ?= { + has_domicile_parameter = camp_unlocks_camp_party_food_option + } + } + } + + cost = { + gold = { + add = { + desc = camp_party_food_lavish + add = { + value = 15 + desc = camp_party_food_lavish + } + add = { + value = 15 + multiply = activity_cost_scale_by_tier + subtract = 15 + desc = activity_cost_scale_by_tier_desc + } + add = { + value = 15 + multiply = activity_cost_scale_by_era + subtract = 15 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = 15 + add = { + value = 15 + multiply = activity_cost_scale_by_tier + subtract = 15 + } + add = { + value = 15 + multiply = activity_cost_scale_by_era + subtract = 15 + } + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + min = 0 + } + } + } + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_middling_expense_value + # Quantity preference. + ## We just use slightly reduced quantity prefs here. + add = { + value = activity_option_prefers_large_volume_value + multiply = 0.6 + } + } + } + } + #Drinks options: upgrades locked behind Mess Tent & Mobile Brewery + camp_party_option_drinks = { + camp_party_drinks_none = { #Default + default = yes + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_cheap_expense_value + # Quantity preference. + add = activity_option_food_prefers_small_volume_value + } + } + camp_party_drinks_adequate = { #locked behind Mess Tent + is_shown = { always = yes } + + is_valid = { + custom_tooltip = { + text = camp_party_drinks_adequate_invalid + domicile ?= { + has_domicile_building_or_higher = mess_tent_01 + } + } + } + + cost = { + gold = { + add = { + desc = camp_party_drinks_adequate + add = { + value = 10 + desc = camp_party_drinks_adequate + } + add = { + value = 10 + multiply = activity_cost_scale_by_tier + subtract = 10 + desc = activity_cost_scale_by_tier_desc + } + add = { + value = 10 + multiply = activity_cost_scale_by_era + subtract = 10 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = 10 + add = { + value = 10 + multiply = activity_cost_scale_by_tier + subtract = 10 + } + add = { + value = 10 + multiply = activity_cost_scale_by_era + subtract = 10 + } + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + min = 0 + } + } + } + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_middling_expense_value + # Quantity preference. + ## We just use slightly reduced quantity prefs here. + add = { + value = activity_option_prefers_large_volume_value + multiply = 0.3 + } + } + } + camp_party_drinks_abundant = { #locked behind Mobile Brewery + is_shown = { always = yes } + + is_valid = { + custom_tooltip = { + text = camp_party_drinks_abundant_invalid + domicile ?= { + has_domicile_building_or_higher = mess_tent_brewers + } + } + } + + cost = { + gold = { + add = { + desc = camp_party_drinks_abundant + add = { + value = 20 + desc = camp_party_drinks_abundant + } + add = { + value = 20 + multiply = activity_cost_scale_by_tier + subtract = 20 + desc = activity_cost_scale_by_tier_desc + } + add = { + value = 20 + multiply = activity_cost_scale_by_era + subtract = 20 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = 35 + add = { + value = 35 + multiply = activity_cost_scale_by_tier + subtract = 35 + } + add = { + value = 35 + multiply = activity_cost_scale_by_era + subtract = 35 + } + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + min = 0 + } + } + } + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_middling_expense_value + # Quantity preference. + ## We just use slightly reduced quantity prefs here. + add = { + value = activity_option_prefers_large_volume_value + multiply = 0.6 + } + } + } + } + } + + max_guest_arrival_delay_time = { weeks = 1 } + + ################### + # ACTIVITY-SPECIFIC PULSES + ################### + + pulse_actions = { + entries = { + apa_bonded_by_fire + apa_taught_repair + apa_revelry_hangover_camp + apa_local_food_camp + apa_lauded_food_camp + apa_guest_of_honor_impressed + apa_cultural_acceptance + apa_camp_host_gifted + apa_fireside_chat_shared_stories_martial + apa_fireside_chat_shared_stories_learning + apa_fireside_chat_shared_stories_diplomacy + apa_fireside_chat_shared_stories_stewardship + apa_fireside_chat_shared_stories_intrigue + apa_fireside_chat_shared_drinks + apa_fireside_chat_inspiring_speech + apa_camp_party_sad_lonesome + apa_camp_party_shadows_in_the_dark + apa_camp_party_fortress_of_solitude + apa_camp_party_lecture + apa_camp_party_tales_of_distant_lands + apa_camp_party_tales_of_war + apa_camp_party_tales_of_lands_lost + apa_camp_party_blademaster_sparring + apa_camp_party_tales_of_piety + + #Re-used + host_gains_diplo_xp + host_gains_intrigue_xp + hook_trusting_guest + } + chance_of_no_event = 2 + } + + on_start = { + scope:activity ?= { + activity_setup_special_type_progression_effect = yes + if = { + limit = { + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_simple + } + } + activity_special_type_progression_variable = { NUM = 25 } + } + else_if = { + limit = { + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_lavish + } + } + activity_special_type_progression_variable = { NUM = 50 } + } + } + } + + ################### + # AI VALUES + ################### + + # desc is only shown in debug AI watch window + ai_will_do = { + value = 50 + + if = { + limit = { + has_trait = lazy + } + add = -10 + } + + #Can you actually afford this? + if = { + limit = { + domicile.provisions <= 100 + } + add = -75 + } + } + + ai_check_interval = 60 + + ai_will_select_province = { + value = 10 + } + + ################### + # GUEST HANDLING + ################### + + host_intents = { + default = reduce_stress_intent + intents = { reduce_stress_intent befriend_attendee_intent fireside_chat_intent } + } + + guest_intents = { + intents = { reduce_stress_intent befriend_attendee_intent } + default = reduce_stress_intent + } + + can_be_activity_guest = { + OR = { #Follower + AND = { + is_healthy = yes + is_available = yes + age >= 16 + is_ai = yes + liege = scope:host + location = scope:host.location + } + AND = { #Local lord + is_healthy = yes + is_available = yes + age >= 16 + is_ai = yes + top_liege = this + location = scope:host.location + } + } + } + + guest_invite_rules = { + defaults = { + 1 = activity_invite_rule_followers + 2 = activity_invite_rule_local_lord + 2 = activity_invite_rule_friends + 2 = activity_invite_rule_potential_friends + 2 = activity_invite_rule_lovers + 2 = activity_invite_rule_potential_lovers + } + } + + special_guests = { + camp_party_honorary_guest = { + is_required = no + + can_pick = { + this != scope:host + is_healthy = yes + is_available = yes + age >= 16 + is_ai = yes + top_liege = this + location = scope:host.location + } + + ai_will_do = { + value = 10 + } + } + } + + travel_entourage_selection = { + weight = { + value = 10 + if = { + limit = { + NOT = { is_in_list = special_guests } + } + multiply = 0 + } + } + + invite_rule_order = 1 + + # Up to how many characters to select for a player + max = 2 + + # Up to how many characters to select for an AI + ai_max = 2 + } + + max_guests = 50 #Theoretically everyone, practically only around 2-10 usually + + guest_join_chance = { + base = 50 #Everyone should accept, but... + base_activity_modifier = yes + + # Scripted Modifiers + activity_guest_shared_ai_accept_modifier = yes + + modifier = { + is_courtier_of = scope:host + scope:host = { + has_government = landless_adventurer_government + } + add = 100 + desc = ACTIVITY_GUEST_ADVENTURER_REASON + } + + modifier = { #Emperors + primary_title.tier = tier_empire + add = -100 + desc = ACTIVITY_GUEST_LANDLESS_REASON + } + modifier = { #Kings + primary_title.tier = tier_kingdom + add = -75 + desc = ACTIVITY_GUEST_LANDLESS_REASON + } + modifier = { #Dukes + primary_title.tier = tier_duchy + add = -50 + desc = ACTIVITY_GUEST_LANDLESS_REASON + } + modifier = { #Counts + primary_title.tier = tier_county + add = -25 + desc = ACTIVITY_GUEST_LANDLESS_REASON + } + modifier = { #Barons + primary_title.tier = tier_barony + add = -5 + desc = ACTIVITY_GUEST_LANDLESS_REASON + } + } + + ################### + # GRAPHICS + ################### + + #Backgrounds mostly not needed here + background = { #Campfire + trigger = { + scope:host.location = scope:activity.activity_location + } + texture = "gfx/interface/illustrations/event_scenes/ep3_campfire.dds" + environment = "environment_event_bp1_bonfire" + ambience = "event:/SFX/Events/Backgrounds/burning_building" + } + + ### Plug in widgets + activity_window_widgets = { + activity_special_type_progression = "activity_plugin_widgets_summary" + } + + window_characters = { + guest = { + camera = camera_body_right + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + } + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + always = yes + } + animation = { drink_goblet happiness flirtation throne_room_conversation_3 throne_room_conversation_1 instrument_idle alto_flute_active } + } + } + } + + #Guest of Honor + guest = { + camera = camera_body + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + any_attending_character = { + this = scope:activity.special_guest:camp_party_honorary_guest + location = scope:activity.activity_location + } + } + every_attending_character = { + limit = { + this = scope:activity.special_guest:camp_party_honorary_guest + location = scope:activity.activity_location + } + add_to_list = characters + } + } + else = { + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + } + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:character = { has_trait = shy } + } + animation = { worry stress boredom fear disbelief paranoia eyeroll drink drink_goblet } + } + triggered_animation = { + trigger = { + scope:character = { + NOT = { has_trait = shy } + } + } + animation = { ecstasy wedding_priest chaplain personality_honorable personality_bold hero_flex } + } + #Fallback + animation = toast_goblet + } + } + + host = { + camera = camera_body + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + scope:host = { + add_to_list = characters + } + } + } + scripted_animation = { + triggered_animation = { + trigger = { + always = yes + } + animation = { toast_goblet toast lute_active } + } + } + } + + guest = { + camera = camera_body + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + } + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:character = { has_trait = shy } + } + animation = { worry stress boredom fear disbelief paranoia eyeroll drink drink_goblet } + } + triggered_animation = { + trigger = { + scope:character = { + NOT = { has_trait = shy } + } + } + animation = { dancing laugh throne_room_conversation_2 } + } + #Fallback + animation = toast + } + } + + guest = { + camera = camera_body_left + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + } + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:character = { has_trait = shy } + } + animation = { worry stress boredom fear disbelief paranoia eyeroll drink drink_goblet } + } + triggered_animation = { + trigger = { + scope:character = { + NOT = { has_trait = shy } + } + } + animation = { drink eavesdrop wedding_drunk instrument_active } + } + #Fallback + animation = toast + } + } + } +} diff --git a/common/activities/activity_types/feast.txt b/common/activities/activity_types/feast.txt new file mode 100644 index 00000000..f28d08e0 --- /dev/null +++ b/common/activities/activity_types/feast.txt @@ -0,0 +1,4927 @@ +@weight_up_ai_select_province_small = 10 +@weight_up_ai_select_province_medium = 50 +@weight_up_ai_select_province_large = 250 +@weight_up_ai_select_province_massive = 500 + +@feast_cost_gold_low = tiny_gold_value +@feast_cost_gold_medium = medium_gold_value +@feast_cost_gold_high = major_gold_value + +activity_feast = { + is_shown = { + is_landed_or_landless_administrative = yes + highest_held_title_tier > tier_barony + trigger_if = { + limit = { + is_ai = yes + NOT = { has_character_flag = feast_ai_override } + } + years_from_game_start >= 3 + ai_should_focus_on_building_in_their_capital = no + is_at_war = no + OR = { + has_character_flag = feasts_a_lot + short_term_gold >= feast_activity_cost + AND = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + short_term_treasury >= feast_activity_cost + } + } + trigger_if = { # Throttle Counts + limit = { + highest_held_title_tier = tier_county + NOR = { + has_government = japan_administrative_government + has_government = japan_feudal_government + } + } + ai_sociability >= 100 + } + } + #Every other activity must be blocked until an uncrowned AI crowns themselves + trigger_if = { + limit = { + is_ai = yes + } + NOT = { + has_realm_law = uncrowned + } + } + } + + can_start_showing_failures_only = { + NOT = { is_activity_type_on_cooldown = activity_feast } + trigger_if = { + limit = { + OR = { + is_ai = no + NOT = { has_character_flag = feast_ai_override } + } + } + is_available_adult = yes + } + } + + is_valid = { + scope:host = { + is_alive = yes + is_capable_adult = yes + is_imprisoned = no + is_landed_or_landless_administrative = yes + NOT = { is_incapable = yes } + } + # If no one shows up + trigger_if = { + limit = { + is_current_phase_active = yes + } + has_attending_activity_guests = yes + } + } + + on_host_death = { + every_attending_character = { + limit = { is_alive = yes } + trigger_event = { + id = feast.5003 + days = 1 # So you don't get spammed + } + } + # Code sends your entourage home on invalidated + scope:activity.var:host_var = { + # Saving the title for loc + primary_title = { save_scope_as = host_title } + # Inform your heir if you have one + player_heir ?= { + trigger_event = { + id = feast.0800 + days = 1 + } + } + } + } + + on_invalidated = { + if = { + limit = { + scope:host = { is_imprisoned = yes } + } + #Host has been imprisoned + every_attending_character = { + limit = { + this != scope:host + } + trigger_event = feast.5005 + } + scope:host = { trigger_event = feast.5004 } + } + else_if = { #Invalidation for your Murder Target not showing up + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = feast_type_murder + } + exists = special_guest:honorary_guest + } + scope:activity = { #theyre not attending + any_attending_character = { + this != scope:activity.special_guest:honorary_guest + } + } + scope:activity.special_guest:honorary_guest = { is_alive = yes } #but they're alive + scope:host = { #and you didn't back down/fail + NOR = { + has_variable = murder_feast_murder_back_down + has_variable = murder_feast_murder_failure_var + } + } + } + activity_host = { trigger_event = feast.2020 } + every_attending_character = { + limit = { + this != scope:host + } + trigger_event = feast.2021 + } + } + else_if = { #Invalidation for your Murder Target dying before you kill them + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = feast_type_murder + } + } + scope:activity.special_guest:honorary_guest = { + is_alive = no + scope:host = { has_variable = murder_feast_killed_var } + } + } + activity_host = { trigger_event = feast.2010 } + every_attending_character = { + limit = { + this != scope:host + } + trigger_event = feast.2011 + } + } + if = { + limit = { + scope:host = { is_incapable = yes } + } + scope:activity = { + activity_type = { save_scope_as = activity_type } + } + scope:host = { + trigger_event = activity_system.0330 + } + every_attending_character = { + limit = { this != scope:host } + trigger_event = activity_system.0331 + } + } + if = { # No one shows up + limit = { + has_attending_activity_guests = no + } + scope:activity = { + activity_type = { save_scope_as = activity_type } + activity_location = { save_scope_as = location } + } + scope:host = { trigger_event = feast.2003 } + } + # Accolade stuff + if = { + limit = { + any_attending_character = { + has_character_modifier = accolade_charmer_party_modifier + } + } + every_attending_character = { + limit = { + has_character_modifier = accolade_charmer_party_modifier + } + remove_character_modifier = accolade_charmer_party_modifier + } + } + if = { + limit = { + any_attending_character = { + has_character_modifier = accolade_charmer_party_high_modifier + } + } + every_attending_character = { + limit = { + has_character_modifier = accolade_charmer_party_high_modifier + } + remove_character_modifier = accolade_charmer_party_high_modifier + } + } + # Host becomes unlanded + if = { + limit = { + scope:host = { + is_landed_or_landless_administrative = no + } + } + scope:activity = { + activity_type = { save_scope_as = activity_type } + } + every_attending_character = { + trigger_event = activity_system.0320 + } + } + } + + ################### + # PARAMETERS + ################### + + is_single_location = yes + + province_filter = domicile_domain + ai_province_filter = capital + + max_route_deviation_mult = 2.0 + + is_location_valid = { + has_holding = yes + } + + province_description = { + desc = activity_feast_province_desc + # +++ / triple plus good + triggered_desc = { + trigger = { has_building_or_higher = citadel_of_aleppo_01 } + desc = activity_feast_province_desc_citadel_of_aleppo + } + triggered_desc = { + trigger = { has_building_or_higher = palace_of_aachen_01 } + desc = activity_feast_province_desc_palace_of_aachen + } + triggered_desc = { + trigger = { has_building_or_higher = doges_palace_01 } + desc = activity_feast_province_desc_doges_palace + } + triggered_desc = { + trigger = { has_building_or_higher = ghana_palace_01 } + desc = activity_feast_province_desc_ghana_palace_01 + } + triggered_desc = { + trigger = { has_building_or_higher = kyz_kala_01 } + desc = activity_feast_province_desc_kyz_kala_01 + } + triggered_desc = { + trigger = { has_building_or_higher = leisure_palace_01 } + desc = activity_feast_province_desc_leisure_palace + } + triggered_desc = { + trigger = { has_building_or_higher = alhambra_01 } + desc = activity_feast_province_desc_alhambra + } + # ++ / double plus good + triggered_desc = { + trigger = { has_building_or_higher = paddy_fields_01 } + desc = activity_feast_province_desc_paddy_fields + } + # + / plus good + triggered_desc = { + trigger = { has_building_or_higher = longhouses_01 } + desc = activity_feast_province_desc_longhouses + } + triggered_desc = { + trigger = { has_building_or_higher = orchards_01 } + desc = activity_feast_province_desc_orchards + } + triggered_desc = { + trigger = { has_building_or_higher = cereal_fields_01 } + desc = activity_feast_province_desc_cereal_fields + } + triggered_desc = { + trigger = { has_building_or_higher = plantations_01 } + desc = activity_feast_province_desc_plantations + } + triggered_desc = { + trigger = { has_building_or_higher = pleasure_dome } + desc = activity_feast_province_desc_pleasure_dome + } + } + + max_province_icons = 5 + + province_score = { + value = 0 + # BUILDINGS + # Triple good / +++ + if = { + limit = { has_building_or_higher = citadel_of_aleppo_01 } + add = 100 + } + if = { + limit = { has_building_or_higher = palace_of_aachen_01 } + add = 100 + } + if = { + limit = { has_building_or_higher = doges_palace_01 } + add = 100 + } + if = { + limit = { has_building_or_higher = ghana_palace_01 } + add = 100 + } + if = { + limit = { has_building_or_higher = kyz_kala_01 } + add = 100 + } + if = { + limit = { has_building_or_higher = leisure_palace_01 } + add = 100 + } + if = { + limit = { has_building_or_higher = alhambra_01 } + add = 100 + } + if = { + limit = { has_building_or_higher = pleasure_dome } + add = 100 + } + # Double good / ++ + if = { + limit = { has_building_or_higher = farm_estates_01 } + add = 50 + } + if = { + limit = { has_building_or_higher = paddy_fields_01 } + add = 50 + } + # Good / + + if = { + limit = { has_building_or_higher = longhouses_01 } + add = 25 + } + if = { + limit = { has_building_or_higher = orchards_01 } + add = 25 + } + if = { + limit = { has_building_or_higher = cereal_fields_01 } + add = 25 + } + if = { + limit = { has_building_or_higher = plantations_01 } + add = 25 + } + } + + cooldown = { years = standard_feast_cooldown_time } + + # desc is only shown in debug AI watch window + ai_will_do = { + add = { + value = 30 + desc = "Base" + } + add = { + value = ai_greed + multiply = -0.25 + desc = "ai_greed" + } + add = { + value = ai_sociability + multiply = 0.5 + desc = "ai_sociability" + } + if = { + limit = { + ai_energy < 0 + } + add = { + add = ai_energy + desc = "ai_energy" + } + } + if = { + limit = { has_trait = gregarious } + add = { + value = 10 + desc = "Is gregarious" + } + } + if = { + limit = { has_trait = shy } + add = { + value = -30 + desc = "Is shy" + } + } + if = { + limit = { has_trait = inappetetic } + add = { + value = -30 + desc = "Is inappetetic" + } + } + if = { + limit = { has_trait = reclusive } + add = { + value = -30 + desc = "Is reclusive" + } + } + if = { + limit = { + short_term_gold >= feast_activity_cost + short_term_gold >= major_gold_value + } + add = { + value = 30 + desc = "Got gold to burn" + } + } + if = { + limit = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + short_term_treasury >= hunt_activity_base_cost + short_term_treasury >= major_gold_value + } + add = { + value = 30 + desc = "Got treasury to burn" + } + } + if = { + limit = { has_trait = lifestyle_reveler } + add = { + value = 20 + desc = "Is Reveler" + } + } + if = { + limit = { + has_royal_court = yes + has_court_type = court_intrigue + } + add = { + value = 10 + desc = "Intrigue court trait" + } + } + if = { + limit = { has_trait = comfort_eater } + add = { + value = 10 + desc = "Is Comfort Eater" + } + } + if = { + limit = { has_trait = drunkard } + add = { + value = 10 + desc = "Is Drunkard" + } + } + if = { + limit = { has_trait = gluttonous } + add = { + value = 10 + desc = "Is Gluttonous" + } + } + if = { + limit = { has_trait = hashishiyah } + add = { + value = 10 + desc = "Has Munchies" + } + } + # Stress + if = { # Low Stress + limit = { + stress >= lower_than_baseline_stress + NOT = { has_trait = shy } + } + add = { + value = 20 + desc = "lower_than_baseline_stress" + } + } + if = { # High Stress + limit = { + stress >= higher_than_baseline_stress + NOT = { has_trait = shy } + } + add = { + value = 20 + desc = "higher_than_baseline_stress" + } + } + if = { # Very High Stress + limit = { + stress >= high_stress + NOT = { has_trait = shy } + } + add = { + value = 20 + desc = "high_stress" + } + } + if = { + limit = { + culture = { + has_cultural_tradition = tradition_culinary_art + } + } + add = { + value = 20 + desc = "Host culture has Culinary Artists Cultural Tradition" + } + } + if = { + limit = { + faith = { has_doctrine = tenet_ritual_celebrations } + } + add = { + value = 35 + desc = "Host culture has Ritual Celebrations Cultural Tradition" + } + } + if = { + limit = { + faith = { has_doctrine = tenet_hedonistic } + } + add = { + value = 35 + desc = "Host faith has Hedonistic Tenet" + } + } + if = { + limit = { + host.faith = { + has_doctrine = tenet_asceticism + } + } + add = { + value = -20 + desc = "Host faith has Asceticism tenet" + } + } + if = { + limit = { has_character_flag = feasts_a_lot } + add = { + value = 500 + desc = "feasts a lot" + } + } + if = { + limit = { + top_liege != this + has_vassal_stance = courtly + } + add = { + value = 10 + desc = courtly + } + } + if = { + limit = { ai_has_warlike_personality = yes } + add = { + value = -30 + desc = "Warlike" + } + } + if = { + limit = { + government_has_flag = government_is_nomadic + gold > prestige + gold > 200 + prestige < 600 + } + add = { + value = 70 + desc = "Nomad searching for prestige" + } + } + # Struggles. + if = { + limit = { + any_character_struggle = { + involvement = involved + phase_has_catalyst = catalyst_invite_diff_faith_culture_to_feast + } + } + # Escalating. + if = { + limit = { has_character_flag = agenda_towards_escalation } + add = { + value = -25 + desc = debug_gui.activity_weight.struggle.wants_to_escalate + } + } + # Deescalating. + if = { + limit = { has_character_flag = agenda_towards_deescalation } + add = { + value = 50 + desc = debug_gui.activity_weight.struggle.wants_to_deescalate + } + } + } + if = { + limit = { + ai_has_warlike_personality = yes + war_chest_gold < war_chest_gold_maximum + } + multiply = { + value = 0.25 + desc = "Warlike" + } + } + # Economic Archetype + if = { # Too busy booming the economy + limit = { + OR = { + ai_has_economical_boom_personality = yes + has_character_flag = ai_boom + } + } + add = { + value = -200 + desc = "Builder" + } + } + if = { # Should probably spend their gold elsewhere + limit = { + ai_has_pious_builder_personality = yes + } + if = { # Unless... + limit = { + faith = { has_doctrine = tenet_ritual_celebrations } + } + add = { + value = 100 + desc = "Pious Builder with Ritual Celebrations" + } + } + else = { + add = { + value = -100 + desc = "Pious Builder" + } + } + } + if = { + limit = { + has_variable = conqueror + OR = { + AND = { + prestige_level < 4 + can_use_conquest_cbs_trigger = yes + } + prestige < 1000 + } + } + add = { + value = 1000 + desc = "conqueror looking for prestige" + } + } + if = { + limit = { + has_variable = conqueror + trigger_if = { + limit = { + prestige_level >= 4 + can_use_conquest_cbs_trigger = yes + } + prestige_level >= 4 + } + prestige >= 1000 + } + add = { + value = -5000 + desc = "conqueror sated for prestige" + } + } + # Legitimacy + if = { + limit = { + is_valid_for_legitimacy_change = yes + } + if = { # Low Legitimacy + limit = { + OR = { + legitimacy_level = 1 + legitimacy_level = 2 + } + } + add = { + value = 10 + desc = "low_legitimacy" + } + } + if = { # Very Low Legitimacy + limit = { + legitimacy_level = 0 + } + add = { + value = 20 + desc = "low_legitimacy" + } + } + } + # Plague + if = { + limit = { + any_held_title = { + title_tier = county + has_province_with_epidemic = { intensity < apocalyptic } + } + would_follow_social_distancing_value >= -1 + } + add = { + value = -60 + desc = "Plague in Domain" + } + } + else_if = { + limit = { + any_realm_county = { + has_province_with_epidemic = { intensity < apocalyptic } + } + would_follow_social_distancing_value >= -1 + } + add = { + value = -20 + desc = "Plague in Top Realm" + } + } + if = { + limit = { + any_held_title = { + title_tier = county + has_province_with_epidemic = { intensity = apocalyptic } + } + } + add = { + value = -200 + desc = "Apocalyptic Plague in Domain" + } + } + else_if = { + limit = { + any_held_title = { + title_tier = county + has_province_with_epidemic = { intensity = apocalyptic } + } + } + add = { + value = -40 + desc = "Apocalyptic Plague in Top Realm" + } + } + if = { + limit = { + is_ai = yes + has_character_flag = feast_ai_override + } + add = 10000 + } + } + + ################### + # GUEST HANDLING + ################### + + max_guests = 40 + + guest_invite_rules = { + rules = { + # Relations. + 2 = activity_invite_rule_rivals_if_appropriate + + # Family. + 3 = activity_invite_rule_extended_family + + # Magnates. + 4 = activity_invite_neighbouring_rulers + + # Misc landless. + 5 = activity_invite_rule_knights + + # MP + 6 = activity_invite_mp + } + defaults = { + 1 = activity_invite_rule_friends + 1 = activity_invite_rule_potential_friends + 2 = activity_invite_rule_lovers + 2 = activity_invite_rule_potential_lovers + 1 = activity_invite_rule_close_family + 1 = activity_invite_rule_liege + 1 = activity_invite_rule_suzerain + 1 = activity_invite_rule_tributaries + 1 = activity_invite_rule_confederates + 1 = activity_invite_rule_vassals + 2 = activity_invite_rule_fellow_vassals + 3 = activity_invite_rule_courtiers + 4 = activity_invite_rule_guests + 1 = activity_invite_spouses + 1 = activity_invite_rule_landless_adventurers_restricted_range_opinion + } + } + + can_be_activity_guest = { + is_adult = yes + is_healthy = yes + in_diplomatic_range = scope:host + } + + host_intents = { + intents = { reduce_stress_intent murder_attendee_intent woo_attendee_intent befriend_attendee_intent spread_legend_intent legitimacy_intent } + default = reduce_stress_intent + } + + guest_intents = { + intents = { reduce_stress_intent murder_attendee_intent woo_attendee_intent befriend_attendee_intent banquet_mischief_intent spread_legend_intent legitimacy_intent } + default = reduce_stress_intent + } + + guest_join_chance = { + base = 10 + base_activity_modifier = yes + + # Scripted Modifiers + activity_guest_shared_ai_accept_modifier = yes + activity_guest_feast_ai_accept_modifier = yes + + # If the Host has hosted a Murder Feast recently people are sus + modifier = { + scope:host = { has_variable = recent_murder_feast_var } + add = { + value = -15 + desc = "Recent $feast_type_murder$" + } + } + + # Master of Revels Accolade increasing invite acceptance + modifier = { + scope:host = { + any_active_accolade = { + accolade_parameter = acclaimed_knight_feast_wedding_invite_acceptance_bonus + } + } + add = accolade_feast_wedding_invite_acceptance_value + } + } + + special_guests = { + honorary_guest_regular = { + is_required = no + + is_shown = { + scope:special_option = flag:feast_type_generic + } + + can_pick = { + this != scope:host + is_healthy = yes + is_adult = yes + trigger_if = { # Pick adventurers first! + limit = { + scope:host = { + is_ai = yes + has_character_flag = feast_ai_override + } + } + reverse_has_opinion_modifier = { + modifier = laamp_used_contact_opinion_special + target = scope:host + } + } + trigger_if = { + limit = { + scope:host = { + is_ai = yes + NOT = { has_character_flag = feast_ai_override } + } + } + OR = { + is_vassal_of = scope:host + target_is_vassal_or_below = scope:host + has_relation_friend = scope:host + has_relation_lover = scope:host + } + } + } + + ai_will_do = { + value = 10 + } + } + + honorary_guest = { #Murder guest, localization changes for host + is_required = yes + + is_shown = { + scope:special_option = flag:feast_type_murder + } + + can_pick = { + this != scope:host + is_healthy = yes + is_adult = yes + NOT = { is_spouse_of = scope:host } + trigger_if = { + limit = { + scope:host = { is_ai = yes } + } + has_relation_rival = scope:host #AI only picks rivals + this != scope:host.liege #AI doesnt pick their liege + this != scope:host.faith.religious_head #AI doesnt pick their HoF + } + } + + ai_will_do = { + value = 10 + } + } + } + + travel_entourage_selection = { + weight = { + value = standard_travel_entourage_additions + if = { + limit = { + OR = { + has_trait = gregarious + has_trait = drunkard + has_trait = hashishiyah + has_trait = gluttonous + has_trait = comfort_eater + } + } + add = 10 + } + } + max = 18 + invite_rule_order = 3 + } + + cost = { + gold = { + if = { + limit = { + OR = { + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + government_has_flag = government_is_mandala + AND = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + government_allows = barter + } + } + value = 0 + } + else = { + add = base_feast_cost_value + } + if = { + limit = { + has_title = title:e_minister_of_revenue + } + multiply = 0.85 + } + } + treasury = { + if = { + limit = { + OR = { + NAND = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + } + } + value = 0 + } + else = { + value = base_feast_cost_value + if = { + limit = { + has_title = title:e_minister_of_revenue + } + multiply = 0.85 + } + } + } + piety = { + if = { + limit = { + OR = { + NOT = { government_has_flag = government_is_mandala } + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + } + } + value = 0 + } + else = { + add = base_feast_cost_value + } + } + barter_goods = { + if = { + limit = { + NOT = { government_allows = barter } + } + value = 0 + } + else = { + add = base_feast_cost_value + } + } + } + + ui_predicted_cost = { + # All costs are balanced on County/Early Era starting point + gold = { + if = { + limit = { + OR = { + government_has_flag = government_is_mandala + AND = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + government_allows = barter + } + } + value = 0 + } + else = { + value = base_feast_ui_cost_value + } + + if = { + limit = { has_variable = mpo_nerge_1060_free_feast } + multiply = { + value = 0 # Free + desc = mpo_nerge_1060_free_feast_desc + } + } + } + treasury = { # Make sure this matches the gold cost above + if = { + limit = { + NAND = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + } + value = 0 + } + else = { + value = base_feast_cost_value + } + + if = { + limit = { has_variable = mpo_nerge_1060_free_feast } + multiply = { + value = 0 # Free + desc = mpo_nerge_1060_free_feast_desc + } + } + } + + piety = { + if = { + limit = { + NOT = { government_has_flag = government_is_mandala } + } + value = 0 + } + else = { + value = base_feast_ui_cost_value + } + + if = { + limit = { has_variable = mpo_nerge_1060_free_feast } + multiply = { + value = 0 # Free + desc = mpo_nerge_1060_free_feast_desc + } + } + } + + barter_goods = { + if = { + limit = { + NOT = { government_allows = barter } + } + value = 0 + } + else = { + value = base_feast_ui_cost_value + } + + if = { + limit = { has_variable = mpo_nerge_1060_free_feast } + multiply = { + value = 0 # Free + desc = mpo_nerge_1060_free_feast_desc + } + } + } + } + + ################### + # GRAPHICS + ################### + + map_entity = { + trigger = { + activity_location.culture = { + OR = { + has_graphical_iranian_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_steppe_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + } + } + } + reference = "building_mena_feast_01_entity" + } + + map_entity = { + trigger = { + activity_location.culture = { + has_graphical_india_culture_group_trigger = yes + } + } + reference = "building_indian_feast_01_entity" + } + + map_entity = "building_western_feast_01_entity" + + # Travel + background = { # Bridge + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + is_riverside_province = yes + geographical_region = world_europe + OR = { + terrain = farmlands + terrain = plains + terrain = mountains + terrain = hills + } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_bridge.dds" + environment = "environment_travel_bridge" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #Rice Fields - If we have Paddy fields AND/or terraced hills + #This goes before other terrain since it can override in many different terrains if built + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + terrain = farmlands + OR = { + terrain = terraced_hills + has_building_or_higher = paddy_fields_01 + } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_rice_fields.dds" + environment = "environment_tgp_rice_fields" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_rice_fields" + } + + background = { #Farmlands - East Asia + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + terrain = farmlands + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_farm_asia.dds" + environment = "environment_tgp_farm_asia" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_farm_asia" + } + + background = { # Farmland, settled + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + terrain = farmlands + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_farm.dds" + environment = "environment_travel_farmlands" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { # Farmland, unsettled + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + terrain = farmlands + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/farms.dds" + environment = "environment_event_farms" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #Desert, settled + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_desert_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_desert.dds" + environment = "environment_travel_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + background = { #Desert, unsettled + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_desert_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/desert.dds" + environment = "environment_event_bp1_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { #forest snowy + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location ?= { hunt_snowy_forest_trigger = yes } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_hunt_snowy_forest.dds" + environment = "environment_hunt_snowy_forest" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #forest_pine + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_forest_pine_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/forest_pine.dds" + environment = "environment_event_forest_pine" + ambience = "event:/SFX/Events/Backgrounds/coniferous_forest_day" + } + + background = { #forest + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_forest_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/forest.dds" + environment = "environment_event_forest" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #mountains, settled + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_mountains_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_mountains.dds" + environment = "environment_travel_mountain_settlement" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + background = { #mountains, unsettled + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_mountains_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/mountains.dds" + environment = "environment_event_mountains" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #steppe, settled + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_steppe_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_steppe.dds" + environment = "environment_travel_steppe_settlement" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + background = { #steppe, unsettled + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_steppe_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/steppe.dds" + environment = "environment_event_steppe" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + + background = { #drylands (formerly desert) + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_drylands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/drylands.dds" + environment = "environment_event_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { #wetlands + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_wetlands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_wetlands.dds" + environment = "environment_event_bp1_wetlands" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #jungle + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_jungle_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_jungle.dds" + environment = "environment_event_bp1_jungle" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #plains, settled + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_plains_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + environment = "environment_travel_hills_settlement" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { #plains, unsettled + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_plains_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_plains.dds" + environment = "environment_event_bp1_plains" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #hills, settled + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_hills_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + environment = "environment_travel_hills_settlement" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { #hills, unsettled + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_hills_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_hills.dds" + environment = "environment_event_bp1_hills" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #sea + trigger = { + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + is_sea_province = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/fp1_ocean.dds" + environment = "environment_event_fp1_ocean" + ambience = "event:/DLC/FP1/SFX/Events/event_ocean_longship" + } + # End Travel + + background = { + trigger = { + OR = { + scope:host = { government_has_flag = government_is_nomadic } + AND = { + scope:host = { government_has_flag = government_is_tribal } + activity_location.culture ?= { has_graphical_steppe_culture_group_trigger = yes } + } + scope:host = { + is_landless_adventurer = yes + culture ?= { has_graphical_steppe_culture_group_trigger = yes } + } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_feast_steppe.dds" + environment = "environment_steppe_feast" + ambience = "event:/SFX/Events/Backgrounds/feasthall" + } + background = { # EP3 + trigger = { + activity_location.culture = { + OR = { + has_building_gfx = byzantine_building_gfx + has_building_gfx = caucasian_building_gfx + } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep3_feast_byzantine.dds" + environment = "environment_ep3_byzantine_feast" + ambience = "event:/SFX/Events/Backgrounds/corner_of_tavern" + } + background = { # FP1 + trigger = { + activity_location.culture = { has_building_gfx = norse_building_gfx } + } + texture = "gfx/interface/illustrations/event_scenes/fp1_viking_feast.dds" + environment = "environment_event_fp1_viking_feast" + ambience = "event:/DLC/FP1/SFX/Events/event_viking_feast" + } + background = { + trigger = { + activity_location ?= { + OR = { + culture = { has_graphical_india_culture_group_trigger = yes } + steppe_building_gfx_use_indian_trigger = yes + } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_feast_indian.dds" + environment = "environment_indian_feast" + ambience = "event:/SFX/Events/Backgrounds/feasthall" + } + background = { + trigger = { + OR = { + activity_location.culture = { has_building_gfx = arabic_group_building_gfx } + activity_location.culture = { has_building_gfx = berber_group_building_gfx } + activity_location.culture = { has_building_gfx = iberian_building_gfx } + activity_location.culture = { has_building_gfx = iranian_building_gfx } + activity_location = { steppe_building_gfx_use_mena_trigger = yes } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_feast_mena.dds" + environment = "environment_mena_feast" + ambience = "event:/SFX/Events/Backgrounds/feasthall" + } + background = { + trigger = { + activity_location ?= { + OR = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } + steppe_building_gfx_use_east_asian_trigger = yes + } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_feast_asia.dds" + environment = "environment_tgp_feast_asia" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_feast_asia" + } + background = { + trigger = { + activity_location.culture = { has_building_gfx = african_building_gfx } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_feast_sub_saharan.dds" + environment = "environment_sub-saharan_feast" + ambience = "event:/SFX/Events/Backgrounds/feasthall" + } + background = { + trigger = { + OR = { + scope:activity = { + has_activity_option = { + category = special_type + option = feast_type_generic + } + } + scope:activity = { + has_activity_option = { + category = special_type + option = feast_type_legendary + } + } + scope:activity.special_guest:honorary_guest ?= { is_alive = yes } + } + } + texture = "gfx/interface/illustrations/event_scenes/feast.dds" + environment = "environment_event_feast" + ambience = "event:/SFX/Events/Backgrounds/feasthall" + music = "grandfeast_cue" + } + background = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = feast_type_murder + } + } + scope:activity.special_guest:honorary_guest ?= { is_alive = no } + } + texture = "gfx/interface/illustrations/event_scenes/feast.dds" + environment = "environment_event_feast" + ambience = "event:/SFX/Events/Backgrounds/feasthall" + music = "murderfest_cue" + } + background = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = feast_type_tsagaan_sar + } + } + scope:activity.special_guest:honorary_guest ?= { is_alive = no } + } + texture = "gfx/interface/illustrations/event_scenes/feast.dds" + environment = "environment_event_feast" + ambience = "event:/SFX/Events/Backgrounds/feasthall" + music = "grandfeast_cue" + } + + window_characters = { + + guest = { + camera = camera_body_right + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + exists = scope:player + scope:player = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + } + } + scope:player ?= { add_to_list = characters } + } + else_if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + exists = scope:host.intent_target + any_attending_character = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + this = scope:host.intent_target + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + this = scope:host.intent_target + } + add_to_list = characters + } + } + else_if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + any_attending_character = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + OR = { + has_relation_lover = scope:host + has_relation_friend = scope:host + } + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + OR = { + has_relation_lover = scope:host + has_relation_friend = scope:host + } + } + add_to_list = characters + } + } + else_if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + any_attending_character = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + is_consort_of = scope:host + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + is_consort_of = scope:host + } + add_to_list = characters + } + } + else_if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + any_attending_character = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + is_councillor_of = scope:host + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + is_councillor_of = scope:host + } + add_to_list = characters + } + } + else_if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + any_attending_character = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + highest_held_title_tier >= tier_duchy + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + highest_held_title_tier >= tier_duchy + } + add_to_list = characters + } + } + else_if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + any_attending_character = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + highest_held_title_tier >= tier_county + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + highest_held_title_tier >= tier_county + } + add_to_list = characters + } + } + else_if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + any_attending_character = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + OR = { + is_parent_of = scope:host + is_close_or_extended_family_of = scope:host + } + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + OR = { + is_parent_of = scope:host + is_close_or_extended_family_of = scope:host + } + } + add_to_list = characters + } + } + else_if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + } + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:activity = { is_murder_feast = yes } + } + animation = { worry stress boredom fear disbelief paranoia eyeroll drink drink_goblet } + } + triggered_animation = { + trigger = { + exists = scope:host.intent_target + scope:host = { + has_activity_intent = woo_attendee_intent + } + scope:character = scope:host.intent_target + } + animation = { love flirtation } + } + triggered_animation = { + trigger = { + exists = scope:host.intent_target + scope:host = { + has_activity_intent = murder_attendee_intent + } + scope:character = scope:host.intent_target + } + animation = { dismissal worry paranoia } + } + triggered_animation = { + trigger = { + scope:activity = { is_murder_feast = no } + scope:character = { has_trait = shy } + } + animation = { sadness worry } + } + triggered_animation = { + trigger = { + scope:activity = { is_murder_feast = no } + } + animation = { drink_goblet happiness flirtation throne_room_conversation_3 throne_room_conversation_1 } + } + #Fallback + animation = toast + } + } + + host = { + camera = camera_body + + effect = { + if = { + limit = { + OR = { + scope:host.location = scope:activity.activity_location + scope:host.location = { is_sea_province = yes } + } + } + scope:host = { + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:host.location = { is_sea_province = yes } + } + animation = { survey } + } + triggered_animation = { + trigger = { + OR = { + AND = { + exists = scope:activity.special_guest:honorary_guest.location + NOT = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:honorary_guest_regular.location + NOT = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + } + } + animation = { boredom } + } + triggered_animation = { + trigger = { + scope:activity = { is_murder_feast = yes } + } + animation = { schadenfreude personality_vengeful } + } + triggered_animation = { + trigger = { + exists = scope:host.intent_target + scope:host = { + is_male = yes + has_activity_intent = befriend_attendee_intent + } + scope:host.intent_target.location = scope:activity.activity_location + } + animation = { personality_forgiving personality_compassionate } + } + triggered_animation = { + trigger = { + exists = scope:host.intent_target + scope:host = { + is_male = yes + has_activity_intent = murder_attendee_intent + } + scope:host.intent_target.location = scope:activity.activity_location + } + animation = { hunting_knife_start } + } + triggered_animation = { + trigger = { + exists = scope:host.intent_target + scope:host = { + is_male = yes + has_activity_intent = woo_attendee_intent + } + scope:host.intent_target.location = scope:activity.activity_location + } + animation = { wedding_groom_right } + } + triggered_animation = { + trigger = { + exists = scope:host.intent_target + scope:host = { + is_female = yes + has_activity_intent = woo_attendee_intent + } + scope:host.intent_target.location = scope:activity.activity_location + } + animation = { reception_bride_right } + } + triggered_animation = { + trigger = { + scope:activity = { is_murder_feast = no } + } + animation = { toast_goblet } + } + } + } + + travel_host = { + camera = camera_event_horse_left + + effect = { + if = { + limit = { + NOR = { + scope:host.location = scope:activity.activity_location + scope:host.location = { is_sea_province = yes } + } + } + scope:host = { + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { scope:character = { has_trait = impatient } } + animation = { jockey_gallop } + } + animation = jockey_walk + } + } + + honorary_guest_traveling_murder = { + camera = camera_event_horse_left + + effect = { + if = { + limit = { + scope:activity.special_guest:honorary_guest.involved_activity ?= scope:activity + NOR = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + scope:activity.special_guest:honorary_guest.location ?= { is_sea_province = yes } + } + } + special_guest:honorary_guest ?= { + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { scope:character = { has_trait = impatient } } + animation = { jockey_gallop } + } + animation = jockey_walk + } + } + + honorary_guest_murder = { # Both regular and murder + camera = camera_body + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + scope:activity.special_guest:honorary_guest.location ?= { is_sea_province = yes } + } + } + special_guest:honorary_guest ?= { + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:activity.special_guest:honorary_guest_regular = { is_travelling = yes } + } + animation = { idle } + } + triggered_animation = { + trigger = { + always = yes + } + animation = { ecstasy wedding_priest chaplain personality_honorable personality_bold } + } + } + } + + honorary_guest_regular_traveling = { + camera = camera_event_horse_left + + effect = { + if = { + limit = { + scope:activity.special_guest:honorary_guest_regular.involved_activity ?= scope:activity + NOR = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + scope:activity.special_guest:honorary_guest_regular.location = { is_sea_province = yes } + } + } + special_guest:honorary_guest_regular ?= { + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { scope:character = { has_trait = impatient } } + animation = { jockey_gallop } + } + animation = jockey_walk + } + } + + honorary_guest_regular = { + camera = camera_body + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + scope:activity.special_guest:honorary_guest_regular.location ?= { is_sea_province = yes } + } + } + special_guest:honorary_guest_regular ?= { + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:activity.special_guest:honorary_guest_regular = { is_travelling = yes } + } + animation = { idle } + } + triggered_animation = { + trigger = { + always = yes + } + animation = { ecstasy wedding_priest chaplain personality_honorable personality_bold dancing } + } + } + } + + guest = { + camera = camera_body + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + any_attending_character = { + count >= 2 + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + is_councillor_of = scope:host + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + is_councillor_of = scope:host + } + add_to_list = characters + } + } + else_if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + any_attending_character = { + count >= 2 + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + highest_held_title_tier >= tier_duchy + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + highest_held_title_tier >= tier_duchy + } + add_to_list = characters + } + } + else_if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + any_attending_character = { + count >= 2 + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + highest_held_title_tier >= tier_county + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + highest_held_title_tier >= tier_county + } + add_to_list = characters + } + } + else_if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + any_attending_character = { + count >= 2 + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + OR = { + is_parent_of = scope:host + is_close_or_extended_family_of = scope:host + } + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + OR = { + is_parent_of = scope:host + is_close_or_extended_family_of = scope:host + } + } + add_to_list = characters + } + } + else_if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + } + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:activity = { is_murder_feast = yes } + } + animation = { worry stress boredom fear disbelief paranoia eyeroll drink drink_goblet } + } + triggered_animation = { + trigger = { + scope:activity = { is_murder_feast = no } + scope:character = { has_trait = shy } + } + animation = { stress } + } + triggered_animation = { + trigger = { + scope:activity = { is_murder_feast = no } + } + animation = { dancing laugh toast flirtation_left throne_room_conversation_2 } + } + #Fallback + animation = toast + } + } + + guest = { + camera = camera_body_left + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + any_attending_character = { + count >= 3 + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + is_councillor_of = scope:host + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + is_councillor_of = scope:host + } + add_to_list = characters + } + } + else_if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + any_attending_character = { + count >= 3 + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + highest_held_title_tier >= tier_duchy + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + highest_held_title_tier >= tier_duchy + } + add_to_list = characters + } + } + else_if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + any_attending_character = { + count >= 3 + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + highest_held_title_tier >= tier_county + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + highest_held_title_tier >= tier_county + } + add_to_list = characters + } + } + else_if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + any_attending_character = { + count >= 3 + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + OR = { + is_parent_of = scope:host + is_close_or_extended_family_of = scope:host + } + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + OR = { + is_parent_of = scope:host + is_close_or_extended_family_of = scope:host + } + } + add_to_list = characters + } + } + else_if = { + limit = { + scope:host.location = scope:activity.activity_location + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest } + scope:activity.special_guest:honorary_guest.location ?= scope:activity.activity_location + } + OR = { + NOT = { exists = scope:activity.special_guest:honorary_guest_regular } + scope:activity.special_guest:honorary_guest_regular.location ?= scope:activity.activity_location + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + scope:activity.special_guest:honorary_guest ?= this + scope:activity.special_guest:honorary_guest_regular ?= this + } + } + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:activity = { is_murder_feast = yes } + } + animation = { worry stress boredom fear disbelief paranoia eyeroll drink drink_goblet dancing } + } + triggered_animation = { + trigger = { + scope:activity = { is_murder_feast = no } + scope:character = { has_trait = shy } + } + animation = { paranoia } + } + triggered_animation = { + trigger = { + scope:activity = { is_murder_feast = no } + } + animation = { drink eavesdrop wedding_drunk dancing } + } + #Fallback + animation = toast + } + } + } + + ################### + # OPTIONS + ################### + + options = { + #Feast types + special_type = { + # Revel feast. + ## Generic feast for when you've got no specific reason. + feast_type_generic = { + default = yes + + ai_will_do = { + value = 50 + if = { + limit = { + OR = { + has_trait = gregarious + has_trait = arrogant + has_trait = arbitrary + has_trait = brave + has_trait = just + } + } + add = 50 + } + if = { + limit = { + OR = { + has_trait = shy + has_trait = humble + has_trait = callous + has_trait = sadistic + } + } + subtract = 50 + } + if = { + limit = { + is_ai = yes + has_character_flag = feast_ai_override + } + add = 100 + } + } + } + # Legendary feast. + ## Spread your legend. + feast_type_legendary = { + + is_shown = { + has_dlc_feature = legends_of_the_dead + } + + is_valid = { + custom_tooltip = { + text = legendary_feast_valid_tt + exists = promoted_legend #you need to have a legend to promote + } + } + + ai_will_do = { + value = 50 + if = { + limit = { + OR = { + has_trait = arrogant + has_trait = ambitious + has_trait = lifestyle_poet + has_trait = journaller + } + } + add = 50 + } + if = { + limit = { + OR = { + has_trait = shy + has_trait = humble + } + } + subtract = 50 + } + if = { + limit = { + is_ai = yes + has_character_flag = feast_ai_override + } + add = 100 + } + } + } + # Murder feast. + ## You're trying to kill. _Everyone_. Kind of. + feast_type_murder = { + cost = { + gold = { + if = { + limit = { + OR = { + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + AND = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + } + } + value = 0 + } + else = { + value = feast_type_murder_value + if = { + limit = { has_variable = mpo_nerge_1060_free_feast } + multiply = { + value = 0 # Free + desc = mpo_nerge_1060_free_feast_desc + } + } + } + } + treasury = { # Make sure this matches the gold cost above + if = { + limit = { + OR = { + NAND = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + } + } + value = 0 + } + else = { + value = feast_type_murder_value + if = { + limit = { has_variable = mpo_nerge_1060_free_feast } + multiply = { + value = 0 # Free + desc = mpo_nerge_1060_free_feast_desc + } + } + } + } + } + + is_shown = { + has_dlc_feature = tours_and_tournaments + } + + is_valid = { + has_perk = forever_infamous_perk + custom_tooltip = { + text = feast_type_murder_valid_tt + NOT = { has_variable = recent_murder_feast_var } #15 years cooldown + } + } + + blocked_intents = { murder_attendee_intent befriend_attendee_intent woo_attendee_intent } #you can only relax mate + + ai_will_do = { + value = 0 + if = { + limit = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = arbitrary + has_trait = vengeful + has_trait = torturer + } + } + add = 50 + } + if = { + limit = { + OR = { + has_trait = just + has_trait = honest + has_trait = compassionate + has_trait = generous + has_trait = forgiving + } + } + subtract = 50 + } + if = { + limit = { + this = faith.religious_head + NOT = { has_trait = torturer } + faith = { + NOR = { + has_doctrine_parameter = gruesome_festivals_active + has_doctrine_parameter = human_sacrifice_active + } + } + } + add = -100 + } + if = { + limit = { + this = faith.religious_head + NOT = { has_trait = compassionate } + faith = { + OR = { + has_doctrine_parameter = gruesome_festivals_active + has_doctrine_parameter = human_sacrifice_active + } + } + } + add = 50 + } + } + } + # Tsagaan Sar + ## Special feast for nomads + feast_type_tsagaan_sar = { + cost = { + gold = { + add = { + add = { + value = feast_activity_cost + multiply = 2.5 + desc = feast_type_tsagaan_sar + } + add = { + value = feast_activity_cost + multiply = 2.5 + multiply = activity_cost_scale_by_era + subtract = { + value = feast_activity_cost + multiply = 2.5 + } + desc = activity_cost_scale_by_era_desc + } + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = feast_activity_cost + multiply = 2.5 + multiply = activity_cost_scale_by_era + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + if = { + limit = { + has_character_modifier = mpo_bountiful_sheep_modifier + } + multiply = { + value = 0.8 + desc = mpo_bountiful_sheep_modifier + } + } + if = { + limit = { + has_character_modifier = mpo_si_slaughtered_animals + } + multiply = { + value = 0.5 + desc = mpo_si_slaughtered_animals + } + } + if = { + limit = { + has_character_modifier = mpo_nerge_feast_discount + } + multiply = { + value = 0.5 + desc = mpo_nerge_feast_discount + } + } + + if = { + limit = { has_variable = mpo_nerge_1060_free_feast } + multiply = { + value = 0 # Free + desc = mpo_nerge_1060_free_feast_desc + } + } + + if = { + limit = { + is_ai = yes + has_character_flag = feast_ai_override + } + multiply = 0 + } + } + } + + is_shown = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + culture = { + OR = { + has_cultural_pillar = heritage_mongolic + has_cultural_pillar = heritage_turkic + } + } + } + + is_valid = { + custom_tooltip = { + text = feast_type_tsagaan_sar_valid_tt + NOT = { has_variable = recent_tsagaan_sar_feast_var } #3 years cooldown + } + custom_tooltip = { + text = feast_type_tsagaan_sar_valid_tt_time + AND = { + current_month >= 1 + current_month <= 3 + } + } + } + + ai_will_do = { + value = 50 + if = { + limit = { + OR = { + has_trait = gregarious + has_trait = arrogant + has_trait = arbitrary + has_trait = brave + has_trait = just + } + } + add = 50 + } + if = { + limit = { + OR = { + has_trait = shy + has_trait = humble + has_trait = callous + has_trait = sadistic + } + } + subtract = 50 + } + if = { + limit = { + is_ai = yes + has_character_flag = feast_ai_override + } + add = 100 + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + add = 100 + } + } + } + } + + # How fancy do you make your dishes? + feast_option_food = { + feast_food_bad = { + is_shown = { has_dlc_feature = advanced_activities } + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_cheap_expense_value + # Fanciness preference. + add = activity_option_likes_functional_food_option_value + } + } + feast_food_normal = { + default = yes + cost = { + gold = { + if = { + limit = { + OR = { + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + government_has_flag = government_is_mandala + AND = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + government_allows = barter + } + } + value = 0 + } + else = { + value = feast_food_normal_value + } + } + treasury = { # Make sure this matches the gold cost above + if = { + limit = { + OR = { + NAND = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + } + } + value = 0 + } + else = { + value = feast_food_normal_value + } + } + piety = { + if = { + limit = { + OR = { + NOT = { government_has_flag = government_is_mandala } + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + } + } + value = 0 + } + else = { + value = feast_food_normal_value + } + } + barter_goods = { + if = { + limit = { + OR = { + NOT = { government_allows = barter } + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + } + } + value = 0 + } + else = { + value = feast_food_normal_value + } + } + } + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_middling_expense_value + # Fanciness preference. + ## We just use slightly reduced fanciness prefs here. + add = { + value = activity_option_likes_ostentatious_food_option_value + multiply = 0.5 + } + } + } + feast_food_good = { + is_shown = { has_dlc_feature = advanced_activities } + + cost = { + gold = { + if = { + limit = { + OR = { + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + government_has_flag = government_is_mandala + AND = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + government_allows = barter + } + } + value = 0 + } + else = { + value = feast_food_good_value + } + } + treasury = { + if = { + limit = { + OR = { + NAND = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + } + } + value = 0 + } + else = { + value = feast_food_good_value + } + } + piety = { + if = { + limit = { + OR = { + NOT = { government_has_flag = government_is_mandala } + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + } + } + value = 0 + } + else = { + value = feast_food_good_value + } + } + barter_goods = { + if = { + limit = { + OR = { + NOT = { government_allows = barter } + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + } + } + value = 0 + } + else = { + value = feast_food_good_value + } + } + } + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_heavy_expense_value + # Fanciness preference. + add = activity_option_likes_ostentatious_food_option_value + } + } + } + + # How many courses do you have? + feast_option_courses = { + feast_courses_bad = { + is_shown = { has_dlc_feature = advanced_activities } + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_cheap_expense_value + # Quantity preference. + add = activity_option_food_prefers_small_volume_value + } + } + feast_courses_normal = { + default = yes + + cost = { + gold = { + if = { + limit = { + OR = { + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + government_has_flag = government_is_mandala + AND = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + government_allows = barter + } + } + value = 0 + } + else = { + value = feast_courses_normal_value + } + } + treasury = { # Make sure this matches the gold cost above + if = { + limit = { + OR = { + NAND = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + } + } + value = 0 + } + else = { + value = feast_courses_normal_value + } + } + + piety = { + if = { + limit = { + OR = { + NOT = { government_has_flag = government_is_mandala } + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + } + } + value = 0 + } + else = { + value = feast_courses_normal_value + + if = { + limit = { has_variable = mpo_nerge_1060_free_feast } + multiply = { + value = 0 # Free + desc = mpo_nerge_1060_free_feast_desc + } + } + } + } + + barter_goods = { + if = { + limit = { + OR = { + NOT = { government_allows = barter } + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + } + } + value = 0 + } + else = { + value = feast_courses_normal_value + + if = { + limit = { has_variable = mpo_nerge_1060_free_feast } + multiply = { + value = 0 # Free + desc = mpo_nerge_1060_free_feast_desc + } + } + } + } + } + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_middling_expense_value + # Quantity preference. + ## We just use slightly reduced quantity prefs here. + add = { + value = activity_option_prefers_large_volume_value + multiply = 0.5 + } + } + } + feast_courses_good = { + is_shown = { has_dlc_feature = advanced_activities } + + cost = { + gold = { + if = { + limit = { + OR = { + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + government_has_flag = government_is_mandala + AND = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + government_allows = barter + } + } + value = 0 + } + else = { + value = feast_courses_good_value + } + } + treasury = { + if = { + limit = { + OR = { + NAND = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + } + } + value = 0 + } + else = { + value = feast_courses_good_value + } + } + piety = { + if = { + limit = { + OR = { + NOT = { government_has_flag = government_is_mandala } + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + } + } + value = 0 + } + else = { + value = feast_courses_good_value + } + } + + barter_goods = { + if = { + limit = { + OR = { + NOT = { government_allows = barter } + AND = { + is_ai = yes + has_character_flag = feast_ai_override + } + } + } + value = 0 + } + else = { + value = feast_courses_good_value + } + } + } + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_heavy_expense_value + # Quantity preference. + add = activity_option_prefers_large_volume_value + } + } + } + + # Estate Unlock - Wine Selection, how much do you spend on wine and other exotic drinks? + feast_option_wine = { + feast_wine_none = { + is_shown = { + has_dlc_feature = advanced_activities + domicile ?= { + OR = { + has_domicile_parameter = estate_unlock_feast_influence_option_1 + has_domicile_parameter = estate_unlock_feast_influence_option_2 + has_domicile_parameter = estate_unlock_feast_influence_option_3 + } + } + } + + default = yes + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_cheap_expense_value + # Quantity preference. + add = activity_option_food_prefers_small_volume_value + } + } + feast_wine_limited = { + is_shown = { + has_dlc_feature = advanced_activities + domicile ?= { + OR = { + has_domicile_parameter = estate_unlock_feast_influence_option_1 + has_domicile_parameter = estate_unlock_feast_influence_option_2 + has_domicile_parameter = estate_unlock_feast_influence_option_3 + } + } + } + + cost = { + gold = { + if = { + limit = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + value = 0 + } + else = { + add = { + desc = feast_wine_limited + add = { + value = 10 + desc = feast_wine_limited + } + add = { + value = 10 + multiply = activity_cost_scale_by_tier + subtract = 10 + desc = activity_cost_scale_by_tier_desc + } + add = { + value = 10 + multiply = activity_cost_scale_by_era + subtract = 10 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = 10 + add = { + value = 10 + multiply = activity_cost_scale_by_tier + subtract = 10 + } + add = { + value = 10 + multiply = activity_cost_scale_by_era + subtract = 10 + } + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + min = 0 + } + } + if = { + limit = { + is_ai = yes + has_character_flag = feast_ai_override + } + multiply = 0 + } + } + treasury = { # Make sure this matches the gold cost above + if = { + limit = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + add = { + desc = feast_wine_limited + add = { + value = 10 + desc = feast_wine_limited + } + add = { + value = 10 + multiply = activity_cost_scale_by_tier + subtract = 10 + desc = activity_cost_scale_by_tier_desc + } + add = { + value = 10 + multiply = activity_cost_scale_by_era + subtract = 10 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = 10 + add = { + value = 10 + multiply = activity_cost_scale_by_tier + subtract = 10 + } + add = { + value = 10 + multiply = activity_cost_scale_by_era + subtract = 10 + } + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + min = 0 + } + } + else = { + value = 0 + } + if = { + limit = { + is_ai = yes + has_character_flag = feast_ai_override + } + multiply = 0 + } + } + } + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_middling_expense_value + # Quantity preference. + ## We just use slightly reduced quantity prefs here. + add = { + value = activity_option_prefers_large_volume_value + multiply = 0.3 + } + } + } + feast_wine_normal = { + is_shown = { + has_dlc_feature = advanced_activities + domicile ?= { + OR = { + has_domicile_parameter = estate_unlock_feast_influence_option_2 + has_domicile_parameter = estate_unlock_feast_influence_option_3 + } + } + } + + cost = { + gold = { + if = { + limit = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + value = 0 + } + else = { + add = { + desc = feast_wine_normal + add = { + value = 35 + desc = feast_wine_normal + } + add = { + value = 35 + multiply = activity_cost_scale_by_tier + subtract = 35 + desc = activity_cost_scale_by_tier_desc + } + add = { + value = 35 + multiply = activity_cost_scale_by_era + subtract = 35 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = 35 + add = { + value = 35 + multiply = activity_cost_scale_by_tier + subtract = 35 + } + add = { + value = 35 + multiply = activity_cost_scale_by_era + subtract = 35 + } + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + min = 0 + } + } + if = { + limit = { + is_ai = yes + has_character_flag = feast_ai_override + } + multiply = 0 + } + } + treasury = { # Make sure this matches the gold cost above + if = { + limit = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + add = { + desc = feast_wine_normal + add = { + value = 35 + desc = feast_wine_normal + } + add = { + value = 35 + multiply = activity_cost_scale_by_tier + subtract = 35 + desc = activity_cost_scale_by_tier_desc + } + add = { + value = 35 + multiply = activity_cost_scale_by_era + subtract = 35 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = 35 + add = { + value = 35 + multiply = activity_cost_scale_by_tier + subtract = 35 + } + add = { + value = 35 + multiply = activity_cost_scale_by_era + subtract = 35 + } + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + min = 0 + } + } + else = { + value = 0 + } + if = { + limit = { + is_ai = yes + has_character_flag = feast_ai_override + } + multiply = 0 + } + } + } + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_middling_expense_value + # Quantity preference. + ## We just use slightly reduced quantity prefs here. + add = { + value = activity_option_prefers_large_volume_value + multiply = 0.6 + } + } + } + feast_wine_extensive = { + is_shown = { + has_dlc_feature = advanced_activities + domicile ?= { has_domicile_parameter = estate_unlock_feast_influence_option_3 } + } + + cost = { + gold = { + if = { + limit = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + value = 0 + } + else = { + add = { + desc = feast_wine_extensive + add = { + value = 90 + desc = feast_wine_extensive + } + add = { + value = 90 + multiply = activity_cost_scale_by_tier + subtract = 90 + desc = activity_cost_scale_by_tier_desc + } + add = { + value = 90 + multiply = activity_cost_scale_by_era + subtract = 90 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = 90 + add = { + value = 90 + multiply = activity_cost_scale_by_tier + subtract = 90 + } + add = { + value = 90 + multiply = activity_cost_scale_by_era + subtract = 90 + } + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + min = 0 + } + } + if = { + limit = { + is_ai = yes + has_character_flag = feast_ai_override + } + multiply = 0 + } + } + treasury = { # Make sure this matches the gold cost above + if = { + limit = { + house ?= { has_house_power_parameter = feasts_costs_treasury } + has_treasury = yes + } + add = { + desc = feast_wine_extensive + add = { + value = 90 + desc = feast_wine_extensive + } + add = { + value = 90 + multiply = activity_cost_scale_by_tier + subtract = 90 + desc = activity_cost_scale_by_tier_desc + } + add = { + value = 90 + multiply = activity_cost_scale_by_era + subtract = 90 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = 90 + add = { + value = 90 + multiply = activity_cost_scale_by_tier + subtract = 90 + } + add = { + value = 90 + multiply = activity_cost_scale_by_era + subtract = 90 + } + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + min = 0 + } + } + else = { + value = 0 + } + if = { + limit = { + is_ai = yes + has_character_flag = feast_ai_override + } + multiply = 0 + } + } + } + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_heavy_expense_value + # Quantity preference. + add = activity_option_prefers_large_volume_value + } + } + } + } + + special_option_category = special_type + + ################### + # PHASES + ################### + + max_guest_arrival_delay_time = { months = 8 } + + phases = { + # Meal. + feast_phase_meal = { + order = 1 + is_predefined = yes + + is_shown = { always = yes } + is_valid = { + trigger_if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = feast_type_murder + } + } + } + scope:activity.special_guest:honorary_guest = { + OR = { + AND = { #is alive and attending/invited + is_alive = yes + OR = { + is_participant_in_activity = scope:activity + scope:activity = { + any_invited_character = { this = scope:activity.special_guest:honorary_guest } + } + } + } + AND = { #is dead but you killed them + is_alive = no + scope:host = { has_variable = murder_feast_killed_var } + } + } + } + } + } + + on_phase_active = { + # Sort some stuff on the host. + if = { + limit = { this = scope:host } + + scope:activity = { progress_activity_phase_after = { months = 1 } } + + # Misc. old content variable. + ## Reduce alcohol stores if appropriate. + if = { + limit = { exists = var:protected_alcohol_stores } + set_variable = { + name = protected_alcohol_stores + value = 0 + } + } + ## Look for a target you're trying to befriend + if = { + limit = { + any_scheme = { + type = befriend + scheme_target_character = { + involved_activity ?= scope:activity + } + } + } + random_scheme = { + type = befriend + limit = { + scheme_target_character = { + involved_activity ?= scope:activity + } + } + scheme_target_character = { + save_scope_as = potential_friend + scope:activity = { + set_variable = { + name = potential_friend + value = scope:potential_friend + } + } + } + scheme_freeze = { + reason = "BEFRIENDING_AT_FEAST" + days = 10 + } + } + } + # And now, the main event! + ## Check that there are guests apart from the feast host. + if = { + limit = { + scope:activity = { + any_attending_character = { + count = 0 + this != scope:host + } + } + } + # If there are no other guests, throw this event. + ## [sad period-appropriate trombone noises] + trigger_event = feast.2003 + } + ## Otherwise, there are guests present. + ### The key event is chosen for the host, and fires other events from there to every participant. + else = { + trigger_event = feast.2001 + # Struggle Catalysts + ## We trigger this here to make sure that someone else actually turned up to the party before having it affect regional relations. + if = { + limit = { + # At least one participant is involved and of a different faith or culture + scope:activity = { + any_attending_character = { + any_character_struggle = { + involvement = involved + phase_has_catalyst = catalyst_invite_diff_faith_culture_to_feast + } + is_diff_faith_or_culture_trigger = { + CHAR = scope:host + STATUS = involved + } + } + } + } + every_character_struggle = { + involvement = involved + activate_struggle_catalyst = { + catalyst = catalyst_invite_diff_faith_culture_to_feast + character = scope:activity.activity_host + } + } + } + } + # Accolade stuff + if = { + limit = { + any_active_accolade = { + accolade_parameter = accolade_party_fertility + } + } + add_character_modifier = { + modifier = accolade_charmer_party_modifier + } + } + if = { + limit = { + any_active_accolade = { + accolade_parameter = accolade_party_fertility_high + } + } + add_character_modifier = { + modifier = accolade_charmer_party_high_modifier + } + } + if = { + limit = { is_tsagaan_sar = yes } + set_variable = { + name = recent_tsagaan_sar_feast_var + years = 5 + } + trigger_event = feast_tsagaan_sar_events.0001 # Determine who should give gifts, and who will + } + } + # And for everyone else. + else = { + # You're busy at another party! (invites were sent the same day, but you agreed to another party after this one ) + if = { + limit = { + exists = var:booked_for_a_party + var:booked_for_a_party = { + this != scope:activity.activity_host + } + } + trigger_event = feast.0010 + } + else = { + random_list = { + 0 = { #they don't join + modifier = { + add = 100 + scope:host = { has_variable = murder_feast_perpetrator_var } #if you have hosted a murder feast + } + } + 100 = { + trigger_event = feast.7051 + } + } + # Take care of reveller stuff for everyone else. + if = { + limit = { + NOT = { has_trait = temperate } + } + # Reveler lifestyle tracking: + reveler_points_gain_effect = { + CHANGE = 1 + RANDOM_CHANGE = 1 + } + # Remove blocker for invitations to feasts (the feast is now active and will work as a blocker) + remove_variable = booked_for_a_party + } + } + } + } + + on_weekly_pulse = { + if = { #host + limit = { + this = scope:host + } + trigger_event = { on_action = feast_new_event_selection_tombola } + } + else_if = { #guest + limit = { + this != scope:host + } + trigger_event = { on_action = feast_default_event_selection } + } + } + } + + # Toast. + feast_phase_toast = { + order = 2 + is_predefined = yes + + on_enter_phase = { + if = { + limit = { this = scope:host } + + # No passive state for the toast, just jump right into it + scope:activity = { progress_activity_phase_after = { days = 1 } } + } + } + + on_phase_active = { + if = { + limit = { this = scope:host } + + if = { # Regular feast + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = feast_type_generic + } + } + } + + # Save the GoH for the sake of my sanity. + scope:activity.special_guest:honorary_guest_regular ?= { save_scope_as = goh } + + # EP3 Dynasty Legacy Domicile Building Buff + ep3_dynasty_legacy_add_legitimacy_effect = yes + + # Trigger summary event, also handles guest events + trigger_event = feast.7201 + } + else_if = { # Legendary feast + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = feast_type_legendary + } + } + } + # Trigger summary event, also handles guest events + trigger_event = feast.7204 + } + else_if = { # Murder feast + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = feast_type_murder + } + } + scope:host = { NOT = { has_variable = murder_feast_murder_back_down } } + } + + trigger_event = { on_action = feast_murder_feast_event_selection } #KILL event, also handles the guest events + } + + scope:activity = { progress_activity_phase_after = { weeks = 1 } } + } + + if = { # Tsagaan Sar + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = feast_type_tsagaan_sar + } + } + } + + trigger_event = { id = feast_tsagaan_sar_events.0290 } + + if = { + limit = { this = scope:host } + + trigger_event = { + id = feast_tsagaan_sar_events.0010 + days = 2 + } + } + } + } + + on_end = { + # Adjust everyone's waistlines. + target_weight_modifier_effect = { + VALUE = feast_weight_modifier_value + } + } + } + } + + ai_check_interval_by_tier = { + barony = 0 + county = 60 + duchy = 60 + kingdom = 60 + empire = 60 + hegemony = 60 + } + + ai_will_select_province = { + # Base + value = 1 + # Buildings + ## Tribal + ### Gathering Halls + if = { + limit = { has_building_or_higher = longhouses_01 } + add = { + value = @weight_up_ai_select_province_small + desc = activity_feast_province_desc_longhouses + } + } + ## Terrain + ### Manor Houses + if = { + limit = { has_building_or_higher = farm_estates_01 } + add = { + value = @weight_up_ai_select_province_medium + desc = activity_feast_province_desc_farm_estates + } + } + ### Paddy Fields + if = { + limit = { has_building_or_higher = paddy_fields_01 } + add = { + value = @weight_up_ai_select_province_medium + desc = activity_feast_province_desc_paddy_fields + } + } + ### Orchards + if = { + limit = { has_building_or_higher = orchards_01 } + add = { + value = @weight_up_ai_select_province_small + desc = activity_feast_province_desc_orchards + } + } + ### Farms & Fields + if = { + limit = { has_building_or_higher = cereal_fields_01 } + add = { + value = @weight_up_ai_select_province_small + desc = activity_feast_province_desc_cereal_fields + } + } + ### Hill Farms + if = { + limit = { has_building_or_higher = hill_farms_01 } + add = { + value = @weight_up_ai_select_province_small + desc = debug_gui.location_weight.building.hill_farms + } + } + ### Desert Agriculture + if = { + limit = { has_building_or_higher = plantations_01 } + add = { + value = @weight_up_ai_select_province_small + desc = activity_feast_province_desc_plantations + } + } + ## Duchy + ### Leisure Palaces + if = { + limit = { has_building_or_higher = leisure_palace_01 } + add = { + value = @weight_up_ai_select_province_large + desc = activity_feast_province_desc_leisure_palace + } + } + ## Special + ### Doge's Palace + if = { + limit = { has_building_or_higher = doges_palace_01 } + add = { + value = @weight_up_ai_select_province_massive + desc = activity_feast_province_desc_doges_palace + } + } + ### Ghana Palace + if = { + limit = { has_building_or_higher = ghana_palace_01 } + add = { + value = @weight_up_ai_select_province_massive + desc = activity_feast_province_desc_ghana_palace_01 + } + } + ### Palace of Aachen + if = { + limit = { has_building_or_higher = palace_of_aachen_01 } + add = { + value = @weight_up_ai_select_province_large + desc = activity_feast_province_desc_palace_of_aachen + } + } + ### Royal Palace of Alhambra + if = { + limit = { has_building_or_higher = alhambra_01 } + add = { + value = @weight_up_ai_select_province_massive + desc = activity_feast_province_desc_alhambra + } + } + ### Citadel of Aleppo + if = { + limit = { has_building_or_higher = citadel_of_aleppo_01 } + add = { + value = @weight_up_ai_select_province_massive + desc = activity_feast_province_desc_citadel_of_aleppo + } + } + ### Theodosian Walls + #### Standing in for "Constantinople's guts" because otherwise we'd use the Hagia Sophia, and that would be weird. + if = { + limit = { has_building_or_higher = theodosian_walls_01 } + add = { + value = @weight_up_ai_select_province_massive + desc = activity_feast_province_desc_theodosian_walls + } + } + ### Hall of Heroes + if = { + limit = { has_building_or_higher = hall_of_heroes_01 } + add = { + value = @weight_up_ai_select_province_medium + desc = activity_feast_province_desc_hall_of_heroes + } + } + } + + ################### + # ACTIVITY-SPECIFIC PULSES + ################### + + pulse_actions = { + entries = { + spouse_skill_diplomacy_improves spouse_gives_host_prestige spouse_manages_feast_splendidly spouse_impresses_clergy spouse_gives_hook + relation_gains_friend children_bonding hook_trusting_guest guest_tells_fantastic_joke + excellent_food lauded_food guest_impressed_by_court_artifact friend_lauds_efforts courtly_vassals_appeased impressed_courtly_vassal + impressed_guest_honor guest_of_honor_impressed guest_of_honor_praised + guest_chokes_on_bone guest_brawl spouse_insults_host ridiculed_food + host_gains_diplo_xp host_gains_steward_xp host_gains_intrigue_xp + leftover_food_giveaway virtuous_feast noble_privileges good_kitty good_puppy antiquarian_admires_artifact jester_entertained_guests apa_executioner + } + chance_of_no_event = 5 + } + + on_start = { + #if = { + # limit = { + # NOT = { + # exists = global_var:feasts_worldwide + # } + # } + # set_global_variable = { + # name = feasts_worldwide + # value = 1 + # } + #} + #else = { + # change_global_variable = { + # name = feasts_worldwide + # add = 1 + # } + #} + scope:host = { + if = { + limit = { + has_character_flag = feast_ai_override + } + remove_character_flag = feast_ai_override + } + if = { + limit = { + has_character_modifier = mpo_nerge_feast_discount + } + remove_character_modifier = mpo_nerge_feast_discount + } + if = { + limit = { has_variable = mpo_nerge_1060_free_feast } + remove_variable = mpo_nerge_1060_free_feast + } + #Mandala Serenity tracker + if = { + limit = { + government_has_flag = government_is_mandala + scope:activity = { + has_activity_option = { + category = feast_option_food + option = feast_food_good + } + has_activity_option = { + category = feast_option_courses + option = feast_courses_good + } + } + } + increment_variable_effect = { + VAR = num_exorbitant_feasts_hosted + VAL = 1 + } + } + } + set_variable = { + name = host_var + value = scope:host + } + add_activity_log_entry = { + key = feast_start_log + character = scope:host + score = 10 + } + if = { + limit = { is_murder_feast = yes } + scope:host = { + set_variable = { + name = recent_murder_feast_var + years = 15 + } + } + scope:activity = { + set_variable = { + name = murder_guest_var + value = scope:activity.special_guest:honorary_guest + } + } + scope:host = { #doing this to get the loc for invalidation cases + set_variable = { + name = murder_guest_host_var + value = scope:activity.special_guest:honorary_guest + } + } + if = { + limit = { + scope:activity.special_guest:honorary_guest = scope:host.liege + } + scope:host = { set_variable = murder_feast_liege_var } + } + if = { + limit = { + scope:activity.special_guest:honorary_guest = scope:host.faith.religious_head + } + scope:host = { set_variable = murder_feast_head_of_faith_var } + } + } + scope:host = { + if = { + limit = { + ai_sociability > 0 + is_ai = yes + } + random = { + chance = { + value = 0.5 # One in 200 feasts + if = { + limit = { + has_trait = gluttonous + } + add = 0.5 + } + if = { + limit = { + has_trait = comfort_eater + } + add = 0.5 + } + if = { + limit = { + ai_rationality <= -25 + has_personality_extroverted_trigger = yes + } + add = 0.5 + } + } + add_character_flag = feasts_a_lot + } + } + } + #fires hostage reunion event, if hostage giver is also present + every_attending_character = { + limit = { + is_hostage_warden = yes + has_bp2_dlc_trigger = yes + this != scope:host + } + trigger_event = { + id = bp2_yearly.6120 + days = 2 + } + } + } + + on_enter_passive_state = { + trigger_event = feast.7002 + } + + on_enter_active_state = { + surveyor_no_stone_unturned_perk_effect = yes + } + + # Effects run when the activity completes after its last phase + # root = character in this phase + # scope:activity = the activity + # scope:host = host of the activity + on_complete = { + # Run conclusion stuff here + if = { + limit = { this = scope:host } + location = { save_scope_as = activity_location } + if = { + limit = { + is_murder_feast = yes + scope:host = { NOT = { has_variable = murder_feast_murder_back_down } } + } + scope:activity.var:murder_guest_var = { save_scope_as = murder_guest } + scope:host = { + save_scope_as = root_scope + trigger_event = feast.7110 + disburse_murder_feast_activity_rewards = yes + } + } + else_if = { + limit = { this = scope:host } + scope:host = { + save_scope_as = root_scope + trigger_event = feast.7101 + disburse_feast_activity_rewards = yes + } + } + # Various post-feast effects. + if = { + limit = { + has_character_flag = murdered_someone_during_feast + } + remove_character_flag = murdered_someone_during_feast + } + ## A vassal was promised a feast (vassal.2101) + if = { + limit = { + exists = var:was_promised_a_feast + var:was_promised_a_feast = { is_alive = yes } + } + trigger_event = { + id = vassal.2110 + days = { 7 14 } + } + } + ## Hold Court: A vassal sponsored a feast (vassal.2101) + if = { + limit = { + exists = var:hold_court_sponsored_a_feast + has_royal_court = yes + has_dlc_feature = royal_court + } + trigger_event = { + id = hold_court.3001 + days = { 15 20 } + } + } + ## Remove strife variable. + if = { + limit = { has_variable = strife_loss_total } + remove_variable = strife_loss_total + } + # Accolade stuff + if = { + limit = { + has_character_modifier = accolade_charmer_party_modifier + } + remove_character_modifier = accolade_charmer_party_modifier + } + if = { + limit = { + has_character_modifier = accolade_charmer_party_high_modifier + } + remove_character_modifier = accolade_charmer_party_high_modifier + } + ## mpo_contract_events.0055 feast modifier + if = { + limit = { has_character_modifier = mpo_si_slaughtered_animals } + remove_character_modifier = mpo_si_slaughtered_animals + } + } + # Conclusion event for guests + else = { + if = { + limit = { + is_alive = yes + this != scope:host + is_imprisoned = no + } + if = { + limit = { + is_murder_feast = yes + scope:host = { NOT = { has_variable = murder_feast_murder_back_down } } + } + scope:activity.var:murder_guest_var = { save_scope_as = murder_guest } + trigger_event = feast_default.8061 + } + else = { + disburse_feast_reveler_rewards = yes + trigger_event = feast.7151 + } + } + } + # Achievements. + scope:host = { + if = { + limit = { + exists = global_var:started_black_dinner_achievement + is_ai = no + scope:activity = { + has_activity_option = { + category = special_type + option = feast_type_murder + } + } + NOR = { + has_variable = murder_feast_murder_failure_var + has_variable = murder_feast_murder_back_down + } + } + set_global_variable = { + name = finished_black_dinner_achievement + value = yes + } + } + if = { + limit = { + var:tgp_ceremonial_liege_events_0020_discount ?= flag:feast + } + remove_variable = tgp_ceremonial_liege_events_0020_discount + } + } + + # Struggle Catalysts + fp3_struggle_catalysts_for_activities_effect = yes + } +} diff --git a/common/activities/activity_types/funeral.txt b/common/activities/activity_types/funeral.txt new file mode 100644 index 00000000..1ce7790a --- /dev/null +++ b/common/activities/activity_types/funeral.txt @@ -0,0 +1,1694 @@ +@weight_up_ai_select_province_small = 10 +@weight_up_ai_select_province_medium = 50 +@weight_up_ai_select_province_large = 250 +@weight_up_ai_select_province_massive = 500 + +@funeral_cost_gold_low = tiny_gold_value +@funeral_cost_gold_medium = medium_gold_value +@funeral_cost_gold_high = major_gold_value + +activity_funeral = { + is_shown = { + highest_held_title_tier > tier_barony + is_landed = yes + trigger_if = { + limit = { + is_ai = yes + } + is_at_war = no + short_term_gold >= funeral_activity_cost + } + has_ce1_dlc_trigger = yes + #Every other activity must be blocked until an uncrowned AI crowns themselves + trigger_if = { + limit = { + is_ai = yes + } + NOT = { + has_realm_law = uncrowned + } + } + } + + can_start_showing_failures_only = { + NOT = { is_activity_type_on_cooldown = activity_funeral } + age >= 12 + is_available = yes + trigger_if = { + limit = { + is_ai = no + } + custom_tooltip = { + text = has_someone_selected_to_bury + exists = scope:body_to_bury + } + } + trigger_if = { + limit = { + is_ai = yes + } + has_available_funeral_target = yes + } + } + + can_plan = { + custom_tooltip = { + text = has_someone_to_bury_tt + has_available_funeral_target = yes + } + } + + can_start = { + custom_tooltip = { + text = has_someone_to_bury_tt + has_available_funeral_target = yes + } + } + + is_valid = { + scope:host = { + is_alive = yes + is_imprisoned = no + is_landed = yes + NOT = { is_incapable = yes } + } + # If no one shows up + trigger_if = { + limit = { + is_current_phase_active = yes + } + has_attending_activity_guests = yes + } + } + + on_host_death = { + if = { # Transfer hostly duties to the heir if possible + limit = { + exists = scope:host.player_heir + any_attending_character = { this = scope:host.player_heir } + } + scope:host.player_heir = { save_scope_as = new_host } + #Also inherit the travel plan + if = { + limit = { + scope:host.current_travel_plan = { + any_entourage_character = { this = scope:new_host } + } + } + scope:host.current_travel_plan = { set_travel_plan_owner = scope:new_host } + } + scope:activity = { set_activity_host = scope:new_host } + scope:new_host = { + primary_title = { save_scope_as = host_title } + trigger_event = { + id = funeral.0002 + days = 1 + } + } + } + else = { # Otherwise, tell everyone to go home + every_attending_character = { + limit = { is_alive = yes } + trigger_event = { + id = funeral.0001 + days = 1 # So you don't get spammed + } + } + } + } + + ################### + # PARAMETERS + ################### + + is_single_location = yes + + province_filter = realm + ai_province_filter = capital + + max_route_deviation_mult = 2.0 + + is_location_valid = { + has_holding = yes + } + + province_description = { + desc = activity_funeral_province_desc + # +++ / triple plus good + # Triple good / +++ + triggered_desc = { # Has a big cool temple of your faith + trigger = { + has_holy_building = yes + } + desc = activity_funeral_major_religious_building + } + triggered_desc = { # Has a tower of silence + trigger = { + has_building_or_higher = tower_of_silence_01 + } + desc = activity_funeral_tos + } + triggered_desc = { #Wavel Cathedral + trigger = { + has_building_or_higher = wawel_cathedral_01 + } + desc = activity_funeral_wavel + } + # Double good / ++ + triggered_desc = { + trigger = { + barony = { + is_holy_site_of = scope:host.faith + } + } + desc = activity_funeral_holy_site + } + # Things your religion values + triggered_desc = { + trigger = { + scope:host.faith = { has_doctrine_parameter = sky_burials_active } + is_mountainous_trigger = yes + } + desc = activity_funeral_mountain + } + # Good / + + triggered_desc = { + trigger = { + has_building_or_higher = temple_01 + faith.religion = scope:host.faith.religion + } + desc = activity_funeral_temple + } + } + + max_province_icons = 5 + + province_score = { + value = 0 + # BUILDINGS + # Triple good / +++ + if = { # Has a big cool temple of your faith + limit = { + has_holy_building = yes + } + add = 100 + } + if = { # Wavel Cathedral + limit = { + has_building_or_higher = wawel_cathedral_01 + } + add = 100 #Also a holy building so this means +200 + } + if = { # Has a tower of silence + limit = { + has_building_or_higher = tower_of_silence_01 + } + add = 100 + } + # Double good / ++ + if = { + limit = { + barony = { + is_holy_site_of = scope:host.faith + } + } + add = 50 + } + # Things your religion values + if = { + limit = { + scope:host.faith = { has_doctrine_parameter = sky_burials_active } + is_mountainous_trigger = yes + } + add = 50 + } + # Good / + + if = { + limit = { + has_building_or_higher = temple_01 + faith.religion = scope:host.faith.religion + } + add = 25 + } + } + + cooldown = { years = standard_funeral_cooldown_time } + + # desc is only shown in debug AI watch window + ai_will_do = { + add = { + value = 30 + desc = "Base" + } + add = { + value = ai_greed + multiply = -0.25 + desc = "ai_greed" + } + add = { + value = ai_sociability + multiply = 0.5 + desc = "ai_sociability" + } + if = { + limit = { + ai_energy < 0 + } + add = { + add = ai_energy + desc = "ai_energy" + } + } + if = { + limit = { has_trait = gregarious } + add = { + value = 10 + desc = "Is gregarious" + } + } + if = { + limit = { has_trait = shy } + add = { + value = -30 + desc = "Is shy" + } + } + if = { + limit = { has_trait = inappetetic } + add = { + value = -30 + desc = "Is inappetetic" + } + } + if = { + limit = { has_trait = reclusive } + add = { + value = -30 + desc = "Is reclusive" + } + } + if = { + limit = { + short_term_gold >= funeral_activity_cost + short_term_gold >= major_gold_value + } + add = { + value = 30 + desc = "Got gold to burn" + } + } + if = { + limit = { has_trait = lifestyle_reveler } + add = { + value = 20 + desc = "Is Reveler" + } + } + if = { + limit = { + has_royal_court = yes + has_court_type = court_intrigue + } + add = { + value = 10 + desc = "Intrigue court trait" + } + } + if = { + limit = { has_trait = comfort_eater } + add = { + value = 10 + desc = "Is Comfort Eater" + } + } + if = { + limit = { has_trait = drunkard } + add = { + value = 10 + desc = "Is Drunkard" + } + } + if = { + limit = { has_trait = gluttonous } + add = { + value = 10 + desc = "Is Gluttonous" + } + } + if = { + limit = { has_trait = hashishiyah } + add = { + value = 10 + desc = "Has Munchies" + } + } + # Stress + if = { # Low Stress + limit = { + stress >= lower_than_baseline_stress + NOT = { has_trait = shy } + } + add = { + value = 10 + desc = "lower_than_baseline_stress" + } + } + if = { # High Stress + limit = { + stress >= higher_than_baseline_stress + NOT = { has_trait = shy } + } + add = { + value = 10 + desc = "higher_than_baseline_stress" + } + } + if = { # Very High Stress + limit = { + stress >= high_stress + NOT = { has_trait = shy } + } + add = { + value = 10 + desc = "high_stress" + } + } + if = { + limit = { + culture = { + has_cultural_tradition = tradition_culinary_art + } + } + add = { + value = 20 + desc = "Host culture has Culinary Artists Cultural Tradition" + } + } + if = { + limit = { + faith = { has_doctrine = tenet_ritual_celebrations } + } + add = { + value = 35 + desc = "Host culture has Ritual Celebrations Cultural Tradition" + } + } + if = { + limit = { + faith = { has_doctrine = tenet_hedonistic } + } + add = { + value = 35 + desc = "Host faith has Hedonistic Tenet" + } + } + if = { + limit = { + host.faith = { + has_doctrine = tenet_asceticism + } + } + add = { + value = -20 + desc = "Host faith has Asceticism tenet" + } + } + if = { + limit = { + top_liege != this + has_vassal_stance = courtly + } + add = { + value = 10 + desc = courtly + } + } + if = { + limit = { ai_has_warlike_personality = yes } + add = { + value = -30 + desc = "Warlike" + } + } + if = { + limit = { + ai_has_warlike_personality = yes + war_chest_gold < war_chest_gold_maximum + } + multiply = { + value = 0.25 + desc = "Warlike" + } + } + # Economic Archetype + if = { # Too busy booming the economy + limit = { + OR = { + ai_has_economical_boom_personality = yes + has_character_flag = ai_boom + } + } + add = { + value = -200 + desc = "Builder" + } + } + if = { # Funerals are good... and pious + limit = { ai_has_pious_builder_personality = yes } + add = { + value = 50 + desc = "Pious Builder" + } + } + # Legitimacy + if = { + limit = { + is_valid_for_legitimacy_change = yes + } + if = { # Low Legitimacy + limit = { + OR = { + legitimacy_level = 1 + legitimacy_level = 2 + } + } + add = { + value = 20 + desc = "low_legitimacy" + } + } + if = { # Very Low Legitimacy + limit = { + legitimacy_level = 0 + } + add = { + value = 30 + desc = "low_legitimacy" + } + } + } + # Plague + if = { + limit = { + any_held_title = { + title_tier = county + has_province_with_epidemic = { intensity < apocalyptic } + } + would_follow_social_distancing_value >= -1 + } + add = { + value = -60 + desc = "Plague in Domain" + } + } + else_if = { + limit = { + any_realm_county = { + has_province_with_epidemic = { intensity < apocalyptic } + } + would_follow_social_distancing_value >= -1 + } + add = { + value = -20 + desc = "Plague in Top Realm" + } + } + if = { + limit = { + any_held_title = { + title_tier = county + has_province_with_epidemic = { intensity = apocalyptic } + } + } + add = { + value = -200 + desc = "Apocalyptic Plague in Domain" + } + } + else_if = { + limit = { + any_held_title = { + title_tier = county + has_province_with_epidemic = { intensity = apocalyptic } + } + } + add = { + value = -40 + desc = "Apocalyptic Plague in Top Realm" + } + } + } + + ################### + # GUEST HANDLING + ################### + + max_guests = 40 + + guest_invite_rules = { + rules = { + # Relations. + 2 = activity_invite_rule_rivals_if_appropriate + + # Family. + 3 = activity_invite_rule_extended_family + + # Magnates. + 4 = activity_invite_neighbouring_rulers + + # Misc landless. + 5 = activity_invite_rule_knights + + # MP + 6 = activity_invite_mp + } + defaults = { + 1 = activity_invite_rule_friends + 1 = activity_invite_rule_potential_friends + 2 = activity_invite_rule_lovers + 2 = activity_invite_rule_potential_lovers + 1 = activity_invite_rule_close_family + 1 = activity_invite_rule_liege + 1 = activity_invite_rule_suzerain + 1 = activity_invite_rule_tributaries + 1 = activity_invite_rule_vassals + 1 = activity_invite_rule_confederates + 2 = activity_invite_rule_fellow_vassals + 3 = activity_invite_rule_courtiers + 4 = activity_invite_rule_guests + 1 = activity_invite_spouses + 1 = activity_invite_rule_landless_adventurers_restricted_range + } + } + + can_be_activity_guest = { + age >= 12 + is_healthy = yes + in_diplomatic_range = scope:host + } + + host_intents = { + intents = { mourn_intent murder_attendee_intent woo_attendee_intent befriend_attendee_intent legitimacy_intent } + default = mourn_intent + } + + guest_intents = { + intents = { mourn_intent murder_attendee_intent woo_attendee_intent befriend_attendee_intent legitimacy_intent } + default = mourn_intent + } + + guest_join_chance = { + base = 10 + base_activity_modifier = yes + + # Scripted Modifiers + activity_guest_shared_ai_accept_modifier = yes + } + + travel_entourage_selection = { + weight = { + value = standard_travel_entourage_additions + if = { + limit = { + OR = { + has_trait = gregarious + has_trait = drunkard + has_trait = hashishiyah + has_trait = gluttonous + has_trait = comfort_eater + } + } + add = 10 + } + } + max = 18 + invite_rule_order = 3 + } + + cost = { + gold = { + add = { + value = 0 + desc = funeral_activity_cost_desc + add = { + value = funeral_activity_cost + desc = funeral_activity_cost_desc + } + add = { + value = funeral_activity_cost + multiply = activity_cost_scale_by_era + subtract = funeral_activity_cost + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + scope:province ?= { + OR = { + has_building_or_higher = holy_site_cathedral_01 + has_building_or_higher = holy_site_mosque_01 + has_building_or_higher = holy_site_pagan_grand_temple_01 + has_building_or_higher = holy_site_indian_grand_temple_01 + has_building_or_higher = holy_site_other_grand_temple_01 + has_building_or_higher = tower_of_silence_01 + # TGP + has_building_or_higher = holy_site_buddhist_grand_temple_01 + has_building_or_higher = holy_site_japanese_temple_01 + has_building_or_higher = holy_site_chinese_temple_01 + has_building_or_higher = holy_site_se_asia_pagan_temple_01 + } + } + } + add = { + value = funeral_activity_cost + multiply = funeral_activity_cost_increase_max + subtract = funeral_activity_cost + desc = funeral_cost_increase_great_temple + } + } + if = { + limit = { + root.faith ?= { has_doctrine_parameter = mummification_funeral } + } + add = { + value = funeral_activity_cost + multiply = 2 + subtract = funeral_activity_cost + desc = funeral_cost_increase_mummification + } + } + if = { + limit = { + root.faith ?= { has_doctrine_parameter = cremation_funeral } + } + add = { + value = funeral_activity_cost + multiply = funeral_activity_cost_discount_max + subtract = funeral_activity_cost + desc = funeral_cost_discount_cremation + } + } + if = { + limit = { + domicile ?= { has_domicile_parameter = estate_cheaper_funeral_cost } + } + subtract = { + value = 0 + add = { + value = funeral_activity_cost + add = { + value = feast_activity_cost + multiply = activity_cost_scale_by_era + subtract = feast_activity_cost + } + } + multiply = estate_cheaper_funeral_cost_value + desc = estate_cheaper_funeral_cost_desc + } + } + if = { + limit = { + confederation ?= { has_cohesion_level_parameter = any_member_activity_cost_reduced } + } + multiply = { + value = 0.9 + desc = CB_COHESION_PARAMETER_DISCOUNT + } + } + } + if = { + limit = { + has_title = title:e_minister_of_revenue + } + multiply = 0.85 + } + } + } + + ui_predicted_cost = { + # All costs are balanced on County/Early Era starting point + gold = { + add = { # Base Cost, scaled by era + value = funeral_activity_cost + multiply = activity_cost_scale_by_era + } + add = { # Ceremony + value = 0 # Bad Option Cost + add = 10 # Normal Option Cost + add = 35 # Good Option Cost + # Scale the sum of the options by era and tier + add = { + value = 45 + multiply = activity_cost_scale_by_tier + } + add = { + value = 45 + multiply = activity_cost_scale_by_era + } + # Divide by 3 (num of levels for this option) so we get the average option cost + divide = 3 + } + save_temporary_value_as = pre_discount_funeral_cost_ui + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = scope:pre_discount_funeral_cost_ui + multiply = law_legacy_cost_reduction_mult + } + } + if = { + limit = { + confederation ?= { has_cohesion_level_parameter = any_member_activity_cost_reduced } + } + multiply = { + value = 0.9 + desc = CB_COHESION_PARAMETER_DISCOUNT + } + } + + # Make it a multiple of 5 (rounded up) + divide = 5 + ceiling = yes + multiply = 5 + if = { + limit = { + has_title = title:e_minister_of_revenue + } + multiply = 0.85 + } + } + } + + ################### + # GRAPHICS + ################### + + map_entity = { + trigger = { + activity_location.culture = { + OR = { + has_graphical_iranian_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_steppe_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + } + } + } + reference = "building_mena_feast_01_entity" + } + + map_entity = { + trigger = { + activity_location.culture = { + has_graphical_india_culture_group_trigger = yes + } + } + reference = "building_indian_feast_01_entity" + } + + map_entity = "building_western_feast_01_entity" + + # Travel + background = { # Bridge + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + is_riverside_province = yes + geographical_region = world_europe + OR = { + terrain = farmlands + terrain = plains + terrain = mountains + terrain = hills + } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_bridge.dds" + environment = "environment_travel_bridge" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #Rice Fields - If we have Paddy fields AND/or terraced hills + #This goes before other terrain since it can override in many different terrains if built + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + OR = { + terrain = terraced_hills + has_building_or_higher = paddy_fields_01 + } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_rice_fields.dds" + environment = "environment_tgp_rice_fields" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_rice_fields" + } + + background = { #Farmlands - East Asia + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_farm_asia.dds" + environment = "environment_tgp_farm_asia" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_farm_asia" + } + + background = { # Farmland, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_farm.dds" + environment = "environment_travel_farmlands" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { # Farmland, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/farms.dds" + environment = "environment_event_farms" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #Desert, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_desert_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_desert.dds" + environment = "environment_travel_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + background = { #Desert, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_desert_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/desert.dds" + environment = "environment_event_bp1_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { #forest snowy + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location ?= { hunt_snowy_forest_trigger = yes } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_hunt_snowy_forest.dds" + environment = "environment_hunt_snowy_forest" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #forest_pine + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_forest_pine_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/forest_pine.dds" + environment = "environment_event_forest_pine" + ambience = "event:/SFX/Events/Backgrounds/coniferous_forest_day" + } + + background = { #forest + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_forest_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/forest.dds" + environment = "environment_event_forest" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #mountains, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_mountains_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_mountains.dds" + environment = "environment_travel_mountain_settlement" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + background = { #mountains, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_mountains_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/mountains.dds" + environment = "environment_event_mountains" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #steppe, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_steppe_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_steppe.dds" + environment = "environment_travel_steppe_settlement" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + background = { #steppe, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_steppe_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/steppe.dds" + environment = "environment_event_steppe" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + + background = { #drylands (formerly desert) + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_drylands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/drylands.dds" + environment = "environment_event_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { #wetlands + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_wetlands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_wetlands.dds" + environment = "environment_event_bp1_wetlands" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #jungle + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_jungle_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_jungle.dds" + environment = "environment_event_bp1_jungle" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #plains, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_plains_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + environment = "environment_travel_hills_settlement" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { #plains, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_plains_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_plains.dds" + environment = "environment_event_bp1_plains" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #hills, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_hills_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + environment = "environment_travel_hills_settlement" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { #hills, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_hills_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_hills.dds" + environment = "environment_event_bp1_hills" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #sea + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + is_sea_province = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/fp1_ocean.dds" + environment = "environment_event_fp1_ocean" + ambience = "event:/DLC/FP1/SFX/Events/event_ocean_longship" + } + # End Travel + + background = { + trigger = { + exists = scope:activity + exists = scope:host + scope:host = { + faith = { + has_doctrine_parameter = cremation_funeral + } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_bonfire.dds" + environment = "environment_event_bp1_bonfire" + ambience = "event:/SFX/Events/Backgrounds/burning_building" + } + background = { + trigger = { + exists = scope:activity + exists = scope:host + scope:host.culture = { + has_graphical_east_asia_culture_group_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_chinese_corridor_night.dds" + environment = "environment_tgp_chinese_corridor_night" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_chinese_corridor_night" + } + background = { + texture = "gfx/interface/illustrations/event_scenes/fp4_catacombs.dds" + environment = "environment_ce1_catacombs" + ambience = "event:/SFX/Events/Backgrounds/FP4/fp4_condemned_village" + } + + window_characters = { + + host = { + camera = camera_event_center + + effect = { + if = { + limit = { + OR = { + scope:host.location = scope:activity.activity_location + scope:host.location = { is_sea_province = yes } + } + } + scope:host = { + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:host.location = { is_sea_province = yes } + } + animation = survey + } + triggered_animation = { + trigger = { + scope:activity.var:body_to_bury = { + killer ?= scope:host + } + } + animation = eccentric + } + triggered_animation = { + trigger = { + scope:character.faith = { + has_doctrine_parameter = bewailment_funeral + } + } + animation = { wailing grief } + } + triggered_animation = { + trigger = { + scope:character.faith = { + NOT = { has_doctrine_parameter = bewailment_funeral } + } + } + animation = { grief sadness } + } + + #Fallback + animation = grief + } + } + + travel_host = { + camera = camera_event_horse_left + + effect = { + if = { + limit = { + NOR = { + scope:host.location = scope:activity.activity_location + scope:host.location = { is_sea_province = yes } + } + } + scope:host = { + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { scope:character = { has_trait = impatient } } + animation = { jockey_gallop } + } + animation = jockey_walk + } + } + + guest = { + camera = camera_event_left + + effect = { + every_attending_character = { + limit = { + scope:host.location = scope:activity.activity_location + } + add_to_list = characters + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:character.faith = { + has_doctrine_parameter = bewailment_funeral + } + } + animation = { sadness } + } + triggered_animation = { + trigger = { + scope:character.faith = { + NOT = { has_doctrine_parameter = bewailment_funeral } + } + } + animation = { wailing } + } + #Fallback + animation = grief + } + } + + guest = { + camera = camera_event_center + + effect = { + every_attending_character = { + limit = { + scope:host.location = scope:activity.activity_location + } + add_to_list = characters + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:character.faith = { + has_doctrine_parameter = bewailment_funeral + } + } + animation = { stress crying } + } + triggered_animation = { + trigger = { + scope:character.faith = { + NOT = { has_doctrine_parameter = bewailment_funeral } + } + } + animation = { stress crying } + } + #Fallback + animation = grief + } + } + + body = { + camera = camera_event_center + + effect = { + if = { + limit = { + exists = scope:activity.var:body_to_bury + } + scope:activity.var:body_to_bury = { + add_to_list = characters + } + } + } + + scripted_animation = { + animation = dead + } + } + } + + ################### + # OPTIONS + ################### + + options = { + # How much do you spend on pomp and fancy stuff at the funeral? + + # How much do you spend on the religious ceremony? + funeral_option_ceremony = { + funeral_ceremony_bad = { + is_shown = { has_dlc_feature = advanced_activities } + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_cheap_expense_value + # Quantity preference. + add = activity_option_food_prefers_small_volume_value + } + } + funeral_ceremony_normal = { + default = yes + + cost = { + gold = { + add = { + value = 0 + desc = funeral_ceremony_normal + add = { + value = 10 + desc = funeral_ceremony_normal + } + add = { + value = 10 + multiply = activity_cost_scale_by_tier + subtract = 10 + desc = activity_cost_scale_by_tier_desc + } + add = { + value = 10 + multiply = activity_cost_scale_by_era + subtract = 10 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = 10 + add = { + value = 10 + multiply = activity_cost_scale_by_tier + subtract = 10 + } + add = { + value = 10 + multiply = activity_cost_scale_by_era + subtract = 10 + } + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + } + } + } + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_middling_expense_value + # Quantity preference. + ## We just use slightly reduced quantity prefs here. + add = { + value = activity_option_prefers_large_volume_value + multiply = 0.5 + } + } + } + funeral_ceremony_good = { + is_shown = { has_dlc_feature = advanced_activities } + + cost = { + gold = { + add = { + value = 0 + desc = funeral_ceremony_good + add = { + value = 35 + desc = funeral_ceremony_good + } + add = { + value = 35 + multiply = activity_cost_scale_by_tier + subtract = 35 + desc = activity_cost_scale_by_tier_desc + } + add = { + value = 35 + multiply = activity_cost_scale_by_era + subtract = 35 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = 35 + add = { + value = 35 + multiply = activity_cost_scale_by_tier + subtract = 35 + } + add = { + value = 35 + multiply = activity_cost_scale_by_era + subtract = 35 + } + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + } + } + } + + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_heavy_expense_value + # Quantity preference. + add = activity_option_prefers_large_volume_value + } + } + } + } + + ################### + # PHASES + ################### + + max_guest_arrival_delay_time = { months = 8 } + + phases = { + # Mingling and socialising + funeral_phase_wake = { + order = 1 + is_predefined = yes + + is_shown = { always = yes } + + on_phase_active = { + # Sort some stuff on the host. + if = { + limit = { this = scope:host } + + scope:activity = { progress_activity_phase_after = { months = 3 } } + } + } + + on_weekly_pulse = { + scope:activity.var:body_to_bury = { save_scope_as = deceased } + root.involved_activity = { save_scope_as = activity } + trigger_event = { on_action = funeral_wake_pulse } + } + } + + # The funeral ceremony itself + funeral_phase_ceremony = { + order = 2 + is_predefined = yes + + on_enter_phase = { + if = { + limit = { this = scope:host } + + # No passive state for the toast, just jump right into it + scope:activity = { progress_activity_phase_after = { days = 5 } } + } + } + + on_phase_active = { + if = { + limit = { this = scope:host } + scope:activity = { save_scope_as = activity } + trigger_event = funeral.0100 + scope:activity = { progress_activity_phase_after = { weeks = 1 } } + } + } + } + } + + ai_check_interval_by_tier = { + barony = 0 + county = 60 + duchy = 60 + kingdom = 60 + empire = 60 + hegemony = 60 + } + + ai_will_select_province = { + # Base + value = 0 + # BUILDINGS + # Triple good / +++ + if = { # Has a big cool temple of your faith + limit = { + barony = { + is_holy_site_of = scope:host.faith + } + has_holy_building = yes + } + add = { + value = @weight_up_ai_select_province_large + desc = activity_funeral_major_religious_building + } + } + if = { # Has a big cool temple of your faith + limit = { + has_building_or_higher = wawel_cathedral_01 + } + add = { + value = @weight_up_ai_select_province_large + desc = activity_funeral_wavel + } + } + if = { # Has a tower of silence + limit = { + has_building_or_higher = tower_of_silence_01 + } + add = { + value = @weight_up_ai_select_province_large + desc = activity_funeral_tos + } + } + # Double good / ++ + if = { + limit = { + barony = { + is_holy_site_of = scope:host.faith + } + } + add = { + value = @weight_up_ai_select_province_medium + desc = activity_funeral_holy_site + } + } + # Things your religion values + if = { + limit = { + scope:host.faith = { has_doctrine_parameter = sky_burials_active } + is_mountainous_trigger = yes + } + add = { + value = @weight_up_ai_select_province_medium + desc = activity_funeral_mountain + } + } + # Good / + + if = { + limit = { + has_building_or_higher = temple_01 + faith.religion = scope:host.faith.religion + } + add = { + value = @weight_up_ai_select_province_small + desc = activity_funeral_temple + } + } + } + + ################### + # ACTIVITY-SPECIFIC PULSES + ################### + + pulse_actions = { + entries = { + spouse_skill_diplomacy_improves spouse_gives_host_prestige spouse_impresses_clergy spouse_gives_hook + relation_gains_friend children_bonding hook_trusting_guest guest_tells_fantastic_joke + excellent_food lauded_food guest_impressed_by_court_artifact friend_lauds_efforts courtly_vassals_appeased impressed_courtly_vassal + guest_of_honor_praised + guest_chokes_on_bone guest_brawl spouse_insults_host ridiculed_food + host_gains_diplo_xp host_gains_steward_xp host_gains_intrigue_xp + good_kitty good_puppy antiquarian_admires_artifact jester_entertained_guests apa_executioner + } + chance_of_no_event = 5 + } + + on_start = { + if = { + limit = { + scope:host = { + is_ai = yes + } + } + scope:host = { + funeral_add_funeral_targets_to_list = { + LIST_NAME = funeral_activity_targets + } + random_in_list = { + variable = funeral_activity_targets + save_scope_as = body_to_bury + } + clear_variable_list = funeral_activity_targets + } + set_variable = { + name = body_to_bury + value = scope:body_to_bury + } + } + random = { + chance = 5 + set_variable = { + name = incorrupt_body + value = yes + years = 5 + } + } + scope:activity.var:body_to_bury = { + set_dead_character_variable = { + name = body_has_been_disposed + value = yes + years = 5 + } + } + } + + on_enter_passive_state = { + trigger_event = funeral.0010 + } + + on_enter_active_state = { + surveyor_no_stone_unturned_perk_effect = yes + } + # Effects run when the activity completes after its last phase + # root = character in this phase + # scope:activity = the activity + # scope:host = host of the activity + on_complete = { + if = { + limit = { + is_ai = no + promoted_legend ?= { + legend_protagonist = scope:activity.var:body_to_bury + } + } + add_achievement_global_variable_effect = { + VARIABLE = ce1_f_achievement_unlocked + VALUE = yes + } + } + scope:host = { + if = { + limit = { + has_character_flag = cancelled_coronation + } + remove_character_flag = cancelled_coronation + } + } + } + + activity_planner_widgets = { + funeral_deceased_selection_button = "activity_options_plugins" + funeral_deceased_selection_widget = "activity_plugin_center" + } + + activity_window_widgets = { + funeral_deceased_portrait = "activity_top_layer_event_widgets" + funeral_deceased_portrait = "activity_top_layer_idle_widgets" + } +} diff --git a/common/activities/activity_types/hike.txt b/common/activities/activity_types/hike.txt new file mode 100644 index 00000000..de4bb5b8 --- /dev/null +++ b/common/activities/activity_types/hike.txt @@ -0,0 +1,1030 @@ +activity_roaming = { + is_shown = { + has_bp3_dlc_trigger = yes + highest_held_title_tier >= tier_county + is_adult = yes + #Every other activity must be blocked until an uncrowned AI crowns themselves + trigger_if = { + limit = { + is_ai = yes + } + NOT = { + has_realm_law = uncrowned + } + } + has_perk = roaming_perk + } + + can_always_plan = no + + can_start_showing_failures_only = { + NOT = { is_activity_type_on_cooldown = activity_roaming } + is_available = yes + age >= 16 + } + + is_valid = { + scope:host = { + is_alive = yes + is_imprisoned = no + NOT = { is_incapable = yes } + OR = { + is_ai = no + is_landed = yes + } + } + } + + is_location_valid = { + trigger_if = { + limit = { + scope:host = { + is_ai = no + OR = { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + is_landed = no + } + } + } + custom_tooltip = { + text = hike_province_requirement_landless + scope:host.location = { + OR = { + AND = { + this = root + exists = county + } + any_neighboring_province = { + this = root + exists = county + } + } + } + } + } + trigger_else_if = { + limit = { + scope:host = { + is_ai = no + is_landless_adventurer = no + } + } + custom_tooltip = { + text = hike_province_requirement_landed + scope:host = { + any_realm_province = { + this = root + } + } + } + } + trigger_else = { + always = yes + } + } + + on_enter_travel_state = { + add_character_flag = roaming_character + } + + on_invalidated = { + invalidation_imprisoned_effect = yes + invalidation_incapable_effect = yes + invalidation_unlanded_effect = yes + } + + on_enter_active_state = { + surveyor_no_stone_unturned_perk_effect = yes + } + + on_complete = { + scope:activity.special_guest:honorary_guest_traveling_companion ?= { save_scope_as = special_guest } + if = { + limit = { + this = scope:host + } + scope:activity = { + add_activity_log_entry = { + key = roaming_end_of_the_journey_key + tags = { pulse_action } + character = root + show_in_conclusion = yes + show_as_tooltip = { + ordered_attending_character = { + order_by = { + value = 1 + if = { + limit = { this = scope:host } + add = 20 + } + } + if = { + limit = { + has_variable = roaming_tally_opinion + exists = scope:special_guest + this = scope:host + } + reverse_add_opinion = { + modifier = friendliness_opinion + target = scope:special_guest + opinion = var:roaming_tally_opinion + } + } + else_if = { + limit = { + has_variable = roaming_tally_opinion + exists = scope:special_guest + this = scope:special_guest + } + reverse_add_opinion = { + modifier = friendliness_opinion + target = scope:host + opinion = var:roaming_tally_opinion + } + } + if = { + limit = { + has_variable = roaming_tally_fame + } + add_prestige_experience = var:roaming_tally_fame + } + if = { + limit = { + has_variable = roaming_tally_stress + } + stress_impact = { base = var:roaming_tally_stress } + } + if = { + limit = { + has_variable = roaming_tally_piety + } + add_piety = var:roaming_tally_piety + } + if = { + limit = { + has_variable = roaming_tally_gold + } + add_gold = var:roaming_tally_gold + } + if = { + limit = { + has_variable = roaming_tally_mystic + } + add_trait_force_tooltip = lifestyle_mystic + } + if = { + limit = { + has_variable = roaming_tally_mystic_xp + } + add_trait_xp = { + trait = lifestyle_mystic + value = var:roaming_tally_mystic_xp + } + } + if = { + limit = { + has_variable = roaming_tally_athletic + } + add_trait_force_tooltip = athletic + } + if = { + limit = { + has_variable = roaming_tally_learning_skill + } + add_learning_skill = var:roaming_tally_learning_skill + } + if = { + limit = { + has_variable = roaming_tally_learning_lifestyle_xp + } + add_learning_lifestyle_xp = var:roaming_tally_learning_lifestyle_xp + } + } + } + } + hidden_effect = { + every_attending_character = { + remove_variable = roaming_tally_opinion + remove_variable = roaming_tally_fame + remove_variable = roaming_tally_stress + remove_variable = roaming_tally_piety + remove_variable = roaming_tally_gold + remove_variable = roaming_tally_mystic + remove_variable = roaming_tally_mystic_xp + remove_variable = roaming_tally_athletic + remove_variable = roaming_tally_learning_skill + remove_variable = roaming_tally_learning_lifestyle_xp + } + } + } + } + } + + on_host_death = { + invalidation_host_death_effect = yes + } + + province_filter = all + ai_province_filter = domain + + max_province_icons = 3 + allow_zero_guest_invites = yes + open_invite = no + + province_description = { + desc = activity_roaming_province_desc + + triggered_desc = { + trigger = { + has_province_modifier = wayfarer_astronomical_phenomenon + } + desc = activity_roaming_astronomical_phenomenon + } + + triggered_desc = { + trigger = { + OR = { + terrain = desert_mountains + terrain = mountains + } + } + desc = activity_roaming_good_terrain + } + + triggered_desc = { + trigger = { + OR = { + terrain = oasis + terrain = hills + terrain = taiga + terrain = forest + terrain = jungle + } + } + desc = activity_roaming_ok_terrain + } + + triggered_desc = { + trigger = { has_holding = no } + desc = activity_roaming_empty_holding + } + } + + province_score = { + add = roaming_province_reference_value + } + + cost = { + gold = { + add = { + value = standard_roaming_activity_cost + desc = hunt_base_cost + } + if = { + limit = { + has_title = title:e_minister_of_revenue + } + multiply = 0.85 + } + } + } + + ui_predicted_cost = { + gold = { + # Base Cost + value = standard_roaming_activity_cost + # Make it a multiple of 5 (rounded up) + divide = 5 + ceiling = yes + multiply = 5 + if = { + limit = { + has_title = title:e_minister_of_revenue + } + multiply = 0.85 + } + } + } + + cooldown = { months = 18 } + + ################### + # PHASES AND OPTIONS + ################### + + phases = { + phase_roaming = { + is_predefined = yes + location_source = pickable + + on_phase_active = { + scope:activity.special_guest:honorary_guest_traveling_companion ?= { save_scope_as = special_guest } + trigger_event = { id = bp3_roaming.0005 } + if = { + limit = { + this = scope:host + scope:activity = { + has_activity_option = { + category = roaming_option_travel_length + option = roaming_long_length + } + } + } + scope:activity = { progress_activity_phase_after = { days = 90 } } + trigger_event = { + on_action = random_roaming_event_pulse + days = 15 + } + trigger_event = { + on_action = random_roaming_event_pulse + days = 30 + } + trigger_event = { + on_action = roaming_mid_activity_event_pulse + days = 45 + } + trigger_event = { + on_action = random_roaming_event_pulse + days = 60 + } + trigger_event = { + on_action = random_roaming_event_pulse + days = 75 + } + } + else_if = { + limit = { + this = scope:host + } + scope:activity = { progress_activity_phase_after = { days = 60 } } + trigger_event = { + on_action = random_roaming_event_pulse + days = 15 + } + trigger_event = { + on_action = roaming_mid_activity_event_pulse + days = 30 + } + trigger_event = { + on_action = random_roaming_event_pulse + days = 45 + } + } + if = { + limit = { + this = scope:host + scope:host.location = { + has_province_modifier = wayfarer_astronomical_phenomenon + } + } + trigger_event = { + id = bp3_roaming.0200 + days = 40 + } + } + } + + on_end = { + random_list = { + 1 = { add_character_flag = roaming_weak_stress_loss } + 1 = { add_character_flag = roaming_medium_stress_loss } + 1 = { add_character_flag = roaming_strong_stress_loss } + 1 = { add_character_flag = roaming_very_strong_stress_loss } + } + roaming_tally_variable_effect = { TYPE = stress VALUE = roaming_outro_stress_loss_value } + roaming_tally_stress_impact_effect = { TRAIT = athletic VALUE = medium_stress_impact_loss } + roaming_tally_stress_impact_effect = { TRAIT = lifestyle_traveler VALUE = minor_stress_impact_loss } + trigger_event = { id = bp3_roaming.0010 } + } + } + } + + options = { + roaming_option_travel_length = { + roaming_short_length = { + default = yes + } + roaming_long_length = { + is_valid = { + has_perk = the_home_away_from_home_perk + } + + cost = { + gold = { + add = { + value = 35 + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + desc = roaming_long_length + } + } + } + } + } + } + + max_guest_arrival_delay_time = { months = 1 } + + + ################### + # ACTIVITY-SPECIFIC PULSES + ################### + + pulse_actions = { + entries = { + apa_roaming_feather + apa_roaming_ancient_runestone + apa_roaming_ancient_megalith + apa_roaming_natural_arch + apa_roaming_coast_seashells + apa_roaming_forest_gnarled_oak + apa_roaming_rabbit_family + apa_roaming_desert_lilies + apa_roaming_desert_lilies_oasis + apa_roaming_desert_fox + apa_roaming_mountain_river + apa_roaming_lonely_yurt + apa_roaming_standing_stone + apa_roaming_wildflowers + apa_roaming_lost_sheep + apa_roaming_friendly_dog + apa_roaming_grazing_cattle + apa_roaming_rock_outcrop_plains + apa_roaming_rock_outcrop_hills + apa_roaming_waterfall + apa_roaming_heron + apa_roaming_dragonfly + apa_roaming_ducklings + apa_roaming_dates + apa_roaming_oasis_shelter + apa_roaming_oasis_traders + apa_roaming_traders + apa_roaming_luminescent_mushrooms + apa_roaming_wild_berries + } + chance_of_no_event = 0 + } + + ################### + # AI VALUES + ################### + + # desc is only shown in debug AI watch window + ai_will_do = { + value = 50 + + if = { + limit = { + has_trait = lazy + } + add = -10 + } + + #Can you actually afford this? + if = { + limit = { + NOT = { can_make_expensive_purchase_trigger = { PRICE = activity_minor_gold_value } } + } + add = -75 + } + } + + ai_check_interval = 60 + + ai_will_select_province = { + value = 10 + } + + ################### + # GUEST HANDLING + ################### + + host_intents = { + default = reduce_stress_intent + intents = { reduce_stress_intent roaming_storyteller_intent roaming_befriend_intent roaming_mystic_intent } + } + + guest_intents = { + intents = { reduce_stress_intent } + default = reduce_stress_intent + } + + can_be_activity_guest = { + roaming_activity_special_guest_trigger = yes + } + + guest_invite_rules = { + defaults = { + 2 = activity_invite_rule_lovers + 1 = activity_invite_rule_friends + 1 = activity_invite_rule_close_family + 1 = activity_invite_spouses + 1 = activity_invite_rule_knights + } + } + + special_guests = { + honorary_guest_traveling_companion = { + is_required = no + + is_shown = { + + } + + can_pick = { + roaming_activity_special_guest_trigger = yes + } + + ai_will_do = { + value = 10 + } + } + } + + travel_entourage_selection = { + weight = { + value = 10 + if = { + limit = { + NOT = { is_in_list = special_guests } + } + multiply = 0 + } + } + + invite_rule_order = 1 + + # Up to how many characters to select for a player + max = 2 + + # Up to how many characters to select for an AI + ai_max = 2 + } + + max_guests = 1 + + guest_join_chance = { + base = 10 + + modifier = { + factor = 0 + NOT = { is_in_list = special_guests } + } + } + + ################### + # GRAPHICS + ################### + + # Travel + background = { # Bridge + trigger = { + scope:host.location = { + is_riverside_province = yes + geographical_region = world_europe + OR = { + terrain = farmlands + terrain = plains + terrain = mountains + terrain = hills + } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_bridge.dds" + environment = "environment_travel_bridge" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { # Riverside + trigger = { + scope:host.location = { + has_winter_trigger = no + is_riverside_province = yes + OR = { + terrain = plains + terrain = mountains + terrain = hills + terrain = steppe + } + OR = { + NOT = { exists = province_owner } + this = scope:province + } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp3_riverside.dds" + environment = "environment_event_bp1_plains" + ambience = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ep2_event_grand_hunt_waterbank" + } + + background = { #Rice Fields - If we have Paddy fields AND/or terraced hills + #This goes before other terrain since it can override in many different terrains if built + trigger = { + scope:host.location = { + terrain = farmlands + OR = { + terrain = terraced_hills + has_building_or_higher = paddy_fields_01 + } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_rice_fields.dds" + environment = "environment_tgp_rice_fields" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_rice_fields" + } + + background = { #Farmlands - East Asia + trigger = { + scope:host.location = { + terrain = farmlands + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_farm_asia.dds" + environment = "environment_tgp_farm_asia" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_farm_asia" + } + + background = { # Farmland/Plains, winter + trigger = { + scope:host.location = { + has_winter_trigger = yes + OR = { + terrain = farmlands + terrain = plains + } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp3_plains_winter.dds" + environment = "environment_event_farms" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { # Farmland, settled + trigger = { + scope:host.location = { + terrain = farmlands + exists = province_owner + this != scope:province + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_farm.dds" + environment = "environment_travel_farmlands" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { # Farmland, unsettled + trigger = { + scope:host.location = { + terrain = farmlands + OR = { + NOT = { exists = province_owner } + this = scope:province + } + } + } + texture = "gfx/interface/illustrations/event_scenes/farms.dds" + environment = "environment_event_farms" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { # Plains, settled + trigger = { + scope:host.location = { + graphical_plains_trigger = yes + exists = province_owner + this != scope:province + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + environment = "environment_travel_hills_settlement" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { # Plains, unsettled + trigger = { + scope:host.location = { + graphical_plains_trigger = yes + OR = { + NOT = { exists = province_owner } + this = scope:province + } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_plains.dds" + environment = "environment_event_bp1_plains" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { # Desert, settled + trigger = { + scope:host.location = { + graphical_wilderness_desert_trigger = yes + exists = province_owner + this != scope:province + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_desert.dds" + environment = "environment_travel_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + background = { # Desert, unsettled + trigger = { + scope:host.location = { + graphical_wilderness_desert_trigger = yes + OR = { + NOT = { exists = province_owner } + this = scope:province + } + } + } + texture = "gfx/interface/illustrations/event_scenes/desert.dds" + environment = "environment_event_bp1_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { # Forest, Winter + trigger = { + scope:host.location ?= { + has_winter_trigger = yes + OR = { + graphical_wilderness_forest_trigger = yes + graphical_wilderness_forest_pine_trigger = yes + } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_hunt_snowy_forest.dds" + environment = "environment_hunt_snowy_forest" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { # Forest_pine + trigger = { + scope:host.location = { + graphical_wilderness_forest_pine_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/forest_pine.dds" + environment = "environment_event_forest_pine" + ambience = "event:/SFX/Events/Backgrounds/coniferous_forest_day" + } + + background = { # Forest + trigger = { + scope:host.location = { + graphical_wilderness_forest_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/forest.dds" + environment = "environment_event_forest" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { # Mountains, winter + trigger = { + scope:host.location = { + has_winter_trigger = yes + graphical_wilderness_mountains_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp3_mountain_winter.dds" + environment = "environment_event_mountains" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + background = { # Mountains, settled + trigger = { + scope:host.location = { + graphical_wilderness_mountains_trigger = yes + exists = province_owner + this != scope:province + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_mountains.dds" + environment = "environment_travel_mountain_settlement" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + background = { # Mountains, unsettled + trigger = { + scope:host.location = { + graphical_wilderness_mountains_trigger = yes + OR = { + NOT = { exists = province_owner } + this = scope:province + } + } + } + texture = "gfx/interface/illustrations/event_scenes/mountains.dds" + environment = "environment_event_mountains" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { # Steppe, winter + trigger = { + scope:host.location = { + has_winter_trigger = yes + graphical_wilderness_steppe_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp3_steppe_winter.dds" + environment = "environment_event_steppe" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + background = { # Steppe, settled + trigger = { + scope:host.location = { + graphical_wilderness_steppe_trigger = yes + exists = province_owner + this != scope:province + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_steppe.dds" + environment = "environment_travel_steppe_settlement" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + background = { # Steppe, unsettled + trigger = { + scope:host.location = { + graphical_wilderness_steppe_trigger = yes + OR = { + NOT = { exists = province_owner } + this = scope:province + } + } + } + texture = "gfx/interface/illustrations/event_scenes/steppe.dds" + environment = "environment_event_steppe" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + + background = { # Drylands (formerly desert) + trigger = { + scope:host.location = { + graphical_drylands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/drylands.dds" + environment = "environment_event_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { # Wetlands, Winter + trigger = { + scope:host.location = { + has_winter_trigger = yes + graphical_wilderness_wetlands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp3_wetlands_winter.dds" + environment = "environment_event_bp1_wetlands" + ambience = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ep2_event_grand_hunt_waterbank" + } + background = { # Wetlands + trigger = { + scope:host.location = { + graphical_wilderness_wetlands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_wetlands.dds" + environment = "environment_event_bp1_wetlands" + ambience = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ep2_event_grand_hunt_waterbank" + } + + background = { # Jungle + trigger = { + scope:host.location = { + graphical_wilderness_jungle_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_jungle.dds" + environment = "environment_event_bp1_jungle" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { # Hills, winter + trigger = { + scope:host.location = { + has_winter_trigger = yes + graphical_hills_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp3_hills_winter.dds" + environment = "environment_event_bp1_hills" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { # Hills, settled + trigger = { + scope:host.location = { + graphical_hills_trigger = yes + exists = province_owner + this != scope:province + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + environment = "environment_travel_hills_settlement" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { # Hills, unsettled + trigger = { + scope:host.location = { + graphical_hills_trigger = yes + OR = { + NOT = { exists = province_owner } + this = scope:province + } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_hills.dds" + environment = "environment_event_bp1_hills" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { # Sea + trigger = { + scope:host.location = { + is_sea_province = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/fp1_ocean.dds" + environment = "environment_event_fp1_ocean" + ambience = "event:/DLC/FP1/SFX/Events/event_ocean_longship" + } + + window_characters = { + + host = { + camera = camera_body + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + scope:host = { + add_to_list = characters + } + } + } + + scripted_animation = { + animation = survey_staff + } + } + + travel_host = { + camera = camera_event_horse_left + + effect = { + if = { + limit = { + scope:host.location != scope:activity.activity_location + } + scope:host = { + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:character.location = { is_sea_province = yes } + } + animation = { idle } + } + triggered_animation = { + trigger = { scope:character = { has_trait = impatient } } + animation = { jockey_gallop } + } + animation = jockey_walk + } + } + + guest = { + camera = camera_body + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + } + add_to_list = characters + } + } + } + + scripted_animation = { + animation = idle + } + } + } +} diff --git a/common/activities/activity_types/hunt.txt b/common/activities/activity_types/hunt.txt new file mode 100644 index 00000000..f76f96f2 --- /dev/null +++ b/common/activities/activity_types/hunt.txt @@ -0,0 +1,5789 @@ +activity_hunt = { + is_shown = { + highest_held_title_tier > tier_barony + is_playable_character = yes + trigger_if = { + limit = { + is_ai = yes + } + years_from_game_start >= 3 + is_at_war = no + ai_should_focus_on_building_in_their_capital = no + OR = { + has_character_flag = hunts_a_lot + short_term_gold >= hunt_activity_base_cost + AND = { + gold >= hunt_activity_base_cost + ai_has_warlike_personality = yes + } + AND = { + house ?= { has_house_power_parameter = hunts_costs_treasury } + short_term_treasury >= hunt_activity_base_cost + } + government_has_flag = government_is_nomadic + } + trigger_if = { # Throttle Counts + limit = { + highest_held_title_tier = tier_county + NOR = { + has_government = japan_administrative_government + has_government = japan_feudal_government + } + } + ai_boldness >= 100 + } + } + #Every other activity must be blocked until an uncrowned AI crowns themselves + trigger_if = { + limit = { + is_ai = yes + } + NOT = { + has_realm_law = uncrowned + } + } + } + + can_start_showing_failures_only = { + NOT = { is_activity_type_on_cooldown = activity_hunt } + is_available_adult = yes + can_hunt_trigger = yes + trigger_if = { + limit = { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + } + custom_tooltip = { + text = adventurer_3_courtiers + any_courtier = { + count >= 3 + is_available_adult = yes + can_hunt_trigger = yes + } + } + } + trigger_if = { + limit = { + government_has_flag = government_is_nomadic + } + is_landed = yes + } + } + + is_valid = { + scope:host = { + is_alive = yes + is_imprisoned = no + is_playable_character = yes + NOT = { is_incapable = yes } + top_liege = { + NOT = { has_variable = banned_falconry_hunts } + } + } + NOT = { has_variable = hunt_invalidated } + trigger_if = { + limit = { exists = var:hunt_started } + exists = var:animal_type + } + # If no one shows up + trigger_if = { + limit = { + is_current_phase_active = yes + } + has_attending_activity_guests = yes + } + } + + on_invalidated = { + # Save scopes for flavor events + scope:activity = { + var:hunt_invalidated_flavor ?= { save_scope_as = invalidated_flavor } + var:hunt_invalidated_culprit ?= { save_scope_as = invalidated_culprit } + every_attending_character = { + limit = { + is_ai = no + is_alive = yes + NOR = { + scope:invalidated_culprit ?= this + scope:activity.activity_host = this + } + } + add_to_list = attendees + } + if = { # Wound + limit = { var:hunt_invalidated ?= flag:wounded } + save_scope_as = wounded_invalidation + every_in_list = { + list = attendees + trigger_event = hunt.0086 + } + } + else_if = { # Death + limit = { var:hunt_invalidated ?= flag:death } + save_scope_as = death_invalidation + every_in_list = { + list = attendees + trigger_event = hunt.0080 + } + } + else_if = { # Assassination Attempt + limit = { var:hunt_invalidated ?= flag:assassination_attempt } + save_scope_as = assassination_invalidation + every_in_list = { + list = attendees + trigger_event = hunt.0083 + } + } + else_if = { # Abduction Attempt + limit = { var:hunt_invalidated ?= flag:abduction_attempt } + save_scope_as = abduction_attempt_invalidation + every_in_list = { + list = attendees + trigger_event = hunt.0084 + } + } + else_if = { # Abduction + limit = { var:hunt_invalidated ?= flag:abduction } + save_scope_as = abduction_invalidation + every_in_list = { + list = attendees + trigger_event = hunt.0085 + } + } + else_if = { # Host Imprisoned + limit = { + scope:host = { is_imprisoned = yes} + } + every_in_list = { + list = attendees + trigger_event = hunt.0082 + } + } + # Host becomes unlanded + else_if = { + limit = { + scope:host = { + is_playable_character = no + } + } + scope:activity = { + activity_type = { save_scope_as = activity_type } + } + every_in_list = { + list = attendees + limit = { this != scope:host } + trigger_event = activity_system.0320 + } + } + else_if = { + limit = { + scope:host = { is_incapable = yes } + } + scope:activity = { + activity_type = { save_scope_as = activity_type } + } + scope:host = { + trigger_event = activity_system.0330 + } + every_in_list = { + list = attendees + limit = { this != scope:host } + trigger_event = activity_system.0331 + } + } + else_if = { # No one shows up + limit = { + has_attending_activity_guests = no + NOT = { + scope:host = { has_character_flag = no_claims_to_land } + } + } + scope:activity = { + activity_type = { save_scope_as = activity_type } + activity_location = { save_scope_as = location } + } + scope:host = { trigger_event = activity_system.0100 } + } + else_if = { # You don't have hunting rights + limit = { var:hunt_invalidated ?= flag:landless } + save_scope_as = landless_invalidation + every_in_list = { + list = attendees + trigger_event = hunt.0080 + } + } + else_if = { + limit = { + has_activity_option = { category = special_type option = hunt_type_falconry } + scope:host.top_liege = { + NOT = { has_variable = banned_falconry_hunts } + } + } + every_in_list = { + list = attendees + limit = { this != scope:host } + trigger_event = tgp_hunt.0003 + } + } + else_if = { + limit = { scope:host = { is_alive = no } } + every_in_list = { + list = attendees + trigger_event = hunt.0087 + } + } + + hunt_remove_variables_effect = yes + } + } + + cooldown = { years = standard_hunting_cooldown_time } # 4 years + + cost = { + herd = { + if = { + limit = { + OR = { + NOT = { government_has_flag = government_is_nomadic } + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + } + } + value = 0 + } + else = { + add = { + value = domicile.minor_herd_value + min = 50 + desc = hunt_base_cost + } + if = { + limit = { + any_character_situation = { + any_situation_sub_region = { + has_sub_region_phase_parameter = the_great_steppe_cheaper_hunts + any_situation_sub_region_participant_group = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = root + } + } + } + + } + multiply = { + value = 0.5 + desc = steppe_season_hunt_discount_desc + } + } + if = { + limit = { + confederation ?= { has_cohesion_level_parameter = any_member_activity_cost_reduced } + } + multiply = { + value = 0.9 + desc = CB_COHESION_PARAMETER_DISCOUNT + } + } + } + if = { + limit = { + var:tgp_ceremonial_liege_events_0020_discount ?= flag:hunt + } + multiply = { + value = 0.85 + desc = tgp_ceremonial_liege_events_0020_discount_desc + } + } + } + gold = { + if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + has_character_flag = free_hunt + government_has_flag = government_is_mandala + AND = { + house ?= { has_house_power_parameter = hunts_costs_treasury } + has_treasury = yes + } + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + } + } + value = 0 + } + else = { + add = { + add = { + value = hunt_activity_base_cost #Base level + desc = hunt_base_cost + } + add = { + value = hunt_activity_base_cost + multiply = activity_cost_scale_by_era + subtract = hunt_activity_base_cost + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + domicile ?= { has_domicile_parameter = estate_cheaper_hunt_cost } + } + subtract = { + value = 0 + add = { + value = hunt_activity_base_cost + add = { + value = hunt_activity_base_cost + multiply = activity_cost_scale_by_era + subtract = hunt_activity_base_cost + } + } + multiply = estate_cheaper_hunt_cost_value + desc = estate_cheaper_hunt_cost_desc + } + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = 0 + add = { + value = hunt_activity_base_cost + add = { + value = hunt_activity_base_cost + multiply = activity_cost_scale_by_era + subtract = hunt_activity_base_cost + } + } + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + if = { + limit = { + has_character_modifier = mpo_bountiful_hunting_modifier + } + multiply = { + value = 0.8 + desc = mpo_bountiful_hunting_modifier + } + } + #court.8140 + if = { + limit = { + has_character_flag = court_event_discount_hunt + } + multiply = { + value = 0.5 + desc = court_event_discount_desc + } + } + if = { + limit = { + government_has_flag = government_is_japan_feudal + } + multiply = { + value = 0.75 + desc = japan_feudal_government + } + } + if = { + limit = { + confederation ?= { has_cohesion_level_parameter = any_member_activity_cost_reduced } + } + multiply = { + value = 0.9 + desc = CB_COHESION_PARAMETER_DISCOUNT + } + } + if = { + limit = { + var:tgp_ceremonial_liege_events_0020_discount ?= flag:hunt + } + multiply = { + value = 0.85 + desc = tgp_ceremonial_liege_events_0020_discount_desc + } + } + } + } + if = { + limit = { + has_title = title:e_minister_of_revenue + } + multiply = 0.85 + } + } + treasury = { # Make sure this matches the gold cost above + if = { + limit = { + house ?= { has_house_power_parameter = hunts_costs_treasury } + has_treasury = yes + } + add = { + add = { + value = hunt_activity_base_cost #Base level + desc = hunt_base_cost + } + add = { + value = hunt_activity_base_cost + multiply = activity_cost_scale_by_era + subtract = hunt_activity_base_cost + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + domicile ?= { has_domicile_parameter = estate_cheaper_hunt_cost } + } + subtract = { + value = 0 + add = { + value = hunt_activity_base_cost + add = { + value = hunt_activity_base_cost + multiply = activity_cost_scale_by_era + subtract = hunt_activity_base_cost + } + } + multiply = estate_cheaper_hunt_cost_value + desc = estate_cheaper_hunt_cost_desc + } + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = 0 + add = { + value = hunt_activity_base_cost + add = { + value = hunt_activity_base_cost + multiply = activity_cost_scale_by_era + subtract = hunt_activity_base_cost + } + } + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + if = { + limit = { + has_character_modifier = mpo_bountiful_hunting_modifier + } + multiply = { + value = 0.8 + desc = mpo_bountiful_hunting_modifier + } + } + #court.8140 + if = { + limit = { + has_character_flag = court_event_discount_hunt + } + multiply = { + value = 0.5 + desc = court_event_discount_desc + } + } + if = { + limit = { + government_has_flag = government_is_japan_feudal + } + multiply = { + value = 0.75 + desc = japan_feudal_government + } + } + if = { + limit = { + confederation ?= { has_cohesion_level_parameter = any_member_activity_cost_reduced } + } + multiply = { + value = 0.9 + desc = CB_COHESION_PARAMETER_DISCOUNT + } + } + if = { + limit = { + var:tgp_ceremonial_liege_events_0020_discount ?= flag:hunt + } + multiply = { + value = 0.85 + desc = tgp_ceremonial_liege_events_0020_discount_desc + } + } + } + } + else = { + value = 0 + } + if = { + limit = { + has_title = title:e_minister_of_revenue + } + multiply = 0.85 + } + } + piety = { + if = { + limit = { + NOT = { government_has_flag = government_is_mandala } + } + value = 0 + } + else = { + add = { + add = { + value = hunt_activity_base_cost #Base level + desc = hunt_base_cost + } + add = { + value = hunt_activity_base_cost + multiply = activity_cost_scale_by_era + subtract = hunt_activity_base_cost + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + domicile ?= { has_domicile_parameter = estate_cheaper_hunt_cost } + } + subtract = { + value = 0 + add = { + value = hunt_activity_base_cost + add = { + value = hunt_activity_base_cost + multiply = activity_cost_scale_by_era + subtract = hunt_activity_base_cost + } + } + multiply = estate_cheaper_hunt_cost_value + desc = estate_cheaper_hunt_cost_desc + } + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = 0 + add = { + value = hunt_activity_base_cost + add = { + value = hunt_activity_base_cost + multiply = activity_cost_scale_by_era + subtract = hunt_activity_base_cost + } + } + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + if = { + limit = { + has_character_modifier = mpo_bountiful_hunting_modifier + } + multiply = { + value = 0.8 + desc = mpo_bountiful_hunting_modifier + } + } + #court.8140 + if = { + limit = { + has_character_flag = court_event_discount_hunt + } + multiply = { + value = 0.5 + desc = court_event_discount_desc + } + } + } + } + } + } + + ui_predicted_cost = { + # All costs are balanced on County/Early Era starting point + herd = { + if = { + limit = { + OR = { + NOT = { government_has_flag = government_is_nomadic } + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + } + } + value = 0 + } + else = { + add = { # Base cost, scaled by era + value = domicile.minor_herd_value + min = 50 + } + + # Options + add = { # Attendants + value = 0 # Local Game Keepers Cost + add = domicile.miniscule_herd_value # Search Parties Cost + add = domicile.minor_herd_value # Flushing Gangs Cost + # Divide by the number of option levels +2 to get an average option cost + divide = 5 + } + add = { # Party Size + value = 0 # Intimate Party Cost + add = domicile.miniscule_herd_value # Reasonable Party Cost + add = domicile.minor_herd_value # Substantial Party Cost + # Divide by the number of option levels +2 to get an average option cost + divide = 5 + } + + if = { + limit = { + any_character_situation = { + any_situation_sub_region = { + has_sub_region_phase_parameter = the_great_steppe_cheaper_hunts + any_situation_sub_region_participant_group = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = root + } + } + } + + } + multiply = { + value = 0.5 + } + } + + # Make it a multiple of 5 (rounded up) + divide = 5 + ceiling = yes + multiply = 5 + + if = { + limit = { + OR = { + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + } + } + multiply = 0 + } + if = { + limit = { + var:tgp_ceremonial_liege_events_0020_discount ?= flag:hunt + } + multiply = { + value = 0.85 + desc = tgp_ceremonial_liege_events_0020_discount_desc + } + } + } + } + gold = { + if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + government_has_flag = government_is_mandala + AND = { + house ?= { has_house_power_parameter = hunts_costs_treasury } + has_treasury = yes + } + } + } + value = 0 + } + else = { + add = { # Base cost, scaled by era + value = hunt_activity_base_cost + multiply = activity_cost_scale_by_era + } + + # Options + add = { # Attendants + value = 0 # Local Game Keepers Cost + add = 10 # Search Parties Cost + add = 35 # Flushing Gangs Cost + # Scale option costs by tier and era + multiply = activity_cost_scale_by_tier + multiply = activity_cost_scale_by_era + # Divide by the number of option levels to get an average option cost + divide = 3 + } + add = { # Party Size + value = 0 # Intimate Party Cost + add = 10 # Reasonable Party Cost + add = 35 # Substantial Party Cost + # Scale option costs by tier and era + multiply = activity_cost_scale_by_tier + multiply = activity_cost_scale_by_era + # Divide by the number of option levels to get an average option cost + divide = 3 + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = hunt_activity_base_cost + multiply = law_legacy_cost_reduction_mult + } + } + + #court.8140 + if = { + limit = { + has_character_flag = court_event_discount_feast + } + multiply = { + value = 0.5 + } + } + + # Adventurer + if = { + limit = { OR = { has_government = landless_adventurer_government has_government = landless_minority_government } } + multiply = 0.25 + } + + if = { + limit = { + var:tgp_ceremonial_liege_events_0020_discount ?= flag:hunt + } + multiply = { + value = 0.85 + desc = tgp_ceremonial_liege_events_0020_discount_desc + } + } + + # Make it a multiple of 5 (rounded up) + divide = 5 + ceiling = yes + multiply = 5 + } + if = { + limit = { + has_title = title:e_minister_of_revenue + } + multiply = 0.85 + } + } + treasury = { # Make sure this matches the gold cost above + if = { + limit = { + house ?= { has_house_power_parameter = hunts_costs_treasury } + has_treasury = yes + } + add = { # Base cost, scaled by era + value = hunt_activity_base_cost + multiply = activity_cost_scale_by_era + } + + # Options + add = { # Attendants + value = 0 # Local Game Keepers Cost + add = 10 # Search Parties Cost + add = 35 # Flushing Gangs Cost + # Scale option costs by tier and era + multiply = activity_cost_scale_by_tier + multiply = activity_cost_scale_by_era + # Divide by the number of option levels to get an average option cost + divide = 3 + } + add = { # Party Size + value = 0 # Intimate Party Cost + add = 10 # Reasonable Party Cost + add = 35 # Substantial Party Cost + # Scale option costs by tier and era + multiply = activity_cost_scale_by_tier + multiply = activity_cost_scale_by_era + # Divide by the number of option levels to get an average option cost + divide = 3 + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = hunt_activity_base_cost + multiply = law_legacy_cost_reduction_mult + } + } + + #court.8140 + if = { + limit = { + has_character_flag = court_event_discount_feast + } + multiply = { + value = 0.5 + } + } + + # Adventurer + if = { + limit = { OR = { has_government = landless_adventurer_government has_government = landless_minority_government } } + multiply = 0.25 + } + + if = { + limit = { + var:tgp_ceremonial_liege_events_0020_discount ?= flag:hunt + } + multiply = { + value = 0.85 + desc = tgp_ceremonial_liege_events_0020_discount_desc + } + } + + # Make it a multiple of 5 (rounded up) + divide = 5 + ceiling = yes + multiply = 5 + } + else = { + value = 0 + } + if = { + limit = { + has_title = title:e_minister_of_revenue + } + multiply = 0.85 + } + } + piety = { + if = { + limit = { + NOT = { government_has_flag = government_is_mandala } + } + value = 0 + } + else = { + add = { # Base cost, scaled by era + value = hunt_activity_base_cost + multiply = activity_cost_scale_by_era + } + + # Options + add = { # Attendants + value = 0 # Local Game Keepers Cost + add = 10 # Search Parties Cost + add = 35 # Flushing Gangs Cost + # Scale option costs by tier and era + multiply = activity_cost_scale_by_tier + multiply = activity_cost_scale_by_era + # Divide by the number of option levels to get an average option cost + divide = 3 + } + add = { # Party Size + value = 0 # Intimate Party Cost + add = 10 # Reasonable Party Cost + add = 35 # Substantial Party Cost + # Scale option costs by tier and era + multiply = activity_cost_scale_by_tier + multiply = activity_cost_scale_by_era + # Divide by the number of option levels to get an average option cost + divide = 3 + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = hunt_activity_base_cost + multiply = law_legacy_cost_reduction_mult + } + } + + #court.8140 + if = { + limit = { + has_character_flag = court_event_discount_feast + } + multiply = { + value = 0.5 + } + } + + # Make it a multiple of 5 (rounded up) + divide = 5 + ceiling = yes + multiply = 5 + } + } + } + + on_host_death = { + scope:activity = { + save_scope_as = death_invalidation + if = { + limit = { + has_activity_option = { category = special_type option = hunt_type_legendary } + } + save_scope_as = legendary_invalidation + } + } + scope:host = { + save_scope_as = invalidated_flavor + player_heir ?= { + save_scope_as = heir + add_character_flag = { + flag = hunt_heir + weeks = 1 + } + trigger_event = { id = hunt.0080 days = 1 } + } + } + } + + is_location_valid = { + custom_tooltip = { + text = activity_location_any_game_tt + hunt_animal_small_available_trigger = yes + } + trigger_if = { + limit = { scope:special_option ?= flag:hunt_type_legendary } + custom_tooltip = { + text = activity_hunt_location_legendary_sighting_tt + county = { + has_county_modifier = hunt_sighting_legendary_modifier + var:sighting_owner ?= scope:host + } + } + } + trigger_if = { + limit = { scope:special_option ?= flag:hunt_type_nerge } + custom_tooltip = { + text = activity_hunt_location_nerge_recently_visited_tt + county = { + scope:host = { + NOT = { + is_target_in_variable_list = { + name = recent_nerges + target = prev + } + } + } + } + } + } + } + + ai_will_do = { + value = 0 + + # Base + add = { + value = -10 + desc = "base" + } + if = { + limit = { + highest_held_title_tier <= tier_county + } + add = -20 + } + # ai_value + add = { + value = ai_greed + multiply = -0.5 + desc = "ai_greed" + } + add = { + value = ai_boldness + desc = "ai_boldness" + } + add = { + value = ai_sociability + multiply = 0.5 + desc = "ai_sociability" + } + if = { + limit = { + ai_energy < 0 + } + add = { + add = ai_energy + desc = "ai_energy" + } + } + # Dharmic Pacificism + if = { + limit = { + hunt_dharmic_pacificist_trigger = yes + NOT = { has_trait = sadistic } + } + add = { + value = -40 + desc = tenet_dharmic_pacifism_name + } + } + # Personality + if = { # Avoids responsibilities + limit = { has_trait = lazy } + add = { + value = 20 + desc = lazy + } + } + if = { + limit = { has_trait = ambitious } + add = { + value = 20 + desc = ambitious + } + } + else_if = { # Better things to do + limit = { has_trait = diligent } + add = { + value = -10 + desc = diligent + } + } + if = { # Likes hurting things + limit = { has_trait = sadistic } + add = { + value = 20 + desc = sadistic + } + } + else_if = { # Empathetic + limit = { has_trait = compassionate } + add = { + value = -10 + desc = compassionate + } + } + if = { # Likes to socialize + limit = { has_trait = gregarious } + add = { + value = 20 + desc = gregarious + } + } + else_if = { + limit = { has_trait = shy } + add = { + value = -10 + desc = shy + } + } + if = { + limit = { has_trait = reclusive } + add = { + value = -25 + desc = reclusive + } + } + # Prestige + if = { + limit = { prestige < 0 } + add = { + value = 30 + desc = "Very low prestige" + } + } + if = { + limit = { prestige_level <= 1 } + add = { + value = 5 + desc = "Low prestige level" + } + } + if = { + limit = { + prestige_level <= 2 + can_use_conquest_cbs_trigger = yes + ai_has_warlike_personality = yes + } + add = { + value = 15 + desc = "Can use conquest but has low prestige_level" + } + } + if = { + limit = { + prestige <= 500 + can_use_conquest_cbs_trigger = yes + ai_has_warlike_personality = yes + } + add = { + value = 25 + desc = "Can use conquest but has low prestige" + } + } + # Court + if = { + limit = { + has_royal_court = yes + has_court_type = court_warlike + } + add = { + value = 15 + desc = court_warlike + } + } + # Education + if = { + limit = { has_trait = education_martial } + add = { + value = 20 + desc = education_martial + } + } + # Culture + if = { # Prolific Hunters + limit = { + culture = { has_cultural_parameter = hunting_traits_more_common } + } + add = { + value = 20 + desc = "hunting_traits_more_common" + } + } + if = { # Prolific Hunters + limit = { + culture = { has_cultural_parameter = hunting_traits_more_valued } + } + add = { + value = 20 + desc = "hunting_traits_more_valued" + } + } + if = { # Sacred Hunts + limit = { + culture = { has_cultural_parameter = hunting_traits_more_pious } + } + add = { + value = 20 + desc = "hunting_traits_more_pious" + } + } + if = { # Bellicose + limit = { + culture = { has_cultural_pillar = ethos_bellicose } + } + add = { + value = 15 + desc = ethos_bellicose + } + } + # Lifestyle + if = { + limit = { has_trait = lifestyle_hunter } + add = { + value = 25 + desc = lifestyle_hunter + } + } + if = { + limit = { + has_trait = lifestyle_hunter + OR = { + has_trait_xp = { + trait = lifestyle_hunter + track = hunter + value >= trait_second_level + } + has_trait_xp = { + trait = lifestyle_hunter + track = falconer + value >= trait_second_level + } + } + } + add = { + value = 25 + desc = "experienced hunter" + } + } + # Stress + if = { # Low Stress + limit = { stress >= lower_than_baseline_stress } + add = { + value = 20 + desc = "lower_than_baseline_stress" + } + } + if = { # High Stress + limit = { stress >= higher_than_baseline_stress } + add = { + value = 20 + desc = "higher_than_baseline_stress" + } + } + if = { # Very High Stress + limit = { stress >= high_stress } + add = { + value = 20 + desc = "high_stress" + } + } + # Economic Archetype + if = { # Too busy booming the economy + limit = { + NOT = { government_has_flag = government_is_nomadic } + OR = { + ai_has_economical_boom_personality = yes + has_character_flag = ai_boom + } + } + add = { + value = -200 + desc = "Builder" + } + } + if = { # Prestige? Pffft. + limit = { ai_has_pious_builder_personality = yes } + add = { + value = -100 + desc = "Pious Builder" + } + } + if = { + limit = { + top_liege != this + has_vassal_stance = glory_hound + } + add = { + value = 10 + desc = glory_hound + } + } + if = { + limit = { ai_has_warlike_personality = yes } + add = { + value = 20 + desc = "Warlike" + } + } + # Economy Sanity + if = { # Work first, play later + limit = { + NOT = { government_has_flag = government_is_nomadic } + exists = capital_county + capital_county.title_province = { free_building_slots > 0 } + } + add = { + value = -35 + desc = "Work first, play later" + } + } + # Sightings + if = { + limit = { + NOT = { + any_sub_realm_county = { + OR = { + has_county_modifier = hunt_sighting_standard_modifier + has_county_modifier = hunt_sighting_dangerous_modifier + has_county_modifier = hunt_sighting_falconry_modifier + has_county_modifier = hunt_sighting_legendary_modifier + } + var:sighting_owner ?= root + } + } + } + add = { + value = -10 + desc = "No Sighting" + } + } + if = { + limit = { + any_sub_realm_county = { + OR = { + has_county_modifier = hunt_sighting_standard_modifier + has_county_modifier = hunt_sighting_dangerous_modifier + has_county_modifier = hunt_sighting_falconry_modifier + } + var:sighting_owner ?= root + } + } + add = { + value = 25 + desc = "Sighting" + } + } + if = { + limit = { + any_sub_realm_county = { + has_county_modifier = hunt_sighting_legendary_modifier + var:sighting_owner ?= root + } + } + add = { + value = 50 + desc = "Legendary Sighting" + } + } + if = { + limit = { + short_term_gold >= hunt_activity_base_cost + short_term_gold >= major_gold_value + } + add = { + value = 30 + desc = "Got gold to burn" + } + } + if = { + limit = { + house ?= { has_house_power_parameter = hunts_costs_treasury } + has_treasury = yes + short_term_treasury >= hunt_activity_base_cost + short_term_treasury >= major_gold_value + } + add = { + value = 30 + desc = "Got treasury to burn" + } + } + if = { + limit = { has_character_flag = hunts_a_lot } + add = { + value = 500 + desc = "hunts a lot" + } + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + add = { + value = 1000 + desc = "nomads love hunting" + } + } + if = { + limit = { + has_variable = conqueror + OR = { + AND = { + prestige_level < 4 + can_use_conquest_cbs_trigger = yes + } + prestige < 1000 + } + } + add = { + value = 1000 + desc = "conqueror looking for prestige" + } + } + if = { + limit = { + has_variable = conqueror + trigger_if = { + limit = { + prestige_level >= 4 + can_use_conquest_cbs_trigger = yes + } + prestige_level >= 4 + } + prestige >= 1000 + } + add = { + value = -5000 + desc = "conqueror sated for prestige" + } + } + # Legitimacy + if = { + limit = { + is_valid_for_legitimacy_change = yes + } + if = { # Low Legitimacy + limit = { + OR = { + legitimacy_level = 1 + legitimacy_level = 2 + } + } + add = { + value = 10 + desc = "low_legitimacy" + } + } + if = { # Very Low Legitimacy + limit = { + legitimacy_level = 0 + } + add = { + value = 20 + desc = "low_legitimacy" + } + } + } + # Plague + if = { + limit = { + any_held_title = { + title_tier = county + has_province_with_epidemic = { intensity < apocalyptic } + } + would_follow_social_distancing_value >= -1 + } + add = { + value = -60 + desc = "Plague in Domain" + } + } + else_if = { + limit = { + any_realm_county = { + has_province_with_epidemic = { intensity < apocalyptic } + } + would_follow_social_distancing_value >= -1 + } + add = { + value = -20 + desc = "Plague in Top Realm" + } + } + if = { + limit = { + any_held_title = { + title_tier = county + has_province_with_epidemic = { intensity = apocalyptic } + } + } + add = { + value = -200 + desc = "Apocalyptic Plague in Domain" + } + } + else_if = { + limit = { + any_held_title = { + title_tier = county + has_province_with_epidemic = { intensity = apocalyptic } + } + } + add = { + value = -40 + desc = "Apocalyptic Plague in Top Realm" + } + } + #Government type + if = { + limit = { government_has_flag = government_is_mandala } + add = { + value = -50 + desc = "Has Mandala Government" + } + } + if = { + limit = { + any_held_title = { + tier = tier_county + any_county_province = { + any_province_epidemic = { + count >= 1 + outbreak_intensity < apocalyptic + } + } + } + would_follow_social_distancing_value >= -1 + } + add = { + value = -60 + desc = "Plague in Domain" + } + } + else_if = { + limit = { + any_realm_county = { + any_county_province = { + any_province_epidemic = { + count >= 1 + outbreak_intensity < apocalyptic + } + } + } + would_follow_social_distancing_value >= -1 + } + add = { + value = -20 + desc = "Plague in Top Realm" + } + } + if = { + limit = { + any_held_title = { + tier = tier_county + any_county_province = { + any_province_epidemic = { + count >= 1 + outbreak_intensity = apocalyptic + } + } + } + } + add = { + value = -200 + desc = "Apocalyptic Plague in Domain" + } + } + else_if = { + limit = { + any_held_title = { + tier = tier_county + any_county_province = { + any_province_epidemic = { + count >= 1 + outbreak_intensity = apocalyptic + } + } + } + } + add = { + value = -40 + desc = "Apocalyptic Plague in Top Realm" + } + } + #ACH Greatest Hunter Oath + if = { + limit = { + has_character_modifier = oath_greatest_hunter + } + add = { + value = 200 + desc = "Greatest Hunter Oath" + } + } + } + + host_description = { + desc = activity_hunt_host_desc + triggered_desc = { + trigger = { + has_dlc_feature = legends + NOT = { has_game_rule = historical_legends_only } + } + desc = activity_legend_seed_tt + } + first_valid = { + triggered_desc = { + trigger = { + culture = { has_cultural_parameter = sacred_hunts } + } + desc = activity_hunt_host_desc_piety + } + desc = activity_hunt_host_desc_prestige + } + first_valid = { + triggered_desc = { + trigger = { has_trait = lifestyle_hunter } + desc = activity_hunt_host_desc_trait_xp + } + desc = activity_hunt_host_desc_trait + } + triggered_desc = { + trigger = { + has_dlc_feature = accolades + } + desc = activity_hunt_guest_desc_accolade + } + triggered_desc = { + trigger = { + is_landless_adventurer = no + NOT = { employs_court_position = master_of_hunt_court_position } + } + desc = activity_hunt_host_desc_moh + } + triggered_desc = { + trigger = { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + NOT = { employs_court_position = huntperson_camp_officer } + } + desc = activity_hunt_host_desc_huntsperson + } + triggered_desc = { + trigger = { + is_landed = yes + NOT = { + any_held_county = { + any_county_province = { + NOT = { exists = var:recent_hunt_held } + } + } + } + } + desc = activity_hunt_host_desc_recent + } + } + + guest_description = { + first_valid = { + triggered_desc = { + trigger = { + culture = { has_cultural_parameter = sacred_hunts } + } + desc = activity_hunt_host_desc_piety + } + desc = activity_hunt_host_desc_prestige + } + first_valid = { + triggered_desc = { + trigger = { has_trait = lifestyle_hunter } + desc = activity_hunt_host_desc_trait_xp + } + desc = activity_hunt_host_desc_trait + } + desc = activity_hunt_guest_desc_accolade + } + + conclusion_description = { + first_valid = { + triggered_desc = { + trigger = { + activity_is_nerge_type = no + scope:activity.var:hunt_success_chance >= 50 + scope:activity.var:hunt_success_chance_event >= hunt_activity_success_increase_medium_value + } + desc = hunt.9001.desc_good + } + triggered_desc = { + trigger = { + activity_is_nerge_type = no + scope:activity.var:hunt_success_chance >= 50 + scope:activity.var:hunt_success_chance_event < hunt_activity_success_decrease_minor_value + } + desc = hunt.9001.desc_good_bad + } + triggered_desc = { + trigger = { + activity_is_nerge_type = no + scope:activity.var:hunt_success_chance < 50 + scope:activity.var:hunt_success_chance_event < hunt_activity_success_decrease_minor_value + } + desc = hunt.9001.desc_bad + } + triggered_desc = { + trigger = { + activity_is_nerge_type = no + scope:activity.var:hunt_success_chance < 50 + scope:activity.var:hunt_success_chance_event >= hunt_activity_success_increase_medium_value + } + desc = hunt.9001.desc_bad_good + } + triggered_desc = { + trigger = { + activity_is_nerge_type = no + } + desc = hunt.9001.desc_same + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { category = special_type option = hunt_type_legendary } + } + } + desc = activity_hunt_conclusion_desc_legendary_success + } + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { category = special_type option = hunt_type_legendary } + } + } + desc = activity_hunt_conclusion_desc_legendary + } + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + } + desc = activity_hunt_conclusion_desc_falconry_success + } + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + } + desc = activity_hunt_conclusion_desc_falconry + } + triggered_desc = { + trigger = { + activity_is_nerge_type = no + scope:activity.var:hunt_success ?= flag:yes + } + desc = activity_hunt_conclusion_desc_standard_success + } + triggered_desc = { + trigger = { + activity_is_nerge_type = no + } + desc = activity_hunt_conclusion_desc_standard + } + } + first_valid = { # Nerge Text + triggered_desc = { + trigger = { + activity_is_nerge_type = yes + scope:activity.var:activity_special_type_progression < 25 + } + desc = activity_hunt_conclusion_nerge_desc_failed + } + triggered_desc = { + trigger = { + activity_is_nerge_type = yes + scope:activity.var:activity_special_type_progression <= 50 + } + desc = activity_hunt_conclusion_nerge_desc_standard + } + triggered_desc = { + trigger = { + activity_is_nerge_type = yes + scope:activity.var:activity_special_type_progression <= 100 + } + desc = activity_hunt_conclusion_nerge_desc_excellent + } + } + } + + ################### + # PARAMETERS + ################### + + is_single_location = yes + + ################### + # LOCATION + ################### + + province_filter = domicile_realm + ai_province_filter = domicile_domain + + province_description = { + desc = activity_hunt_province_desc + # +++ / triple plus good + triggered_desc = { + trigger = { + scope:special_option ?= flag:hunt_type_standard + NOT = { scope:special_option ?= flag:hunt_type_nerge } + county ?= { has_county_modifier = hunt_sighting_standard_modifier } + } + desc = activity_hunt_province_desc_standard_sighting + } + triggered_desc = { + trigger = { + scope:special_option ?= flag:hunt_type_standard + NOT = { scope:special_option ?= flag:hunt_type_nerge } + county ?= { has_county_modifier = hunt_sighting_dangerous_modifier } + } + desc = activity_hunt_province_desc_dangerous_sighting + } + triggered_desc = { + trigger = { + scope:special_option ?= flag:hunt_type_falconry + NOT = { scope:special_option ?= flag:hunt_type_nerge } + county ?= { has_county_modifier = hunt_sighting_falconry_modifier } + } + desc = activity_hunt_province_desc_falconry_sighting + } + triggered_desc = { + trigger = { + has_building = royal_forest_03 + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_royal_forest_major + } + triggered_desc = { + trigger = { + has_building_or_higher = hunting_grounds_06 + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_hunting_grounds_major + } + triggered_desc = { + trigger = { + has_building_or_higher = rainbow_mountains_01 + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_rainbow_mountains_major + } + triggered_desc = { + trigger = { + has_building_or_higher = visegrad_castle_01 + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_visegrad_castle_01_major + } + triggered_desc = { + trigger = { + OR = { + terrain = taiga + terrain = forest + terrain = mountains + terrain = jungle + } + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_terrain_great + } + triggered_desc = { + trigger = { + OR = { + has_province_modifier = inspection_hidden_hinterlands_recruit_modifier + has_province_modifier = inspection_hidden_hinterlands_hunters_modifier + } + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_hidden_hinterlands + } + triggered_desc = { + trigger = { + exists = county + county = { uses_county_fertility = yes } + county.county_fertility >= great_county_fertility_level + } + desc = activity_hunt_province_desc_fertility_great + } + # --- / triple minus bad + triggered_desc = { + trigger = { + OR = { + terrain = farmlands + terrain = floodplains + } + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_terrain_terrible + } + triggered_desc = { + trigger = { + exists = county + county.development_level >= medium_development_level + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_development_terrible + } + triggered_desc = { + trigger = { + has_building_or_higher = logging_camps_06 + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_logging_camps_major + } + triggered_desc = { + trigger = { + exists = var:recent_hunt_held + var:recent_hunt_held >= 5 + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_recent_hunt_major + } + # ++ / double plus good + triggered_desc = { + trigger = { + has_holding = no + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_no_holding + } + triggered_desc = { + trigger = { + has_building = royal_forest_02 + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_royal_forest_medium + } + triggered_desc = { + trigger = { + has_building_or_higher = hunting_grounds_03 + NOT = { has_building_or_higher = hunting_grounds_06 } + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_hunting_grounds_medium + } + triggered_desc = { + trigger = { + exists = county + county = { uses_county_fertility = yes } + county.county_fertility < great_county_fertility_level + county.county_fertility >= good_county_fertility_level + } + desc = activity_hunt_province_desc_fertility_good + } + # -- / double minus bad + triggered_desc = { + trigger = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = oasis + } + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_terrain_bad + } + triggered_desc = { + trigger = { + exists = county + county.development_level < medium_development_level + county.development_level >= bad_development_level + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_development_bad + } + triggered_desc = { + trigger = { + has_building_or_higher = logging_camps_03 + NOT = { has_building_or_higher = logging_camps_06 } + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_logging_camps_medium + } + triggered_desc = { + trigger = { + exists = var:recent_hunt_held + var:recent_hunt_held >= 2 + var:recent_hunt_held <= 4 + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_recent_hunt_medium + } + # + / plus good + triggered_desc = { + trigger = { + has_building = royal_forest_01 + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_royal_forest_minor + } + triggered_desc = { + trigger = { + has_building_or_higher = hunting_grounds_01 + NOT = { has_building_or_higher = hunting_grounds_03 } + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_hunting_grounds_minor + } + triggered_desc = { + trigger = { + county ?= { has_county_modifier = hunt_mismanaged_game_modifier } + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_punished_poachers + } + triggered_desc = { + trigger = { + county ?= { has_county_modifier = ep3_abundant_game_modifier } + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_abundant_game + } + triggered_desc = { + trigger = { + OR = { + terrain = hills + terrain = wetlands + } + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_terrain_good + } + triggered_desc = { + trigger = { + scope:host.culture ?= { + OR = { + AND = { # Forests + has_cultural_parameter = forest_hunt_success_chance + root = { + OR = { + terrain = forest + terrain = taiga + } + } + } + AND = { # Hills + has_cultural_parameter = hills_hunt_success_chance + root = { terrain = hills } + } + AND = { # Deserts + has_cultural_parameter = desert_hunt_success_chance + root = { + OR = { + terrain = desert + terrain = oasis + } + } + } + AND = { # Steppes + has_cultural_parameter = steppe_hunt_success_chance + root = { terrain = steppe } + } + AND = { # Mountains + has_cultural_parameter = mountains_hunt_success_chance + root = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + AND = { # Drylands + has_cultural_parameter = drylands_hunt_success_chance + root = { + OR = { + terrain = drylands + terrain = desert + } + } + } + AND = { # Jungle + has_cultural_parameter = jungle_hunt_success_chance + root = { terrain = jungle } + } + AND = { # Wetlands + has_cultural_parameter = wetlands_hunt_success_chance + root = { + OR = { + terrain = wetlands + terrain = floodplains + } + } + } + } + } + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_culture + } + triggered_desc = { + trigger = { + exists = county + county = { uses_county_fertility = yes } + county.county_fertility < good_county_fertility_level + county.county_fertility >= medium_county_fertility_level + } + desc = activity_hunt_province_desc_fertility + } + # - / minus bad + triggered_desc = { + trigger = { + exists = county + county.development_level < bad_development_level + county.development_level >= terrible_development_level + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_development + } + triggered_desc = { + trigger = { + county ?= { has_county_modifier = hunt_mismanaged_game_modifier } + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_mismanaged_game + } + triggered_desc = { + trigger = { + county ?= { has_county_modifier = ep3_wild_predators_modifier } + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_wild_predators + } + triggered_desc = { + trigger = { + has_building_or_higher = logging_camps_01 + NOT = { has_building_or_higher = logging_camps_03 } + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_logging_camps_minor + } + triggered_desc = { + trigger = { + exists = var:recent_hunt_held + var:recent_hunt_held <= 1 + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_recent_hunt_minor + } + } + + max_province_icons = 5 + + province_score = { + add = hunt_province_reference_value + if = { + limit = { + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + # SIGHTINGS + if = { + limit = { + OR = { + # Standard + AND = { + OR = { + county = { has_county_modifier = hunt_sighting_standard_modifier } + county = { has_county_modifier = hunt_sighting_dangerous_modifier } + } + scope:special_option ?= flag:hunt_type_standard + } + # Falconry + AND = { + county = { has_county_modifier = hunt_sighting_falconry_modifier } + scope:special_option ?= flag:hunt_type_falconry + } + } + } + add = 20 + } + # LEGENDARY BUILDING + if = { + limit = { + county = { + any_county_province = { + has_building_or_higher = legendary_hunting_lodge + } + } + } + add = 50 + } + # Stop AI stealing sightings + if = { + limit = { + scope:host = { is_ai = yes } + exists = county.var:animal_type + NOT = { var:sighting_owner ?= scope:host } + } + add = -1000 + } + } + else_if = { + limit = { + scope:special_option ?= flag:hunt_type_nerge + } + add = county.county_fertility + } + } + + ################### + # GRAPHICS + ################### + + map_entity = { + trigger = { + activity_location.culture = { + OR = { + has_graphical_iranian_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_steppe_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + } + } + } + reference = "building_mena_hunt_01_entity" + } + + map_entity = { + trigger = { + activity_location.culture = { + has_graphical_india_culture_group_trigger = yes + } + } + reference = "building_indian_hunt_01_entity" + } + + map_entity = "building_western_hunt_01_entity" + + # Travel + background = { # Bridge + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + is_riverside_province = yes + geographical_region = world_europe + OR = { + terrain = farmlands + terrain = plains + terrain = mountains + terrain = hills + } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_bridge.dds" + environment = "environment_travel_bridge" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #Rice Fields - If we have Paddy fields AND/or terraced hills + #This goes before other terrain since it can override in many different terrains if built + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + OR = { + terrain = terraced_hills + has_building_or_higher = paddy_fields_01 + } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_rice_fields.dds" + environment = "environment_tgp_rice_fields" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_rice_fields" + } + + background = { #Farmlands - East Asia + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_farm_asia.dds" + environment = "environment_tgp_farm_asia" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_farm_asia" + } + + background = { # Farmland, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_farm.dds" + environment = "environment_travel_farmlands" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { # Farmland, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/farms.dds" + environment = "environment_event_farms" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #Desert, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_desert_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_desert.dds" + environment = "environment_travel_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + background = { #Desert, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_desert_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/desert.dds" + environment = "environment_event_bp1_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { #forest snowy + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location ?= { hunt_snowy_forest_trigger = yes } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_hunt_snowy_forest.dds" + environment = "environment_hunt_snowy_forest" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #forest_pine + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_forest_pine_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/forest_pine.dds" + environment = "environment_event_forest_pine" + ambience = "event:/SFX/Events/Backgrounds/coniferous_forest_day" + } + + background = { #forest + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_forest_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/forest.dds" + environment = "environment_event_forest" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #mountains, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_mountains_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_mountains.dds" + environment = "environment_travel_mountain_settlement" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + background = { #mountains, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_mountains_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/mountains.dds" + environment = "environment_event_mountains" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #steppe, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_steppe_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_steppe.dds" + environment = "environment_travel_steppe_settlement" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + background = { #steppe, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_steppe_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/steppe.dds" + environment = "environment_event_steppe" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + + background = { #drylands (formerly desert) + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_drylands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/drylands.dds" + environment = "environment_event_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { #wetlands + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_wetlands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_wetlands.dds" + environment = "environment_event_bp1_wetlands" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #jungle + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_jungle_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_jungle.dds" + environment = "environment_event_bp1_jungle" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #plains, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_plains_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + environment = "environment_travel_hills_settlement" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { #plains, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_plains_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_plains.dds" + environment = "environment_event_bp1_plains" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #hills, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_hills_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + environment = "environment_travel_hills_settlement" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { #hills, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_hills_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_hills.dds" + environment = "environment_event_bp1_hills" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #sea + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + is_sea_province = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/fp1_ocean.dds" + environment = "environment_event_fp1_ocean" + ambience = "event:/DLC/FP1/SFX/Events/event_ocean_longship" + } + + # End Travel + + background = { # Snowy Forest + trigger = { + activity_location = { hunt_snowy_forest_trigger = yes } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_hunt_snowy_forest.dds" + environment = "environment_hunt_snowy_forest" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { # Mountains + trigger = { + activity_location = { graphical_wilderness_mountains_trigger = yes } + } + texture = "gfx/interface/illustrations/event_scenes/mountains.dds" + environment = "environment_event_mountains" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { + trigger = { + scope:host = { + government_has_flag = government_is_nomadic + } + NOT = { scope:activity = { has_variable = nerge_began } } + } + texture = "gfx/interface/illustrations/event_scenes/mpo_hunt_steppe.dds" + environment = "environment_mpo_hunt_steppe" + ambience = "event:/DLC/CE2/Events/Event_Images/mpo_hunt_steppe" + } + + background = { # Steppe + trigger = { + activity_location = { graphical_wilderness_steppe_trigger = yes } + } + texture = "gfx/interface/illustrations/event_scenes/steppe.dds" + environment = "environment_event_steppe" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + + background = { #Desert + trigger = { + activity_location = { graphical_wilderness_desert_trigger = yes } + } + texture = "gfx/interface/illustrations/event_scenes/desert.dds" + environment = "environment_event_bp1_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { # Jungle + trigger = { + activity_location = { graphical_wilderness_jungle_trigger = yes } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_jungle.dds" + environment = "environment_event_bp1_jungle" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { # Drylands + trigger = { + activity_location = { graphical_drylands_trigger = yes } + } + texture = "gfx/interface/illustrations/event_scenes/drylands.dds" + environment = "environment_event_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + background = { #Desert, settled, Tribal + trigger = { + activity_location ?= { + OR = { + graphical_wilderness_desert_trigger = yes + terrain = drylands + } + } + } + texture = "gfx/interface/illustrations/event_scenes/desert_nomad.dds" + environment = "environment_travel_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + background = { # Nomad Camp + trigger = { + activity_host = { government_has_flag = government_is_nomadic } + } + texture = "gfx/interface/illustrations/event_scenes/mpo_hunt_steppe.dds" + environment = "environment_mpo_hunt_steppe" + ambience = "event:/DLC/CE2/Events/Event_Images/mpo_hunt_steppe" + } + background = { #SE Asia and India tribals + trigger = { + activity_location = { + OR = { + geographical_region = world_asia + geographical_region = world_burma + geographical_region = world_india + } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_hunt_generic_asia.dds" + environment = "environment_tgp_hunt_generic_asia" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_hunt_generic_asia" + } + background = { # Camp + texture = "gfx/interface/illustrations/event_scenes/ep2_hunt_poachers_camp.dds" + environment = "environment_event_forest_pine" + ambience = "event:/SFX/Events/Backgrounds/coniferous_forest_day" + } + + ### Plug in widgets + activity_window_widgets = { + hunt_success_chance = "activity_plugin_widgets_summary" + nerge_special_type_progression = "activity_plugin_widgets_summary" + artifact_rewards = "activity_plugin_widgets_conclusion" + trait_rewards = "activity_plugin_widgets_conclusion" + } + + window_characters = { + hunter = { + camera = camera_event_center + + effect = { + if = { + limit = { + activity_is_nerge_type = no + scope:host.location = scope:activity.activity_location + } + if = { + limit = { + scope:player ?= { + NOR = { + this = scope:host + AND = { + exists = scope:host.court_position:master_of_hunt_court_position + this = scope:host.court_position:master_of_hunt_court_position + } + AND = { + exists = scope:host.court_position:huntperson_camp_officer + this = scope:host.court_position:huntperson_camp_officer + } + AND = { + exists = var:animal_slayer + this = var:animal_slayer + } + } + } + } + scope:player ?= { add_to_list = characters } + } + else_if = { + limit = { + exists = scope:host.intent_target + any_attending_character = { + location = scope:activity.activity_location + this != scope:host + this = scope:host.intent_target + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + this = scope:host.intent_target + } + add_to_list = characters + } + } + else_if = { + limit = { + any_attending_character = { + location = scope:activity.activity_location + this != scope:host + OR = { + has_relation_lover = scope:host + has_relation_friend = scope:host + } + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + OR = { + has_relation_lover = scope:host + has_relation_friend = scope:host + } + } + add_to_list = characters + } + } + else_if = { + limit = { + any_attending_character = { + location = scope:activity.activity_location + this != scope:host + is_councillor_of = scope:host + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + is_councillor_of = scope:host + } + add_to_list = characters + } + } + else_if = { + limit = { + any_attending_character = { + location = scope:activity.activity_location + this != scope:host + highest_held_title_tier >= tier_duchy + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + highest_held_title_tier >= tier_duchy + } + add_to_list = characters + } + } + else_if = { + limit = { + any_attending_character = { + location = scope:activity.activity_location + this != scope:host + highest_held_title_tier >= tier_county + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + highest_held_title_tier >= tier_county + } + add_to_list = characters + } + } + else = { + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + has_court_position = master_of_hunt_court_position + has_court_position = huntperson_camp_officer + } + } + add_to_list = characters + } + } + } + } + scripted_animation = { + triggered_animation = { + trigger = { + exists = scope:host.intent_target + scope:host = { + has_activity_intent = woo_attendee_intent + } + scope:character = scope:host.intent_target + } + animation = { love flirtation } + } + triggered_animation = { + trigger = { + exists = scope:host.intent_target + scope:host = { + has_activity_intent = murder_attendee_intent + } + scope:character = scope:host.intent_target + } + animation = { dismissal worry paranoia } + } + triggered_animation = { + trigger = { + exists = scope:host.intent_target + scope:host = { + has_activity_intent = impose_obedience_intent + } + scope:character = scope:host.intent_target + } + animation = { dismissal worry fear } + } + triggered_animation = { + trigger = { + scope:activity = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + scope:character = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + animation = { hunting_knife_start idle happiness laugh admiration worry } + } + triggered_animation = { + trigger = { + scope:activity = { + NOT = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + # Only show weapons in the active part + exists = var:hunt_activity_story + NOR = { + var:hunt_activity_story = flag:ambush + var:hunt_activity_story = flag:stealth + } + NOT = { exists = var:hunt_success } + } + scope:character = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + animation = { hunting_knife_start throne_room_two_handed_passive_1 lantern marshal throne_room_one_handed_passive_1 } + } + triggered_animation = { + trigger = { + scope:activity = { + NOT = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + # Only show weapons in the active part + exists = var:hunt_activity_story + OR = { + var:hunt_activity_story = flag:ambush + var:hunt_activity_story = flag:stealth + } + NOT = { exists = var:hunt_success } + } + scope:character = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + animation = { hunting_knife_start hunting_shortbow_rest_arrow_default lantern marshal } + } + triggered_animation = { + trigger = { + scope:activity = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + } + animation = { idle happiness laugh admiration worry } + } + triggered_animation = { + trigger = { + NOR = { + scope:activity = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + scope:character = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + } + animation = { lantern worry paranoia stress } + } + #Fallback + animation = hunting_knife_start + } + } + + hunter = { # Nerge + camera = camera_activity_horse + + effect = { + if = { + limit = { + activity_is_nerge_type = yes + scope:host.location = scope:activity.activity_location + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + has_court_position = master_of_hunt_court_position + has_court_position = huntperson_camp_officer + } + } + add_to_list = characters + } + } + } + scripted_animation = { + triggered_animation = { + trigger = { + scope:activity = { has_variable = nerge_began } + } + animation = jockey_gallop + } + animation = horse_conversing_right + } + } + + host = { + camera = camera_event_center + + effect = { + if = { + limit = { + OR = { + scope:host.location = scope:activity.activity_location + scope:host.location = { is_sea_province = yes } + } + scope:activity = { + hunt_is_nerge_type = no + } + } + scope:host = { + add_to_list = characters + } + } + } + scripted_animation = { + triggered_animation = { + trigger = { + scope:character.location = { is_sea_province = yes } + } + animation = survey + } + triggered_animation = { + trigger = { + scope:activity = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + } + animation = hunting_falcon + } + triggered_animation = { + trigger = { + scope:activity.var:animal_slayer ?= scope:character + scope:activity.var:animal_type ?= flag:hare + } + animation = hunting_carcass_start + } + triggered_animation = { + trigger = { + scope:activity = { + NOT = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + } + NOT = { + scope:host = { + OR = { + employs_court_position = master_of_hunt_court_position + employs_court_position = huntperson_camp_officer + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + } + animation = hunting_horn + } + triggered_animation = { + trigger = { + scope:activity = { + NOT = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + # Only show weapons in the active part + exists = var:hunt_activity_story + NOR = { + var:hunt_activity_story = flag:ambush + var:hunt_activity_story = flag:stealth + } + NOT = { exists = var:hunt_success } + } + scope:host = { + OR = { + employs_court_position = master_of_hunt_court_position + employs_court_position = huntperson_camp_officer + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + animation = { hunting_knife_start throne_room_two_handed_passive_1 throne_room_one_handed_passive_1 idle } + } + triggered_animation = { + trigger = { + scope:activity = { + NOT = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + # Only show weapons in the active part + exists = var:hunt_activity_story + OR = { + var:hunt_activity_story = flag:ambush + var:hunt_activity_story = flag:stealth + } + NOT = { exists = var:hunt_success } + } + scope:host = { + OR = { + employs_court_position = master_of_hunt_court_position + employs_court_position = huntperson_camp_officer + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + animation = { hunting_knife_start hunting_longbow_rest_arrow_default idle } + } + #Fallback + animation = idle + } + } + + travel_host = { + camera = camera_event_horse_left + + effect = { + if = { + limit = { + NOR = { + scope:host.location = scope:activity.activity_location + scope:host.location = { is_sea_province = yes } + } + } + scope:host = { + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { scope:character = { has_trait = impatient } } + animation = { jockey_gallop } + } + animation = jockey_walk + } + } + + host = { # Nerge + camera = camera_activity_horse + + effect = { + if = { + limit = { + OR = { + scope:host.location = scope:activity.activity_location + scope:host.location = { is_sea_province = yes } + } + scope:activity = { + hunt_is_nerge_type = yes + } + } + scope:host = { + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:activity = { has_variable = nerge_began } + } + animation = horse_sword_shield + } + animation = horse_archer_idle + } + } + + master_of_hunt = { + camera = camera_event_center + + effect = { + if = { + limit = { + activity_is_nerge_type = no + scope:host.location = scope:activity.activity_location + } + scope:host.court_position:master_of_hunt_court_position ?= { + if = { + limit = { + is_participant_in_activity = scope:activity + location = scope:activity.activity_location + } + add_to_list = characters + } + } + scope:host.court_position:huntperson_camp_officer ?= { + if = { + limit = { + is_participant_in_activity = scope:activity + location = scope:activity.activity_location + } + add_to_list = characters + } + } + } + } + scripted_animation = { + animation = hunting_horn + } + } + + master_of_chase = { # Nerge + camera = camera_activity_horse + + effect = { + if = { + limit = { + activity_is_nerge_type = yes + scope:host.location = scope:activity.activity_location + } + scope:host.court_position:master_of_hunt_court_position ?= { + if = { + limit = { + is_participant_in_activity = scope:activity + location = scope:activity.activity_location + } + add_to_list = characters + } + } + scope:host.court_position:huntperson_camp_officer ?= { + if = { + limit = { + is_participant_in_activity = scope:activity + location = scope:activity.activity_location + } + add_to_list = characters + } + } + } + } + scripted_animation = { + triggered_animation = { + trigger = { + scope:activity = { has_variable = nerge_began } + } + animation = horse_sword_shield + } + animation = horse_conversing_left + } + } + + animal_slayer = { + camera = camera_event_center + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + var:animal_slayer ?= { add_to_list = characters } + } + } + scripted_animation = { + triggered_animation = { + trigger = { scope:activity.var:animal_type ?= flag:hare } + animation = hunting_carcass_start + } + animation = marshal + } + } + + hunter = { + camera = camera_event_center + + effect = { + if = { + limit = { + NOT = { exists = var:animal_slayer } + activity_is_nerge_type = no + scope:host.location = scope:activity.activity_location + } + if = { + limit = { + any_attending_character = { + count >= 2 + location = scope:activity.activity_location + this != scope:host + is_councillor_of = scope:host + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + is_councillor_of = scope:host + } + add_to_list = characters + } + } + else_if = { + limit = { + any_attending_character = { + count >= 2 + location = scope:activity.activity_location + this != scope:host + highest_held_title_tier >= tier_duchy + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + highest_held_title_tier >= tier_duchy + } + add_to_list = characters + } + } + else_if = { + limit = { + any_attending_character = { + count >= 2 + location = scope:activity.activity_location + this != scope:host + highest_held_title_tier >= tier_county + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + highest_held_title_tier >= tier_county + } + add_to_list = characters + } + } + else = { + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + has_court_position = master_of_hunt_court_position + has_court_position = huntperson_camp_officer + } + } + add_to_list = characters + } + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + scope:character = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + animation = { hunting_knife_start idle happiness laugh admiration worry } + } + triggered_animation = { + trigger = { + scope:activity = { + NOT = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + # Only show weapons in the active part + exists = var:hunt_activity_story + OR = { + var:hunt_activity_story = flag:ambush + var:hunt_activity_story = flag:stealth + } + NOT = { exists = var:hunt_success } + } + scope:character = { + culture = { has_innovation = innovation_advanced_bowmaking } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + animation = { hunting_longbow_aim_arrow_default hunting_shortbow_aim_arrow_default crossbow } + } + triggered_animation = { + trigger = { + scope:activity = { + NOT = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + # Only show weapons in the active part + exists = var:hunt_activity_story + OR = { + var:hunt_activity_story = flag:ambush + var:hunt_activity_story = flag:stealth + } + NOT = { exists = var:hunt_success } + } + NOT = { + scope:host.culture = { has_innovation = innovation_advanced_bowmaking } + } + scope:character = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + animation = { hunting_longbow_aim_arrow_default hunting_shortbow_aim_arrow_default } + } + triggered_animation = { + trigger = { + scope:activity = { + NOT = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + # Only show weapons in the active part + exists = var:hunt_activity_story + NOR = { + var:hunt_activity_story = flag:ambush + var:hunt_activity_story = flag:stealth + } + NOT = { exists = var:hunt_success } + } + scope:character = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + animation = { hunting_knife_start throne_room_two_handed_passive_1 throne_room_one_handed_passive_1 idle } + } + triggered_animation = { + trigger = { + scope:activity = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + scope:character = { + NOT = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } } + } + } + animation = { idle happiness laugh admiration worry } + } + triggered_animation = { + trigger = { + scope:activity = { NOT = { has_activity_option = { category = special_type option = hunt_type_falconry } } } + scope:character = { + NOT = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } } + } + } + animation = { shock paranoia fear } + } + #Fallback + animation = hunting_shortbow_rest_arrow_default + } + } + + hunter = { + camera = camera_event_center + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + activity_is_nerge_type = no + } + if = { + limit = { + any_attending_character = { + count >= 3 + location = scope:activity.activity_location + this != scope:host + is_councillor_of = scope:host + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + is_councillor_of = scope:host + } + add_to_list = characters + } + } + else_if = { + limit = { + any_attending_character = { + count >= 3 + location = scope:activity.activity_location + this != scope:host + highest_held_title_tier >= tier_duchy + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + highest_held_title_tier >= tier_duchy + } + add_to_list = characters + } + } + else_if = { + limit = { + any_attending_character = { + count >= 3 + location = scope:activity.activity_location + this != scope:host + highest_held_title_tier >= tier_county + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + highest_held_title_tier >= tier_county + } + add_to_list = characters + } + } + else = { + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + has_court_position = master_of_hunt_court_position + has_court_position = huntperson_camp_officer + } + } + add_to_list = characters + } + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:activity = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + scope:character = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + animation = { hunting_knife_start idle happiness laugh admiration worry } + } + triggered_animation = { + trigger = { + NOT = { + scope:activity = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + } + scope:host.culture = { has_innovation = innovation_advanced_bowmaking } + scope:character = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + animation = { hunting_longbow_aim_arrow_default hunting_shortbow_aim_arrow_default crossbow } + } + triggered_animation = { + trigger = { + NOR = { + scope:activity = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + scope:host.culture = { has_innovation = innovation_advanced_bowmaking } + } + scope:character = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + animation = { hunting_longbow_aim_arrow_default hunting_shortbow_aim_arrow_default } + } + triggered_animation = { + trigger = { + scope:activity = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + NOT = { + scope:character = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + } + animation = { idle happiness laugh admiration worry } + } + triggered_animation = { + trigger = { + NOR = { + scope:activity = { + has_activity_option = { category = special_type option = hunt_type_falconry } + } + scope:character = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + } + animation = { shock paranoia fear } + } + #Fallback + animation = hunting_knife_start + } + } + + hunter = { # Nerge + camera = camera_activity_horse + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + activity_is_nerge_type = yes + } + if = { + limit = { + any_attending_character = { + count >= 3 + location = scope:activity.activity_location + NOT = { + this = scope:host + } + is_councillor_of = scope:host + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOT = { + this = scope:host + } + is_councillor_of = scope:host + } + add_to_list = characters + } + } + else_if = { + limit = { + any_attending_character = { + count >= 3 + location = scope:activity.activity_location + NOT = { + this = scope:host + } + highest_held_title_tier >= tier_duchy + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOT = { + this = scope:host + } + highest_held_title_tier >= tier_duchy + } + add_to_list = characters + } + } + else_if = { + limit = { + any_attending_character = { + count >= 3 + location = scope:activity.activity_location + NOT = { + this = scope:host + } + highest_held_title_tier >= tier_county + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOT = { + this = scope:host + } + highest_held_title_tier >= tier_county + } + add_to_list = characters + } + } + else = { + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + has_court_position = master_of_hunt_court_position + has_court_position = huntperson_camp_officer + } + } + add_to_list = characters + } + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:activity = { has_variable = nerge_began } + } + animation = jockey_gallop + } + animation = horse_archer_aggressive + } + } + } + + ################### + # OPTIONS + ################### + + special_option_category = special_type + + options = { + # option example + special_type = { + hunt_type_standard = { + default = yes + blocked_intents = { + successful_nerge_intent + dreadful_nerge_intent + } + ai_will_do = { + add = { + value = 30 + desc = "base" + } + # Personality + if = { + limit = { has_trait = craven } + add = { + value = 10 + desc = "Cowardly" + } + } + # Gender + if = { + limit = { + save_temporary_scope_as = host_temp + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host_temp } + } + } + add = { + value = -25 + desc = "martial gender" + } + } + # Sighting + if = { + limit = { + any_sub_realm_county = { + has_county_modifier = hunt_sighting_standard_modifier + var:sighting_owner ?= root + } + } + add = { + value = 15 + desc = hunt_sighting_standard_modifier + } + } + # Trait + if = { + limit = { + has_trait = lifestyle_hunter + has_trait_xp = { + trait = lifestyle_hunter + track = hunter + value >= 10 + } + } + add = { + value = 10 + desc = hunter + } + } + } + } + hunt_type_falconry = { + is_shown = { has_dlc_feature = tours_and_tournaments } + blocked_intents = { + successful_nerge_intent + dreadful_nerge_intent + } + cost = { + herd = { + if = { + limit = { + OR = { + NOT = { government_has_flag = government_is_nomadic } + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + } + } + value = 0 + } + else = { + add = { + value = domicile.miniscule_herd_value + multiply = 0.5 + desc = hunt_type_falconry + if = { + limit = { + any_character_situation = { + any_situation_sub_region = { + has_sub_region_phase_parameter = the_great_steppe_cheaper_hunts + any_situation_sub_region_participant_group = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = root + } + } + } + + } + multiply = { + value = 0.5 + desc = steppe_season_hunt_discount_desc + } + } + + if = { + limit = { + OR = { + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + } + } + multiply = 0 + } + } + } + } + gold = { + if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + government_has_flag = government_is_mandala + AND = { + house ?= { has_house_power_parameter = hunts_costs_treasury } + has_treasury = yes + } + } + } + value = 0 + } + else = { + add = { + add = { + value = hunt_activity_base_cost #Base level + desc = hunt_type_falconry + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = 0 + add = { + value = hunt_activity_base_cost + add = { + value = hunt_activity_base_cost + multiply = activity_cost_scale_by_era + subtract = hunt_activity_base_cost + } + } + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + + if = { + limit = { + OR = { + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + } + } + multiply = 0 + } + } + } + } + treasury = { # Make sure this matches the gold cost above + if = { + limit = { + house ?= { has_house_power_parameter = hunts_costs_treasury } + has_treasury = yes + } + add = { + add = { + value = hunt_activity_base_cost #Base level + desc = hunt_type_falconry + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = 0 + add = { + value = hunt_activity_base_cost + add = { + value = hunt_activity_base_cost + multiply = activity_cost_scale_by_era + subtract = hunt_activity_base_cost + } + } + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + + if = { + limit = { + has_character_flag = free_hunt + } + multiply = 0 + } + if = { + limit = { + has_character_flag = free_falconry + } + multiply = 0 + } + } + } + else = { + value = 0 + } + } + } + ai_will_do = { + value = 15 + add = { + value = ai_greed + multiply = -0.25 + desc = "ai_greed" + } + add = { + value = ai_sociability + multiply = 0.25 + desc = "ai_sociability" + } + add = { + value = ai_boldness + multiply = -0.25 + desc = "ai_boldness" + } + # Cowardice + if = { + limit = { has_trait = brave } + add = { + value = -25 + desc = "Brave" + } + } + else_if = { + limit = { has_trait = craven } + add = { + value = 25 + desc = "Cowardly" + } + } + # Economic Archetype + if = { + limit = { ai_has_cautious_personality = yes } + add = { + value = -25 + desc = "cautious" + } + } + if = { + limit = { ai_has_economical_boom_personality = yes } + add = { + value = -25 + desc = "builder" + } + } + # Gender + if = { + limit = { + save_temporary_scope_as = host_temp + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host_temp } + } + } + add = { + value = 50 + desc = "martial gender" + } + } + # Sighting + if = { + limit = { + any_sub_realm_county = { + has_county_modifier = hunt_sighting_falconry_modifier + var:sighting_owner ?= root + } + } + add = { + value = 15 + desc = hunt_sighting_falconry_modifier + } + } + # Trait + if = { + limit = { + has_trait = lifestyle_hunter + has_trait_xp = { + trait = lifestyle_hunter + track = falconer + value >= 10 + } + } + add = { + value = 25 + desc = falconer + } + } + # Court + if = { + limit = { + has_royal_court = yes + has_court_type = court_diplomatic + } + add = { + value = 25 + desc = court_diplomatic + } + } + # Culture + if = { + limit = { + culture = { has_cultural_pillar = ethos_courtly } + } + add = { + value = 25 + desc = ethos_courtly + } + } + # It's Free + if = { + limit = { + has_character_flag = free_falconry + } + add = { + value = 100 + desc = "free" + } + } + } + } + hunt_type_nerge = { + is_shown = { + government_has_flag = government_is_nomadic + } + + blocked_intents = { + reduce_stress_intent + slay_beast_intent + woo_attendee_intent + befriend_attendee_intent + } + ai_will_do = { + add = { + value = 10 + desc = "base" + } + if = { + limit = { gold < 200 } + add = { + value = 90 + desc = nomad_seeking_gold + } + } + if = { + limit = { + prestige >= 500 + prestige > gold + } + add = { + value = 90 + desc = nomad_satiated_with_prestige + } + } + } + } + hunt_type_legendary = { + is_valid = { + custom_tooltip = { + text = hunt_any_county_legendary_sighting_tt + OR = { + root.domicile.domicile_location.county ?= { + has_county_modifier = hunt_sighting_legendary_modifier + } + any_sub_realm_county = { + has_county_modifier = hunt_sighting_legendary_modifier + var:sighting_owner ?= root + } + } + } + } + blocked_intents = { + successful_nerge_intent + dreadful_nerge_intent + } + ai_will_do = { + add = { + value = 50 + desc = "base" + } + add = { + value = ai_boldness + desc = ai_boldness + } + add = { + value = ai_vengefulness + min = 0 + desc = ai_vengefulness + } + # Personality + if = { + limit = { has_trait = stubborn } + add = { + value = 25 + desc = stubborn + } + } + # Gender + if = { + limit = { + save_temporary_scope_as = host_temp + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host_temp } + } + } + add = { + value = -25 + desc = "martial gender" + } + } + # Trait + if = { + limit = { + has_trait = lifestyle_hunter + has_trait_xp = { + trait = lifestyle_hunter + track = hunter + value >= 10 + } + } + add = { + value = 25 + desc = hunter + } + } + # ACH Greatest Hunter Oath + if = { + limit = { + has_variable = greatest_hunter_oath + } + add = { + value = 200 + desc = "greatest hunter oath" + } + } + } + } + } + + ######### + # ATTENDANTS NUMBER + ######### + hunt_option_attendants = { + hunt_attendants_few = { + + is_shown = { + has_dlc_feature = advanced_activities + NOT = { government_has_flag = government_is_nomadic } + } + + # desc is only shown in debug AI watch window + ai_will_do = { + value = 25 + # Economic Archetype + if = { # Cautious + limit = { ai_has_cautious_personality = yes } + add = { + value = 25 + desc = "Cautious" + } + } + if = { # Builder + limit = { + OR = { + ai_has_economical_boom_personality = yes + has_character_flag = ai_boom + } + } + add = { + value = 25 + desc = "Builder" + } + } + if = { # There's probably a Pilgrimage somewhere I should attend + limit = { ai_has_pious_builder_personality = yes } + add = { + value = -25 + desc = "Pious Builder" + } + } + # Economy Sanity + if = { # Work first, play later + limit = { + exists = capital_county + capital_county.title_province = { free_building_slots > 0 } + } + add = { + value = 25 + desc = "Work first, play later" + } + } + } + } + hunt_attendants_normal = { + default = yes + + is_shown = { + NOT = { government_has_flag = government_is_nomadic } + } + + is_valid = { + can_make_expensive_purchase_trigger = { + PRICE = root.hunt_normal_option_cost + } + } + + cost = { + herd = { + if = { + limit = { + OR = { + NOT = { government_has_flag = government_is_nomadic } + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + } + } + value = 0 + } + else = { + add = { + value = domicile.miniscule_herd_value + desc = hunt_attendants_normal + if = { + limit = { + any_character_situation = { + any_situation_sub_region = { + has_sub_region_phase_parameter = the_great_steppe_cheaper_hunts + any_situation_sub_region_participant_group = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = root + } + } + } + + } + multiply = { + value = 0.5 + desc = steppe_season_hunt_discount_desc + } + } + + if = { + limit = { + OR = { + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + } + } + multiply = 0 + } + } + } + } + gold = { + if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + government_has_flag = government_is_mandala + AND = { + house ?= { has_house_power_parameter = hunts_costs_treasury } + has_treasury = yes + } + } + } + value = 0 + } + else = { + add = { + desc = hunt_attendants_normal + add = { + value = hunt_normal_option_cost + desc = hunt_attendants_normal + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = hunt_normal_option_cost + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + } + } + } + treasury = { # Make sure this matches the gold cost above + if = { + limit = { + house ?= { has_house_power_parameter = hunts_costs_treasury } + has_treasury = yes + } + add = { + desc = hunt_attendants_normal + add = { + value = hunt_normal_option_cost + desc = hunt_attendants_normal + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = hunt_normal_option_cost + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + } + } + else = { + value = 0 + } + } + piety = { + if = { + limit = { + NOT = { government_has_flag = government_is_mandala } + } + value = 0 + } + else = { + add = { + desc = hunt_attendants_normal + add = { + value = hunt_normal_option_cost + desc = hunt_attendants_normal + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = hunt_normal_option_cost + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + } + } + } + } + + # desc is only shown in debug AI watch window + ai_will_do = { + add = { + value = 25 + desc = hunt_attendants_normal + } + if = { # Cautious + limit = { gold >= major_gold_value } + add = { + value = 25 + desc = "Rich" + } + } + if = { # Ambitious + limit = { has_trait = ambitious } + add = { + value = 10 + desc = "Ambitious" + } + } + if = { # Ambitious + limit = { has_trait = greedy } + add = { + value = -10 + desc = "Greedy" + } + } + if = { # Warlike + limit = { ai_has_warlike_personality = yes } + add = { + value = 25 + desc = "Warlike" + } + } + } + } + hunt_attendants_many = { + + is_shown = { + has_dlc_feature = advanced_activities + NOT = { government_has_flag = government_is_nomadic } + } + + is_valid = { + can_make_expensive_purchase_trigger = { + PRICE = root.hunt_good_option_cost + } + } + + cost = { + herd = { + if = { + limit = { + OR = { + NOT = { government_has_flag = government_is_nomadic } + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + } + } + value = 0 + } + else = { + add = { + value = domicile.minor_herd_value + desc = hunt_attendants_many + if = { + limit = { + any_character_situation = { + any_situation_sub_region = { + has_sub_region_phase_parameter = the_great_steppe_cheaper_hunts + any_situation_sub_region_participant_group = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = root + } + } + } + + } + multiply = { + value = 0.5 + desc = steppe_season_hunt_discount_desc + } + } + + if = { + limit = { + OR = { + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + } + } + multiply = 0 + } + } + } + } + gold = { + if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + government_has_flag = government_is_mandala + AND = { + house ?= { has_house_power_parameter = hunts_costs_treasury } + has_treasury = yes + } + } + } + value = 0 + } + else = { + add = { + desc = hunt_attendants_many + add = { + value = hunt_good_option_cost #Base level + desc = hunt_attendants_many + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = hunt_good_option_cost + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + } + } + } + treasury = { # Make sure this matches the gold cost above + if = { + limit = { + house ?= { has_house_power_parameter = hunts_costs_treasury } + has_treasury = yes + } + add = { + desc = hunt_attendants_many + add = { + value = hunt_good_option_cost #Base level + desc = hunt_attendants_many + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = hunt_good_option_cost + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + } + } + else = { + value = 0 + } + } + piety = { + if = { + limit = { + NOT = { government_has_flag = government_is_mandala } + } + value = 0 + } + else = { + add = { + desc = hunt_attendants_many + add = { + value = hunt_good_option_cost #Base level + desc = hunt_attendants_many + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = hunt_good_option_cost + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + } + } + } + } + + # desc is only shown in debug AI watch window + ai_will_do = { + add = { + value = 10 + desc = hunt_attendants_many + } + if = { # Cautious + limit = { gold >= major_gold_value } + add = { + value = 25 + desc = "Rich" + } + } + if = { # Cautious + limit = { gold >= monumental_gold_value } + add = { + value = 25 + desc = "Rich" + } + } + if = { # Ambitious + limit = { has_trait = ambitious } + add = { + value = 10 + desc = "Ambitious" + } + } + if = { # Ambitious + limit = { has_trait = greedy } + add = { + value = -10 + desc = "Greedy" + } + } + if = { # Warlike + limit = { ai_has_warlike_personality = yes } + add = { + value = 25 + desc = "Warlike" + } + } + } + } + } + + ######### + # GUEST NUMBER + ######### + hunt_option_party_size = { + hunt_party_size_few = { + default = yes + is_shown = { has_dlc_feature = advanced_activities } + + # Entourage option grabbing suitable bodyguards & maybe someone from court who really likes you, + randos. + travel_entourage_selection = { + weight = hunt_entourage_base_set_weighting_value + max = 5 + invite_rule_order = 2 + } + + # desc is only shown in debug AI watch window + ai_will_do = { + value = 0 + # Economic Archetype + if = { # Cautious + limit = { ai_has_cautious_personality = yes } + add = { + value = 25 + desc = "Cautious" + } + } + if = { # Builder + limit = { + OR = { + ai_has_economical_boom_personality = yes + has_character_flag = ai_boom + } + } + add = { + value = 25 + desc = "Builder" + } + } + # Economy Sanity + if = { # Work first, play later + limit = { + exists = capital_county + capital_county.title_province = { free_building_slots > 0 } + } + add = { + value = 25 + desc = "Work first, play later" + } + } + } + } + hunt_party_size_normal = { + is_valid = { + trigger_if = { + limit = { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + } + custom_tooltip = { + text = I_AM_LANDLESS_ADVENTURER_TRIGGER + is_landless_adventurer = no + } + } + } + + cost = { + herd = { + if = { + limit = { + OR = { + NOT = { government_has_flag = government_is_nomadic } + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + } + } + value = 0 + } + else = { + add = { + value = domicile.miniscule_herd_value + min = 25 + desc = hunt_attendants_many + if = { + limit = { + any_character_situation = { + any_situation_sub_region = { + has_sub_region_phase_parameter = the_great_steppe_cheaper_hunts + any_situation_sub_region_participant_group = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = root + } + } + } + + } + multiply = { + value = 0.5 + desc = steppe_season_hunt_discount_desc + } + } + if = { + limit = { + OR = { + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + } + } + multiply = 0 + } + } + } + } + gold = { + if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + government_has_flag = government_is_mandala + AND = { + house ?= { has_house_power_parameter = hunts_costs_treasury } + has_treasury = yes + } + } + } + value = 0 + } + else = { + add = { + desc = hunt_party_size_normal + add = { + value = hunt_normal_option_cost + desc = hunt_party_size_normal + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = hunt_normal_option_cost + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + } + } + } + treasury = { # Make sure this matches the gold cost above + if = { + limit = { + house ?= { has_house_power_parameter = hunts_costs_treasury } + has_treasury = yes + } + add = { + desc = hunt_party_size_normal + add = { + value = hunt_normal_option_cost + desc = hunt_party_size_normal + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = hunt_normal_option_cost + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + } + } + else = { + value = 0 + } + } + piety = { + if = { + limit = { + NOT = { government_has_flag = government_is_mandala } + } + value = 0 + } + else = { + add = { + desc = hunt_party_size_normal + add = { + value = hunt_normal_option_cost + desc = hunt_party_size_normal + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = hunt_normal_option_cost + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + } + } + } + } + + #Entourage option grabbing most people suitable from court, + randos. + travel_entourage_selection = { + weight = { + add = hunt_entourage_base_set_weighting_value + add = hunt_entourage_extras_set_weighting_value + } + max = 8 + invite_rule_order = 2 + } + + # desc is only shown in debug AI watch window + ai_will_do = { + add = { + value = 25 + desc = hunt_party_size_normal + } + } + } + hunt_party_size_many = { + is_shown = { has_dlc_feature = advanced_activities } + + is_valid = { + trigger_if = { + limit = { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + } + custom_tooltip = { + text = I_AM_LANDLESS_ADVENTURER_TRIGGER + is_landless_adventurer = no + } + } + } + + cost = { + herd = { + if = { + limit = { + OR = { + NOT = { government_has_flag = government_is_nomadic } + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + } + } + value = 0 + } + else = { + add = { + value = domicile.minor_herd_value + min = 50 + desc = hunt_attendants_many + if = { + limit = { + any_character_situation = { + any_situation_sub_region = { + has_sub_region_phase_parameter = the_great_steppe_cheaper_hunts + any_situation_sub_region_participant_group = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = root + } + } + } + + } + multiply = { + value = 0.5 + desc = steppe_season_hunt_discount_desc + } + } + + if = { + limit = { + OR = { + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + } + } + multiply = 0 + } + } + } + } + gold = { + if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + has_character_flag = free_hunt + AND = { + has_character_flag = free_falconry + involved_activity = { has_activity_option = { category = special_type option = hunt_type_falconry } } + } + government_has_flag = government_is_mandala + AND = { + house ?= { has_house_power_parameter = hunts_costs_treasury } + has_treasury = yes + } + } + } + value = 0 + } + else = { + add = { + desc = hunt_party_size_many + add = { + value = hunt_good_option_cost + desc = hunt_party_size_many + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = hunt_good_option_cost + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + } + } + } + treasury = { # Make sure this matches the gold cost above + if = { + limit = { + house ?= { has_house_power_parameter = hunts_costs_treasury } + has_treasury = yes + } + add = { + desc = hunt_party_size_many + add = { + value = hunt_good_option_cost + desc = hunt_party_size_many + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = hunt_good_option_cost + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + } + } + else = { + value = 0 + } + } + piety = { + if = { + limit = { + NOT = { government_has_flag = government_is_mandala } + } + value = 0 + } + else = { + add = { + desc = hunt_party_size_many + add = { + value = hunt_good_option_cost + desc = hunt_party_size_many + } + if = { + limit = { + dynasty ?= { + has_dynasty_perk = law_legacy_1 + } + } + subtract = { + value = hunt_good_option_cost + multiply = law_legacy_cost_reduction_mult + desc = law_legacy_1_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + } + } + } + } + + #Entourage option grabbing sodding everyone suitable from court, + every grabbable rando in the duchy and maybe a few extra. + travel_entourage_selection = { + weight = { + add = hunt_entourage_base_set_weighting_value + add = hunt_entourage_extras_set_weighting_value + add = hunt_entourage_sodding_everyone_set_weighting_value + } + + max = 15 + invite_rule_order = 2 + } + + # desc is only shown in debug AI watch window + ai_will_do = { + add = { + value = 10 + desc = hunt_party_size_many + } + if = { # Cautious + limit = { gold >= monumental_gold_value } + add = { + value = 25 + desc = "Rich" + } + } + if = { # Ambitious + limit = { has_trait = ambitious } + add = { + value = 10 + desc = "Ambitious" + } + } + if = { # Ambitious + limit = { has_trait = greedy } + add = { + value = -10 + desc = "Greedy" + } + } + if = { # Warlike + limit = { ai_has_warlike_personality = yes } + add = { + value = 25 + desc = "Warlike" + } + } + } + } + } + } + + ################### + # PHASES + ################### + + max_guest_arrival_delay_time = { months = 8 } + + phases = { + hunt_phase = { + is_predefined = yes + + is_shown = {} + + on_phase_active = { # Fires for every attendee + if = { + limit = { + this = scope:host + activity_is_nerge_type = no + } + scope:activity = { progress_activity_phase_after = { weeks = 6 } } + + trigger_event = { on_action = hunt_start_events } + trigger_event = { + on_action = hunt_outcome_start_events + days = 21 + } + trigger_event = { + on_action = hunt_outcome_complication_events + days = 28 + } + trigger_event = { + on_action = hunt_outcome_end_events + days = 35 + } + scope:activity = { + every_attending_character = { + limit = { is_ai = no } + trigger_event = { + on_action = hunt_random_pulse + days = 7 + } + trigger_event = { + on_action = hunt_random_pulse + days = 14 + } + } + } + } + else_if = { + limit = { + this = scope:host + activity_is_nerge_type = yes + } + scope:activity = { progress_activity_phase_after = { weeks = 8 } } + trigger_event = { + id = mpo_nerge.0005 + } + trigger_event = { + id = mpo_nerge.0105 + days = 54 + } + scope:activity = { + every_attending_character = { + limit = { is_ai = no } + trigger_event = { + on_action = nerge_flavor_events_on_action + days = 10 + } + trigger_event = { + on_action = nerge_flavor_events_on_action + days = 20 + } + trigger_event = { + on_action = nerge_flavor_events_on_action + days = 30 + } + trigger_event = { + on_action = nerge_flavor_events_on_action + days = 40 + } + } + every_attending_character = { + limit = { is_ai = yes } + trigger_event = { + on_action = nerge_flavor_events_ai_attending_on_action + days = 10 + } + trigger_event = { + on_action = nerge_flavor_events_ai_attending_on_action + days = 20 + } + trigger_event = { + on_action = nerge_flavor_events_ai_attending_on_action + days = 30 + } + trigger_event = { + on_action = nerge_flavor_events_ai_attending_on_action + days = 40 + } + } + } + } + } + + on_weekly_pulse = { # Fires for every attendee + trigger_event = hunt.0081 # Invalidation + } + + on_end = { # Fires for every attendee + if = { + limit = { + is_alive = yes + trigger_if = { + limit = { + scope:activity = { + NOR = { + has_activity_option = { category = special_type option = hunt_type_falconry } + has_activity_option = { category = special_type option = hunt_type_nerge } + } + } + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + target_weight_modifier_effect = { VALUE = hunt_weight_modifier_value } + + # House aspiration - gain merit + if = { + limit = { + house ?= { has_house_power_parameter = hunts_provides_merit } + } + scope:activity = { + add_activity_log_entry = { + key = hunt_completed_merit_gain_log + tags = { good } + character = prev + show_in_conclusion = yes + # EFFECT + prev = { change_merit = major_merit_gain } + } + } + } + } + scope:activity.activity_location = { save_scope_as = activity_location } + if = { + limit = { + this = scope:host + activity_is_nerge_type = no + } + scope:activity = { + random_list = { + 10 = { # Success + trigger = { + # Only fired for legendary if a proxy animal was hunted + trigger_if = { + limit = { + has_activity_option = { category = special_type option = hunt_type_legendary } + } + exists = var:legendary_proxy + } + trigger_if = { + limit = { exists = var:hunt_success } + var:hunt_success = flag:yes + } + } + if = { + limit = { exists = var:hunt_credit_taker } + var:hunt_credit_taker = { save_scope_as = credit_taker } + } + set_variable = { + name = hunt_success + value = flag:yes + } + # Create trophy artifact + scope:host = { + if = { + limit = { + NOT = { exists = scope:activity.var:animal_spared } + } + hunt_create_trophy_effect = yes + } + } + # Prestige etc. + if = { + limit = { exists = scope:newly_created_artifact } + add_activity_log_entry = { + key = hunt_completed_success_log + score = 80 + tags = { complete good } + character = scope:host + show_in_conclusion = yes + artifact = scope:newly_created_artifact + # EFFECT + scope:host = { disburse_hunt_activity_rewards = yes } + } + } + else = { + add_activity_log_entry = { + key = hunt_completed_success_log + score = 80 + tags = { complete good } + character = scope:host + show_in_conclusion = yes + # EFFECT + scope:host = { disburse_hunt_activity_rewards = yes } + } + } + scope:host = { + trigger_event = hunt.9001 + if = { + limit = { + has_variable = greatest_hunter_oath_r_counter + } + change_variable = { + name = greatest_hunter_oath_r_counter + add = 1 + } + } + } + } + 3 = { # Great Success + trigger = { + has_activity_option = { category = special_type option = hunt_type_legendary } + NOT = { exists = var:legendary_proxy } + trigger_if = { + limit = { exists = var:hunt_success } + var:hunt_success = flag:yes + } + } + if = { + limit = { exists = var:hunt_credit_taker } + var:hunt_credit_taker = { save_scope_as = credit_taker } + } + set_variable = { + name = hunt_success + value = flag:yes + } + # Create trophy artifact + save_scope_as = impressive_trophy + add_activity_log_entry = { + key = hunt_completed_success_log + score = 80 + tags = { complete good } + character = scope:host + show_in_conclusion = yes + artifact = scope:newly_created_artifact + + # EFFECT + scope:host = { + end_hunt_mystical_animal_story_cycle_effect = yes + disburse_hunt_activity_rewards = yes + } + } + scope:host = { + trigger_event = hunt.4004 + if = { + limit = { + has_variable = greatest_hunter_oath_l_counter + } + change_variable = { + name = greatest_hunter_oath_l_counter + add = 1 + } + } + } + } + 10 = { # Failure + trigger = { + trigger_if = { + limit = { exists = var:hunt_success } + var:hunt_success = flag:no + } + } + set_variable = { + name = hunt_success + value = flag:no + } + add_activity_log_entry = { + key = hunt_completed_failure_log + score = 80 + tags = { complete bad } + character = scope:host + show_in_conclusion = yes + + # EFFECT + scope:host = { disburse_hunt_activity_rewards = yes } + } + scope:host = { trigger_event = hunt.9002 } + } + } + # tgp_ceremonial_liege_events.0020 + if = { + limit = { + var:hunt_success ?= flag:yes + } + scope:host = { + if = { + limit = { + var:tgp_ceremonial_liege_events_0020_discount ?= flag:hunt + } + tgp_one_up_activity_effect = yes + } + } + } + if = { + limit = { + scope:host = { var:tgp_ceremonial_liege_events_0020_discount ?= flag:hunt } + } + remove_variable = tgp_ceremonial_liege_events_0020_discount + } + } + } + } + } + } + + ai_check_interval_by_tier = { + barony = 0 + county = 60 + duchy = 60 + kingdom = 60 + empire = 60 + hegemony = 60 + } + + ai_will_select_province = { + value = 50 + add = { + value = scope:score # Derived from province_score + multiply = 10 + } + } + + ################### + # GUEST HANDLING + ################### + + guest_invite_rules = { + rules = { + 2 = activity_invite_rule_rivals + 3 = activity_invite_rule_extended_family + 4 = activity_invite_rule_guests + + # MP + 6 = activity_invite_mp + } + defaults = { + 3 = activity_invite_rule_liege + 3 = activity_invite_rule_suzerain + 3 = activity_invite_rule_tributaries + 3 = activity_invite_rule_vassals + 1 = activity_invite_rule_confederates + 3 = activity_invite_rule_close_family + 1 = activity_invite_rule_friends + 1 = activity_invite_rule_potential_friends + 2 = activity_invite_rule_lovers + 2 = activity_invite_rule_potential_lovers + 2 = activity_invite_rule_glory_hounds + 1 = activity_invite_rule_hunters + 3 = activity_invite_rule_knights + 4 = activity_invite_rule_courtiers + 4 = activity_invite_rule_fellow_vassals + 1 = activity_invite_rule_landless_adventurers_restricted_range + } + } + + max_guests = 20 + + can_be_activity_guest = { + OR = { + is_adult = yes + AND = { + government_has_flag = government_is_nomadic + is_child_of = scope:host + age >= 8 + } + } + NOT = { has_trait = incapable } + can_hunt_trigger = yes + in_diplomatic_range = scope:host + } + + host_intents = { + intents = { reduce_stress_intent slay_beast_intent murder_attendee_intent woo_attendee_intent befriend_attendee_intent successful_nerge_intent dreadful_nerge_intent impose_obedience_intent } + default = reduce_stress_intent + player_defaults = { successful_nerge_intent reduce_stress_intent slay_beast_intent } + } + + guest_intents = { + intents = { reduce_stress_intent slay_beast_intent murder_attendee_intent woo_attendee_intent befriend_attendee_intent successful_nerge_intent dreadful_nerge_intent } + default = reduce_stress_intent + player_defaults = { successful_nerge_intent reduce_stress_intent slay_beast_intent } + } + + guest_join_chance = { + base = 10 + base_activity_modifier = yes + + # Scripted Modifiers + activity_guest_shared_ai_accept_modifier = yes + activity_guest_hunt_ai_accept_modifier = yes + } + + ################### + # ACTIVITY-SPECIFIC PULSES + ################### + + pulse_actions = { + entries = { + # Regular + guest_friendship guest_insulted hunt_tracks_character hunt_tracks_option hunt_tracks_dog hunt_tracks_building hunt_hunters_bond hunt_dog_bond hunt_knowledge_sharing hunt_small_game hunt_moh_positive hunt_moh_negative hunt_poetic_inspiration hunt_fervor_gain hunt_distinguished_ability hunt_annoyed_owner hunt_impressive_grounds hunt_eggs_found + + # Nerge + hunt_successful_kill hunt_very_successful_kill hunt_worked_together hunt_failed_kill hunt_failed_several_kills hunt_successful_maneuver hunt_learned_maneuver hunt_prowess_mastery hunt_martial_mastery + } + chance_of_no_event = 3 + } + + on_start = { + #if = { + # limit = { + # NOT = { + # exists = global_var:hunts_worldwide + # } + # } + # set_global_variable = { + # name = hunts_worldwide + # value = 1 + # } + #} + #else = { + # change_global_variable = { + # name = hunts_worldwide + # add = 1 + # } + #} + if = { + limit = { + has_activity_option = { + category = special_type + option = hunt_type_nerge + } + } + set_variable = { + name = nerge_activity + value = 1 + } + activity_setup_special_type_progression_effect = yes + } + else = { + set_variable = { + name = hunt_success_chance + value = hunt_success_chance_value + } + } + if = { + limit = { + exists = activity_location.county.var:animal_type + OR = { + AND = { + has_activity_option = { category = special_type option = hunt_type_standard } + activity_location.county = { + OR = { + has_county_modifier = hunt_sighting_standard_modifier + has_county_modifier = hunt_sighting_dangerous_modifier + } + } + } + AND = { + has_activity_option = { category = special_type option = hunt_type_legendary } + activity_location.county = { has_county_modifier = hunt_sighting_legendary_modifier } + } + AND = { + has_activity_option = { category = special_type option = hunt_type_falconry } + activity_location.county = { has_county_modifier = hunt_sighting_falconry_modifier } + } + } + } + set_variable = { + name = animal_type + value = scope:activity.activity_location.county.var:animal_type + } + } + scope:host = { + if = { + limit = { + ai_sociability > 0 + is_ai = yes + } + random = { + chance = { + value = 0.5 # One in 200 hunts + if = { + limit = { + has_trait = lifestyle_hunter + } + add = 1 + } + if = { + limit = { + ai_rationality <= -25 + has_personality_dominant_trigger = yes + } + add = 0.5 + } + } + add_character_flag = hunts_a_lot + } + } + if = { + limit = { + has_character_flag = free_hunt + } + remove_character_flag = free_hunt + } + if = { + limit = { + has_character_flag = free_falconry + } + remove_character_flag = free_falconry + } + } + } + allow_zero_guest_invites = yes + + on_enter_passive_state = { + scope:activity = { + if = { + limit = { + NOT = { has_variable = progressed_to_active } + # Everyone who accepted is here + any_attending_character = { + count = all + location = scope:activity.activity_location + } + # There are no open invitations + any_invited_character = { + count = 0 + } + } + set_variable = progressed_to_active + scope:activity = { progress_activity_phase_after = { days = 1 } } + } + } + trigger_event = hunt.0550 + if = { + limit = { + this = scope:host + is_landless_adventurer = no + NOT = { employs_court_position = master_of_hunt_court_position } + involved_activity = { + any_attending_character = { + location = root.location + save_temporary_scope_as = potential_moh + + } + } + can_appoint_char_to_court_position = { CHAR = scope:potential_moh COURT_POS = master_of_hunt_court_position } + } + trigger_event = { + id = hunt.0540 + days = { 3 9 } + } + } + if = { + limit = { + this = scope:host + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + can_employ_court_position_type = huntperson_camp_officer + NOT = { employs_court_position = huntperson_camp_officer } + } + trigger_event = { + id = hunt.0540 + days = 1 + } + } + if = { + limit = { + this = scope:host + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + } + trigger_event = { + id = hunt.1337 + } + } + if = { + limit = { + this = scope:host + involved_activity = { + has_activity_option = { category = special_type option = hunt_type_legendary } + } + } + random = { + chance = 5 + trigger_event = { + id = hunt.8540 + days = { 10 12 } + } + } + } + } + + on_enter_active_state = { + surveyor_no_stone_unturned_perk_effect = yes + if = { + limit = { this = scope:host } + trigger_event = { id = hunt.0110 } + } + trigger_event = { + id = hunt.7200 # Do you murder or not? + days = 3 + } + trigger_event = { + id = hunt.7400 # Do you abduct or not? + days = 3 + } + scope:activity ?= { + set_variable = { + name = nerge_began + value = 1 + } + } + } + + on_complete = { + # Struggle Catalysts + fp3_struggle_catalysts_for_activities_effect = yes + + hunt_remove_variables_effect = yes + scope:activity.activity_location = { + if = { + limit = { exists = var:recent_hunt_held } + save_scope_value_as = { + name = recent_hunt_held_count + value = var:recent_hunt_held + } + set_variable = { + name = recent_hunt_held + value = { + value = scope:recent_hunt_held_count + add = 1 + } + years = 4 + } + } + else = { + set_variable = { + name = recent_hunt_held + value = 1 + years = 4 + } + } + if = { + limit = { + activity_is_nerge_type = yes + } + county = { + scope:host = { + add_to_variable_list = { + name = recent_nerges + target = prev + years = 30 + } + } + } + } + } + } +} diff --git a/common/activities/activity_types/imperial_examination.txt b/common/activities/activity_types/imperial_examination.txt new file mode 100644 index 00000000..d97a75d9 --- /dev/null +++ b/common/activities/activity_types/imperial_examination.txt @@ -0,0 +1,2222 @@ +activity_imperial_examination = { + + notify_player_can_join_activity = yes + + is_shown = { + government_has_flag = government_is_celestial + has_tgp_dlc_trigger = yes + trigger_if = { # Allow a local exam to be hosted first. + limit = { + is_ai = yes + NOT = { has_character_flag = examinations_ai_override } + } + years_from_game_start >= 5 + } + } + + can_start_showing_failures_only = { + highest_held_title_tier = tier_hegemony + NOT = { is_activity_type_on_cooldown = activity_imperial_examination } + trigger_if = { + limit = { + is_ai = yes + } + # Special logic for AI Hegemons, more specific than any other is_available trigger + is_available_quick = { + alive = yes + travel = no + imprisoned = no + incapable = no + } + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = holding_court_character_flag + } + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + NOT = { has_character_flag = planning_an_activity } + } + } + trigger_else = { + is_available = yes + } + } + + is_valid = { + scope:host = { + is_physically_able = yes + is_landed = yes + government_allows = merit + } + # If no one shows up + trigger_if = { + limit = { is_current_phase_active = yes } + has_attending_activity_guests = yes + } + } + + on_invalidated = { + activity_type = { save_scope_as = activity_type } + imperial_examination_clean_up_phase_variables_effect = yes + scope:activity = { + every_attending_character = { + if = { # If we still have a short duration remaining on our appointment timeout, clear it + limit = { + appointment_timeout_days > 0 + appointment_timeout_days < 365 + } + clear_appointment_timeout = yes + } + } + } + # Host becomes unlanded + if = { + limit = { + scope:host = { is_landed = no } + } + every_attending_character = { trigger_event = activity_system.0320 } + } + if = { # No one shows up + limit = { + has_attending_activity_guests = no + } + activity_location = { save_scope_as = location } + scope:host = { trigger_event = activity_system.0100 } + } + } + + on_host_death = { + imperial_examination_clean_up_phase_variables_effect = yes + every_attending_character = { trigger_event = activity_system.0501 } + } + + province_description = { + triggered_desc = { + trigger = { this = scope:host.capital_province } + desc = activity_chariot_race_province_capital + } + # + / plus good + triggered_desc = { + trigger = { has_building_or_higher = kaifeng_palace_01 } + desc = activity_imperial_examination_province_kaifeng_palace_desc + } + triggered_desc = { + trigger = { has_building_or_higher = examination_hall_01 } + desc = activity_imperial_examination_province_examination_hall_desc + } + } + + # desc is only shown in debug AI watch window + ai_will_do = { + value = 100 + + #Special flags + if = { + limit = { + is_ai = yes + has_character_flag = examinations_ai_override + } + add = 10000 + } + } + + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 12 + } + + ai_will_select_province = { + # Base + add = { + value = 5 + desc = "base" + } + # Buildings + if = { + limit = { + has_building_or_higher = kaifeng_palace_01 + } + add = { + value = 100 + desc = activity_imperial_examination_province_kaifeng_palace_desc + } + } + if = { + limit = { + has_building_or_higher = examination_hall_01 + } + add = { + value = 5 + desc = activity_imperial_examination_province_examination_hall_desc + } + } + } + + ################### + # PARAMETERS + ################### + + is_single_location = yes + + cooldown = { years = 5 } + + max_province_icons = 3 + + max_route_deviation_mult = 3.0 + + cost = { + treasury = { + if = { + limit = { is_ai = no } + add = { + add = { + value = imperial_examination_actual_cost + desc = imperial_examination_base_cost + } + # Kaifeng cost bonus + if = { + limit = { + root.capital_province = { has_building_or_higher = kaifeng_palace_01 } + } + multiply = { + value = { + value = 1 + subtract = kaifeng_examination_cost_value + } + desc = kaifeng_palace_name_desc + } + } + if = { + limit = { + scope:province ?= { has_building_or_higher = examination_hall_01 } + } + add = { + value = 0 + add = { + value = imperial_examination_base_cost + add = { + value = imperial_examination_base_cost + multiply = activity_cost_scale_by_era + subtract = imperial_examination_base_cost + } + } + multiply = imperial_examination_cost_discount_max_value + desc = imperial_examination_cost_discount_examination_hall + } + } + } + } + else = { value = 0 } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + + # Used to show a rough minimum or expected cost at all to plan this + ui_predicted_cost = { + #Treasury for China + treasury = { + if = { + limit = { + is_ai = yes + has_character_flag = examinations_ai_override + } + value = 0 + } + else = { + add = imperial_examination_predicted_cost + add = imperial_examination_breadth_restricted_value + } + } + } + + conclusion_description = { + desc = imperial_examination_conclusion.intro + desc = { + triggered_desc = { + trigger = { + this = scope:host + scope:activity = { activity_has_extreme_grade_trigger = yes } + } + desc = imperial_examination_conclusion.intro.passing_grade.extreme + } + triggered_desc = { + trigger = { + this = scope:host + scope:activity = { activity_has_high_grade_trigger = yes } + } + desc = imperial_examination_conclusion.intro.passing_grade.high + } + triggered_desc = { + trigger = { + this = scope:host + scope:activity = { activity_has_mediocre_grade_trigger = yes } + } + desc = imperial_examination_conclusion.intro.passing_grade.mediocre + } + triggered_desc = { + trigger = { + this = scope:host + scope:activity = { activity_has_low_grade_trigger = yes } + } + desc = imperial_examination_conclusion.intro.passing_grade.low + } + triggered_desc = { + trigger = { + this = scope:host + scope:activity = { activity_has_imperial_exams_trigger = yes } + } + desc = imperial_examination_conclusion.intro.breadth.imperial + } + triggered_desc = { + trigger = { + this = scope:host + scope:activity = { activity_has_grand_exams_trigger = yes } + } + desc = imperial_examination_conclusion.intro.breadth.grand + } + triggered_desc = { + trigger = { + this = scope:host + scope:activity = { activity_has_palace_exams_trigger = yes } + } + desc = imperial_examination_conclusion.intro.breadth.palace + } + triggered_desc = { + trigger = { this = scope:host } + desc = imperial_examination_conclusion.general + } + triggered_desc = { + trigger = { + has_character_flag = exam_taker + OR = { + has_variable = been_caught_cheating_longterm + is_in_guest_subset = { name = failees } + } + } + desc = imperial_examination_conclusion.entrant_failee + } + triggered_desc = { + trigger = { + has_character_flag = exam_taker + is_in_guest_subset = { name = entrants } + } + desc = imperial_examination_conclusion.entrant_passed + } + triggered_desc = { + trigger = { + has_character_flag = exam_taker + is_in_guest_subset = { name = palace_entrants } + } + desc = imperial_examination_conclusion.entrant_passed_palace + } + } + } + + ################### + # OPTIONS + ################### + + options = { + #Emperor gets to choose skill focus option, making characters with these skills more successful in passing exam rounds + special_type = { + imperial_examination_focus_learning = { + default = yes + ai_will_do = { + value = 100 + # Traits + if = { + limit = { + has_trait = greedy + } + add = 25 + desc = greedy + } + if = { + limit = { + has_trait = lazy + } + add = 15 + desc = lazy + } + if = { + limit = { + OR = { + has_trait = scholarly_court_1 + has_trait = scholarly_court_2 + } + } + add = { + value = 25 + desc = trait_scholarly_court_2 + } + } + # Lifestyle + if = { + limit = { + OR = { + has_focus = learning_scholarship_focus + has_focus = learning_theology_focus + } + } + add = { + value = 20 + desc = focus + } + } + if = { + limit = { has_trait = education_learning } + add = { + value = 50 + desc = education_learning + } + } + if = { + limit = { has_trait = theologian } + add = { + value = 50 + desc = theologian + } + } + if = { + limit = { has_trait = scholar } + add = { + value = 50 + desc = scholar + } + } + } + } + imperial_examination_focus_martial = { + is_valid = { + situation:dynastic_cycle ?= { + situation_current_phase = situation_dynastic_cycle_phase_stability_expansion + } + } + cost = { + #Treasury for China + treasury = { + if = { + limit = { is_ai = no } + add = { + value = imperial_examination_alternate_focus_value + desc = imperial_examination_focus_martial + } + } + else = { value = 0 } + } + } + ai_will_do = { + value = 100 + # Lifestyle + if = { + limit = { has_focus = martial_strategy_focus } + add = { + value = 20 + desc = focus + } + } + if = { + limit = { has_trait = strategist } + add = { + value = 10 + desc = strategist + } + } + if = { + limit = { has_trait = overseer } + add = { + value = 10 + desc = overseer + } + } + # Education + if = { + limit = { has_trait = education_martial } + add = { + value = 20 + desc = education_martial + } + } + # Personality + if = { + limit = { + ai_has_warlike_personality = yes + } + add = { + value = 25 + desc = "Warlike" + } + } + } + } + imperial_examination_focus_stewardship = { + is_valid = { + situation:dynastic_cycle ?= { + situation_current_phase = situation_dynastic_cycle_phase_stability_advancement + } + } + cost = { + #Treasury for China + treasury = { + if = { + limit = { is_ai = no } + add = { + value = imperial_examination_alternate_focus_value + desc = imperial_examination_focus_stewardship + } + } + else = { value = 0 } + } + } + ai_will_do = { + value = 100 + # Lifestyle + if = { + limit = { has_focus = stewardship_domain_focus } + add = { + value = 20 + desc = focus + } + } + if = { + limit = { has_trait = architect } + add = { + value = 10 + desc = architect + } + } + if = { + limit = { has_trait = administrator } + add = { + value = 10 + desc = administrator + } + } + if = { + limit = { has_trait = education_stewardship } + add = { + value = 20 + desc = education_stewardship + } + } + } + } + } + + #Choose the amount of entrants you want + #Choose to add additional entrants - each size adding a multiplier to final legitimacy and rewards, but also increasing cost. + imperial_examination_breadth = { + #50 guests + imperial_examination_breadth_exclusive = { + + cost = { + #Treasury for China + treasury = { + if = { + limit = { is_ai = no } + add = imperial_examination_breadth_exclusive_value + } + else = { value = 0 } + } + } + ai_will_do = { + value = 100 + # Personality + if = { # This is the cheap option + limit = { has_trait = greedy } + add = { + value = 20 + desc = greedy + } + } + # This is the elitist option + add = { + value = ai_honor + multiply = -0.25 + desc = "ai_honor" + } + add = { + value = ai_vengefulness + multiply = 0.15 + desc = "ai_vengefulness" + } + add = { + value = ai_boldness + multiply = 0.15 + desc = "ai_boldness" + } + if = { # Does not like to socialize + limit = { has_trait = shy } + add = { + value = -15 + desc = shy + } + } + if = { # Really does not like socializing + limit = { has_trait = reclusive } + add = { + value = -25 + desc = reclusive + } + } + } + } + #100 guests + imperial_examination_breadth_restricted = { + default = yes + + cost = { + #Treasury for China + treasury = { + if = { + limit = { is_ai = no } + add = imperial_examination_breadth_restricted_value + } + else = { value = 0 } + } + } + ai_will_do = { + value = 100 + if = { # Lazy is likely to go for default option + limit = { has_trait = lazy } + add = { + value = 20 + desc = lazy + } + } + add = { # In many ways, this is the most safe option + value = ai_rationality + multiply = 0.25 + desc = "ai_rationality" + } + } + } + #200 guests + imperial_examination_breadth_open = { + + cost = { + #Treasury for China + treasury = { + if = { + limit = { is_ai = no } + add = imperial_examination_breadth_open_value + } + else = { value = 0 } + } + } + ai_will_do = { + value = 150 + add = { # Wants to socialize and be seen by as many people as possible + value = ai_sociability + multiply = 0.25 + desc = "ai_sociability" + } + if = { # Is a good confucian + limit = { has_trait = compassionate } + add = { + value = 10 + desc = compassionate + } + } + if = { # Is a good confucian + limit = { has_trait = just } + add = { + value = 10 + desc = just + } + } + if = { # Is a good confucian + limit = { has_trait = honest } + add = { + value = 10 + desc = honest + } + } + } + } + } + imperial_examination_passing_grade = { + imperial_examination_passing_grade_low = { + #Don't really need a cost, you pay in decreased legitimacy reward + ai_will_do = { + value = 100 + add = { # The more governors the better! + value = ai_sociability + multiply = 0.25 + desc = "ai_sociability" + } + if = { # Lazy does not wish to bother with difficult tests + limit = { has_trait = lazy } + add = { + value = 20 + desc = lazy + } + } + if = { # Who has the patience to come up with difficult tests?! + limit = { has_trait = impatient } + add = { + value = 20 + desc = impatient + } + } + if = { + limit = { + OR = { + has_trait = education_diplomacy_1 + has_trait = education_martial_1 + has_trait = education_stewardship_1 + has_trait = education_intrigue_1 + has_trait = education_learning_1 + } + } + add = { + value = 50 + desc = "low education" + } + } + } + } + imperial_examination_passing_grade_mediocre = { + #Don't really need a cost, you pay in decreased legitimacy reward + ai_will_do = { + value = 100 + if = { # Let's be chill about this + limit = { has_trait = content } + add = { + value = 20 + desc = content + } + } + if = { # I really don't expect _that_ much + limit = { has_trait = humble } + add = { + value = 10 + desc = humble + } + } + if = { # I don't want to cause too much fuss + limit = { has_trait = craven } + add = { + value = 10 + desc = craven + } + } + if = { # I can't really make up my mind + limit = { has_trait = fickle } + add = { + value = 10 + desc = fickle + } + } + if = { + limit = { + OR = { + has_trait = education_diplomacy_2 + has_trait = education_martial_2 + has_trait = education_stewardship_2 + has_trait = education_intrigue_2 + has_trait = education_learning_2 + } + } + add = { + value = 50 + desc = "mediocre education" + } + } + } + } + imperial_examination_passing_grade_high = { + default = yes + #Don't really need a cost, you pay in decreased legitimacy reward + ai_will_do = { + value = 25 + } + } + imperial_examination_passing_grade_extreme = { + # High Legitimacy reward at cost of fewer prospective governors + ai_will_do = { + value = 25 + } + } + } + } + special_option_category = special_type + + ################### + # PHASES + ################### + + phases = { + #Assembly Phase + imperial_examination_phase_assembly = { + order = 1 + is_predefined = yes + + on_phase_active = { + if = { + limit = { this = scope:host } + #Add all the examiners to guest subsets so they don't become Entrants + imperial_examination_set_up_examiners_effect = { HOST = scope:host } + imperial_examination_gather_examiners_effect = yes + #Add all the Entrants to guest subsets so we can keep track of them + imperial_examination_gather_entrants_effect = yes + #Add all landed characters as guests + imperial_examination_gather_guests_effect = yes + #Let's gooo! + trigger_event = { on_action = imperial_examination_opening_on_action } + } + scope:activity = { + progress_activity_phase_after = { days = imperial_examination_assembly_days } + #Set up the scoreboard + metropolitan_examination_scoreboard_setup_effect = yes + } + } + + on_weekly_pulse = { + trigger_event = { on_action = imperial_examination_pulse } + } + } + + #Preparation Phase + imperial_examination_phase_preparation = { + order = 2 + is_predefined = yes + + on_enter_phase = { + scope:activity = { + progress_activity_phase_after = { days = 1 } + } + } + + on_phase_active = { + scope:activity = { + progress_activity_phase_after = { days = imperial_examination_prep_days } + } + } + + on_weekly_pulse = { + trigger_event = { on_action = imperial_examination_pulse } + } + } + + #Metropolitan Examination Phase + imperial_examination_phase_examination = { + order = 3 + is_predefined = yes + + on_enter_phase = { + scope:activity = { + progress_activity_phase_after = { days = 1 } + every_attending_character = { + limit = { + is_ai = no + is_in_guest_subset = { name = entrants } + NOT = { has_activity_intent = imperial_exam_taker_intent } + } + save_temporary_scope_as = temp_character + scope:activity = { + remove_from_guest_subset = { + name = entrants + target = scope:temp_character + } + add_to_guest_subset = { + name = guests + target = scope:temp_character + } + } + } + } + } + + on_phase_active = { + #Intro event for the phase + if = { + limit = { this = scope:host } + trigger_event = imperial_examination.3000 + } + else_if = { + limit = { has_activity_intent = imperial_exam_support_entrants_intent } + trigger_event = imperial_examination.3005 + } + else_if = { + limit = { has_activity_intent = exam_assist_exam_intent } + trigger_event = imperial_examination.3006 + } + else_if = { + limit = { has_activity_intent = imperial_exam_taker_intent } + trigger_event = imperial_examination.3007 + } + # Progress activity + scope:activity = { + progress_activity_phase_after = { weeks = 6 } + } + } + + on_weekly_pulse = { + if = { # host + limit = { + this = scope:host + } + trigger_event = { on_action = imperial_examination_exam_host_events } + } + else_if = { + limit = { + is_in_guest_subset = { name = entrants } + } + trigger_event = { on_action = imperial_examination_exam_entrant_events } + } + } + + on_end = { + #Run once + if = { + limit = { this = scope:host } + imperial_examination_determine_exam_outcome_effect = yes + } + if = { + #Entrants + limit = { + is_in_guest_subset = { name = entrants } + } + #Get rid of failees + imperial_examination_prune_failees_effect = yes + # If not having taken the Provincial Exam and then attempting the Metropolitan, we are a bit harsh. + if = { + limit = { + is_ai = no + var:imperial_examination_score < 50 + } + save_temporary_scope_as = temp_character + scope:activity = { + remove_from_guest_subset = { + name = entrants + target = scope:temp_character + } + add_to_guest_subset = { + name = failees + target = scope:temp_character + } + } + } + #Clear the scoreboard + if = { + limit = { is_in_guest_subset = { name = scoreboard } } + save_temporary_scope_as = temp_character + scope:activity = { + remove_from_guest_subset = { + name = scoreboard + target = scope:temp_character + } + } + } + } + #Gather the top 10 Entrants into the Palace Entrants + if = { + limit = { this = scope:host } + scope:activity = { + ordered_guest_subset = { + name = entrants + order_by = imperial_examination_score_value + max = metropolitan_exam_final_entrants + check_range_bounds = no + save_temporary_scope_as = temp_char + scope:activity = { + remove_from_guest_subset = { + name = entrants + target = scope:temp_char + } + add_to_guest_subset = { + name = palace_entrants + target = scope:temp_char + } + } + } + } + } + #Clean up variables + imperial_examination_clean_up_phase_variables_effect = yes + } + } + + #Palace Exam + imperial_examination_phase_palace_examination = { + order = 4 + is_predefined = yes + + on_enter_phase = { + # Let us trigger some enter phase events + if = { + limit = { this = scope:host } + trigger_event = imperial_examination.9000 + scope:activity = { + # Save this scope so we trigger the first place entrant event correctly (handled via host event). + ordered_guest_subset = { + name = palace_entrants + order_by = imperial_examination_score_value + save_scope_as = highest_score_entrant + } + set_variable = { + name = highest_score_entrant + value = scope:highest_score_entrant + } + } + } + + if = { + # Event for those who did not make the Palace Exam + limit = { + OR = { + is_in_guest_subset = { name = entrants } + is_in_guest_subset = { name = failees } + } + } + trigger_event = imperial_examination.8010 + } + else_if = { + # Event for those who made the Palace Exam (excluding the first place entrant) + limit = { + is_ai = no + this != scope:activity.var:highest_score_entrant + is_in_guest_subset = { name = palace_entrants } + } + trigger_event = imperial_examination.8000 + } + #Let us enter the Prep event on_action loop + trigger_event = { + on_action = palace_examination_prep_events + days = 9 + } + trigger_event = { + on_action = palace_examination_prep_events + days = 17 + } + trigger_event = { + on_action = palace_examination_prep_events + days = 24 + } + scope:activity = { + progress_activity_phase_after = { days = imperial_examination_prep_days } + #Refresh the scoreboard + palace_examination_scoreboard_setup_effect = yes + } + } + + on_phase_active = { + #Reflect on the exam starting + if = { + limit = { this = scope:host } + trigger_event = imperial_examination.3000 + } + else_if = { + limit = { + is_in_guest_subset = { name = palace_entrants } + has_activity_intent = imperial_exam_taker_intent + } + trigger_event = { on_action = imperial_examination_exam_entrant_events } + } + scope:activity = { + progress_activity_phase_after = { days = 14 } + } + } + + on_weekly_pulse = { + + } + + on_end = { + if = { + #Entrant + limit = { + is_in_guest_subset = { name = palace_entrants } + } + #Clear the scoreboard + if = { + limit = { is_in_guest_subset = { name = scoreboard } } + save_temporary_scope_as = temp_character + scope:activity = { + remove_from_guest_subset = { + name = scoreboard + target = scope:temp_character + } + } + } + } + scope:activity = { + set_variable = { + name = first_place_entrant_score + value = 0 + } + #Record the score of the top three entrants + ordered_guest_subset = { + name = palace_entrants + order_by = imperial_examination_score_value + position = 0 + save_temporary_scope_as = temp_first_char + scope:activity = { + set_variable = { + name = first_place_entrant + value = scope:temp_first_char + } + #And the score of the first place entrant + change_variable = { + name = first_place_entrant_score + add = scope:temp_first_char.var:imperial_examination_score + } + if = { + limit = { exists = var:first_place_entrant_score } + #Error suppressant + } + } + } + ordered_guest_subset = { + name = palace_entrants + order_by = imperial_examination_score_value + position = 1 + save_temporary_scope_as = temp_second_char + scope:activity = { + set_variable = { + name = second_place_entrant + value = scope:temp_second_char + } + } + } + ordered_guest_subset = { + name = palace_entrants + order_by = imperial_examination_score_value + position = 2 + save_temporary_scope_as = temp_third_char + scope:activity = { + set_variable = { + name = third_place_entrant + value = scope:temp_third_char + } + } + } + #Describe the score of the first place entrant + if = { + limit = { has_perfect_score_trigger = { SCORE_VAR = first_place_entrant_score } } + set_variable = has_perfect_score + } + if = { + limit = { has_good_score_trigger = { SCORE_VAR = first_place_entrant_score } } + set_variable = has_great_score + } + if = { + limit = { has_decent_score_trigger = { SCORE_VAR = first_place_entrant_score } } + set_variable = has_decent_score + } + if = { + limit = { has_questionable_score_trigger = { SCORE_VAR = first_place_entrant_score } } + set_variable = has_questionable_score + } + #Record the final amount of failees + set_variable = { + name = num_final_failees + value = 0 + } + } + if = { + limit = { + is_in_guest_subset = { name = failees } + } + scope:activity = { + change_variable = { + name = num_final_failees + add = 1 + } + } + } + #Emperor + if = { + limit = { this = scope:host } + imperial_examination_disburse_activity_host_rewards = yes + } + #Examiner/s + if = { + limit = { + this = { + is_in_guest_subset = { name = imperial_examiners } + OR = { + is_vassal_of = scope:host + is_courtier_of = scope:host + } + } + } + imperial_examination_disburse_activity_examiner_rewards = yes + } + #Entrants & Failees + if = { + limit = { + OR = { + is_in_guest_subset = { name = palace_entrants } + is_in_guest_subset = { name = entrants } + is_in_guest_subset = { name = failees } + } + } + save_temporary_scope_as = entrant + # This effect also handles close family member messaging (excluding the house head) + if = { + limit = { is_ai = no } + exam_grab_entrant_position_effect = yes + } + # This effect also handles close family member messaging (excluding the house head) + imperial_examination_disburse_activity_entrant_rewards = yes + every_parent = { + limit = { + is_ai = no + scope:entrant.court_owner != this + } + add_to_list = exam_house_member + scope:entrant = { + add_to_list = parent_relevant_entrants + } + } + house.house_head ?= { + if = { + limit = { + is_ai = no + NOT = { is_in_list = exam_house_member } + scope:entrant.court_owner != this + } + add_to_list = exam_house_member + scope:entrant = { + add_to_list = parent_relevant_entrants + } + } + if = { + limit = { + list_size = { + name = exam_house_member + value = 0 + } + } + house.house_head ?= { + if = { + limit = { + is_ai = no + NOT = { is_in_list = exam_house_member } + scope:entrant.court_owner != this + } + add_to_list = exam_house_member + scope:entrant = { + add_to_list = parent_relevant_entrants + } + } + } + } + } + } + every_in_list = { + list = exam_house_member + limit = { + NOR = { + involved_activity ?= scope:activity + has_character_flag = triggered_family_followup + } + } + add_character_flag = triggered_family_followup + trigger_event = imperial_examination.7100 + } + # Save scopes for characters involved in the Capital exam, to use in conclusion descs. + if = { + limit = { has_activity_intent = imperial_exam_support_entrants_intent } + scope:activity = { + if = { + limit = { + any_attending_character = { + has_activity_intent = imperial_exam_taker_intent + OR = { + is_close_or_extended_family_of = root + has_relation_disciple = root + this = root.primary_spouse + } + court_owner = root + } + } + every_attending_character = { + limit = { + has_activity_intent = imperial_exam_taker_intent + OR = { + is_close_or_extended_family_of = root + has_relation_disciple = root + this = root.primary_spouse + } + court_owner = root + } + add_to_list = parent_relevant_entrants + } + } + } + add_character_flag = { + flag = family_supporter + years = 1 + } + } + if = { + limit = { has_activity_intent = imperial_exam_taker_intent } + add_character_flag = { + flag = exam_taker + years = 1 + } + } + # Trigger conclusion event + if = { + limit = { has_character_flag = family_supporter } + trigger_event = imperial_examination.7003 + } + else = { trigger_event = imperial_examination.7000 } + } + } + } + + ################### + # GUEST HANDLING + ################### + + open_invite = yes + + max_guests = { + value = 1 + if = { + limit = { + scope:imperial_examination_breadth ?= flag:imperial_examination_breadth_exclusive + } + add = exclusive_exam_guests_amount + max = exclusive_exam_guests_amount + } + else_if = { + limit = { + scope:imperial_examination_breadth ?= flag:imperial_examination_breadth_restricted + } + add = restricted_exam_guests_amount + max = restricted_exam_guests_amount + } + else_if = { + limit = { + scope:imperial_examination_breadth ?= flag:imperial_examination_breadth_open + } + add = open_exam_guests_amount + max = open_exam_guests_amount + } + min = 1 + } + + can_be_activity_guest = { + trigger_if = { + limit = { + is_ruler = no + host ?= { + is_ai = yes + is_ruler = yes + } + } + trigger_if = { + limit = { + scope:host.involved_activity ?= { + any_attending_character = { + count >= { + if = { + limit = { + scope:host.involved_activity = { + has_activity_option = { + category = imperial_examination_breadth + option = imperial_examination_breadth_exclusive + } + } + } + add = exclusive_exam_guests_amount + max = exclusive_exam_guests_amount + } + else_if = { + limit = { + scope:host.involved_activity = { + has_activity_option = { + category = imperial_examination_breadth + option = imperial_examination_breadth_restricted + } + } + } + add = restricted_exam_guests_amount + max = restricted_exam_guests_amount + } + else_if = { + limit = { + scope:host.involved_activity = { + has_activity_option = { + category = imperial_examination_breadth + option = imperial_examination_breadth_open + } + } + } + add = open_exam_guests_amount + max = open_exam_guests_amount + } + multiply = 0.8 + } + } + } + } + always = no + } + } + OR = { + government_has_flag = government_is_celestial + government_has_flag = government_is_landless_adventurer + } + #Just... roll with it. + in_diplomatic_range = scope:host + is_adult = yes + # To avoid monks flooding the activity + NOR = { + has_trait = devoted + has_trait = eunuch + } + # To avoid mercenaries and holy orders to join + trigger_if = { + limit = { + exists = primary_title + } + primary_title = { + is_mercenary_company = no + is_holy_order = no + } + } + # Must be the right gender or a player + trigger_if = { + limit = { + scope:host = { + OR = { + has_realm_law = male_only_law + has_realm_law = male_preference_law + } + } + } + OR = { + is_male = yes + is_ai = no + } + } + trigger_if = { + limit = { + scope:host = { + OR = { + has_realm_law = female_only_law + has_realm_law = female_preference_law + } + } + } + OR = { + is_female = yes + is_ai = no + } + } + } + + host_intents = { + intents = { legitimacy_intent exam_recruit_courtiers_intent } + default = exam_recruit_courtiers_intent + } + + guest_intents = { + intents = { imperial_exam_taker_intent imperial_exam_support_entrants_intent exam_assist_exam_intent } + + default = exam_assist_exam_intent + } + + guest_join_chance = { + base = 5 + base_activity_modifier = yes + + # Scripted Modifiers + activity_guest_shared_ai_accept_modifier = yes + activity_guest_health_ai_accept_modifier = yes + #Failee checks + imperial_examination_activity_failee_modifier = yes + #Forced to retake exam checks + imperial_examination_activity_forced_back_modifier = yes + #Is the Minister of Rites + imperial_examination_activity_rites_modifier = yes + modifier = { + any_player = { + is_close_or_extended_family_of = prev + has_character_flag = command_to_attend_flag + top_liege = prev.top_liege + } + NOR = { + # You should get as many shots at the Palace Exam as you want. + has_character_flag = passed_palace_exam + has_trait = devoted + has_trait = eunuch + } + tgp_gender_can_be_exam_entrant_trigger = yes + is_available = yes + is_adult = yes + + add = 5000 + desc = ACTIVITY_GUEST_CLOSE_FAMILY_REASON + } + } + + guest_subsets = { + palace_entrants + entrants + imperial_examiners + scoreboard + failees + guests + } + + wait_time_before_start = { + # Fixed duration, because it is an open activity + months = imperial_examination_wait_time_before_start_months + } + + max_guest_arrival_delay_time = { months = 2 } + + guest_invite_rules = { + #These are not weighed differenty because the guest invite rules themselves handle the guest distribution. + defaults = { + 1 = activity_invite_rule_player_family_opt_in_imperial_exam + 1 = activity_invite_rule_imperial_exam_entrants + 1 = activity_invite_rule_imperial_exam_guests + } + } + + travel_entourage_selection = { + weight = { + value = standard_travel_entourage_additions + if = { + limit = { + is_landed = no + is_faith_dominant_gender = yes + NOT = { has_character_flag = passed_palace_exam } + court_owner = scope:owner + is_available = yes + is_ai = yes + is_adult = yes + location = scope:owner.location + } + add = 50 + } + } + + max = 15 + ai_max = 7 + invite_rule_order = 1 + } + + ################### + # ON ACTIONS + ################### + + pulse_actions = { + entries = { + apa_boasting_calligraphy + apa_impressive_shot + apa_overcome_with_stress + apa_brought_huangdi_gift + apa_friendly_discussions + apa_high_tempers + apa_impressed_examiner + apa_entrant_disagreement + apa_burning_midnight_oil + apa_found_disciple + apa_fruitful_debate + apa_confucian_fervor + apa_floating_poetry + apa_studied_confucian_classics + } + chance_of_no_event = 5 + } + + on_start = { + scope:host = { + #Dynastic Cycle is pleased! + if = { + limit = { this = title:h_china.holder } + title:h_china = { + set_variable = { + name = years_since_imperial_examination + value = 0 + } + } + } + if = { + limit = { is_ai = yes} + remove_treasury = { + value = { + value = imperial_examination_actual_cost + # Kaifeng cost bonus + if = { + limit = { + root.capital_province = { has_building_or_higher = kaifeng_palace_01 } + } + multiply = { + value = { + value = 1 + subtract = kaifeng_examination_cost_value + } + desc = kaifeng_palace_name_desc + } + } + if = { + limit = { + scope:province ?= { has_building_or_higher = examination_hall_01 } + } + add = { + value = 0 + add = { + value = imperial_examination_base_cost + add = { + value = imperial_examination_base_cost + multiply = activity_cost_scale_by_era + subtract = imperial_examination_base_cost + } + } + multiply = imperial_examination_cost_discount_max_value + desc = imperial_examination_cost_discount_examination_hall + } + } + if = { + limit = { + scope:activity = { + NOT = { + has_activity_option = { + category = special_type + option = imperial_examination_focus_learning + } + } + } + } + add = imperial_examination_alternate_focus_value + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = imperial_examination_breadth + option = imperial_examination_breadth_exclusive + } + } + } + add = imperial_examination_breadth_exclusive_value + } + else_if = { + limit = { + scope:activity = { + has_activity_option = { + category = imperial_examination_breadth + option = imperial_examination_breadth_restricted + } + } + } + add = imperial_examination_breadth_restricted_value + } + else = { add = imperial_examination_breadth_open_value } + # AI gets it for free if a Movement demanded it, to ensure they do it. + if = { + limit = { has_character_flag = examinations_ai_override } + multiply = 0 + } + } + } + if = { + limit = { + has_character_flag = examinations_ai_override + } + remove_character_flag = examinations_ai_override + } + } + } + + # Make sure that Examinations are held roughly every 5 years in relevant areas + if = { + limit = { + scope:host.location = { geographical_region = world_asia_china } + NOT = { + exists = global_var:examination_world_asia_china_motivation + } + } + set_global_variable = { + name = examination_world_asia_china_motivation + value = yes + years = 5 + } + } + every_player = { + limit = { + is_landed = no + NOT = { has_variable = recently_invited_to_exam } + should_notify_can_join_activity = scope:activity.activity_type + NOT = { has_character_flag = passed_palace_exam } + can_join_activity = scope:activity + can_arrive_in_time_to_activity_minimum = scope:activity + } + set_variable = { + name = recently_invited_to_exam + years = 1 + } + scope:activity = { open_view_data = { view = activity_list_detail_invite_window player = prev } } + } + } + + on_enter_travel_state = { + # Set an appointment timeout, to prevent you from getting a new appointment during the examinations + if = { + limit = { is_pool_character = no } + set_appointment_timeout = { + months = 6 + desc = appointment_timeout_desc_examinations + } + } + } + + on_enter_passive_state = { # Character scope + #Add any stray Entrants who are in travel entourage of guests + imperial_examination_gather_stray_entrants_effect = yes + if = { + limit = { + is_ai = no + NOR = { + has_character_flag = passed_palace_exam + has_character_flag = set_activity_intent + } + } + set_activity_intent = imperial_exam_taker_intent + add_character_flag = set_activity_intent + } + if = { + limit = { + has_activity_intent = imperial_exam_taker_intent + is_pool_character = no + } + # Set an appointment timeout, to prevent you from getting a new appointment during the examinations + set_appointment_timeout = { + years = 1 + desc = appointment_timeout_desc_examinations + } + } + } + + on_passive_state_pulse = { + imperial_examination_gather_stray_entrants_effect = yes + } + + on_enter_active_state = { # Character scope + } + + on_active_state_pulse = { # Character scope + } + + on_complete = { # Character scope + scope:activity = { + every_attending_character = { + if = { # If we still have a short duration remaining on our appointment timeout, clear it + limit = { + appointment_timeout_days > 0 + appointment_timeout_days < 365 + } + clear_appointment_timeout = yes + } + } + } + } + + ################### + # GRAPHICS + ################### + + # Travel + background = { # Bridge + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + is_riverside_province = yes + geographical_region = world_europe + OR = { + terrain = farmlands + terrain = plains + terrain = mountains + terrain = hills + } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_bridge.dds" + environment = "environment_travel_bridge" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #Rice Fields - If we have Paddy fields AND/or terraced hills + #This goes before other terrain since it can override in many different terrains if built + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + OR = { + terrain = terraced_hills + has_building_or_higher = paddy_fields_01 + } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_rice_fields.dds" + environment = "environment_tgp_rice_fields" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_rice_fields" + } + + background = { #Farmlands - East Asia + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_farm_asia.dds" + environment = "environment_tgp_farm_asia" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_farm_asia" + } + + background = { # Farmland, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_farm.dds" + environment = "environment_travel_farmlands" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { # Farmland, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/farms.dds" + environment = "environment_event_farms" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #Desert, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_desert_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_desert.dds" + environment = "environment_travel_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + background = { #Desert, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_desert_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/desert.dds" + environment = "environment_event_bp1_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { #forest snowy + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location ?= { hunt_snowy_forest_trigger = yes } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_hunt_snowy_forest.dds" + environment = "environment_hunt_snowy_forest" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #forest_pine + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_forest_pine_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/forest_pine.dds" + environment = "environment_event_forest_pine" + ambience = "event:/SFX/Events/Backgrounds/coniferous_forest_day" + } + + background = { #forest + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_forest_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/forest.dds" + environment = "environment_event_forest" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #mountains, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_mountains_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_mountains.dds" + environment = "environment_travel_mountain_settlement" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + background = { #mountains, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_mountains_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/mountains.dds" + environment = "environment_event_mountains" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #steppe, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_steppe_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_steppe.dds" + environment = "environment_travel_steppe_settlement" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + background = { #steppe, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_steppe_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/steppe.dds" + environment = "environment_event_steppe" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + + background = { #drylands (formerly desert) + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_drylands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/drylands.dds" + environment = "environment_event_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { #wetlands + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_wetlands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_wetlands.dds" + environment = "environment_event_bp1_wetlands" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #jungle + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_jungle_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_jungle.dds" + environment = "environment_event_bp1_jungle" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #plains, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_plains_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + environment = "environment_travel_hills_settlement" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { #plains, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_plains_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_plains.dds" + environment = "environment_event_bp1_plains" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #hills, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_hills_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + environment = "environment_travel_hills_settlement" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { #hills, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_hills_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_hills.dds" + environment = "environment_event_bp1_hills" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #sea + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + is_sea_province = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/fp1_ocean.dds" + environment = "environment_event_fp1_ocean" + ambience = "event:/DLC/FP1/SFX/Events/event_ocean_longship" + } + # End Travel + + background = { + texture = "gfx/interface/illustrations/event_scenes/tgp_examination_room.dds" + environment = "environment_tgp_examination_room" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_examination_room" + } + + ### Plugin widgets + activity_window_widgets = { + imperial_examination_scoreboard_widget = "window_activity_contestants_right_bar_container" + imperial_examination_progress_widget = "activity_plugin_widgets_summary" + } + + window_characters = { + player_entrant_traveling = { + camera = camera_activity_horse + + effect = { + scope:player ?= { + if = { + limit = { + NOR = { + this = scope:activity.activity_host + location = scope:activity.activity_location + } + } + add_to_list = characters + } + } + } + scripted_animation = { + animation = jockey_walk + } + } + player_entrant = { + camera = camera_event_center + + effect = { + scope:player ?= { + if = { + limit = { + this != scope:activity.activity_host + location = scope:activity.activity_location + has_activity_intent = imperial_exam_taker_intent + } + add_to_list = characters + } + } + + } + scripted_animation = { + triggered_animation = { + trigger = { + scope:character = { has_variable = been_caught_cheating_longterm } + } + animation = { stress } + } + animation = thinking + } + } + host = { + camera = camera_event_center + + effect = { + if = { + limit = { scope:player = scope:activity.activity_host } + } + scope:host ?= { add_to_list = characters } + } + scripted_animation = { + animation = pondering + } + } + + minister_of_rites = { + camera = camera_event_very_left_activity + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + any_attending_character = { + location = scope:activity.activity_location + has_title = title:e_minister_of_rites + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + has_title = title:e_minister_of_rites + } + add_to_list = characters + } + } + } + scripted_animation = { + animation = chancellor + } + } + + entrant = { + camera = camera_event_center + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + every_attending_character = { + limit = { + is_in_guest_subset = { name = entrants } + has_activity_intent = imperial_exam_taker_intent + } + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:character = { + NOR = { + has_trait = drunkard + has_trait = lifestyle_reveler + } + } + } + animation = { worry admiration beg stress holding_scrolls } + } + #Fallback + animation = chancellor + } + } + + guest = { + camera = camera_event_center + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + every_attending_character = { + limit = { + is_in_guest_subset = { name = guests } + OR = { + has_activity_intent = imperial_exam_support_entrants_intent + has_activity_intent = exam_assist_exam_intent + } + } + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:character = { + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + } + } + } + animation = { happiness storyteller interested_left } + } + animation = flirtation_left + } + } + + examiner = { + camera = camera_event_very_right_activity + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + every_attending_character = { + limit = { + is_in_guest_subset = { name = imperial_examiners } + } + add_to_list = characters + } + } + } + scripted_animation = { + animation = happy_teacher + } + } + } +} diff --git a/common/activities/activity_types/inspection.txt b/common/activities/activity_types/inspection.txt new file mode 100644 index 00000000..3f3965b5 --- /dev/null +++ b/common/activities/activity_types/inspection.txt @@ -0,0 +1,1244 @@ +activity_survey = { + is_shown = { + OR = { + has_bp3_dlc_trigger = yes + has_tgp_dlc_trigger = yes + has_ep3_dlc_trigger = yes + } + highest_held_title_tier >= tier_county + is_adult = yes + government_has_flag = government_is_settled + #Every other activity must be blocked until an uncrowned AI crowns themselves + trigger_if = { + limit = { + is_ai = yes + } + NOT = { + has_realm_law = uncrowned + } + } + OR = { + has_perk = local_inspection_perk + government_allows = administrative + faith = { has_doctrine_parameter = inspections_unlocked_and_costs_piety } + } + trigger_if = { # Small AI's pace themselves more + limit = { + is_ai = yes + } + sub_realm_size > 1 + } + trigger_else = { + sub_realm_size >= 1 + } + } + + can_always_plan = no + + can_start_showing_failures_only = { + NOT = { is_activity_type_on_cooldown = activity_survey } + #Trigger if chain for good DLC dependent tooltips: + #If I lack both DLC this never shows. + trigger_if = { #I have BP3 only - I need the perk + limit = { + has_bp3_dlc_trigger = yes + NOR = { + has_ep3_dlc_trigger = yes + has_tgp_dlc_trigger = yes + } + } + has_perk = local_inspection_perk + } + trigger_else_if = { #I have both TGP/EP3 and BP3 + limit = { + OR = { + has_ep3_dlc_trigger = yes + has_tgp_dlc_trigger = yes + } + has_bp3_dlc_trigger = yes + } + custom_tooltip = { + text = neither_local_inspection_perk_nor_merit + OR = { + has_perk = local_inspection_perk + government_allows = administrative + faith = { has_doctrine_parameter = inspections_unlocked_and_costs_piety } + } + } + } + trigger_else_if = { #I have only TGP/EP3 - I am required to have a bureaucratic government form (i.e. admin based). + limit = { + OR = { + has_ep3_dlc_trigger = yes + has_tgp_dlc_trigger = yes + } + has_bp3_dlc_trigger = no + } + OR = { + government_allows = administrative + faith = { has_doctrine_parameter = inspections_unlocked_and_costs_piety } + } + } + trigger_else = { + always = no + } + is_available = yes + is_landed = yes + age >= 16 + } + + is_valid = { + scope:host = { + is_alive = yes + is_imprisoned = no + is_incapable = no + } + } + + is_location_valid = { + trigger_if = { + limit = { + scope:host = { + is_governor = no + } + } + custom_tooltip = { + text = survey_activity_not_capital + this != scope:host.capital_province + } + } + trigger_if = { + limit = { + scope:host = { has_variable_list = recently_visited_inspection } + } + custom_tooltip = { + text = survey_activity_on_cooldown + scope:host = { + NOT = { + is_target_in_variable_list = { + name = recently_visited_inspection + target = root + } + } + } + } + } + trigger_if = { + limit = { + scope:host = { is_ai = yes } + } + county.holder = scope:host + } + is_county_capital = yes + } + + on_start = { + set_variable = { + name = inspection_success_chance + value = inspection_success_chance_value + } + scope:host = { + switch = { + trigger = has_variable + inspection_activity_border_focus = { remove_variable = inspection_activity_border_focus } + inspection_activity_bureaucracy_focus = { remove_variable = inspection_activity_bureaucracy_focus } + inspection_activity_domain_focus = { remove_variable = inspection_activity_domain_focus } + } + switch = { + trigger = has_variable + inspection_activity_border_vassal_focus = { remove_variable = inspection_activity_border_vassal_focus } + inspection_activity_border_claim_focus = { remove_variable = inspection_activity_border_claim_focus } + inspection_activity_bureaucracy_tax_focus = { remove_variable = inspection_activity_bureaucracy_tax_focus } + inspection_activity_bureaucracy_development_focus = { remove_variable = inspection_activity_bureaucracy_development_focus } + inspection_activity_bureaucracy_control_focus = { remove_variable = inspection_activity_bureaucracy_control_focus } + inspection_activity_domain_levy_focus = { remove_variable = inspection_activity_domain_levy_focus } + inspection_activity_domain_opinion_focus = { remove_variable = inspection_activity_domain_opinion_focus } + inspection_activity_domain_popular_focus = { remove_variable = inspection_activity_domain_popular_focus } + } + add_to_variable_list = { + name = recently_visited_inspection + target = scope:activity.activity_location + years = 5 + } + } + scope:host = { + if = { + limit = { + has_character_flag = free_inspection + } + remove_character_flag = free_inspection + } + } + } + + on_enter_travel_state = { + + } + + on_invalidated = { + invalidation_imprisoned_effect = yes + invalidation_incapable_effect = yes + invalidation_unlanded_effect = yes + } + + on_complete = { + + } + + on_enter_active_state = { + surveyor_no_stone_unturned_perk_effect = yes + if = { + limit = { + this = scope:host + has_perk = personal_touch_perk + } + location.county = { + local_adjudicate_effect = yes + } + } + } + + on_host_death = { + invalidation_host_death_effect = yes + } + + province_filter = realm + ai_province_filter = realm + + max_province_icons = 3 + allow_zero_guest_invites = yes + open_invite = no + + province_description = { + desc = activity_survey_province_desc + first_valid = { + triggered_desc = { + trigger = { + county = { + any_neighboring_county = { + exists = holder + holder.top_liege != root.county.holder.top_liege + } + } + } + desc = survey_border_county + } + triggered_desc = { + trigger = { + scope:host = { top_liege != this } + county = { + any_neighboring_county = { + exists = holder + holder.top_liege = root.county.holder.top_liege + NOT = { + holder = { + OR = { + is_vassal_of = scope:host + this = scope:host + } + } + } + } + } + } + desc = survey_bordering_other_vassals_county + } + } + first_valid = { + triggered_desc = { + trigger = { + county.county_control <= 25 + } + desc = survey_very_low_county_control + } + triggered_desc = { + trigger = { + county.county_control <= 50 + } + desc = survey_low_county_control + } + triggered_desc = { + trigger = { + county.county_control <= 75 + } + desc = survey_medium_county_control + } + } + } + + province_score = { + add = survey_province_reference_value + } + + cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + NOR = { + faith = { has_doctrine_parameter = inspections_unlocked_and_costs_piety } + has_character_flag = free_inspection + } + } + add = { + value = standard_survey_activity_cost + desc = hunt_base_cost + } + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + NOR = { + faith = { has_doctrine_parameter = inspections_unlocked_and_costs_piety } + has_character_flag = free_inspection + } + } + add = { + value = standard_survey_activity_cost + desc = hunt_base_cost + } + } + } + piety = { + value = 0 + if = { + limit = { + faith = { has_doctrine_parameter = inspections_unlocked_and_costs_piety } + NOT = { has_character_flag = free_inspection } + } + add = { + value = standard_survey_activity_cost + desc = hunt_base_cost + } + } + } + } + + ui_predicted_cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + NOR = { + faith = { has_doctrine_parameter = inspections_unlocked_and_costs_piety } + has_character_flag = free_inspection + } + } + add = { + # Base Cost + value = standard_survey_activity_cost + # Make it a multiple of 5 (rounded up) + divide = 5 + ceiling = yes + multiply = 5 + } + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + NOR = { + faith = { has_doctrine_parameter = inspections_unlocked_and_costs_piety } + has_character_flag = free_inspection + } + } + add = { + # Base Cost + value = standard_survey_activity_cost + # Make it a multiple of 5 (rounded up) + divide = 5 + ceiling = yes + multiply = 5 + } + } + } + piety = { + value = 0 + if = { + limit = { + faith = { has_doctrine_parameter = inspections_unlocked_and_costs_piety } + NOT = { has_character_flag = free_inspection } + } + add = { + # Base Cost + value = standard_survey_activity_cost + # Make it a multiple of 5 (rounded up) + divide = 5 + ceiling = yes + multiply = 5 + } + } + } + } + + cooldown = { years = 2 } + + ################### + # PHASES + ################### + + phases = { + phase_surveying = { + is_predefined = yes + location_source = pickable + + on_phase_active = { + if = { + limit = { + this = scope:host + } + scope:activity = { progress_activity_phase_after = { months = 2 } } + trigger_event = { id = bp3_survey.0005 } + trigger_event = { + on_action = random_survey_first_event_pulse + weeks = 2 + } + trigger_event = { + on_action = random_survey_mid_event_pulse + months = 1 + } + trigger_event = { + on_action = random_survey_second_event_pulse + weeks = 6 + } + trigger_event = { + id = bp3_survey.0010 + days = 59 + } + } + } + + on_end = { + + } + } + } + + options = { + inspection_option_allocated_funds = { + inspection_no_funding = { + default = yes + } + inspection_small_fund = { + cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + } + if = { + limit = { + NOT = { has_character_flag = free_inspection } + } + add = { + value = 20 + multiply = { + value = root.highest_held_title_tier + subtract = 1 + divide = 2 + min = 1 + } + multiply = { + value = current_year + subtract = 900 + divide = 2 + min = 100 + max = 300 + divide = 100 + ceiling = yes + } + desc = inspection_small_fund + } + } + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + } + if = { + limit = { + NOT = { has_character_flag = free_inspection } + } + add = { + value = 20 + multiply = { + value = root.highest_held_title_tier + subtract = 1 + divide = 2 + min = 1 + } + multiply = { + value = current_year + subtract = 900 + divide = 2 + min = 100 + max = 300 + divide = 100 + ceiling = yes + } + desc = inspection_small_fund + } + } + } + } + } + } + inspection_large_fund = { + cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + } + if = { + limit = { + NOT = { has_character_flag = free_inspection } + } + add = { + value = 40 + multiply = { + value = root.highest_held_title_tier + subtract = 1 + divide = 2 + min = 1 + } + multiply = { + value = current_year + subtract = 900 + divide = 2 + min = 100 + max = 300 + divide = 100 + ceiling = yes + } + desc = inspection_large_fund + } + } + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + } + if = { + limit = { + NOT = { has_character_flag = free_inspection } + } + add = { + value = 40 + multiply = { + value = root.highest_held_title_tier + subtract = 1 + divide = 2 + min = 1 + } + multiply = { + value = current_year + subtract = 900 + divide = 2 + min = 100 + max = 300 + divide = 100 + ceiling = yes + } + desc = inspection_large_fund + } + } + } + } + } + } + } + } + + max_guest_arrival_delay_time = { months = 1 } + + + ################### + # ACTIVITY-SPECIFIC PULSES + ################### + + pulse_actions = { + entries = { + apa_survey_bad_harvest + apa_survey_good_harvest + apa_survey_bad_merchant_guild + apa_survey_good_merchant_guild + apa_survey_bad_noble + apa_survey_good_noble + apa_survey_tax_problems + apa_survey_extra_taxes + apa_survey_old_bridge + apa_survey_bad_mercenaries + apa_survey_good_mercenaries + apa_survey_small_festival + apa_survey_fishing_rights + apa_survey_city_walls + apa_survey_local_gift + } + chance_of_no_event = 0 + } + + ################### + # AI VALUES + ################### + + # desc is only shown in debug AI watch window + ai_will_do = { + value = 50 + + if = { + limit = { + has_trait = lazy + } + add = -10 + } + + #Can you actually afford this? + if = { + limit = { + NOT = { can_make_expensive_purchase_trigger = { PRICE = activity_minor_gold_value } } + } + add = -75 + } + } + + ai_check_interval = 60 + + ai_will_select_province = { + value = 10 + } + + ################### + # GUEST HANDLING + ################### + + host_intents = { + default = survey_overseer_intent + intents = { survey_overseer_intent survey_learning_intent } + } + + guest_intents = { + intents = { survey_learning_intent_guest } + default = survey_learning_intent_guest + } + + can_be_activity_guest = { + is_ai = yes + court_owner ?= scope:host + is_healthy = yes + is_landed = no + age >= 12 + OR = { + is_knight_of = scope:host + is_councillor_of = scope:host + is_child_of = scope:host + is_heir_of = scope:host + is_spouse_of = scope:host + is_consort_of = scope:host + has_relation_ward = scope:host + has_relation_friend = scope:host + has_relation_lover = scope:host + } + } + + travel_entourage_selection = { + weight = 1 + + # Up to how many characters to select for a player + max = 20 + + # Up to how many characters to select for an AI + ai_max = 15 + + invite_rule_order = 1 + } + + max_guests = 20 + + guest_join_chance = { + base = 10 + } + + ################### + # GRAPHICS + ################### + + # Travel + background = { # Bridge + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + is_riverside_province = yes + geographical_region = world_europe + OR = { + terrain = farmlands + terrain = plains + terrain = mountains + terrain = hills + } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_bridge.dds" + environment = "environment_travel_bridge" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #Rice Fields - If we have Paddy fields AND/or terraced hills + #This goes before other terrain since it can override in many different terrains if built + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + OR = { + terrain = terraced_hills + has_building_or_higher = paddy_fields_01 + } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_rice_fields.dds" + environment = "environment_tgp_rice_fields" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_rice_fields" + } + + background = { #Farmlands - East Asia + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_farm_asia.dds" + environment = "environment_tgp_farm_asia" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_farm_asia" + } + + background = { # Farmland, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_farm.dds" + environment = "environment_travel_farmlands" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { # Farmland, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/farms.dds" + environment = "environment_event_farms" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #Desert, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_desert_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_desert.dds" + environment = "environment_travel_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + background = { #Desert, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_desert_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/desert.dds" + environment = "environment_event_bp1_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { #forest snowy + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location ?= { hunt_snowy_forest_trigger = yes } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_hunt_snowy_forest.dds" + environment = "environment_hunt_snowy_forest" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #forest_pine + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_forest_pine_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/forest_pine.dds" + environment = "environment_event_forest_pine" + ambience = "event:/SFX/Events/Backgrounds/coniferous_forest_day" + } + + background = { #forest + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_forest_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/forest.dds" + environment = "environment_event_forest" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #mountains, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_mountains_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_mountains.dds" + environment = "environment_travel_mountain_settlement" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + background = { #mountains, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_mountains_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/mountains.dds" + environment = "environment_event_mountains" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #steppe, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_steppe_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_steppe.dds" + environment = "environment_travel_steppe_settlement" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + background = { #steppe, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_steppe_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/steppe.dds" + environment = "environment_event_steppe" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + + background = { #drylands (formerly desert) + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_drylands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/drylands.dds" + environment = "environment_event_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { #wetlands + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_wetlands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_wetlands.dds" + environment = "environment_event_bp1_wetlands" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #jungle + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_jungle_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_jungle.dds" + environment = "environment_event_bp1_jungle" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #plains, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_plains_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + environment = "environment_travel_hills_settlement" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { #plains, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_plains_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_plains.dds" + environment = "environment_event_bp1_plains" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #hills, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_hills_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + environment = "environment_travel_hills_settlement" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { #hills, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_hills_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_hills.dds" + environment = "environment_event_bp1_hills" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { #Nomads and steppe tribals + trigger = { + scope:activity = { + OR = { + activity_host = { government_has_flag = government_is_nomadic } + AND = { + activity_host = { government_has_flag = government_is_tribal } + activity_location.culture ?= { has_graphical_steppe_culture_group_trigger = yes } + } + AND = { + is_landless_adventurer = yes + activity_location.culture ?= { has_graphical_steppe_culture_group_trigger = yes } + } + } + } + } + texture = "gfx/interface/illustrations/event_scenes/mpo_camp_steppe.dds" + environment = "environment_mpo_camp_steppe" + ambience = "event:/DLC/CE2/Events/Event_Images/mpo_camp_steppe" + } + background = { + trigger = { + scope:activity ?= { + activity_location.county = title:c_byzantion + } + } + texture = "gfx/interface/illustrations/event_scenes/ep3_constantinople.dds" + environment = "environment_ep3_constantinople" + ambience = "event:/DLC/EP3/SFX/Events/Event_Images/ep3_evn_eventimage_constantinople" + } + background = { #FP2 + trigger = { + scope:activity ?= { + activity_location = { + OR = { + culture = { has_building_gfx = iberian_building_gfx } + geographical_region = world_europe_west_iberia + } + } + } + } + texture = "gfx/interface/illustrations/event_scenes/fp2_courtyard.dds" + environment = "environment_event_fp2_courtyard" + ambience = "event:/DLC/FP2/SFX/Events/courtyard" + } + background = { #Indian Courtyard + trigger = { + scope:activity ?= { + activity_location ?= { + OR = { + culture = { has_graphical_india_culture_group_trigger = yes } + steppe_building_gfx_use_indian_trigger = yes + } + } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_courtyard_indian.dds" + environment = "environment_event_bp1_courtyard_indian" + ambience = "event:/SFX/Events/Backgrounds/castle_courtyard_western" + } + background = { #MENA Courtyard + trigger = { + scope:activity ?= { + activity_location = { + OR = { + culture ?= { has_graphical_mena_culture_group_trigger = yes } + culture ?= { has_building_gfx = iranian_building_gfx } + steppe_building_gfx_use_mena_trigger = yes + } + } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_courtyard_mena.dds" + environment = "environment_event_bp1_courtyard_mena" + ambience = "event:/SFX/Events/Backgrounds/castle_courtyard_western" + } + background = { #East Asia + trigger = { + scope:activity.activity_location ?= { + OR = { + culture ?= { has_graphical_east_asia_culture_group_trigger = yes } + steppe_building_gfx_use_east_asian_trigger = yes + } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_courtyard_asia.dds" + environment = "environment_tgp_courtyard_asia" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_courtyard_asia" + } + background = { # Fallback + texture = "gfx/interface/illustrations/event_scenes/bp2_courtyard.dds" + environment = "environment_bp2_courtyard" + ambience = "event:/DLC/FP2/SFX/Events/courtyard" + } + + window_characters = { + guest = { + camera = camera_body_left + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + if = { + limit = { + any_attending_character = { + is_councillor_of = scope:host + location = scope:activity.activity_location + this != scope:host + } + } + every_attending_character = { + limit = { + is_councillor_of = scope:host + location = scope:activity.activity_location + this != scope:host + } + add_to_list = characters + } + } + else_if = { + limit = { + any_attending_character = { + is_knight_of = scope:host + location = scope:activity.activity_location + this != scope:host + } + } + every_attending_character = { + limit = { + is_knight_of = scope:host + location = scope:activity.activity_location + this != scope:host + } + add_to_list = characters + } + } + else = { + every_attending_character = { + limit = { + is_adult = yes + location = scope:activity.activity_location + this != scope:host + } + add_to_list = characters + } + } + } + } + + scripted_animation = { + animation = writing + } + } + + host = { + camera = camera_body + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + scope:host = { + add_to_list = characters + } + } + } + + scripted_animation = { + animation = debating + } + } + + travel_host = { + camera = camera_event_horse_left + + effect = { + if = { + limit = { + scope:host.location != scope:activity.activity_location + } + scope:host = { + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:character.location = { is_sea_province = yes } + } + animation = { idle } + } + triggered_animation = { + trigger = { scope:character = { has_trait = impatient } } + animation = { jockey_gallop } + } + animation = jockey_walk + } + } + + guest = { + camera = camera_body + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + if = { + limit = { + any_attending_character = { + age >= 12 + is_primary_heir_of = scope:host + location = scope:activity.activity_location + this != scope:host + } + } + every_attending_character = { + limit = { + age >= 12 + is_primary_heir_of = scope:host + location = scope:activity.activity_location + this != scope:host + } + add_to_list = characters + } + } + else_if = { + limit = { + any_attending_character = { + is_consort_of = scope:host + location = scope:activity.activity_location + this != scope:host + } + } + every_attending_character = { + limit = { + is_consort_of = scope:host + location = scope:activity.activity_location + this != scope:host + } + add_to_list = characters + } + } + else_if = { + limit = { + any_attending_character = { + age >= 12 + OR = { + is_child_of = scope:host + is_grandchild_of = scope:host + } + location = scope:activity.activity_location + this != scope:host + } + } + every_attending_character = { + limit = { + age >= 12 + OR = { + is_child_of = scope:host + is_grandchild_of = scope:host + } + location = scope:activity.activity_location + this != scope:host + } + add_to_list = characters + } + } + else = { + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + } + add_to_list = characters + } + } + } + } + + scripted_animation = { + animation = survey + } + } + } + + activity_window_widgets = { + inspection_success_chance = "activity_plugin_widgets_summary" + } +} diff --git a/common/activities/activity_types/playdate.txt b/common/activities/activity_types/playdate.txt new file mode 100644 index 00000000..5714827c --- /dev/null +++ b/common/activities/activity_types/playdate.txt @@ -0,0 +1,1010 @@ +activity_playdate = { + is_shown = { + highest_held_title_tier > tier_barony + trigger_if = { + limit = { + highest_held_title_tier = tier_county + } + top_liege != this + } + is_landed_or_landless_administrative = yes + trigger_if = { + limit = { + is_ai = yes + } + is_at_war = no + NOT = { has_variable = conqueror } + trigger_if = { # Throttle Counts + limit = { + highest_held_title_tier = tier_county + } + ai_sociability >= 100 + } + } + is_adult = no + age < less_than_two_years_to_adulthood_value #Consistency! + #Every other activity must be blocked until an uncrowned AI crowns themselves + trigger_if = { + limit = { + is_ai = yes + age >= 12 + } + NOT = { + has_realm_law = uncrowned + } + } + } + + can_start_showing_failures_only = { + NOT = { is_activity_type_on_cooldown = activity_playdate } + is_available = yes + age >= 4 + } + + is_valid = { + scope:host = { + is_imprisoned = no + is_landed_or_landless_administrative = yes + NOT = { is_incapable = yes } + } + # If no one shows up + trigger_if = { + limit = { + is_current_phase_active = yes + } + has_attending_activity_guests = yes + } + } + + on_invalidated = { + + if = { # host is imprisoned + limit = { + scope:host = { is_imprisoned = yes } + } + #Host has been imprisoned + every_attending_character = { + limit = { + this != scope:host + } + trigger_event = playdate.0022 + } + scope:host = { + trigger_event = playdate.0021 + } + } + # Host becomes unlanded + if = { + limit = { + scope:host = { + is_landed_or_landless_administrative = no + } + } + scope:activity = { + activity_type = { save_scope_as = activity_type } + } + every_attending_character = { + trigger_event = activity_system.0320 + } + } + if = { + limit = { + scope:host = { is_incapable = yes } + } + scope:activity = { + activity_type = { save_scope_as = activity_type } + } + scope:host = { + trigger_event = activity_system.0330 + } + every_attending_character = { + limit = { this != scope:host } + trigger_event = activity_system.0331 + } + } + if = { # No one shows up + limit = { + has_attending_activity_guests = no + } + scope:host = { + trigger_event = playdate.2003 + } + } + } + + is_location_valid = { + exists = province_owner + province_owner.top_liege = scope:host.top_liege + } + + + on_host_death = { + every_attending_character = { + trigger_event = playdate.0020 + } + } + + province_filter = capital + ai_province_filter = capital + + max_province_icons = 5 + + cost = { + gold = { + add = { + value = standard_playdate_activity_cost + desc = hunt_base_cost + } + # Free playdate credit from various events. + if = { + limit = { has_variable = free_meet_peers_credit } + multiply = 0 + } + } + } + + ui_predicted_cost = { + gold = { + # Base Cost + value = standard_playdate_activity_cost + # Make it a multiple of 5 (rounded up) + divide = 5 + ceiling = yes + multiply = 5 + } + } + + cooldown = { days = standard_playdate_cooldown_time } + + ################### + # PHASES + ################### + + phases = { + playdate_phase = { + is_predefined = yes + + on_phase_active = { + if = { + limit = { this = scope:host } + scope:activity = { progress_activity_phase_after = { months = 3 } } + trigger_event = playdate.2001 + } + else = { + trigger_event = playdate.2501 + } + } + + on_monthly_pulse = { + # Fires for every attendee + trigger_event = { + on_action = playdate_event_selection + days = { 1 3 } + } + random = { + chance = { + value = 10 + if = { + limit = { + has_bp2_dlc_trigger = yes + this = scope:activity.activity_host + } + add = 40 + } + } + trigger_event = { + on_action = playdate_event_selection + days = { 15 20 } + } + } + } + + on_end = { + # Send each character back home + #set_location_to_default = yes + # Send the parents an interface notification that their child has returned from the playdate + if = { + limit = { + this != scope:host + is_ai = yes + is_playable_character = no + save_temporary_scope_as = child_scope_check + any_parent = { + is_ai = no + any_courtier = { + this = scope:child_scope_check + } + } + } + save_scope_as = child_scope + random_parent = { + limit = { + is_ai = no + any_courtier = { + this = scope:child_scope + } + } + send_interface_message = { + type = event_childhood_neutral_text + title = child_return_from_playdate_title + desc = child_return_from_playdate_desc + + left_icon = scope:child_scope + right_icon = scope:host + } + } + } + + # Fire conclusion events + if = { + limit = { this = scope:host } + scope:activity = { + add_activity_log_entry = { + key = playdate_conc_reward + score = 100 + show_in_conclusion = yes + character = root + root = { add_prestige = medium_prestige_gain } + every_attending_character = { + limit = { this != root } + custom = every_guest_scope_tt + add_opinion = { + target = root + modifier = hosted_successful_playdate_opinion + } + } + } + } + trigger_event = playdate.9001 + } + else = { + trigger_event = playdate.9002 + } + } + } + } + + wait_time_before_start = { days = 7 } + max_guest_arrival_delay_time = { months = 8 } + + + ################### + # ACTIVITY-SPECIFIC PULSES + ################### + + pulse_actions = { + entries = { + apa_won_at_dice apa_good_manners apa_visited_friends_chapel apa_mentor_taught_me apa_read_a_book apa_joked_together apa_rescued_kid apa_shared_food apa_broke_toy apa_found_gold_stash apa_learned_from_kid apa_sang_nice_song apa_practiced_with_swords apa_studied_ledger apa_had_charming_convo + } + chance_of_no_event = 10 + } + + + ################### + # AI VALUES + ################### + + # desc is only shown in debug AI watch window + ai_will_do = { + value = 50 + + if = { + limit = { + OR = { + has_trait = shy + has_trait = reclusive + has_trait = depressed_1 + has_trait = depressed_genetic + } + } + add = -30 + } + + if = { + limit = { + has_trait = lazy + } + add = -10 + } + + if = { + limit = { + has_trait = gregarious + } + add = 50 + } + + #Can you actually afford this? + if = { + limit = { + NOT = { can_make_expensive_purchase_trigger = { PRICE = activity_minor_gold_value } } + } + add = -75 + } + # Plague + if = { + limit = { + any_held_title = { + title_tier = county + has_province_with_epidemic = { intensity < apocalyptic } + } + would_follow_social_distancing_value >= -1 + } + add = { + value = -60 + desc = "Plague in Domain" + } + } + else_if = { + limit = { + any_realm_county = { + has_province_with_epidemic = { intensity < apocalyptic } + } + would_follow_social_distancing_value >= -1 + } + add = { + value = -20 + desc = "Plague in Top Realm" + } + } + if = { + limit = { + any_held_title = { + title_tier = county + has_province_with_epidemic = { intensity = apocalyptic } + } + } + add = { + value = -200 + desc = "Apocalyptic Plague in Domain" + } + } + else_if = { + limit = { + any_held_title = { + title_tier = county + has_province_with_epidemic = { intensity = apocalyptic } + } + } + add = { + value = -40 + desc = "Apocalyptic Plague in Top Realm" + } + } + } + + ai_check_interval_by_tier = { + barony = 0 + county = 60 + duchy = 60 + kingdom = 60 + empire = 60 + hegemony = 60 + } + + ai_will_select_province = { + value = 10 + if = { + limit = { + this = scope:host.capital_province + } + add = { + value = 30 + desc = "Capital Province preferred" + } + } + } + + ################### + # GUEST HANDLING + ################### + + max_guests = 30 + + guest_invite_rules = { + defaults = { + 2 = activity_invite_rule_liege + 2 = activity_invite_rule_siblings + 2 = activity_invite_rule_vassals + 1 = activity_invite_rule_confederates + 1 = activity_invite_rule_friends + 1 = activity_invite_rule_crushes + 1 = activity_invite_rule_personal_scheme_targets + 2 = activity_invite_rule_powerful_vassals_children + 2 = activity_invite_rule_fellow_vassals + 3 = activity_invite_rule_fellow_vassals_children + + } + rules = { + # MP + 6 = activity_invite_mp + 3 = activity_invite_rule_vassals_children + } + } + + can_be_activity_guest = { + is_available_for_child_activity_trigger = yes + in_diplomatic_range = scope:host + } + + host_intents = { + default = reduce_stress_intent + intents = { reduce_stress_intent } + } + + guest_intents = { + default = reduce_stress_intent + intents = { reduce_stress_intent } + } + + guest_join_chance = { + base = 10 + base_activity_modifier = yes + + # Scripted Modifiers + activity_guest_shared_ai_accept_modifier = yes + + modifier = { + add = 25 + desc = ACTIVITY_GUEST_PLAYDATE_CREDIT_REASON + scope:host = { has_variable = free_meet_peers_credit } + } + } + + ################### + # GRAPHICS + ################### + + # Travel + background = { # Bridge + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + is_riverside_province = yes + geographical_region = world_europe + OR = { + terrain = farmlands + terrain = plains + terrain = mountains + terrain = hills + } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_bridge.dds" + environment = "environment_travel_bridge" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #Rice Fields - If we have Paddy fields AND/or terraced hills + #This goes before other terrain since it can override in many different terrains if built + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + OR = { + terrain = terraced_hills + has_building_or_higher = paddy_fields_01 + } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_rice_fields.dds" + environment = "environment_tgp_rice_fields" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_rice_fields" + } + + background = { #Farmlands - East Asia + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_farm_asia.dds" + environment = "environment_tgp_farm_asia" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_farm_asia" + } + + background = { # Farmland, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_farm.dds" + environment = "environment_travel_farmlands" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { # Farmland, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/farms.dds" + environment = "environment_event_farms" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #Desert, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_desert_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_desert.dds" + environment = "environment_travel_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + background = { #Desert, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_desert_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/desert.dds" + environment = "environment_event_bp1_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { #forest snowy + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location ?= { hunt_snowy_forest_trigger = yes } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_hunt_snowy_forest.dds" + environment = "environment_hunt_snowy_forest" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #forest_pine + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_forest_pine_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/forest_pine.dds" + environment = "environment_event_forest_pine" + ambience = "event:/SFX/Events/Backgrounds/coniferous_forest_day" + } + + background = { #forest + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_forest_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/forest.dds" + environment = "environment_event_forest" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #mountains, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_mountains_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_mountains.dds" + environment = "environment_travel_mountain_settlement" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + background = { #mountains, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_mountains_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/mountains.dds" + environment = "environment_event_mountains" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #steppe, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_steppe_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_steppe.dds" + environment = "environment_travel_steppe_settlement" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + background = { #steppe, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_steppe_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/steppe.dds" + environment = "environment_event_steppe" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + + background = { #drylands (formerly desert) + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_drylands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/drylands.dds" + environment = "environment_event_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { #wetlands + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_wetlands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_wetlands.dds" + environment = "environment_event_bp1_wetlands" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #jungle + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_jungle_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_jungle.dds" + environment = "environment_event_bp1_jungle" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #plains, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_plains_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + environment = "environment_travel_hills_settlement" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { #plains, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_plains_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_plains.dds" + environment = "environment_event_bp1_plains" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #hills, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_hills_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + environment = "environment_travel_hills_settlement" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { #hills, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_hills_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_hills.dds" + environment = "environment_event_bp1_hills" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #sea + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + is_sea_province = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/fp1_ocean.dds" + environment = "environment_event_fp1_ocean" + ambience = "event:/DLC/FP1/SFX/Events/event_ocean_longship" + } + # End Travel + background = { #Nomads + trigger = { + OR = { + activity_host = { government_has_flag = government_is_nomadic } + AND = { + activity_host = { government_has_flag = government_is_tribal } + activity_location.culture ?= { has_graphical_steppe_culture_group_trigger = yes } + } + AND = { + activity_host = { is_landless_adventurer = yes } + activity_host.culture ?= { has_graphical_steppe_culture_group_trigger = yes } + } + } + } + texture = "gfx/interface/illustrations/event_scenes/mpo_hunt_steppe.dds" + environment = "environment_mpo_hunt_steppe" + ambience = "event:/DLC/CE2/Events/Event_Images/mpo_hunt_steppe" + } + background = { + trigger = { + activity_location = { + OR = { + geographical_region = world_europe_west_iberia + culture = { has_building_gfx = iberian_building_gfx } + } + } + } + texture = "gfx/interface/illustrations/activity_backgrounds/fp2_garden.dds" + environment = "environment_event_fp2_garden" + ambience = "event:/DLC/FP2/SFX/Events/garden" + } + background = { + trigger = { + activity_location = { + OR = { + culture ?= { + has_graphical_mena_culture_group_trigger = yes + } + steppe_building_gfx_use_mena_trigger = yes + } + } + } + texture = "gfx/interface/illustrations/activity_backgrounds/bp1_garden_mena_day.dds" + environment = "environment_event_fp2_garden" + ambience = "event:/DLC/FP2/SFX/Events/garden" + } + background = { #Indian + trigger = { + activity_location = { + OR = { + steppe_building_gfx_use_indian_trigger = yes + culture ?= { has_graphical_india_culture_group_trigger = yes } + } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp2_indian_garden.dds" + environment = "environment_bp2_garden_india_day" + ambience = "event:/SFX/Events/Backgrounds/castle_garden_day" + } + background = { #Asia Garden + trigger = { + activity_location ?= { + OR = { + culture ?= { has_graphical_east_asia_culture_group_trigger = yes } + steppe_building_gfx_use_east_asian_trigger = yes + } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_garden_asia.dds" + environment = "environment_tgp_garden_asia" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_garden_asia" + } + background = { + texture = "gfx/interface/illustrations/activity_backgrounds/garden.dds" + environment = "environment_event_garden" + ambience = "event:/DLC/FP2/SFX/Events/garden" + } + + window_characters = { + + guest = { + camera = camera_event_center + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + scope:player ?= { + this != scope:host + } + } + scope:player ?= { add_to_list = characters } + } + else = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + } + add_to_list = characters + } + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + always = yes + } + animation = { idle throne_room_cheer_2 child_hobby_horse } + } + } + } + + guest = { + camera = camera_event_center + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + } + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + always = yes + } + animation = { idle laugh clutching_ball } + } + } + } + + host = { + camera = camera_event_center + + effect = { + if = { + limit = { + OR = { + scope:host.location = scope:activity.activity_location + scope:host.location = { is_sea_province = yes } + } + } + scope:host = { + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:character.location = { is_sea_province = yes } + } + animation = { survey } + } + animation = idle + } + } + + travel_host = { + camera = camera_event_horse_left + + effect = { + if = { + limit = { + NOR = { + scope:host.location = scope:activity.activity_location + scope:host.location = { is_sea_province = yes } + } + } + scope:host = { + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { scope:character = { has_trait = impatient } } + animation = { jockey_gallop } + } + animation = jockey_walk + } + } + + guest = { + camera = camera_event_center + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + } + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + always = yes + } + animation = { idle thinking throne_room_cheer_1 clutching_doll } + } + } + } + + guest = { + camera = camera_event_center + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + this != scope:host + } + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + always = yes + } + animation = { idle happiness eccentric chess_cocky chess_certain_win reading } + } + } + } + } + + on_enter_active_state = { + surveyor_no_stone_unturned_perk_effect = yes + } + + ################### + # ACTIVITY-SPECIFIC PULSES + ################### + + on_start = { + # Remove free credit. + scope:host = { remove_variable = free_meet_peers_credit } + } +} diff --git a/common/activities/activity_types/tour.txt b/common/activities/activity_types/tour.txt new file mode 100644 index 00000000..fd873ac5 --- /dev/null +++ b/common/activities/activity_types/tour.txt @@ -0,0 +1,4095 @@ +activity_tour = { + is_shown = { + highest_held_title_tier > tier_barony + is_landed = yes + trigger_if = { + limit = { + is_ai = yes + } + is_at_war = no + } + has_dlc_feature = tours_and_tournaments + has_dlc_feature = advanced_activities + NOT = { government_has_flag = government_is_administrative } + #Every other activity must be blocked until an uncrowned AI crowns themselves + trigger_if = { + limit = { + is_ai = yes + } + NOT = { + has_realm_law = uncrowned + } + } + } + + can_start_showing_failures_only = { + NOT = { is_activity_type_on_cooldown = activity_tour } + highest_held_title_tier >= tier_duchy + is_available = yes + age >= 12 + custom_tooltip = { + text = 3_vassals_or_more + vassal_count >= 3 + } + custom_tooltip = { + text = 5_courtiers_or_more + any_courtier_or_guest = { count >= 5 } + } + is_in_civil_war = no + } + + is_valid = { + scope:host = { + is_landed = yes + NOT = { is_incapable = yes } + is_in_civil_war = no + } + } + + on_invalidated = { + # Host becomes unlanded + if = { + limit = { + scope:host = { is_landed = no } + } + scope:activity = { + activity_type = { save_scope_as = activity_type } + } + every_in_list = { + variable = tour_vassals_to_visit + trigger_event = activity_system.0320 + } + } + if = { + limit = { + scope:host = { is_incapable = yes } + } + scope:activity = { + activity_type = { save_scope_as = activity_type } + } + scope:host = { + trigger_event = activity_system.0330 + } + every_in_list = { + variable = tour_vassals_to_visit + trigger_event = activity_system.0331 + } + } + # Clean up character flag preventing visited vassals from starting other activities + every_in_list = { + variable = tour_vassals_to_visit + if = { + limit = { + has_character_flag = being_visited_on_tour + } + remove_character_flag = being_visited_on_tour + trigger_event = { + id = tour_general.9998 + } + } + } + } + + on_host_death = { + # Send your entourage home + scope:host = { + current_travel_plan = { + every_entourage_character = { + set_location_to_default = yes + } + } + # saving the title for loc + primary_title = { save_scope_as = host_title } + # Inform your heir if you have one + player_heir ?= { + trigger_event = activity_system.1010 + } + } + # Inform all the other attendees + scope:activity = { + every_in_list = { + variable = tour_vassals_to_visit + limit = { + this != scope:host.player_heir + } + trigger_event = activity_system.1011 + } + } + } + + ai_will_do = { + value = 30 + if = { + limit = { + liege = { has_ongoing_grand_activity_trigger = yes } + } + desc = "Liege grand activities" + add = -1000 + } + if = { + limit = { + highest_held_title_tier >= tier_kingdom + NOT = { has_character_flag = had_tour } + } + desc = "I am a king and should go on at least one tour" + add = 200 + } + if = { + limit = { + highest_held_title_tier >= tier_kingdom + has_character_flag = had_tour + } + desc = "I am a king and have gone on one tour already" + add = -10 + } + if = { + limit = { + highest_held_title_tier <= tier_duchy + has_character_flag = had_tour + } + desc = "I am a duke and have gone on one tour already" + add = -30 + } + if = { + limit = { + gold <= major_gold_value + OR = { + has_trait = sadistic + has_trait = arbitrary + has_trait = greedy + ai_greed >= 75 + } + NOR = { + has_trait = generous + ai_greed <= -75 + } + } + desc = "I am poor and likely to go on a taxation tour!" + add = 30 + } + if = { + limit = { + ai_has_warlike_personality = yes + war_chest_gold < war_chest_gold_maximum + } + desc = "I am warlike and want to fill my war chest" + add = 30 + } + if = { + limit = { + ai_has_economical_boom_personality = yes + gold < major_gold_value + } + desc = "I am a builder and want more gold to build building with!" + add = 30 + } + if = { + limit = { + gold <= major_gold_value + } + desc = "I am very poor" + add = -20 + } + if = { + limit = { + gold <= massive_gold_value + } + desc = "I am poor" + add = -10 + } + if = { + limit = { + any_powerful_vassal = { + opinion = { + target = root + value <= -25 + } + } + } + desc = "Vassals hate me" + add = 10 + } + if = { + limit = { + any_sub_realm_county = { + count >= 3 + culture = { + cultural_acceptance = { + target = root.culture + value <= 25 + } + } + } + } + desc = "Foreign subjects hate me" + add = 10 + } + if = { + limit = { + any_vassal = { + count >= 5 + } + } + desc = "I have many vassals" + add = 10 + } + if = { + limit = { + OR = { + gold >= 1000 + gold >= massive_gold_value + } + } + desc = "I have a lot of money" + add = 10 + } + # Plague + if = { + limit = { + any_sub_realm_county = { + has_province_with_epidemic = { intensity < apocalyptic } + } + would_follow_social_distancing_value >= -1 + } + add = { + value = -60 + desc = "Plague in Realm" + } + } + if = { + limit = { + any_sub_realm_county = { + has_province_with_epidemic = { intensity = apocalyptic } + } + } + add = { + value = -200 + desc = "Apocalyptic Plague in Realm" + } + } + if = { + limit = { + government_has_flag = government_is_celestial + highest_held_title_tier >= tier_empire + is_independent_ruler = yes + } + add = { + value = -500 + desc = "I have people for that" + } + } + } + + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 60 + kingdom = 60 + empire = 60 + hegemony = 60 + } + + ai_select_num_provinces = { + value = 0 + if = { + limit = { + highest_held_title_tier <= tier_duchy + } + add = { + value = 3 + desc = "Duchy base value" + } + } + else = { + add = { + value = 4 + desc = "King+ base value" + } + } + + if = { + limit = { + gold >= medium_gold_value + } + add = { + value = 1 + desc = "Medium gold +1" + } + } + if = { + limit = { + gold >= major_gold_value + } + add = { + value = 2 + desc = "Major gold +2" + } + } + if = { + limit = { + OR = { + gold >= 1000 + gold >= massive_gold_value + } + } + add = { + value = 5 + desc = "Massive gold +5" + } + } + if = { + limit = { + has_variable = conqueror + } + add = { + value = 10 + desc = "Conquerors" + } + } + if = { + limit = { + ai_should_focus_on_building_in_their_capital = yes + } + add = { + value = 10 + desc = "Needs gold for focused building" + } + } + } + + ai_will_select_province = { + value = scope:score + } + + province_score = { + value = 0 + # General reasons + if = { + limit = { + scope:host ?= { has_relation_friend = root.county.holder } + } + desc = "The host is my friend" + add = 20 + } + if = { + limit = { + scope:host ?= { has_relation_lover = root.county.holder } + } + desc = "The host is my lover" + add = 20 + } + if = { + limit = { + county.holder ?= { is_ai = no } + } + desc = "The host is a player" + add = 50 + } + # Tour grounds reasons + if = { + limit = { + county ?= { + county_control <= 100 + } + } + desc = "I do not completely control this province" + add = 20 + } + if = { + limit = { + county ?= { + county_control <= 75 + } + } + desc = "Control is below average" + add = 20 + } + if = { + limit = { + county ?= { + county_control <= 50 + } + } + desc = "Control is quite low" + add = 20 + } + if = { + limit = { + county ?= { + county_control <= 20 + } + } + desc = "Control is catastrophically low" + add = 20 + } + if = { + limit = { + county ?= { + county_control <= 5 + } + } + desc = "Control is nonexistent" + add = 20 + } + # Culture festival reasons + if = { + limit = { + culture != scope:host.culture + } + desc = "They're a different culture from me" + add = 20 + } + if = { + limit = { + culture = { + cultural_acceptance = { + target = scope:host.culture + value <= 25 + } + } + } + desc = "They're a different culture who actively dislike me" + add = 20 + } + if = { + limit = { + culture = { + cultural_acceptance = { + target = scope:host.culture + value <= 50 + } + } + } + desc = "They're a different culture who are lukewarm to me" + add = 10 + } + if = { + limit = { + county = { county_opinion < 0 } + } + desc = "They have low popular opinion" + add = 20 + } + if = { + limit = { + county = { county_opinion < -20 } + } + desc = "They have very low popular opinion" + add = 20 + } + # Hosted dinner reasons + if = { + limit = { + county.holder = { is_powerful_vassal = yes } + } + desc = "The host is a powerful vassal" + add = 50 + } + if = { + limit = { + county.holder = { + opinion = { + target = scope:host + value <= 10 + } + } + } + desc = "The host doesn't like me" + add = 20 + } + if = { + limit = { + county.holder = { + opinion = { + target = scope:host + value <= -15 + } + } + } + desc = "The host actively dislikes me" + add = 20 + } + if = { + limit = { + county.holder = { + opinion = { + target = scope:host + value <= -50 + } + } + } + desc = "The host hates me" + add = 20 + } + if = { + limit = { + county.holder = { + opinion = { + target = scope:host + value <= -75 + } + } + } + desc = "The host really hates me" + value = 50 + } + } + + ################### + # PARAMETERS + ################### + + activity_group_type = grand + + province_filter = realm + is_single_location = no + planner_type = holder + + is_location_valid = { + ep2_phase_general_location_checks = yes + } + + cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + } + add = { + add = { + value = 50 + desc = tour_base_cost + } + add = { + value = 50 + multiply = activity_cost_scale_by_era + subtract = 50 + desc = activity_cost_scale_by_era_desc + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + if = { + limit = { + confederation ?= { has_cohesion_level_parameter = any_member_activity_cost_reduced } + } + multiply = { + value = 0.9 + desc = CB_COHESION_PARAMETER_DISCOUNT + } + } + } + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = { + add = { + value = 50 + desc = tour_base_cost + } + add = { + value = 50 + multiply = activity_cost_scale_by_era + subtract = 50 + desc = activity_cost_scale_by_era_desc + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + if = { + limit = { + is_ai = yes + has_game_rule = hard_difficulty + } + multiply = 0.5 + } + else_if = { + limit = { + is_ai = yes + has_game_rule = very_hard_difficulty + } + multiply = 0.25 + } + } + } + } + + ui_predicted_cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + } + # Base Cost + add = { + value = 50 + # Scale by Era + multiply = activity_cost_scale_by_era + } + + # Options + # Entourage Option + add = { + value = { # Calculate the average of the 3 option costs + value = 0 + add = 20 # Small Cost + add = 60 # Modest Cost + add = 180 # Grand Cost + # Divide by total number of option level to get an average option cost + divide = 3 + # Scale Option costs by era + multiply = activity_cost_scale_by_era + } + } + # Luxuries Option + add = { + value = { # Calculate the average of the 5 option costs + value = 0 + add = 20 # No Luxuries Cost + add = 40 # Essential Luxuries Cost + add = 60 # Extravagant Luxuries Cost + add = 120 # Luxurious Furniture Cost + add = 180 # Extravagant Furniture Cost + # Divide by total number of option level to get an average option cost + divide = 5 + # Scale Option costs by era + multiply = activity_cost_scale_by_era + } + } + + # Tour Stops + if = { + limit = { primary_title.tier = tier_empire } + add = { + value = 114 # derived from testing + multiply = activity_cost_scale_by_era + multiply = 5 # median number of tour stops (min = 1, max = 10) + } + } + else_if = { + limit = { primary_title.tier = tier_kingdom } + add = { + value = 44 # derived from testing + multiply = activity_cost_scale_by_era + multiply = 5 # median number of tour stops (min = 1, max = 10) + } + } + else_if = { + limit = { primary_title.tier = tier_duchy } + add = { + value = 36 # derived from testing + multiply = activity_cost_scale_by_era + multiply = 5 # median number of tour stops (min = 1, max = 10) + } + } + if = { + limit = { + confederation ?= { has_cohesion_level_parameter = any_member_activity_cost_reduced } + } + multiply = { + value = 0.9 + desc = CB_COHESION_PARAMETER_DISCOUNT + } + } + + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + + # Make it a multiple of 5 (rounded up) + divide = 5 + ceiling = yes + multiply = 5 + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + } + # Base Cost + add = { + value = 50 + # Scale by Era + multiply = activity_cost_scale_by_era + } + + # Options + # Entourage Option + add = { + value = { # Calculate the average of the 3 option costs + value = 0 + add = 20 # Small Cost + add = 60 # Modest Cost + add = 180 # Grand Cost + # Divide by total number of option level to get an average option cost + divide = 3 + # Scale Option costs by era + multiply = activity_cost_scale_by_era + } + } + # Luxuries Option + add = { + value = { # Calculate the average of the 5 option costs + value = 0 + add = 20 # No Luxuries Cost + add = 40 # Essential Luxuries Cost + add = 60 # Extravagant Luxuries Cost + add = 120 # Luxurious Furniture Cost + add = 180 # Extravagant Furniture Cost + # Divide by total number of option level to get an average option cost + divide = 5 + # Scale Option costs by era + multiply = activity_cost_scale_by_era + } + } + + # Tour Stops + if = { + limit = { primary_title.tier = tier_empire } + add = { + value = 114 # derived from testing + multiply = activity_cost_scale_by_era + multiply = 5 # median number of tour stops (min = 1, max = 10) + } + } + else_if = { + limit = { primary_title.tier = tier_kingdom } + add = { + value = 44 # derived from testing + multiply = activity_cost_scale_by_era + multiply = 5 # median number of tour stops (min = 1, max = 10) + } + } + else_if = { + limit = { primary_title.tier = tier_duchy } + add = { + value = 36 # derived from testing + multiply = activity_cost_scale_by_era + multiply = 5 # median number of tour stops (min = 1, max = 10) + } + } + + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + + # Make it a multiple of 5 (rounded up) + divide = 5 + ceiling = yes + multiply = 5 + } + } + } + + cooldown = { years = 10 } + + ################### + # OPTIONS + ################### + + options = { + #Tour types + special_type = { + tour_type_majesty = { + default = yes + ai_will_do = { + value = 50 + if = { # Cautious AI's want stability + limit = { + OR = { + ai_has_cautious_personality = yes + ai_has_pious_builder_personality = yes #Legitimacy, ho! + } + war_chest_gold > cautious_ai_minimum_war_chest_gold + } + add = 50 + } + if = { + limit = { + OR = { + has_trait = gregarious + has_trait = arrogant + has_trait = arbitrary + has_trait = brave + has_trait = just + } + } + add = 50 + } + if = { + limit = { + OR = { + has_trait = shy + has_trait = humble + has_trait = callous + has_trait = sadistic + } + } + subtract = 50 + } + if = { + limit = { + has_variable = conqueror + prestige >= 500 + } + subtract = 500 + } + if = { + limit = { + ai_should_focus_on_building_in_their_capital = yes + } + subtract = 500 + } + } + } + tour_type_intimidation = { + ai_will_do = { + value = 0 + if = { # Cautious AI's want stability + limit = { + ai_has_cautious_personality = yes + war_chest_gold > cautious_ai_minimum_war_chest_gold + NOR = { + has_trait = compassionate + has_trait = generous + has_trait = forgiving + } + } + add = 50 + } + if = { + limit = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = arbitrary + has_trait = vengeful + has_trait = torturer + } + } + add = 50 + } + if = { + limit = { + OR = { + has_trait = just + has_trait = honest + has_trait = compassionate + has_trait = generous + has_trait = forgiving + } + } + subtract = 50 + } + if = { + limit = { + has_variable = conqueror + } + subtract = 500 + } + if = { + limit = { + ai_should_focus_on_building_in_their_capital = yes + } + subtract = 500 + } + } + } + tour_type_taxation = { + is_valid = { + custom_tooltip = { + text = CB_TRIBAL_COST + NOT = { + government_has_flag = government_is_tribal + } + } + } + ai_will_do = { + value = 50 + if = { # Warlike AI's want to fill their coffers + limit = { + ai_has_warlike_personality = yes + war_chest_gold < war_chest_gold_maximum + } + add = 50 + } + if = { # Very appropriate for Builders/Economical Boom personalities + limit = { + ai_has_economical_boom_personality = yes + } + add = 50 + } + if = { + limit = { + OR = { + has_trait = sadistic + has_trait = arbitrary + has_trait = greedy + ai_greed >= 75 + } + } + add = 50 + } + if = { + limit = { + gold < major_gold_value + } + add = 200 + } + if = { + limit = { + OR = { + has_trait = just + has_trait = honest + has_trait = compassionate + has_trait = generous + has_trait = forgiving + } + } + subtract = 50 + } + if = { + limit = { + OR = { + has_trait = generous + ai_greed <= -75 + } + } + subtract = 5000 + } + if = { + limit = { + has_variable = conqueror + } + add = 10000 + } + if = { + limit = { + ai_should_focus_on_building_in_their_capital = yes + } + add = 10000 + } + } + } + } + tour_entourage = { + tour_entourage_small = { + cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + } + add = { + desc = tour_entourage_small + add = { + value = 20 + desc = tour_entourage_small + } + add = { + value = 20 + multiply = activity_cost_scale_by_era + subtract = 20 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = { + desc = tour_entourage_small + add = { + value = 20 + desc = tour_entourage_small + } + add = { + value = 20 + multiply = activity_cost_scale_by_era + subtract = 20 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + if = { + limit = { + is_ai = yes + has_game_rule = hard_difficulty + } + multiply = 0.5 + } + else_if = { + limit = { + is_ai = yes + has_game_rule = very_hard_difficulty + } + multiply = 0.25 + } + } + } + } + + travel_entourage_selection = { + weight = tour_entourage_weight_value + max = 5 + invite_rule_order = 1 + } + + ai_will_do = { + value = 0 + add = { #Base amount + value = 30 + } + if = { + limit = { + has_trait = greedy + } + add = 30 + } + if = { + limit = { + OR = { + has_trait = lazy + has_trait = temperate + has_trait = content + } + } + add = 15 + } + if = { + limit = { + has_trait = humble + } + add = 10 + } + if = { + limit = { + gold <= major_gold_value + } + add = 100 + } + } + } + tour_entourage_normal = { + default = yes + travel_entourage_selection = { + weight = tour_entourage_weight_value + max = 10 + invite_rule_order = 1 + } + + on_start = { + scope:host = { + add_prestige = medium_prestige_gain + } + } + is_valid = { + custom_tooltip = { + text = more_than_5_courtiers + any_courtier_or_guest = { count > 5 } + } + } + + ai_will_do = { + value = 50 + } + + cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + } + add = { + desc = tour_entourage_normal + add = { + value = 60 + desc = tour_entourage_normal + } + add = { + value = 60 + multiply = activity_cost_scale_by_era + subtract = 60 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = { + desc = tour_entourage_normal + add = { + value = 60 + desc = tour_entourage_normal + } + add = { + value = 60 + multiply = activity_cost_scale_by_era + subtract = 60 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + if = { + limit = { + is_ai = yes + has_game_rule = hard_difficulty + } + multiply = 0.5 + } + else_if = { + limit = { + is_ai = yes + has_game_rule = very_hard_difficulty + } + multiply = 0.25 + } + } + } + } + } + tour_entourage_grand = { + is_valid = { + custom_tooltip = { + text = more_than_10_courtiers + any_courtier_or_guest = { count > 10 } + } + } + + travel_entourage_selection = { + weight = tour_entourage_weight_value + max = 40 + ai_max = 20 + invite_rule_order = 1 + } + + on_start = { + scope:host = { + add_prestige = major_prestige_gain + } + } + + ai_will_do = { + value = 0 + add = { #Base amount + value = 30 + } + if = { + limit = { + has_trait = generous + } + add = 30 + } + if = { + limit = { + OR = { + has_trait = diligent + has_trait = gluttonous + has_trait = ambitious + } + } + add = 15 + } + if = { + limit = { + has_trait = arrogant + } + add = 10 + } + } + + cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + } + add = { + desc = tour_entourage_grand + add = { + value = 180 + desc = tour_entourage_grand + } + add = { + value = 180 + multiply = activity_cost_scale_by_era + subtract = 180 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = { + desc = tour_entourage_grand + add = { + value = 180 + desc = tour_entourage_grand + } + add = { + value = 180 + multiply = activity_cost_scale_by_era + subtract = 180 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + if = { + limit = { + is_ai = yes + has_game_rule = hard_difficulty + } + multiply = 0.5 + } + else_if = { + limit = { + is_ai = yes + has_game_rule = very_hard_difficulty + } + multiply = 0.25 + } + } + } + } + } + } + tour_luxuries = { + tour_luxuries_bad = { + cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + } + add = { + desc = tour_luxuries_bad + add = { + value = 20 + desc = tour_luxuries_bad + } + add = { + value = 20 + multiply = activity_cost_scale_by_era + subtract = 20 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = { + desc = tour_luxuries_bad + add = { + value = 20 + desc = tour_luxuries_bad + } + add = { + value = 20 + multiply = activity_cost_scale_by_era + subtract = 20 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + if = { + limit = { + is_ai = yes + has_game_rule = hard_difficulty + } + multiply = 0.5 + } + else_if = { + limit = { + is_ai = yes + has_game_rule = very_hard_difficulty + } + multiply = 0.25 + } + } + } + } + + ai_will_do = { + value = 0 + add = { #Base amount + value = 30 + } + if = { + limit = { + has_trait = greedy + } + add = 30 + } + if = { + limit = { + OR = { + has_trait = lazy + has_trait = temperate + has_trait = content + } + } + add = 15 + } + if = { + limit = { + has_trait = humble + } + add = 10 + } + if = { + limit = { + gold <= major_gold_value + } + add = 100 + } + } + } + tour_luxuries_normal = { + default = yes + cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + } + add = { + desc = tour_luxuries_normal + add = { + value = 40 + desc = tour_luxuries_normal + } + add = { + value = 40 + multiply = activity_cost_scale_by_era + subtract = 40 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = { + desc = tour_luxuries_normal + add = { + value = 40 + desc = tour_luxuries_normal + } + add = { + value = 40 + multiply = activity_cost_scale_by_era + subtract = 40 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + if = { + limit = { + is_ai = yes + has_game_rule = hard_difficulty + } + multiply = 0.5 + } + else_if = { + limit = { + is_ai = yes + has_game_rule = very_hard_difficulty + } + multiply = 0.25 + } + } + } + } + + ai_will_do = { + value = 0 + add = { #Base amount + value = 50 + } + } + } + tour_luxuries_good = { + is_valid = { + custom_tooltip = { + text = government_is_tribal_tt + NOT = { government_has_flag = government_is_tribal } + } + } + + on_start = { + scope:host = { + add_prestige = 30 + } + } + + ai_will_do = { + value = 0 + add = { #Base amount + value = 30 + } + if = { + limit = { + has_trait = generous + } + add = 30 + } + if = { + limit = { + OR = { + has_trait = diligent + has_trait = gluttonous + has_trait = ambitious + } + } + add = 15 + } + if = { + limit = { + has_trait = arrogant + } + add = 10 + } + } + + cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + } + add = { + desc = tour_luxuries_good + add = { + value = 60 + desc = tour_luxuries_good + } + add = { + value = 60 + multiply = activity_cost_scale_by_era + subtract = 60 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = { + desc = tour_luxuries_good + add = { + value = 60 + desc = tour_luxuries_good + } + add = { + value = 60 + multiply = activity_cost_scale_by_era + subtract = 60 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + if = { + limit = { + is_ai = yes + has_game_rule = hard_difficulty + } + multiply = 0.5 + } + else_if = { + limit = { + is_ai = yes + has_game_rule = very_hard_difficulty + } + multiply = 0.25 + } + } + } + } + } + tour_furniture_normal = { + default = yes + is_valid = { + custom_tooltip = { + text = government_is_tribal_tt + NOT = { government_has_flag = government_is_tribal } + } + } + + on_start = { + scope:host = { + add_prestige = medium_prestige_gain + } + } + + ai_will_do = { + value = 0 + add = { #Base amount + value = 50 + } + } + cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + } + add = { + desc = tour_furniture_normal + add = { + value = 120 + desc = tour_furniture_normal + } + add = { + value = 120 + multiply = activity_cost_scale_by_era + subtract = 120 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = { + desc = tour_furniture_normal + add = { + value = 120 + desc = tour_furniture_normal + } + add = { + value = 120 + multiply = activity_cost_scale_by_era + subtract = 120 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + if = { + limit = { + is_ai = yes + has_game_rule = hard_difficulty + } + multiply = 0.5 + } + else_if = { + limit = { + is_ai = yes + has_game_rule = very_hard_difficulty + } + multiply = 0.25 + } + } + } + } + } + tour_furniture_good = { + is_valid = { + custom_tooltip = { + text = government_is_tribal_tt + NOT = { government_has_flag = government_is_tribal } + } + } + + on_start = { + scope:host = { + add_prestige = major_prestige_gain + } + } + + ai_will_do = { + value = 0 + add = { #Base amount + value = 30 + } + if = { + limit = { + has_trait = ambitious + } + add = 15 + } + if = { + limit = { + has_trait = arrogant + } + add = 10 + } + } + + cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + } + add = { + desc = tour_furniture_good + add = { + value = 180 + desc = tour_furniture_good + } + add = { + value = 180 + multiply = activity_cost_scale_by_era + subtract = 180 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = { + desc = tour_furniture_good + add = { + value = 180 + desc = tour_furniture_good + } + add = { + value = 180 + multiply = activity_cost_scale_by_era + subtract = 180 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + if = { + limit = { + is_ai = yes + has_game_rule = hard_difficulty + } + multiply = 0.5 + } + else_if = { + limit = { + is_ai = yes + has_game_rule = very_hard_difficulty + } + multiply = 0.25 + } + } + } + } + } + } + } + + special_option_category = special_type + + ################### + # PHASES + ################### + + phases = { + # tour the grounds + tour_phase_tour_grounds = { + order = 1 + + number_of_picks = 10 + + # desc is only shown in debug AI watch window + ai_will_do = { + value = 0 + add = scope:province.county.development_level + if = { + limit = { + scope:province.county = { county_control <= 100 } + } + desc = "I do not completely control this province" + add = 20 + } + if = { + limit = { + scope:province.county = { county_control <= 75 } + } + desc = "Control is below average" + add = 20 + } + if = { + limit = { + scope:province.county = { county_control <= 50 } + } + desc = "Control is quite low" + add = 20 + } + if = { + limit = { + scope:province.county = { county_control <= 20 } + } + desc = "Control is catastrophically low" + add = 20 + } + if = { + limit = { + scope:province.county = { county_control <= 5 } + } + desc = "Control is nonexistent" + add = 20 + } + } + + is_shown = { + + } + + # Is this phase valid to execute for this ongoing activity + # root = the activity + # scope:host = activity host + # scope:province = current phase location + is_valid = { + ep2_tour_phase_invalidation_check = yes + } + + # Run if this phase is invalidated by its is_valid trigger + # root = character in this phase + # scope:activity = the activity + # scope:host = host of the activity + # scope:province = current phase location + on_invalidated = { + scope:province.province_owner = { save_scope_as = stop_host_scope } + scope:province = { save_scope_as = tour_location } + if = { + limit = { + this = scope:host + } + trigger_event = { + id = tour_general.0500 + } + } + if = { + limit = { + # If I just inherited this title, don't send me two letter events + this != scope:host + # Send it to the province owner + this = scope:province.province_owner + } + if = { + limit = { has_character_flag = being_visited_on_tour } + remove_character_flag = being_visited_on_tour + } + trigger_event = { + id = tour_general.9998 + } + } + if = { + limit = { + scope:activity = { exists = var:months_of_stop } + } + remove_variable = months_of_stop + } + # Achievements. + process_tour_achievement_tallies_effect = yes + if = { + limit = { + this = scope:host + } + remove_variable = having_end_event + } + } + + cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + } + add = { + value = tour_stop_value + desc = tour_phase_tour_grounds_cost_desc + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = { + value = tour_stop_value + desc = tour_phase_tour_grounds_cost_desc + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + if = { + limit = { + is_ai = yes + has_game_rule = hard_difficulty + } + multiply = 0.5 + } + else_if = { + limit = { + is_ai = yes + has_game_rule = very_hard_difficulty + } + multiply = 0.25 + } + } + } + + on_phase_active = { + if = { + limit = { this = scope:host } + scope:activity = { + tour_stop_host_effect = yes + add_activity_log_entry = { + key = tour_stop_tour_grounds_log + character = scope:host + target = scope:stop_host_scope + score = 50 + show_in_conclusion = yes + } + } + scope:activity.var:stop_host = { + trigger_event = tour_general.0001 #event to see tell you that your liege is about to arrive, turn them away? - vassal + } + # Achievements. + process_tour_achievement_tallies_effect = yes + #fires hostage reunion event, if hostage giver is also present + scope:activity = { + every_attending_character = { + limit = { + is_hostage_warden = yes + has_bp2_dlc_trigger = yes + } + trigger_event = { + id = bp2_yearly.6120 + days = 2 + } + } + } + } + } + + on_monthly_pulse = { + if = { + limit = { + this = scope:host + } + scope:activity = { + if = { # Migrate the heir to the tour activity + limit = { + OR = { + NOT = { exists = var:stop_host } + var:stop_host = { is_alive = no } + NOT = { activity_location.county.holder = var:stop_host } + } + } + remove_variable = stop_host + tour_stop_host_effect = yes + add_to_variable_list = { + name = tour_vassals_to_visit + target = var:stop_host + } + } + } + tour_progress_effect = yes + } + scope:host.location.barony = { + save_scope_as = touring_grounds_scope + } + tour_monthly_pulse_effect = { + ON_ACTION_POOL = on_tour_grounds + } + } + + on_end = { + if = { + limit = { + this = scope:host + } + remove_variable = having_end_event + } + } + } + # Attend a Dinner + tour_phase_dinner = { + order = 1 + + number_of_picks = 10 + + # desc is only shown in debug AI watch window + ai_will_do = { + value = 0 + if = { + limit = { + scope:province.county.holder = { is_powerful_vassal = yes } + } + desc = "The host is a powerful vassal" + add = 50 + } + if = { + limit = { + scope:province.county.holder = { + opinion = { + target = scope:province.county.holder.liege + value <= 10 + } + } + } + desc = "The host doesn't like me" + add = 20 + } + if = { + limit = { + scope:province.county.holder = { + opinion = { + target = scope:province.county.holder.liege + value <= -15 + } + } + } + desc = "The host actively dislikes me" + add = 20 + } + if = { + limit = { + scope:province.county.holder = { + opinion = { + target = scope:province.county.holder.liege + value <= -50 + } + } + } + desc = "The host hates me" + add = 20 + } + if = { + limit = { + scope:province.county.holder = { + opinion = { + target = scope:province.county.holder.liege + value <= -75 + } + } + } + desc = "The host really hates me" + add = 50 + } + } + + is_shown = { + + } + + can_pick = { + #scope:province.province_owner = { is_adult = yes } Commenting out for now since there's been an event audit, we'll see if issues prop up + scope:province.province_owner = { age >= 12 } + } + + # Is this phase valid to execute for this ongoing activity + # root = the activity + # scope:host = activity host + # scope:province = current phase location + is_valid = { + ep2_tour_phase_invalidation_check = yes + #scope:province.province_owner = { is_adult = yes } + scope:province.province_owner = { age >= 12 } + } + + # Run if this phase is invalidated by its is_valid trigger + # root = character in this phase + # scope:activity = the activity + # scope:host = host of the activity + # scope:province = current phase location + on_invalidated = { + scope:province.province_owner = { save_scope_as = stop_host_scope } + scope:province = { save_scope_as = tour_location } + if = { + limit = { + this = scope:host + } + trigger_event = { + id = tour_general.0500 + } + } + if = { + limit = { + # If I just inherited this title, don't send me two letter events + this != scope:host + # Send it to the province owner + this = scope:province.province_owner + } + if = { + limit = { has_character_flag = being_visited_on_tour } + remove_character_flag = being_visited_on_tour + } + trigger_event = { + id = tour_general.9998 + } + } + if = { + limit = { + scope:activity = { exists = var:months_of_stop } + } + remove_variable = months_of_stop + } + # Achievements. + process_tour_achievement_tallies_effect = yes + if = { + limit = { + this = scope:host + } + remove_variable = having_end_event + } + } + + cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + } + add = { + value = tour_stop_value + desc = tour_phase_dinner_cost_desc + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = { + value = tour_stop_value + desc = tour_phase_dinner_cost_desc + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + if = { + limit = { + is_ai = yes + has_game_rule = hard_difficulty + } + multiply = 0.5 + } + else_if = { + limit = { + is_ai = yes + has_game_rule = very_hard_difficulty + } + multiply = 0.25 + } + } + } + + on_phase_active = { + if = { + limit = { this = scope:host } + scope:activity = { + tour_stop_host_effect = yes + add_activity_log_entry = { + key = tour_stop_dinner_log + character = scope:host + target = scope:stop_host_scope + score = 50 + show_in_conclusion = yes + } + } + scope:activity.var:stop_host = { + trigger_event = tour_general.0001 #event to see tell you that your liege is about to arrive, turn them away? - vassal + } + # Achievements. + process_tour_achievement_tallies_effect = yes + #fires hostage reunion event, if hostage giver is also present + scope:activity = { + every_attending_character = { + limit = { + is_hostage_warden = yes + has_bp2_dlc_trigger = yes + } + trigger_event = { + id = bp2_yearly.6120 + days = 2 + } + } + } + } + } + + on_monthly_pulse = { + if = { + limit = { + this = scope:host + } + scope:activity = { + if = { # Migrate the heir to the tour activity + limit = { + OR = { + NOT = { exists = var:stop_host } + var:stop_host = { is_alive = no } + NOT = { activity_location.county.holder = var:stop_host } + } + } + remove_variable = stop_host + tour_stop_host_effect = yes + add_to_variable_list = { + name = tour_vassals_to_visit + target = var:stop_host + } + } + } + tour_progress_effect = yes + } + tour_monthly_pulse_effect = { + ON_ACTION_POOL = on_tour_dinner + } + } + + on_end = { + if = { + limit = { + this = scope:host + } + remove_variable = having_end_event + } + } + } + # Observe a Cultural Festival + tour_phase_cultural_festival = { + order = 1 + + number_of_picks = 10 + + # desc is only shown in debug AI watch window + ai_will_do = { + value = 0 + if = { + limit = { + scope:province.culture != root.culture + } + desc = "They're a different culture from me" + add = 20 + } + if = { + limit = { + scope:province.culture = { + cultural_acceptance = { + target = root.culture + value <= 25 + } + } + } + desc = "They're a different culture who actively dislike me" + add = 20 + } + if = { + limit = { + scope:province.culture = { + cultural_acceptance = { + target = root.culture + value <= 50 + } + } + } + desc = "They're a different culture who are lukewarm to me" + add = 10 + } + if = { + limit = { + scope:province.county = { county_opinion < 0 } + } + desc = "They have low popular opinion" + add = 20 + } + if = { + limit = { + scope:province.county = { county_opinion < -20 } + } + desc = "They have very low popular opinion" + add = 20 + } + } + + is_shown = { + + } + + # Is this phase valid to execute for this ongoing activity + # root = the activity + # scope:host = activity host + # scope:province = current phase location + is_valid = { + ep2_tour_phase_invalidation_check = yes + } + + # Run if this phase is invalidated by its is_valid trigger + # root = character in this phase + # scope:activity = the activity + # scope:host = host of the activity + # scope:province = current phase location + on_invalidated = { + scope:province.province_owner = { save_scope_as = stop_host_scope } + scope:province = { save_scope_as = tour_location } + if = { + limit = { + this = scope:host + } + trigger_event = { + id = tour_general.0500 + } + } + if = { + limit = { + # If I just inherited this title, don't send me two letter events + this != scope:host + # Send it to the province owner + this = scope:province.province_owner + } + if = { + limit = { has_character_flag = being_visited_on_tour } + remove_character_flag = being_visited_on_tour + } + trigger_event = { + id = tour_general.9998 + } + } + if = { + limit = { + scope:activity = { exists = var:months_of_stop } + } + remove_variable = months_of_stop + } + # Achievements. + process_tour_achievement_tallies_effect = yes + if = { + limit = { + this = scope:host + } + remove_variable = having_end_event + } + } + + cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + } + add = { + value = tour_stop_value + desc = tour_phase_cultural_festival_cost_desc + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = { + value = tour_stop_value + desc = tour_phase_cultural_festival_cost_desc + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + if = { + limit = { + is_ai = yes + has_game_rule = hard_difficulty + } + multiply = 0.5 + } + else_if = { + limit = { + is_ai = yes + has_game_rule = very_hard_difficulty + } + multiply = 0.25 + } + } + } + + on_phase_active = { + if = { + limit = { this = scope:host } + scope:activity = { + tour_stop_host_effect = yes + add_activity_log_entry = { + key = tour_stop_cultural_festival_log + character = scope:host + target = scope:stop_host_scope + score = 50 + show_in_conclusion = yes + } + } + scope:activity.var:stop_host = { + trigger_event = tour_general.0001 #event to see tell you that your liege is about to arrive, turn them away? - vassal + } + # Achievements. + process_tour_achievement_tallies_effect = yes + #fires hostage reunion event, if hostage giver is also present + scope:activity = { + every_attending_character = { + limit = { + is_hostage_warden = yes + has_bp2_dlc_trigger = yes + } + trigger_event = { + id = bp2_yearly.6120 + days = 2 + } + } + } + } + } + + on_monthly_pulse = { + if = { + limit = { + this = scope:host + } + scope:activity = { + if = { # Migrate the heir to the tour activity + limit = { + OR = { + NOT = { exists = var:stop_host } + var:stop_host = { is_alive = no } + NOT = { activity_location.county.holder = var:stop_host } + } + } + remove_variable = stop_host + tour_stop_host_effect = yes + add_to_variable_list = { + name = tour_vassals_to_visit + target = var:stop_host + } + } + } + tour_progress_effect = yes + } + scope:host.location.county = { #remember in events that this is a county scope + save_scope_as = cultural_festival_scope + } + tour_monthly_pulse_effect = { + ON_ACTION_POOL = on_tour_festival + } + } + + on_end = { + if = { + limit = { + this = scope:host + } + remove_variable = having_end_event + } + } + } + # Go home + tour_phase_journey_home = { + # No effects, exists entirely as a buffer between the final parting demand and the tour conclusion event + is_predefined = yes + order = 2 + + select_scripted_location = { # Every tour should end where it began + root.capital_province = { save_scope_as = province } + } + + # Once you arrive we instantly end this phase since now you are home and happy + on_phase_active = { + if = { + limit = { this = scope:host } + # Run conclusion stuff here + set_variable = { + name = tour_success_var + value = scope:activity.var:tour_success_var + } + disburse_tour_activity_rewards = yes + scope:activity = { progress_activity_phase_after = { days = 1 } } + } + } + + location_source = scripted + } + } + + num_pickable_phases = 10 + + max_pickable_phases_per_province = 1 + + max_guest_arrival_delay_time = { months = 1 } # Note: The tour stops' rulers are not guests + + ################### + # GUEST HANDLING + ################### + + max_guests = 100 + + host_intents = { + intents = { + reduce_stress_intent + lechery_intent + altruism_intent + justice_intent + spread_legend_intent + legitimacy_intent + } + default = justice_intent + } + + guest_intents = { + intents = { reduce_stress_intent } + default = reduce_stress_intent + } + + guest_join_chance = { + base = 10 + base_activity_modifier = yes + + # Scripted Modifiers + activity_guest_shared_ai_accept_modifier = yes + } + + travel_entourage_selection = { + weight = standard_travel_entourage_additions + max = 10 + invite_rule_order = 1 + } + + ################### + # ACTIVITY-SPECIFIC PULSES + ################### + + pulse_actions = { + entries = { + courtiers_became_lovers courtier_friendship + courtier_improved_skill courtier_learned_language + courtiers_got_into_fight courtiers_became_rivals + + liege_intimidated_courtier + + liege_visited_benevolence liege_local_benevolence increased_control + + liege_local_tax levied_tax local_mayor_tax tax_rich_local church_tax local_baron_tax + } + chance_of_no_event = 5 + } + + # Need to fire an activity welcome event when the first active phase starts + on_start = { + # Activity count debugging + #if = { + # limit = { + # debug_only = yes + # } + # if = { + # limit = { + # NOT = { + # exists = global_var:tour_count + # } + # } + # set_global_variable = { + # name = tour_count + # value = 1 + # } + # } + # else = { + # change_global_variable = { + # name = tour_count + # add = 1 + # } + # } + # + # if = { + # limit = { + # scope:host = { highest_held_title_tier = tier_county } + # NOT = { + # exists = global_var:tour_c + # } + # } + # set_global_variable = { + # name = tour_c + # value = 1 + # } + # } + # else_if = { + # limit = { + # scope:host = { highest_held_title_tier = tier_county } + # } + # change_global_variable = { + # name = tour_c + # add = 1 + # } + # } + # + # if = { + # limit = { + # scope:host = { highest_held_title_tier = tier_duchy } + # NOT = { + # exists = global_var:tour_d + # } + # } + # set_global_variable = { + # name = tour_d + # value = 1 + # } + # } + # else_if = { + # limit = { + # scope:host = { highest_held_title_tier = tier_duchy } + # } + # change_global_variable = { + # name = tour_d + # add = 1 + # } + # } + # + # if = { + # limit = { + # scope:host = { highest_held_title_tier = tier_kingdom } + # NOT = { + # exists = global_var:tour_k + # } + # } + # set_global_variable = { + # name = tour_k + # value = 1 + # } + # } + # else_if = { + # limit = { + # scope:host = { highest_held_title_tier = tier_kingdom } + # } + # change_global_variable = { + # name = tour_k + # add = 1 + # } + # } + # + # if = { + # limit = { + # scope:host = { highest_held_title_tier = tier_empire } + # NOT = { + # exists = global_var:tour_e + # } + # } + # set_global_variable = { + # name = tour_e + # value = 1 + # } + # } + # else_if = { + # limit = { + # scope:host = { highest_held_title_tier = tier_empire } + # } + # change_global_variable = { + # name = tour_e + # add = 1 + # } + # } + # + # if = { + # limit = { + # scope:host.location = { geographical_region = world_middle_east } + # NOT = { + # exists = global_var:tour_world_middle_east + # } + # } + # set_global_variable = { + # name = tour_world_middle_east + # value = 1 + # } + # } + # else_if = { + # limit = { + # scope:host.location = { geographical_region = world_middle_east } + # } + # change_global_variable = { + # name = tour_world_middle_east + # add = 1 + # } + # } + # + # if = { + # limit = { + # scope:host.location = { geographical_region = world_europe } + # NOT = { + # exists = global_var:tour_world_europe + # } + # } + # set_global_variable = { + # name = tour_world_europe + # value = 1 + # } + # } + # else_if = { + # limit = { + # scope:host.location = { geographical_region = world_europe } + # } + # change_global_variable = { + # name = tour_world_europe + # add = 1 + # } + # } + # + # if = { + # limit = { + # scope:host.location = { geographical_region = world_steppe } + # NOT = { + # exists = global_var:tour_world_steppe + # } + # } + # set_global_variable = { + # name = tour_world_steppe + # value = 1 + # } + # } + # else_if = { + # limit = { + # scope:host.location = { geographical_region = world_steppe } + # } + # change_global_variable = { + # name = tour_world_steppe + # add = 1 + # } + # } + # + # if = { + # limit = { + # scope:host.location = { geographical_region = world_africa } + # NOT = { + # exists = global_var:tour_world_africa + # } + # } + # set_global_variable = { + # name = tour_world_africa + # value = 1 + # } + # } + # else_if = { + # limit = { + # scope:host.location = { geographical_region = world_africa } + # } + # change_global_variable = { + # name = tour_world_africa + # add = 1 + # } + # } + # + # if = { + # limit = { + # scope:host.location = { geographical_region = world_india } + # NOT = { + # exists = global_var:tour_world_india + # } + # } + # set_global_variable = { + # name = tour_world_india + # value = 1 + # } + # } + # else_if = { + # limit = { + # scope:host.location = { geographical_region = world_india } + # } + # change_global_variable = { + # name = tour_world_india + # add = 1 + # } + # } + #} + set_variable = { + name = tour_success_var + value = 0 + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = tour_luxuries + option = tour_luxuries_bad + } + } + } + change_variable = { + name = tour_success_var + add = 5 + } + } + else_if = { + limit = { + scope:activity = { + has_activity_option = { + category = tour_luxuries + option = tour_luxuries_normal + } + } + } + change_variable = { + name = tour_success_var + add = 10 + } + } + else_if = { + limit = { + scope:activity = { + has_activity_option = { + category = tour_luxuries + option = tour_luxuries_good + } + } + } + change_variable = { + name = tour_success_var + add = 15 + } + } + else_if = { + limit = { + scope:activity = { + has_activity_option = { + category = tour_luxuries + option = tour_furniture_normal + } + } + } + change_variable = { + name = tour_success_var + add = 20 + } + } + else_if = { + limit = { + scope:activity = { + has_activity_option = { + category = tour_luxuries + option = tour_furniture_good + } + } + } + change_variable = { + name = tour_success_var + add = 25 + } + } + + # Creates a list of every vassal you plan to visit and sets a character flag on them so they are unavailable and cannot plan activities/travel + every_activity_phase_location = { + limit = { + NOT = { # Don't tell yourself that you're coming to visit + county.holder = scope:host + } + } + scope:activity = { + # Using a variable list saved on the activity so we can reference it elsewhere, like for removing the character flag upon invalidation or completion + add_to_variable_list = { + name = tour_vassals_to_visit + target = prev.county.holder + } + } + } + every_in_list = { + variable = tour_vassals_to_visit + add_character_flag = being_visited_on_tour + # Send them an event to let them know they will be visited by their liege on tour + trigger_event = { + id = tour_general.9999 + days = 1 # delay so we can test that the event is firing correctly + } + } + # Add activity logs / Type is secret to the guests + scope:host = { + add_character_flag = had_tour + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + scope:activity = { + add_activity_log_entry = { + key = tour_start_majesty_log + character = scope:host + score = 10 + } + } + } + else_if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + scope:activity = { + add_activity_log_entry = { + key = tour_start_intimidation_log + character = scope:host + score = 10 + } + } + } + else = { #Taxation + scope:activity = { + add_activity_log_entry = { + key = tour_start_taxation_log + character = scope:host + score = 10 + } + } + } + } + } + + # Effects run when a character enters a passive state after travel + # root = character in this phase + # scope:activity = the activity + # scope:host = host of the activity + on_enter_passive_state = { + #If you arrive early we just start early + if = { + limit = { + root = scope:host + } + scope:activity = { progress_activity_phase_after = { days = 1 } } + } + } + + on_enter_active_state = { + surveyor_no_stone_unturned_perk_effect = yes + } + + # Effects run when the activity completes after its last phase + # root = character in this phase + # scope:activity = the activity + # scope:host = host of the activity + on_complete = { + # Clean up character flag preventing visited vassals from starting other activities + if = { + limit = { + scope:host = this + } + scope:activity = { + every_in_list = { + variable = tour_vassals_to_visit + if = { + limit = { + has_character_flag = being_visited_on_tour + } + remove_character_flag = being_visited_on_tour + } + } + } + } + # Dynasty Legacy + if = { + limit = { + this = scope:host + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_3 } + } + # Apply our new modifiers. + ## Majesty. + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + add_character_modifier = { + modifier = ep2_activities_legacy_3_tours_majesty_modifier + years = ep2_activities_legacy_3_tours_modifier_duration_value + } + # Do we need to refresh the other modifiers? + hidden_effect = { + # Intimidation. + if = { + limit = { has_character_modifier = ep2_activities_legacy_3_tours_intimidation_modifier } + add_character_modifier = { + modifier = ep2_activities_legacy_3_tours_intimidation_modifier + years = ep2_activities_legacy_3_tours_modifier_duration_value + } + } + # Taxation. + if = { + limit = { has_character_modifier = ep2_activities_legacy_3_tours_taxation_modifier } + add_character_modifier = { + modifier = ep2_activities_legacy_3_tours_taxation_modifier + years = ep2_activities_legacy_3_tours_modifier_duration_value + } + } + } + } + ## Intimidation. + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + add_character_modifier = { + modifier = ep2_activities_legacy_3_tours_intimidation_modifier + years = ep2_activities_legacy_3_tours_modifier_duration_value + } + # Do we need to refresh the other modifiers? + hidden_effect = { + # Majesty. + if = { + limit = { has_character_modifier = ep2_activities_legacy_3_tours_majesty_modifier } + add_character_modifier = { + modifier = ep2_activities_legacy_3_tours_majesty_modifier + years = ep2_activities_legacy_3_tours_modifier_duration_value + } + } + # Taxation. + if = { + limit = { has_character_modifier = ep2_activities_legacy_3_tours_taxation_modifier } + add_character_modifier = { + modifier = ep2_activities_legacy_3_tours_taxation_modifier + years = ep2_activities_legacy_3_tours_modifier_duration_value + } + } + } + } + ## Taxation. + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + add_character_modifier = { + modifier = ep2_activities_legacy_3_tours_taxation_modifier + years = ep2_activities_legacy_3_tours_modifier_duration_value + } + # Do we need to refresh the other modifiers? + hidden_effect = { + # Majesty. + if = { + limit = { has_character_modifier = ep2_activities_legacy_3_tours_majesty_modifier } + add_character_modifier = { + modifier = ep2_activities_legacy_3_tours_majesty_modifier + years = ep2_activities_legacy_3_tours_modifier_duration_value + } + } + # Intimidation. + if = { + limit = { has_character_modifier = ep2_activities_legacy_3_tours_intimidation_modifier } + add_character_modifier = { + modifier = ep2_activities_legacy_3_tours_intimidation_modifier + years = ep2_activities_legacy_3_tours_modifier_duration_value + } + } + } + } + } + host_has_taken_freebie_activity_effect = yes + + # Achievements. + if = { + limit = { + scope:host = this + } + scope:host = { + if = { + limit = { + highest_held_title_tier >= tier_empire + scope:activity = { + has_variable_list = imperial_march_achievement_list + variable_list_size = { + name = imperial_march_achievement_list + value >= achievement_imperial_march_achievement_powerful_vassal_tally_value + } + } + } + set_global_variable = { + name = finished_imperial_march_achievement + value = yes + } + } + if = { + limit = { + scope:activity = { + has_variable_list = the_grandest_tour_achievement_tally_list + variable_list_size = { + name = the_grandest_tour_achievement_tally_list + value >= 10 + } + } + } + set_global_variable = { + name = finished_the_grandest_tour_achievement + value = yes + } + } + } + } + } + + ### Graphics + map_entity = { + trigger = { + activity_location.culture = { + OR = { + has_graphical_iranian_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_steppe_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + } + } + } + reference = "building_mena_feast_01_entity" + } + + map_entity = { + trigger = { + activity_location.culture = { + has_graphical_india_culture_group_trigger = yes + } + } + reference = "building_indian_feast_01_entity" + } + + map_entity = "building_western_feast_01_entity" + + # Travel + background = { # Bridge + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + is_riverside_province = yes + geographical_region = world_europe + OR = { + terrain = farmlands + terrain = plains + terrain = mountains + terrain = hills + } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_bridge.dds" + environment = "environment_travel_bridge" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { # Farmland, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_farm.dds" + environment = "environment_travel_farmlands" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { # Farmland, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + terrain = farmlands + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/farms.dds" + environment = "environment_event_farms" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #Desert, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_desert_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_desert.dds" + environment = "environment_travel_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + background = { #Desert, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_desert_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/desert.dds" + environment = "environment_event_bp1_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { #forest snowy + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location ?= { hunt_snowy_forest_trigger = yes } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_hunt_snowy_forest.dds" + environment = "environment_hunt_snowy_forest" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #forest_pine + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_forest_pine_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/forest_pine.dds" + environment = "environment_event_forest_pine" + ambience = "event:/SFX/Events/Backgrounds/coniferous_forest_day" + } + + background = { #forest + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_forest_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/forest.dds" + environment = "environment_event_forest" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #mountains, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_mountains_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_mountains.dds" + environment = "environment_travel_mountain_settlement" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + background = { #mountains, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_mountains_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/mountains.dds" + environment = "environment_event_mountains" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #steppe, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_steppe_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_steppe.dds" + environment = "environment_travel_steppe_settlement" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + background = { #steppe, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_steppe_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/steppe.dds" + environment = "environment_event_steppe" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + + background = { #drylands (formerly desert) + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_drylands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/drylands.dds" + environment = "environment_event_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { #wetlands + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_wetlands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_wetlands.dds" + environment = "environment_event_bp1_wetlands" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #jungle + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_wilderness_jungle_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_jungle.dds" + environment = "environment_event_bp1_jungle" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #plains, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_plains_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + environment = "environment_travel_hills_settlement" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { #plains, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_plains_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_plains.dds" + environment = "environment_event_bp1_plains" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #hills, settled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_hills_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + environment = "environment_travel_hills_settlement" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { #hills, unsettled + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + graphical_hills_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_hills.dds" + environment = "environment_event_bp1_hills" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #sea + trigger = { + scope:host.location != scope:activity.activity_location + scope:host.location = { + is_sea_province = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/fp1_ocean.dds" + environment = "environment_event_fp1_ocean" + ambience = "event:/DLC/FP1/SFX/Events/event_ocean_longship" + } + # End Travel + + # Tour the Grounds + background = { #FP2 + trigger = { + has_current_phase = tour_phase_tour_grounds + OR = { + activity_location.culture ?= { has_building_gfx = iberian_building_gfx } + activity_location = { geographical_region = world_europe_west_iberia } + } + } + texture = "gfx/interface/illustrations/event_scenes/fp2_courtyard.dds" + environment = "environment_event_fp2_courtyard" + ambience = "event:/DLC/FP2/SFX/Events/courtyard" + } + + background = { #Indian Courtyard + trigger = { + has_current_phase = tour_phase_tour_grounds + activity_location ?= { + OR = { + culture = { has_graphical_india_culture_group_trigger = yes } + steppe_building_gfx_use_indian_trigger = yes + } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_courtyard_indian.dds" + environment = "environment_event_bp1_courtyard_indian" + ambience = "event:/SFX/Events/Backgrounds/castle_courtyard_western" + } + background = { #MENA Courtyard + trigger = { + has_current_phase = tour_phase_tour_grounds + activity_location ?= { + OR = { + culture = { has_graphical_iranian_culture_group_trigger = yes } + culture = { has_graphical_mena_culture_group_trigger = yes } + steppe_building_gfx_use_mena_trigger = yes + } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_courtyard_mena.dds" + environment = "environment_event_bp1_courtyard_mena" + ambience = "event:/SFX/Events/Backgrounds/castle_courtyard_western" + } + background = { #East Asian Courtyard + trigger = { + has_current_phase = tour_phase_tour_grounds + activity_location ?= { + OR = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } + steppe_building_gfx_use_east_asian_trigger = yes + } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_courtyard_asia.dds" + environment = "environment_tgp_courtyard_asia" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_courtyard_asia" + } + + background = { #Fallback + trigger = { + has_current_phase = tour_phase_tour_grounds + } + texture = "gfx/interface/illustrations/event_scenes/courtyard.dds" + environment = "environment_event_courtyard" + ambience = "event:/SFX/Events/Backgrounds/castle_courtyard_western" + } + + # Hosted Dinner + background = { + trigger = { + has_current_phase = tour_phase_dinner + activity_location.county.holder = { + OR = { + government_has_flag = government_is_nomadic + AND = { + government_has_flag = government_is_tribal + culture ?= { has_building_gfx = steppe_building_gfx } + } + } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_feast_steppe.dds" + environment = "environment_steppe_feast" + ambience = "event:/SFX/Events/Backgrounds/feasthall" + } + background = { # FP1 + trigger = { + has_current_phase = tour_phase_dinner + activity_location.culture = { has_building_gfx = norse_building_gfx } + } + texture = "gfx/interface/illustrations/event_scenes/fp1_viking_feast.dds" + environment = "environment_event_fp1_viking_feast" + ambience = "event:/DLC/FP1/SFX/Events/event_viking_feast" + } + background = { #East Asia + trigger = { + has_current_phase = tour_phase_dinner + activity_location ?= { + OR = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } + steppe_building_gfx_use_east_asian_trigger = yes + } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_feast_asia.dds" + environment = "environment_tgp_feast_asia" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_feast_asia" + } + background = { + trigger = { + has_current_phase = tour_phase_dinner + activity_location ?= { + OR = { + culture = { has_graphical_india_culture_group_trigger = yes } + steppe_building_gfx_use_indian_trigger = yes + } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_feast_indian.dds" + environment = "environment_indian_feast" + ambience = "event:/SFX/Events/Backgrounds/feasthall" + } + background = { + trigger = { + has_current_phase = tour_phase_dinner + OR = { + activity_location.culture = { has_building_gfx = arabic_group_building_gfx } + activity_location.culture = { has_building_gfx = berber_group_building_gfx } + activity_location.culture = { has_building_gfx = iberian_building_gfx } + activity_location = { steppe_building_gfx_use_mena_trigger = yes } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_feast_mena.dds" + environment = "environment_mena_feast" + ambience = "event:/SFX/Events/Backgrounds/feasthall" + } + background = { + trigger = { + has_current_phase = tour_phase_dinner + activity_location.culture = { has_building_gfx = african_building_gfx } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_feast_sub_saharan.dds" + environment = "environment_sub-saharan_feast" + ambience = "event:/SFX/Events/Backgrounds/feasthall" + } + background = { + trigger = { + has_current_phase = tour_phase_dinner + } + texture = "gfx/interface/illustrations/event_scenes/feast.dds" + environment = "environment_event_feast" + ambience = "event:/SFX/Events/Backgrounds/feasthall" + } + + # Cultural Festival + background = { + trigger = { + has_current_phase = tour_phase_cultural_festival + activity_location = { + is_coastal = yes + province_owner ?= { + government_has_flag = government_is_tribal + } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_docks_tribal.dds" + environment = "environment_event_bp1_docks_tribal" + ambience = "event:/SFX/Events/Backgrounds/docks_day" + } + background = { + trigger = { + has_current_phase = tour_phase_cultural_festival + activity_location = { + is_coastal = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/docks.dds" + environment = "environment_event_docks" + ambience = "event:/SFX/Events/Backgrounds/docks_day" + } + background = { #Eastern + trigger = { + has_current_phase = tour_phase_cultural_festival + activity_location = { + OR = { + geographical_region = graphical_mena + geographical_region = graphical_india + AND = { + geographical_region = world_europe_west_iberia + faith ?= { religion = religion:islam_religion } + } + } + } + } + texture = "gfx/interface/illustrations/event_scenes/market_east.dds" + environment = "environment_event_market_east" + ambience = "event:/SFX/Events/Backgrounds/town_market_middleeastern_day" + } + background = { #East Asia + trigger = { + has_current_phase = tour_phase_cultural_festival + activity_location.culture = {has_graphical_east_asia_culture_group_trigger = yes } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_market_asia.dds" + environment = "environment_tgp_market_asia" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_market_asia" + } + background = { #Steppe + trigger = { + has_current_phase = tour_phase_cultural_festival + activity_location.culture = { has_building_gfx = steppe_building_gfx } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_feast_steppe.dds" + environment = "environment_steppe_feast" + ambience = "event:/DLC/EP2/SFX/Events/Backgrounds/evn_background_steppe" + } + background = { #Western (standard/fallback) + trigger = { + has_current_phase = tour_phase_cultural_festival + } + texture = "gfx/interface/illustrations/event_scenes/ep2_village_festival_western.dds" + environment = "environment_village_festival" + ambience = "event:/SFX/Events/Backgrounds/corner_of_tavern" + } + + # Tour end/conclusion + background = { # MPO - Nomads + trigger = { + activity_host = { + OR = { + government_has_flag = government_is_nomadic + AND = { + government_has_flag = government_is_tribal + culture ?= { has_graphical_steppe_culture_group_trigger = yes } + } + AND = { + is_landless_adventurer = yes + culture ?= { has_graphical_steppe_culture_group_trigger = yes } + } + } + } + } + texture = "gfx/interface/illustrations/event_scenes/mpo_tent_interior_mongol.dds" + environment = "environment_mpo_tent_interior_mongol" + ambience = "event:/DLC/CE2/Events/Event_Images/mpo_tent_interior_mongol" + } + background = { #FP2 + trigger = { + OR = { + activity_location.culture ?= { has_building_gfx = iberian_building_gfx } + activity_location = { geographical_region = world_europe_west_iberia } + } + } + texture = "gfx/interface/illustrations/event_scenes/fp2_throneroom.dds" + environment = "environment_event_fp2_throneroom" + ambience = "event:/DLC/FP2/SFX/Events/throneroom" + } + + background = { #FP1 Tribal + trigger = { + activity_location.culture ?= { has_building_gfx = norse_building_gfx } + activity_location.barony.holder = { government_has_flag = government_is_tribal } + } + texture = "gfx/interface/illustrations/event_scenes/fp1_throneroom_tribal.dds" + environment = "environment_event_fp1_throneroom_tribal" + ambience = "event:/DLC/FP1/SFX/Events/event_throneroom" + } + + background = { #Tribal + trigger = { activity_location.barony.holder = { should_use_tribal_realm_palace_graphics_trigger = yes } } + texture = "gfx/interface/illustrations/event_scenes/throneroom_tribal.dds" + environment = "environment_frontend_tribal_main" + ambience = "event:/SFX/Events/Backgrounds/throneroom_tribal_pagan" + } + + background = { #FP1 Non-Tribal + trigger = { + activity_location.culture ?= { has_building_gfx = norse_building_gfx } + activity_location.barony.holder = { NOT = { government_has_flag = government_is_tribal } } + } + texture = "gfx/interface/illustrations/event_scenes/fp1_throneroom_nontribal.dds" + environment = "environment_event_fp1_throneroom_nontribal" + ambience = "event:/DLC/FP1/SFX/Events/event_throneroom_nontribal" + } + + background = { #iranian + trigger = { + activity_location.culture ?= { has_graphical_iranian_culture_group_trigger = yes } + } + texture = "gfx/interface/illustrations/event_scenes/fp3_throneroom.dds" + environment = "environment_event_temple" + ambience = "event:/SFX/Events/Backgrounds/throneroom_middleeastern_african" + } + + background = { #MENA + trigger = { + activity_location ?= { + OR = { + culture ?= { has_graphical_mena_culture_group_trigger = yes } + steppe_building_gfx_use_mena_trigger = yes + } + } + } + texture = "gfx/interface/illustrations/event_scenes/throneroom_east.dds" + environment = "environment_frontend_east_main" + ambience = "event:/SFX/Events/Backgrounds/throneroom_middleeastern_african" + } + + background = { #India + trigger = { + activity_location ?= { + OR = { + culture ?= { has_graphical_india_culture_group_trigger = yes } + steppe_building_gfx_use_indian_trigger = yes + } + } + } + texture = "gfx/interface/illustrations/event_scenes/throneroom_india.dds" + environment = "environment_frontend_india_main" + ambience = "event:/SFX/Events/Backgrounds/throneroom_middleeastern_african" + } + + background = { #Mediterranean + trigger = { + activity_location ?= { + OR = { + culture ?= { has_graphical_mediterranean_culture_group_trigger = yes } + steppe_building_gfx_use_mediterranean_trigger = yes + } + } + } + texture = "gfx/interface/illustrations/event_scenes/throneroom_mediterranean.dds" + environment = "environment_frontend_mediterranean_main" + ambience = "event:/SFX/Events/Backgrounds/throneroom_mediterranean" + } + background = { #Eas Asia + trigger = { + activity_location ?= { + OR = { + culture ?= { has_graphical_east_asia_culture_group_trigger = yes } + steppe_building_gfx_use_east_asian_trigger = yes + } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_asia_throne_room.dds" + environment = "environment_tgp_frontend_celestial_main" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_study_asia" + } + + background = { + texture = "gfx/interface/illustrations/event_scenes/throneroom_west.dds" + environment = "environment_frontend_west_main" + ambience = "event:/SFX/Events/Backgrounds/throneroom_western" + } + + activity_window_widgets = { + tour_conclusion_stops = "activity_plugin_widgets_conclusion" + tour_success_bar = "activity_plugin_widgets_summary" + } + + window_characters = { + tour_host = { + camera = camera_body_right + + effect = { + if = { + limit = { + OR = { + scope:host.location = scope:activity.activity_location + scope:host.location = { is_sea_province = yes } + } + } + scope:host = { + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + scope:character.location = { is_sea_province = yes } + } + animation = { survey } + } + triggered_animation = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + animation = { toast_goblet war_over_win personality_honorable thinking } + } + triggered_animation = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + animation = { celebrate_dagger personality_cynical personality_vengeful scheme personality_callous } + } + triggered_animation = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + animation = { steward drink_goblet toast personality_greedy } + } + } + } + + travel_tour_host = { + camera = camera_event_horse_left + + effect = { + if = { + limit = { + NOR = { + scope:host.location = scope:activity.activity_location + scope:host.location = { is_sea_province = yes } + } + } + scope:host = { + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { scope:character = { has_trait = impatient } } + animation = { jockey_gallop } + } + animation = jockey_walk + } + } + + visited_vassal = { + camera = camera_body_left_slight + + effect = { + every_in_list = { + variable = tour_vassals_to_visit + limit = { + is_alive = yes + location = scope:host.location + } + this ?= { + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + always = yes + } + animation = { idle drink_goblet toast personality_greedy happiness admiration personality_honorable personality_cynical personality_vengeful personality_callous + } + } + } + } + } +} diff --git a/common/activities/activity_types/wedding.txt b/common/activities/activity_types/wedding.txt new file mode 100644 index 00000000..2cc99422 --- /dev/null +++ b/common/activities/activity_types/wedding.txt @@ -0,0 +1,4166 @@ +activity_wedding = { + is_shown = { + highest_held_title_tier > tier_barony + is_landed_or_landless_administrative = yes + trigger_if = { + limit = { + is_ai = yes + } + is_at_war = no + NOT = { has_variable = conqueror } + } + # DLC locked + has_dlc_feature = tours_and_tournaments + has_dlc_feature = advanced_activities + #Every other activity must be blocked until an uncrowned AI crowns themselves + trigger_if = { + limit = { + is_ai = yes + } + NOT = { + has_realm_law = uncrowned + } + } + } + + can_start_showing_failures_only = { + NOT = { is_activity_type_on_cooldown = activity_wedding } + is_available = yes + #You have promised a grand wedding to someone + custom_tooltip = { + text = wedding_need_to_promise + has_variable = promised_grand_wedding_marriage_countdown + exists = var:promised_grand_wedding_marriage_countdown.betrothed + } + trigger_if = { + limit = { + has_variable = promised_grand_wedding_marriage_countdown + exists = var:promised_grand_wedding_marriage_countdown.betrothed + } + custom_tooltip = { + text = wedding_need_to_be_valid + #That someone and their betrothed are alive and adults and can marry + var:promised_grand_wedding_marriage_countdown = { + is_valid_grand_wedding_special_guest_trigger = { OTHER_SPOUSE = root.var:promised_grand_wedding_marriage_countdown.betrothed } + } + var:promised_grand_wedding_marriage_countdown.betrothed = { + is_valid_grand_wedding_special_guest_trigger = { OTHER_SPOUSE = root.var:promised_grand_wedding_marriage_countdown } + } + } + } + } + + # Require a betrothal for player to start planning a wedding + can_always_plan = no + + is_valid = { + # A spouse dying will invalidate + scope:activity.special_guest:spouse_1 = { + is_alive = yes + } + trigger_if = { # weird workaround because the on_start is parsed after the is_valid the first time + limit = { exists = scope:activity.var:spouse_2_var } + OR = { + scope:activity.var:spouse_2_var = { + is_alive = yes + } + AND = { + scope:activity.var:spouse_2_var = { + is_alive = no + } + scope:activity = { #you're in a murder wedding + has_activity_option = { + category = special_type + option = wedding_type_bloody + } + } + } + } + } + # Being imprisoned will invalidate + scope:activity.special_guest:spouse_1 = { + is_imprisoned = no + } + trigger_if = { # weird workaround because the on_start is parsed after the is_valid the first time + limit = { exists = scope:activity.var:spouse_2_var } + scope:activity.var:spouse_2_var = { + is_imprisoned = no + } + } + scope:host = { + # The host becoming unlanded will invalidate + is_landed_or_landless_administrative = yes + # The new host being only a baron will invalidate + highest_held_title_tier >= tier_county + # Incapable host will invalidate + NOT = { is_incapable = yes } + } + # Saying no at the altar will invalidate + scope:activity = { + NOT = { has_variable = wedding_invalidated_said_no } + } + # If no one shows up + trigger_if = { + limit = { + scope:activity = { is_current_phase_active = yes } + } + has_attending_activity_guests = yes + } + # Emergency Invalidation: one of the spouses is not coming for some reason + trigger_if = { + limit = { + scope:activity = { + NOT = { has_variable = activity_travel_countdown } + } + exists = scope:activity.var:spouse_2_var + } + scope:activity.var:spouse_2_var = { + OR = { + AND = { + is_ai = yes + involved_activity ?= scope:activity + OR = { + location = scope:activity.activity_location + current_travel_plan ?= { + travel_plan_activity = scope:activity + } + } + } + is_ai = no + AND = { + is_alive = no + scope:activity = { #you're in a murder wedding + has_activity_option = { + category = special_type + option = wedding_type_bloody + } + } + } + } + } + } + } + + on_invalidated = { + scope:host ?= { save_scope_as = previous_host } + scope:activity.special_guest:spouse_1 ?= { save_scope_as = spouse_1 } + scope:activity.special_guest:spouse_2 ?= { save_scope_as = spouse_2 } + # Set up the refund + scope:previous_host = { + set_variable = { + name = gwedding_gold_recoup_value + value = { + value = 0 + # For a base, add the total pot spent. + add = scope:activity.var:gwedding_refund_pot + # Then revise it down a little to account for some costs being irredeemable. + multiply = 0.75 + } + } + } + + if = { + limit = { + scope:host = { has_trait = incapable } + } + scope:activity = { + activity_type = { save_scope_as = activity_type } + } + scope:host = { + trigger_event = activity_system.0330 + } + every_attending_character = { + limit = { this != scope:host } + trigger_event = activity_system.0331 + } + } + + # Only the player as spouse_1 can say no at the altar, no reason to have events to notify the AI + else_if = { + limit = { + scope:activity = { + has_variable = wedding_invalidated_said_no + } + exists = scope:spouse_1 + scope:spouse_1 = { is_alive = yes } + } + scope:spouse_1 = { trigger_event = ep2_wedding.0152 } + } + + # One of the spouses was taken prisoner along the way + else_if = { + limit = { + OR = { + scope:spouse_1 ?= { is_imprisoned = yes } + scope:spouse_2 ?= { is_imprisoned = yes } + } + } + if = { + limit = { + scope:spouse_1 = { is_imprisoned = yes } + } + scope:spouse_1 = { save_scope_as = prisoner_spouse } + scope:spouse_2 = { save_scope_as = free_spouse } + } + else = { + scope:spouse_2 = { save_scope_as = prisoner_spouse } + scope:spouse_1 = { save_scope_as = free_spouse } + } + scope:prisoner_spouse = { trigger_event = ep2_wedding.0920 } + every_attending_character = { + limit = { + this != scope:prisoner_spouse + } + trigger_event = ep2_wedding.0921 + } + } + + # Host becomes unlanded + else_if = { + limit = { + scope:host = { + is_landed_or_landless_administrative = no + } + } + scope:activity = { + activity_type = { save_scope_as = activity_type } + } + every_attending_character = { + trigger_event = activity_system.0320 + } + } + + # The new host doesn't meet the tier requirements + else_if = { + limit = { + scope:host = { highest_held_title_tier < tier_county } + } + every_attending_character = { + trigger_event = ep2_wedding.0999 + } + } + + # The activity failed because one of the spouses died + else_if = { + limit = { + OR = { + scope:activity.special_guest:spouse_1 = { + is_alive = no + } + AND = { + scope:activity.var:spouse_2_var ?= { + is_alive = no + } + scope:activity = { #you're not in a murder wedding + has_activity_option = { + category = special_type + option = wedding_type_normal + } + } + } + } + } + if = { + limit = { + scope:previous_host = { + is_alive = yes + } + } + scope:previous_host = { + # Set up the refund + set_variable = { + name = gwedding_gold_recoup_value + value = { + value = 0 + # For a base, add the total pot spent. + add = scope:activity.var:gwedding_refund_pot + # Then revise it down a little to account for some costs being irredeemable. + multiply = 0.75 + } + } + } + } + # The host was one of the spouses and died + else = { + scope:previous_host.player_heir = { + # Set up the refund + set_variable = { + name = gwedding_gold_recoup_value + value = { + value = 0 + # For a base, add the total pot spent. + add = scope:activity.var:gwedding_refund_pot + # Then revise it down a little to account for some costs being irredeemable. + multiply = 0.75 + } + } + } + } + # Special event for the surviving spouse + if = { + limit = { + scope:spouse_1 = { + is_alive = yes + } + } + scope:spouse_2 = { save_scope_as = dead_spouse } + scope:spouse_1 = { + trigger_event = ep2_wedding.0910 + } + } + else_if = { + limit = { + scope:spouse_1 = { + is_alive = no + } + } + scope:spouse_1 = { save_scope_as = dead_spouse } + scope:spouse_2 = { + trigger_event = ep2_wedding.0910 + } + } + # Event for all other attending characters, including the host + scope:activity = { + every_attending_character = { + limit = { + NOR = { + this = scope:spouse_1 + this = scope:spouse_2 + } + } + trigger_event = ep2_wedding.0900 + } + } + # If the host/spouse died, notify the heir if somewhere else + if = { + limit = { + scope:previous_host = { + is_alive = no + player_heir = { + NOT = { involved_activity ?= scope:activity } + } + } + } + scope:previous_host.player_heir = { + trigger_event = ep2_wedding.0915 + } + } + } + # Emergency Invalidation: one of the spouses is not coming for some reason + else_if = { + limit = { + scope:activity = { + NOT = { has_variable = activity_travel_countdown } + } + scope:activity.var:spouse_2_var ?= { + NOR = { + is_ai = yes + involved_activity ?= scope:activity + location = scope:activity.activity_location + current_travel_plan ?= { + travel_plan_activity = scope:activity + } + } + } + } + scope:activity.var:spouse_2_var = { save_scope_as = missing_spouse } + scope:activity.special_guest:spouse_1 = { save_scope_as = other_spouse } + scope:activity = { + every_attending_character = { + trigger_event = ep2_wedding.0997 + } + } + } + # Fallback Invalidation + else = { + if = { + limit = { + scope:spouse_1 ?= { + is_betrothed = yes + } + exists = scope:spouse_2 + } + scope:spouse_1 = { + break_betrothal = scope:spouse_2 + } + } + scope:activity = { + every_attending_character = { + trigger_event = ep2_wedding.0998 + } + } + } + #Accolades' modifiers' removal + if = { + limit = { + scope:activity = { + any_attending_character = { + has_character_modifier = accolade_charmer_party_modifier + } + } + } + scope:activity = { + every_attending_character = { + limit = { + has_character_modifier = accolade_charmer_party_modifier + } + remove_character_modifier = accolade_charmer_party_modifier + } + } + } + if = { + limit = { + scope:activity = { + any_attending_character = { + has_character_modifier = accolade_charmer_party_high_modifier + } + } + } + scope:activity = { + every_attending_character = { + limit = { + has_character_modifier = accolade_charmer_party_high_modifier + } + remove_character_modifier = accolade_charmer_party_high_modifier + } + } + } + if = { # No one shows up + limit = { + has_attending_activity_guests = no + } + scope:activity = { + activity_type = { save_scope_as = activity_type } + activity_location = { save_scope_as = location } + } + scope:host = { trigger_event = activity_system.0100 } + } + #Get rid of temporary modifiers + if = { + limit = { + scope:activity = { + any_attending_character = { + has_character_modifier = wedding_jitters + } + } + } + scope:activity = { + every_attending_character = { + limit = { + has_character_modifier = wedding_jitters + } + remove_character_modifier = wedding_jitters + } + } + } + if = { + limit = { + scope:activity = { + any_attending_character = { + has_character_modifier = wedding_confident_groom + } + } + } + scope:activity = { + every_attending_character = { + limit = { + has_character_modifier = wedding_confident_groom + } + remove_character_modifier = wedding_confident_groom + } + } + } + if = { + limit = { + scope:activity = { + any_attending_character = { + has_character_modifier = wedding_confident_bride + } + } + } + scope:activity = { + every_attending_character = { + limit = { + has_character_modifier = wedding_confident_bride + } + remove_character_modifier = wedding_confident_bride + } + } + } + + if = { + limit = { exists = scope:officiant } + scope:officiant = { + if = { + limit = { has_character_flag = need_priest_outfit } + remove_character_flag = need_priest_outfit + } + if = { + limit = { has_character_flag = officiant } + remove_character_flag = officiant + } + } + } + scope:host = { #In case of bloody wedding, run the variable cleanup event + trigger_event = { #cleans up the variables with enough delay for the guest events + id = ep2_wedding.0958 + days = 7 + } + } + + } + + on_host_death = { + scope:activity.special_guest:spouse_1 = { save_scope_as = spouse_1 } + scope:activity.special_guest:spouse_2 = { save_scope_as = spouse_2 } + # Make the player heir the new host if attending (unless it was the host's wedding!) + if = { + limit = { + exists = scope:host.player_heir + scope:host.player_heir = { + involved_activity = scope:activity + } + scope:host = { + NOR = { + this = scope:spouse_1 + this = scope:spouse_2 + } + } + } + scope:host.player_heir = { save_scope_as = new_host } + } + # Otherwise, spouse_1 takes over + else = { + scope:spouse_1 = { save_scope_as = new_host } + } + # If spouse_1 is landless, it will invalidate to activity_system.0320 according to is_valid criteria. + # If spouse_1 is only a baron, it will invalidate to ep2_wedding.0999 according to is_valid_criteria. + wedding_update_hosting_variable_effect = yes + + scope:activity = { set_activity_host = scope:new_host } + scope:new_host = { + trigger_event = { + id = activity_system.0080 + days = 1 + } + } + } + + # desc is only shown in debug AI watch window + ai_will_do = { + value = 0 + add = { + value = 1000 + desc = "Wedding functional, always make weddings!" + } + } + + ai_check_interval_by_tier = { + barony = 0 + county = 4 + duchy = 4 + kingdom = 4 + empire = 4 + hegemony = 4 + } + + ai_will_select_province = { + value = 0 + add = { + value = 30 + desc = "Base test value" + } + # Buildings + if = { + limit = { has_building = royal_garden_01 } + add = { + value = 30 + desc = "Royal Garden" + } + } + else_if = { + limit = { has_building = royal_garden_02 } + add = { + value = 50 + desc = "Royal Garden" + } + } + else_if = { + limit = { has_building = royal_garden_03 } + add = { + value = 80 + desc = "Royal Garden" + } + } + if = { + limit = { has_building = leisure_palace_01 } + add = { + value = 50 + desc = "Leisure Palace" + } + } + else_if = { + limit = { has_building = leisure_palace_02 } + add = { + value = 80 + desc = "Leisure Palace" + } + } + else_if = { + limit = { has_building = leisure_palace_03 } + add = { + value = 100 + desc = "Leisure Palace" + } + } + else_if = { + limit = { has_building = pleasure_dome } + add = { + value = 100 + desc = "Pleasure Dome" + } + } + if = { + limit = { barony = { is_holy_site_of = scope:host.faith } } + add = { + value = 50 + desc = "Holy Site" + } + } + } + + max_province_icons = 5 + + province_score = { + value = 75 + # Capital + if = { + limit = { + this = scope:host.capital_province + } + add = 75 + } + # Buildings + if = { + limit = { has_building = royal_garden_01 } + add = 50 + } + else_if = { + limit = { has_building = royal_garden_02 } + add = 75 + } + else_if = { + limit = { has_building = royal_garden_03 } + add = 100 + } + if = { + limit = { has_building = leisure_palace_01 } + add = 75 + } + else_if = { + limit = { has_building = leisure_palace_02 } + add = 100 + } + else_if = { + limit = { has_building = leisure_palace_03 } + add = 125 + } + else_if = { + limit = { has_building = pleasure_dome } + add = 125 + } + # Holy Site + if = { + limit = { barony = { is_holy_site_of = scope:host.faith } } + add = 75 + } + } + + province_description = { + triggered_desc = { + trigger = { this = scope:host.capital_province } + desc = province_desc_wedding_capital + } + triggered_desc = { + trigger = { has_building = royal_garden_01 } + desc = province_desc_wedding_gardens + } + triggered_desc = { + trigger = { has_building = royal_garden_02 } + desc = province_desc_wedding_gardens_2 + } + triggered_desc = { + trigger = { has_building = royal_garden_03 } + desc = province_desc_wedding_gardens_3 + } + triggered_desc = { + trigger = { has_building = leisure_palace_01 } + desc = province_desc_wedding_palace + } + triggered_desc = { + trigger = { has_building = leisure_palace_02 } + desc = province_desc_wedding_palace_2 + } + triggered_desc = { + trigger = { has_building = leisure_palace_03 } + desc = province_desc_wedding_palace_3 + } + triggered_desc = { + trigger = { has_building = pleasure_dome } + desc = province_desc_wedding_pleasure_dome + } + triggered_desc = { + trigger = { barony = { is_holy_site_of = scope:host.faith } } + desc = province_desc_wedding_holy_site + } + } + + ################### + # PARAMETERS + ################### + + activity_group_type = grand + + max_guest_arrival_delay_time = { months = 8 } + + province_filter = domicile_domain + ai_province_filter = capital + + cost = { + gold = { + add = { + add = { + value = root.base_wedding_cost + desc = WEDDING_BASE_COST + } + add = { + value = root.base_wedding_cost + multiply = activity_cost_scale_by_era + subtract = root.base_wedding_cost + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + root.dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + add = { + value = root.base_wedding_cost + multiply = activity_cost_scale_by_era + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + multiply = -1 + desc = ep2_activities_legacy_2_name + } + } + if = { + limit = { + confederation ?= { has_cohesion_level_parameter = any_member_activity_cost_reduced } + } + multiply = { + value = 0.9 + desc = CB_COHESION_PARAMETER_DISCOUNT + } + } + # Some people get one free. + if = { + limit = { + root = { + factor_zero_if_entitled_to_freebie_activity_trigger = yes + } + } + multiply = { + value = 0 + desc = ep2_activities_legacy_5_name + } + } + } + } + } + + ui_predicted_cost = { + # All costs are balanced on County/Early Era starting point + gold = { + # Base Cost + add = { + value = root.base_wedding_cost + desc = WEDDING_BASE_COST + # Scale by Era + multiply = { + value = activity_cost_scale_by_era + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + root.dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + # OPTIONS + add = { # Entertainment + add = { # Calculate the average of the three option costs + value = 0 + add = 20 # Bad Option Cost + add = 60 # Normal Option Cost + add = 180 # Good Option Cost + # Divide by the total number of option levels so we get an average option cost + divide = 3 + # Scale option costs by era + multiply = activity_cost_scale_by_era + } + if = { + limit = { + root.dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + add = { # Food + value = { # Calculate the average of the three option costs + value = 0 + add = 20 # Bad Option Cost + add = 60 # Normal Option Cost + add = 180 # Good Option Cost + # Scale option costs by era + multiply = activity_cost_scale_by_era + # Divide by the total number of option levels so we get an average option cost + divide = 3 + } + if = { + limit = { + root.dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + add = { # Decoration + value = { # Calculate the average of the three option costs + value = 0 + add = 40 # Bad Option Cost + add = 120 # Normal Option Cost + add = 360 # Good Option Cost + # Scale option costs by era + multiply = activity_cost_scale_by_era + # Divide by the total number of option levels so we get an average option cost + divide = 3 + } + if = { + limit = { + root.dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + } + if = { + limit = { + confederation ?= { has_cohesion_level_parameter = any_member_activity_cost_reduced } + } + multiply = { + value = 0.9 + desc = CB_COHESION_PARAMETER_DISCOUNT + } + } + # Make it a multiple of 5 (rounded up) + divide = 5 + ceiling = yes + multiply = 5 + } + } + } + + ################### + # OPTIONS + ################### + + options = { + # Wedding Types + special_type = { + # Regular Wedding + wedding_type_normal = { + default = yes + ai_will_do = { + value = 100 + } + } + # Bloody Wedding + wedding_type_bloody = { + cost = { + gold = { + add = { + add = { + value = root.base_wedding_cost + multiply = 4 + desc = bloody_wedding_activity_cost_desc + } + add = { + value = root.base_wedding_cost + multiply = activity_cost_scale_by_era + subtract = root.base_wedding_cost + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + add = { + value = root.base_wedding_cost + multiply = activity_cost_scale_by_era + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + multiply = -1 + desc = ep2_activities_legacy_2_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + } + } + if = { + limit = { + root = { is_ai = yes } + } + multiply = 0 + } + } + } + is_shown = {} + + is_valid = { + # Do you have the skill to pull it off? + has_perk = accomplished_forger_perk + custom_tooltip = { + text = wedding_type_murder_valid_tt + NOT = { has_variable = recent_red_wedding_var } #15 years cooldown + } + } + blocked_intents = { murder_attendee_intent woo_attendee_intent diplomatic_intent matchmaking_intent } + + ai_will_do = { + value = 0 + if = { + limit = { + has_trait = torturer + NOT = { has_trait = zealous } + can_make_expensive_purchase_trigger = { PRICE = real_wedding_cost_root_scope } + } + add = 30 + } + if = { + limit = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = arbitrary + has_trait = vengeful + } + NOT = { has_trait = zealous } + can_make_expensive_purchase_trigger = { PRICE = real_wedding_cost_root_scope_plus_50 } + } + add = 15 + } + if = { + limit = { + OR = { + has_trait = just + has_trait = honest + has_trait = compassionate + has_trait = generous + has_trait = forgiving + has_trait = calm + has_trait = zealous + } + } + subtract = 50 + } + if = { + limit = { + this = faith.religious_head + NOT = { has_trait = torturer } + faith = { + NOR = { + has_doctrine_parameter = gruesome_festivals_active + has_doctrine_parameter = human_sacrifice_active + } + } + } + add = -100 + } + if = { + limit = { + this = faith.religious_head + NOT = { has_trait = compassionate } + faith = { + OR = { + has_doctrine_parameter = gruesome_festivals_active + has_doctrine_parameter = human_sacrifice_active + } + } + } + add = 50 + } + } + } + } + wedding_option_entertainment = { + wedding_entertainment_bad = { + # desc is only shown in debug AI watch window + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_cheap_expense_value + } + cost = { + gold = { + add = { + desc = wedding_entertainment_bad + add = { + value = 20 + desc = wedding_entertainment_bad + } + add = { + value = 20 + multiply = activity_cost_scale_by_era + subtract = 20 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + add = { + value = 20 + multiply = activity_cost_scale_by_era + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + multiply = -1 + desc = ep2_activities_legacy_2_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + desc = ep2_activities_legacy_5_name + } + } + if = { + limit = { + is_ai = yes + } + multiply = 0 + } + } + } + on_start = { + # keep synced with the cost of the option + if = { + limit = { # if you don't get a freebie or a discount, we add the discounted cost + scope:host = { + factor_zero_if_entitled_to_freebie_activity_trigger = no + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + } + change_variable = { + name = gwedding_refund_pot + add = { + value = 20 + multiply = scope:host.activity_cost_scale_by_era + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + } + } + } + else_if = { + limit = { # otherwise, as long as no freebie, we add the full cost + scope:host = { + factor_zero_if_entitled_to_freebie_activity_trigger = no + } + } + change_variable = { + name = gwedding_refund_pot + add = { + value = 20 + multiply = scope:host.activity_cost_scale_by_era + desc = wedding_entertainment_normal + } + } + } + } + } + + wedding_entertainment_normal = { + is_valid = { + } + default = yes + # desc is only shown in debug AI watch window + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_middling_expense_value + } + cost = { + gold = { + add = { + desc = wedding_entertainment_normal + add = { + value = 60 + desc = wedding_entertainment_normal + } + add = { + value = 60 + multiply = activity_cost_scale_by_era + subtract = 60 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + add = { + value = 60 + multiply = activity_cost_scale_by_era + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + multiply = -1 + desc = ep2_activities_legacy_2_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + desc = ep2_activities_legacy_5_name + } + } + if = { + limit = { + is_ai = yes + } + multiply = 0 + } + } + } + on_start = { + # Vassal opinion + wedding_normal_option_effect = yes + # keep synced with the cost of the option + if = { + limit = { # if you don't get a freebie or a discount, we add the discounted cost + scope:host = { + factor_zero_if_entitled_to_freebie_activity_trigger = no + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + } + change_variable = { + name = gwedding_refund_pot + add = { + value = 60 + multiply = scope:host.activity_cost_scale_by_era + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + } + } + } + else_if = { + limit = { # otherwise, as long as no freebie, we add the full cost + scope:host = { factor_zero_if_entitled_to_freebie_activity_trigger = no } + } + change_variable = { + name = gwedding_refund_pot + add = { + value = 60 + multiply = scope:host.activity_cost_scale_by_era + desc = wedding_entertainment_normal + } + } + } + } + } + + wedding_entertainment_good = { + is_valid = { + } + # desc is only shown in debug AI watch window + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_heavy_expense_value + } + cost = { + gold = { + add = { + desc = wedding_entertainment_good + add = { + value = 180 + desc = wedding_entertainment_good + } + add = { + value = 180 + multiply = activity_cost_scale_by_era + subtract = 180 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + add = { + value = 180 + multiply = activity_cost_scale_by_era + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + multiply = -1 + desc = ep2_activities_legacy_2_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + desc = ep2_activities_legacy_5_name + } + } + if = { + limit = { + is_ai = yes + } + multiply = 0 + } + } + } + on_start = { + # Vassal Opinion and Option bonuses + wedding_good_option_effect = yes + scope:host = { + if = { + limit = { + has_trait = lifestyle_reveler + } + add_trait_xp = { + trait = lifestyle_reveler + value = 5 + } + } + else = { + add_trait = lifestyle_reveler + } + } + # keep synced with the cost of the option + if = { + limit = { # if you don't get a freebie or a discount, we add the discounted cost + scope:host = { + factor_zero_if_entitled_to_freebie_activity_trigger = no + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + } + change_variable = { + name = gwedding_refund_pot + add = { + value = 180 + multiply = scope:host.activity_cost_scale_by_era + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + } + } + } + else_if = { + limit = { # otherwise, as long as no freebie, we add the full cost + scope:host = { factor_zero_if_entitled_to_freebie_activity_trigger = no } + } + change_variable = { + name = gwedding_refund_pot + add = { + value = 180 + multiply = scope:host.activity_cost_scale_by_era + desc = wedding_entertainment_normal + } + } + } + } + } + } + + wedding_option_food = { + wedding_food_bad = { + # desc is only shown in debug AI watch window + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_cheap_expense_value + } + cost = { + gold = { + add = { + desc = wedding_food_bad + add = { + value = 20 + desc = wedding_food_bad + } + add = { + value = 20 + multiply = activity_cost_scale_by_era + subtract = 20 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + add = { + value = 20 + multiply = activity_cost_scale_by_era + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + multiply = -1 + desc = ep2_activities_legacy_2_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + desc = ep2_activities_legacy_5_name + } + } + if = { + limit = { + is_ai = yes + } + multiply = 0 + } + } + } + on_start = { + # keep synced with the cost of the option + if = { + limit = { # if you don't get a freebie or a discount, we add the discounted cost + scope:host = { + factor_zero_if_entitled_to_freebie_activity_trigger = no + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + } + change_variable = { + name = gwedding_refund_pot + add = { + value = 20 + multiply = scope:host.activity_cost_scale_by_era + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + } + } + } + else_if = { + limit = { # otherwise, as long as no freebie, we add the full cost + scope:host = { factor_zero_if_entitled_to_freebie_activity_trigger = no } + } + change_variable = { + name = gwedding_refund_pot + add = { + value = 20 + multiply = scope:host.activity_cost_scale_by_era + desc = wedding_entertainment_normal + } + } + } + } + } + + wedding_food_normal = { + is_valid = { + } + default = yes + # desc is only shown in debug AI watch window + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_middling_expense_value + } + cost = { + gold = { + add = { + desc = wedding_food_normal + add = { + value = 60 + desc = wedding_food_normal + } + add = { + value = 60 + multiply = activity_cost_scale_by_era + subtract = 60 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + add = { + value = 60 + multiply = activity_cost_scale_by_era + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + multiply = -1 + desc = ep2_activities_legacy_2_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + desc = ep2_activities_legacy_5_name + } + } + if = { + limit = { + is_ai = yes + } + multiply = 0 + } + } + } + on_start = { + # Vassal Opinion and Option bonuses + wedding_normal_option_effect = yes + # keep synced with the cost of the option + if = { + limit = { # if you don't get a freebie or a discount, we add the discounted cost + scope:host = { + factor_zero_if_entitled_to_freebie_activity_trigger = no + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + } + change_variable = { + name = gwedding_refund_pot + add = { + value = 60 + multiply = scope:host.activity_cost_scale_by_era + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + } + } + } + else_if = { + limit = { # otherwise, as long as no freebie, we add the full cost + scope:host = { factor_zero_if_entitled_to_freebie_activity_trigger = no } + } + change_variable = { + name = gwedding_refund_pot + add = { + value = 60 + multiply = scope:host.activity_cost_scale_by_era + desc = wedding_entertainment_normal + } + } + } + } + } + + wedding_food_good = { + is_valid = { + + } + # desc is only shown in debug AI watch window + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_heavy_expense_value + } + cost = { + gold = { + add = { + desc = wedding_food_good + add = { + value = 180 + desc = wedding_food_good + } + add = { + value = 180 + multiply = activity_cost_scale_by_era + subtract = 180 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + add = { + value = 180 + multiply = activity_cost_scale_by_era + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + multiply = -1 + desc = ep2_activities_legacy_2_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + desc = ep2_activities_legacy_5_name + } + } + if = { + limit = { + is_ai = yes + } + multiply = 0 + } + } + } + on_start = { + # Vassal Opinion and Option bonuses + wedding_good_option_effect = yes + scope:host = { + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + add_character_modifier = { + modifier = wedding_lavish_food_royal_modifier + years = 5 + } + } + else = { + add_character_modifier = { + modifier = wedding_lavish_food_modifier + years = 5 + } + } + } + # keep synced with the cost of the option + if = { + limit = { # if you don't get a freebie or a discount, we add the discounted cost + scope:host = { + factor_zero_if_entitled_to_freebie_activity_trigger = no + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + } + change_variable = { + name = gwedding_refund_pot + add = { + value = 180 + multiply = scope:host.activity_cost_scale_by_era + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + } + } + } + else_if = { + limit = { # otherwise, as long as no freebie, we add the full cost + scope:host = { factor_zero_if_entitled_to_freebie_activity_trigger = no } + } + change_variable = { + name = gwedding_refund_pot + add = { + value = 180 + multiply = scope:host.activity_cost_scale_by_era + desc = wedding_entertainment_normal + } + } + } + } + } + } + + wedding_option_decoration = { + wedding_decoration_bad = { + # desc is only shown in debug AI watch window + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_cheap_expense_value + } + cost = { + gold = { + add = { + desc = wedding_decoration_bad + add = { + value = 40 + desc = wedding_decoration_bad + } + add = { + value = 40 + multiply = activity_cost_scale_by_era + subtract = 40 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + add = { + value = 40 + multiply = activity_cost_scale_by_era + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + multiply = -1 + desc = ep2_activities_legacy_2_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + desc = ep2_activities_legacy_5_name + } + } + if = { + limit = { + is_ai = yes + } + multiply = 0 + } + } + } + on_start = { + # keep synced with the cost of the option + if = { + limit = { # if you don't get a freebie or a discount, we add the discounted cost + scope:host = { + factor_zero_if_entitled_to_freebie_activity_trigger = no + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + } + change_variable = { + name = gwedding_refund_pot + add = { + value = 40 + multiply = scope:host.activity_cost_scale_by_era + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + } + } + } + else_if = { + limit = { # otherwise, as long as no freebie, we add the full cost + scope:host = { factor_zero_if_entitled_to_freebie_activity_trigger = no } + } + change_variable = { + name = gwedding_refund_pot + add = { + value = 40 + multiply = scope:host.activity_cost_scale_by_era + desc = wedding_entertainment_normal + } + } + } + } + } + + wedding_decoration_normal = { + is_valid = { + } + default = yes + # desc is only shown in debug AI watch window + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_middling_expense_value + } + cost = { + gold = { + add = { + desc = wedding_decoration_normal + add = { + value = 120 + desc = wedding_decoration_normal + } + add = { + value = 120 + multiply = activity_cost_scale_by_era + subtract = 120 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + add = { + value = 120 + multiply = activity_cost_scale_by_era + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + multiply = -1 + desc = ep2_activities_legacy_2_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + desc = ep2_activities_legacy_5_name + } + } + if = { + limit = { + is_ai = yes + } + multiply = 0 + } + } + } + on_start = { + # Vassal Opinion and Option bonuses + wedding_normal_option_effect = yes + # keep synced with the cost of the option + if = { + limit = { # if you don't get a freebie or a discount, we add the discounted cost + scope:host = { + factor_zero_if_entitled_to_freebie_activity_trigger = no + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + } + change_variable = { + name = gwedding_refund_pot + add = { + value = 120 + multiply = scope:host.activity_cost_scale_by_era + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + } + } + } + else_if = { + limit = { # otherwise, as long as no freebie, we add the full cost + scope:host = { factor_zero_if_entitled_to_freebie_activity_trigger = no } + } + change_variable = { + name = gwedding_refund_pot + add = { + value = 120 + multiply = scope:host.activity_cost_scale_by_era + desc = wedding_entertainment_normal + } + } + } + } + } + + wedding_decoration_good = { + is_valid = { + + } + # desc is only shown in debug AI watch window + ai_will_do = { + value = 0 + # Financial preference. + add = activity_option_likes_heavy_expense_value + } + cost = { + gold = { + add = { + desc = wedding_decoration_good + add = { + value = 360 + desc = wedding_decoration_good + } + add = { + value = 360 + multiply = activity_cost_scale_by_era + subtract = 360 + desc = activity_cost_scale_by_era_desc + } + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + add = { + value = 360 + multiply = activity_cost_scale_by_era + multiply = ep2_activities_legacy_2_grand_weddings_discount_value + multiply = -1 + desc = ep2_activities_legacy_2_name + } + } + if = { + limit = { + has_perk = journey_planner_perk + } + multiply = { + value = voyager_journey_planner_value + desc = journey_planner_perk_name + } + } + # Some people get one free. + if = { + limit = { factor_zero_if_entitled_to_freebie_activity_trigger = yes } + multiply = 0 + desc = ep2_activities_legacy_5_name + } + } + if = { + limit = { + is_ai = yes + } + multiply = 0 + } + } + } + on_start = { + # Vassal Opinion and Option bonuses + wedding_good_option_effect = yes + scope:host = { + add_prestige = medium_prestige_gain + } + # keep synced with the cost of the option + if = { + limit = { # if you don't get a freebie or a discount, we add the discounted cost + scope:host = { + factor_zero_if_entitled_to_freebie_activity_trigger = no + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + } + change_variable = { + name = gwedding_refund_pot + add = { + value = 360 + multiply = scope:host.activity_cost_scale_by_era + multiply = { + value = ep2_activities_legacy_2_grand_weddings_discount_value + desc = ep2_activities_legacy_track + } + } + } + } + else_if = { + limit = { # otherwise, as long as no freebie, we add the full cost + scope:host = { factor_zero_if_entitled_to_freebie_activity_trigger = no } + } + change_variable = { + name = gwedding_refund_pot + add = { + value = 360 + multiply = scope:host.activity_cost_scale_by_era + desc = wedding_entertainment_normal + } + } + } + } + } + } + } + + special_option_category = special_type + + ################### + # PHASES + ################### + + phases = { + + wedding_phase_ceremony = { + is_predefined = yes + + order = 1 + + is_shown = { + always = yes + } + + on_phase_active = { + # Fires for every attendee + if = { #Record whether the couple were already lovers before the ceremony + limit = { + scope:activity.special_guest:spouse_1 = { + any_relation = { + type = lover + this = scope:activity.special_guest:spouse_2 + } + } + } + scope:activity = { + set_variable = { + name = lovers_wedding + value = yes + } + } + } + if = { + limit = { + root = scope:host + scope:activity = { + has_activity_option = { + category = special_type + option = wedding_type_bloody + } + } + } + scope:host = { trigger_event = ep2_wedding.0101 } + } + else = { trigger_event = ep2_wedding.0100 } + # Accolade stuff + if = { + limit = { + this = scope:host + any_active_accolade = { + accolade_parameter = accolade_party_fertility + } + } + add_character_modifier = { + modifier = accolade_charmer_party_modifier + } + } + if = { + limit = { + this = scope:host + any_active_accolade = { + accolade_parameter = accolade_party_fertility_high + } + } + add_character_modifier = { + modifier = accolade_charmer_party_high_modifier + } + } + if = { + limit = { + exists = scope:host.faith.religious_head + scope:host.faith.religious_head = { + NOR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + } + scope:activity = { + any_attending_character = { + this = scope:host.faith.religious_head + } + } + } + scope:host.faith.religious_head = { save_scope_as = officiant } + } + else_if = { + limit = { + scope:host != scope:activity.special_guest:spouse_1 + } + scope:host = { save_scope_as = officiant } + } + else_if = { + limit = { + exists = scope:host.cp:councillor_court_chaplain + scope:activity = { + any_attending_character = { + this = scope:host.cp:councillor_court_chaplain + } + } + } + scope:host.cp:councillor_court_chaplain = { save_scope_as = officiant } + } + else_if = { + limit = { + NOT = { scope:host.faith = { has_doctrine = doctrine_theocracy_lay_clergy } } + } + if = { + limit = { + NOT = { + scope:activity = { + any_attending_character = { + is_ai = no + } + } + } + any_pool_character = { + province = scope:activity.activity_location + is_physically_able_ai_adult = yes + faith = scope:host.faith + can_be_clergy_due_to_gender_trigger = yes + } + } + random_pool_character = { + province = scope:activity.activity_location + limit = { + is_physically_able_ai_adult = yes + faith = scope:host.faith + can_be_clergy_due_to_gender_trigger = yes + } + save_scope_as = officiant + } + } + else = { + create_character = { + template = priest_character_template + dynasty = none + location = scope:host.location + save_scope_as = officiant + } + } + } + scope:officiant ?= { + add_character_flag = officiant + } + # Fires the conclusion events for every attendee, and advance to next phase, with a delay of 2 months + trigger_event = { + on_action = wedding_ceremony_ending_event_pulse + days = 60 + } + } + + on_weekly_pulse = { + # Fires for every attendee + trigger_event = { on_action = wedding_ceremony_ongoing_event_pulse } + } + + ai_will_do = { + value = 100 + } + } + + wedding_phase_banquet = { + is_predefined = yes + + order = 2 + + on_enter_phase = { + if = { + limit = { this = scope:host } + # No passive state for the toast, just jump right into it + scope:activity = { progress_activity_phase_after = { days = 1 } } + } + } + + on_phase_active = { + # Fires for every attendee + trigger_event = ep2_wedding.0200 + + if = { + limit = { + root = scope:host + } + + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = wedding_type_bloody + } + } + } + + if = { #if you have the wedding night kill we progress to that + limit = { + has_variable = bloody_wedding_murder_spouse_var + } + scope:activity = { progress_activity_phase_after = { months = 2 } } + } + + else = { + # MASSACRE event + trigger_event = { + on_action = wedding_bloody_banquet_ongoing_event_pulse + days = 60 + } + } + } + else = { + scope:activity = { progress_activity_phase_after = { months = 2 } } + } + } + } + + on_end = { + if = { + limit = { this = scope:host } + ep3_dynasty_legacy_add_legitimacy_effect = yes + } + } + + on_weekly_pulse = { + # Fires for every attendee + trigger_event = { on_action = wedding_banquet_ongoing_event_pulse } + } + + ai_will_do = { + value = 100 + } + } + + wedding_phase_wnight = { + is_predefined = yes + + order = 3 + + on_enter_phase = { + if = { + limit = { this = scope:host } + # No passive state for the toast, just jump right into it + scope:activity = { progress_activity_phase_after = { days = 1 } } + } + } + + on_phase_active = { + # Fires for every attendee + # Regular Weddings - Murder Wedding won't get this far unless you're trying to kill your own spouse during the wnight + if = { + limit = { + OR = { + scope:activity = { + has_activity_option = { + category = special_type + option = wedding_type_normal + } + } + scope:host = { has_variable = bloody_wedding_murder_spouse_var } + } + } + trigger_event = ep2_wedding.0300 + } + if = { + limit = { this = scope:host } + scope:activity = { progress_activity_phase_after = { months = 1 } } + } + } + + on_weekly_pulse = { + # Bloody Wedding only has a murder event, no regular wnight + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = wedding_type_bloody + } + } + } + if = { + limit = { + scope:host = scope:activity.special_guest:spouse_1 #if you're the spouse + scope:host = { has_variable = bloody_wedding_murder_spouse_var } #and you've chosen to kill them during the wedding night + } + scope:host = { trigger_event = ep2_wedding.3060 } + } + } + # For a regular wedding + # Fires only for the spouses + if = { + limit = { + OR = { + scope:activity = { + has_activity_option = { + category = special_type + option = wedding_type_normal + } + } + scope:host = { has_variable = bloody_wedding_backed_down_var } + } + OR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + } + trigger_event = { + on_action = wedding_wnight_spouse_event_pulse + } + } + # Fires for the guests + else_if = { + limit = { + OR = { + scope:activity = { + has_activity_option = { + category = special_type + option = wedding_type_normal + } + } + scope:host = { has_variable = bloody_wedding_backed_down_var } + } + } + trigger_event = { on_action = wedding_wnight_ongoing_event_pulse } + } + } + + ai_will_do = { + value = 100 + } + } + } + + ################### + # GUEST HANDLING + ################### + + max_guests = 80 + + guest_invite_rules = { + rules = { + 2 = activity_invite_rule_rivals + 2 = activity_invite_rule_extended_family + 2 = activity_invite_rule_lovers + 2 = activity_invite_rule_potential_lovers + 1 = activity_invite_rule_hof + + # MP + 6 = activity_invite_mp + } + defaults = { + 2 = activity_invite_rule_friends + 2 = activity_invite_rule_potential_friends + 1 = activity_invite_rule_close_family + 1 = activity_invite_rule_tributaries + 2 = activity_invite_rule_vassals + 1 = activity_invite_rule_confederates + 2 = activity_invite_rule_fellow_vassals + 3 = activity_invite_rule_courtiers + 4 = activity_invite_rule_guests + 2 = activity_invite_rule_all_lieges + 1 = activity_invite_spouses_close_family + 2 = activity_invite_spouses_extended_family + 2 = activity_invite_neighbouring_rulers + 1 = activity_invite_rule_landless_adventurers_restricted_range + } + } + + can_be_activity_guest = { + is_adult = yes + OR = { + in_diplomatic_range = scope:host + has_been_promised_grand_wedding = yes + } + } + + host_intents = { + intents = { reduce_stress_intent murder_attendee_intent woo_attendee_intent diplomatic_intent matchmaking_intent spread_legend_intent legitimacy_intent } + default = reduce_stress_intent + } + + guest_intents = { + intents = { reduce_stress_intent murder_attendee_intent woo_attendee_intent diplomatic_intent banquet_mischief_intent spread_legend_intent legitimacy_intent } + default = reduce_stress_intent + } + + guest_join_chance = { + base = 10 + base_activity_modifier = yes + + # Scripted Modifiers + activity_guest_shared_ai_accept_modifier = yes + activity_guest_wedding_ai_accept_modifier = yes + + # Master of Revels Accolade increasing invite acceptance + modifier = { + scope:host = { + any_active_accolade = { + accolade_parameter = acclaimed_knight_feast_wedding_invite_acceptance_bonus + } + } + add = accolade_feast_wedding_invite_acceptance_value + } + } + + special_guests = { + spouse_1 = { + is_required = yes + + # You can only promise a grand wedding to one character, so we can just directly grab them + select_character = { + var:promised_grand_wedding_marriage_countdown = { + save_scope_as = character + } + } + + can_pick = { + is_valid_grand_wedding_special_guest_trigger = { OTHER_SPOUSE = scope:spouse_2 } + OR = { + AND = { + is_male = yes + patrilinear_betrothal = yes + } + AND = { + is_female = yes + matrilinear_betrothal = yes + } + } + } + on_invite = { + if = { + limit = { + is_close_or_extended_family_of = scope:host + this != scope:host + dynasty = scope:host.dynasty + } + add_opinion = { + target = scope:host + modifier = organized_my_wedding_opinion + } + } + } + } + + spouse_2 = { + is_required = yes + + select_character = { + var:promised_grand_wedding_marriage_countdown.betrothed = { + save_scope_as = character + } + } + + can_pick = { + is_valid_grand_wedding_special_guest_trigger = { OTHER_SPOUSE = scope:spouse_1 } + betrothed = { + OR = { + AND = { + is_male = yes + patrilinear_betrothal = yes + } + AND = { + is_female = yes + matrilinear_betrothal = yes + } + } + } + } + on_invite = { + if = { + limit = { + is_close_or_extended_family_of = scope:host + this != scope:host + dynasty = scope:host.dynasty + } + add_opinion = { + target = scope:host + modifier = organized_my_wedding_opinion + } + } + } + } + } + + travel_entourage_selection = { + weight = standard_travel_entourage_additions + max = 10 + invite_rule_order = 3 + } + + ################### + # ACTIVITY-SPECIFIC PULSES + ################### + + pulse_actions = { + entries = { excellent_food hook_trusting_guest dynasty_blessing cultural_acceptance marriage_reflection royal_gift gossip_with_guests contact_network wedding_gift bonding_spouse_family received_flowers admired_venue knight_praised seductive_exchange impressed_courtly_vassal music_performance poetry_performance floral_exhibit spouse_impressed spouse_skill_diplomacy_improves spouse_gives_host_prestige spouse_manages_feast_splendidly spouse_impresses_clergy spouse_gives_hook relation_gains_friend lauded_food children_bonding guest_impressed_by_court_artifact guest_chokes_on_bone guest_brawl friend_lauds_efforts courtly_vassals_appeased spouse_insults_host host_gains_diplo_xp host_gains_steward_xp host_gains_intrigue_xp ridiculed_food guest_tells_fantastic_joke } + chance_of_no_event = 3 + } + + on_start = { + #if = { # Activity count debugging, left in for QA purposes + # limit = { + # debug_only = yes + # } + # if = { + # limit = { + # NOT = { + # exists = global_var:wedding_count + # } + # } + # set_global_variable = { + # name = wedding_count + # value = 1 + # } + # } + # else = { + # change_global_variable = { + # name = wedding_count + # add = 1 + # } + # } + # + # if = { + # limit = { + # scope:host = { highest_held_title_tier = tier_county } + # NOT = { + # exists = global_var:wedding_c + # } + # } + # set_global_variable = { + # name = wedding_c + # value = 1 + # } + # } + # else_if = { + # limit = { + # scope:host = { highest_held_title_tier = tier_county } + # } + # change_global_variable = { + # name = wedding_c + # add = 1 + # } + # } + # + # if = { + # limit = { + # scope:host = { highest_held_title_tier = tier_duchy } + # NOT = { + # exists = global_var:wedding_d + # } + # } + # set_global_variable = { + # name = wedding_d + # value = 1 + # } + # } + # else_if = { + # limit = { + # scope:host = { highest_held_title_tier = tier_duchy } + # } + # change_global_variable = { + # name = wedding_d + # add = 1 + # } + # } + # + # if = { + # limit = { + # scope:host = { highest_held_title_tier = tier_kingdom } + # NOT = { + # exists = global_var:wedding_k + # } + # } + # set_global_variable = { + # name = wedding_k + # value = 1 + # } + # } + # else_if = { + # limit = { + # scope:host = { highest_held_title_tier = tier_kingdom } + # } + # change_global_variable = { + # name = wedding_k + # add = 1 + # } + # } + # + # if = { + # limit = { + # scope:host = { highest_held_title_tier = tier_empire } + # NOT = { + # exists = global_var:wedding_e + # } + # } + # set_global_variable = { + # name = wedding_e + # value = 1 + # } + # } + # else_if = { + # limit = { + # scope:host = { highest_held_title_tier = tier_empire } + # } + # change_global_variable = { + # name = wedding_e + # add = 1 + # } + # } + # + # if = { + # limit = { + # scope:host.location = { geographical_region = world_middle_east } + # NOT = { + # exists = global_var:wedding_world_middle_east + # } + # } + # set_global_variable = { + # name = wedding_world_middle_east + # value = 1 + # } + # } + # else_if = { + # limit = { + # scope:host.location = { geographical_region = world_middle_east } + # } + # change_global_variable = { + # name = wedding_world_middle_east + # add = 1 + # } + # } + # + # if = { + # limit = { + # scope:host.location = { geographical_region = world_europe } + # NOT = { + # exists = global_var:wedding_world_europe + # } + # } + # set_global_variable = { + # name = wedding_world_europe + # value = 1 + # } + # } + # else_if = { + # limit = { + # scope:host.location = { geographical_region = world_europe } + # } + # change_global_variable = { + # name = wedding_world_europe + # add = 1 + # } + # } + # + # if = { + # limit = { + # scope:host.location = { geographical_region = world_steppe } + # NOT = { + # exists = global_var:wedding_world_steppe + # } + # } + # set_global_variable = { + # name = wedding_world_steppe + # value = 1 + # } + # } + # else_if = { + # limit = { + # scope:host.location = { geographical_region = world_steppe } + # } + # change_global_variable = { + # name = wedding_world_steppe + # add = 1 + # } + # } + # + # if = { + # limit = { + # scope:host.location = { geographical_region = world_africa } + # NOT = { + # exists = global_var:wedding_world_africa + # } + # } + # set_global_variable = { + # name = wedding_world_africa + # value = 1 + # } + # } + # else_if = { + # limit = { + # scope:host.location = { geographical_region = world_africa } + # } + # change_global_variable = { + # name = wedding_world_africa + # add = 1 + # } + # } + # + # if = { + # limit = { + # scope:host.location = { geographical_region = world_india } + # NOT = { + # exists = global_var:wedding_world_india + # } + # } + # set_global_variable = { + # name = wedding_world_india + # value = 1 + # } + # } + # else_if = { + # limit = { + # scope:host.location = { geographical_region = world_india } + # } + # change_global_variable = { + # name = wedding_world_india + # add = 1 + # } + # } + #} + # Keep synced with the wedding Base cost + set_variable = { + name = gwedding_refund_pot + value = scope:host.base_wedding_cost + } + scope:activity = { #we save the spouse_2 as a variable in case we kill them + set_variable = { + name = spouse_2_var + value = special_guest:spouse_2 + } + # we save a countdown to check that no spouse has gotten stuck in odd places - don't ask + set_variable = { + name = activity_travel_countdown + days = 15 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = wedding_type_bloody + } + } + } + scope:host = { + set_variable = { + name = recent_red_wedding_var + years = 15 + } + } + if = { + limit = { + OR = { + scope:activity.special_guest:spouse_2 = scope:host.liege + scope:host.liege = { + is_close_or_extended_family_of = scope:activity.special_guest:spouse_2 + this != scope:host + is_close_family_or_spouse_of_root_trigger = no + } + } + } + scope:host = { set_variable = murder_feast_liege_var } + } + if = { + limit = { + OR = { + scope:activity.special_guest:spouse_2 = scope:host.faith.religious_head + scope:host.faith.religious_head = { + is_close_or_extended_family_of = scope:activity.special_guest:spouse_2 + this != scope:host + NOT = { is_close_family_or_spouse_trigger = { CHARACTER = scope:host } } + } + } + } + scope:host = { set_variable = murder_feast_head_of_faith_var } + } + } + #fires hostage reunion event, if hostage giver is also present + every_attending_character = { + limit = { + is_hostage_warden = yes + has_bp2_dlc_trigger = yes + this != scope:host + } + trigger_event = { + id = bp2_yearly.6120 + days = 2 + } + } + } + + # Effects run when a character enters a travel state + # root = character in this phase + # scope:activity = the activity + # scope:host = host of the activity + on_enter_travel_state = { + } + + # Effects run when a character enters a passive state after travel + # root = character in this phase + # scope:activity = the activity + # scope:host = host of the activity + on_enter_passive_state = { + + } + + # Effects run during the activity event pulse for characters in the passive state + # root = character in this phase + # scope:activity = the activity + # scope:host = host of the activity + on_passive_state_pulse = { + + } + + # Effects run when entering an active phase of the activity + # root = character in this phase + # scope:activity = the activity + # scope:host = host of the activity + on_enter_active_state = { + surveyor_no_stone_unturned_perk_effect = yes + } + + # Effects run during the activity event pulse for characters in the active state + # root = character in this phase + # scope:activity = the activity + # scope:host = host of the activity + on_active_state_pulse = { + # add active state events here + # maybe some way to check if this is the first active state? + } + + # Effects run when the activity completes after its last phase + # root = character in this phase + # scope:activity = the activity + # scope:host = host of the activity + on_complete = { + # Run conclusion stuff here + scope:host = { + save_scope_as = host + } + scope:activity = { + activity_location = { + save_scope_as = wedding_venue + } + special_guest:spouse_1 = { + save_scope_as = spouse_1 + } + special_guest:spouse_2 = { + save_scope_as = spouse_2 + } + } + # Remove the wedding reward for Bloody Weddings + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = wedding_type_bloody + } + activity_location.county = { + has_county_modifier = ruler_married_here_county_modifier + } + } + } + scope:activity.activity_location.county = { + remove_county_modifier = ruler_married_here_county_modifier + } + } + # Clean up for murder host / guests + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = wedding_type_bloody + } + } + scope:host = { + #You haven't failed/backed down + NOR = { + has_variable = bloody_wedding_backed_down_var + has_variable = bloody_murder_fail + } + } + } + scope:activity.special_guest:spouse_1 = { + save_scope_as = spouse_1 + } + scope:activity.special_guest:spouse_2 = { + save_scope_as = spouse_2 + } + if = { + limit = { + this = scope:host + } + # For the murderous host + scope:host = { + trigger_event = ep2_wedding.0301 #this triggers event ep2_wedding.0955 + disburse_murder_wedding_host_rewards = yes + } + } + else = { + # For the survivors - realize you're in a Red Wedding + scope:activity = { + every_attending_character = { + limit = { + this != scope:host + } + trigger_event = ep2_wedding.0302 #includes special loc for spouse_1 if not host + } + } + } + } + # Fires for every attendee + # Accolade stuff + if = { + limit = { + this = scope:host + has_character_modifier = accolade_charmer_party_modifier + } + remove_character_modifier = accolade_charmer_party_modifier + } + if = { + limit = { + this = scope:host + has_character_modifier = accolade_charmer_party_high_modifier + } + remove_character_modifier = accolade_charmer_party_high_modifier + } + + # Rewards for Bloody Weddings given out in event ep2_wedding.0955 + + # Rewards for Normal Weddings + if = { + limit = { + OR = { + scope:activity = { + has_activity_option = { + category = special_type + option = wedding_type_normal + } + } + scope:host = { has_variable = bloody_wedding_backed_down_var } #you've backed down from a Red Wedding + } + } + if = { + limit = { + root = scope:host + } + root = { disburse_wedding_activity_rewards = yes } + if = { + limit = { + scope:host = scope:spouse_1 + } + root = { disburse_wedding_spouse_host_activity_rewards = yes } + scope:spouse_2 = { disburse_wedding_spouse_activity_rewards = yes } + } + else_if = { + limit = { + scope:host = scope:spouse_2 + } + root = { disburse_wedding_spouse_host_activity_rewards = yes } + scope:spouse_1 = { disburse_wedding_spouse_activity_rewards = yes } + } + # if the host is not a spouse, we disburse the regular spouse rewards to both spouses + else_if = { + limit = { + root = scope:host + NOR = { + scope:host = scope:spouse_1 + scope:host = scope:spouse_2 + } + } + scope:spouse_1 = { disburse_wedding_spouse_activity_rewards = yes } + scope:spouse_2 = { disburse_wedding_spouse_activity_rewards = yes } + } + # Conclusion notification event for the host + trigger_event = ep2_wedding.0950 + } + else_if = { + limit = { + OR = { + root = scope:spouse_1 + root = scope:spouse_2 + } + root != scope:host + } + # Conclusion notification event for the spouses + # The spouses' rewards are handed out by the host to ensure they are given just once to each + trigger_event = ep2_wedding.0960 + } + else = { + # Conclusion notification event for the guests + # The guests' rewards are handed out by the host (inside the host's disburse effect) to ensure they are given just once to each + trigger_event = ep2_wedding.0970 + } + } + if = { + limit = { has_character_modifier = wedding_confident_groom } + remove_character_modifier = wedding_confident_groom + } + if = { + limit = { has_character_modifier = wedding_confident_bride } + remove_character_modifier = wedding_confident_bride + } + if = { + limit = { has_character_modifier = wedding_jitters } + remove_character_modifier = wedding_jitters + } + + # Dynasty Legacies + host_has_taken_freebie_activity_effect = yes + + # Achievement tracking. + if = { + limit = { + this = scope:host + } + scope:host = { + ## A.E.I.O.U & Me + if = { + limit = { + exists = global_var:started_a_e_i_o_u_and_me_achievement + exists = dynasty + } + dynasty = { + if = { + limit = { + NOT = { has_variable = a_e_i_o_u_and_me_achievement_grand_wedding_tally } + } + set_variable = { + name = a_e_i_o_u_and_me_achievement_grand_wedding_tally + value = 1 + } + } + else = { + change_variable = { + name = a_e_i_o_u_and_me_achievement_grand_wedding_tally + add = 1 + } + } + } + } + ## Black Dinner + if = { + limit = { + exists = global_var:started_black_dinner_achievement + is_ai = no + scope:activity = { + has_activity_option = { + category = special_type + option = wedding_type_bloody + } + } + NOR = { + has_variable = bloody_murder_fail + has_variable = bloody_wedding_backed_down_var + } + } + set_global_variable = { + name = finished_black_dinner_achievement + value = yes + } + } + } + } + # Free the officiant! + if = { + limit = { exists = scope:officiant } + scope:officiant = { + if = { + limit = { has_character_flag = need_priest_outfit } + remove_character_flag = need_priest_outfit + } + if = { + limit = { has_character_flag = officiant } + remove_character_flag = officiant + } + } + } + } + + ### Graphics + + map_entity = { + trigger = { + activity_location.culture = { + OR = { + has_graphical_iranian_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_steppe_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + } + } + } + reference = "building_mena_wedding_01_entity" + } + + map_entity = { + trigger = { + activity_location.culture = { + has_graphical_india_culture_group_trigger = yes + } + } + reference = "building_indian_wedding_01_entity" + } + + map_entity = "building_western_wedding_01_entity" + + # Travel + background = { # Bridge + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + is_riverside_province = yes + geographical_region = world_europe + OR = { + terrain = farmlands + terrain = plains + terrain = mountains + terrain = hills + } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_bridge.dds" + environment = "environment_travel_bridge" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #Rice Fields - If we have Paddy fields AND/or terraced hills + #This goes before other terrain since it can override in many different terrains if built + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + terrain = farmlands + OR = { + terrain = terraced_hills + has_building_or_higher = paddy_fields_01 + } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_rice_fields.dds" + environment = "environment_tgp_rice_fields" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_rice_fields" + } + + background = { #Farmlands - East Asia + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + terrain = farmlands + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_farm_asia.dds" + environment = "environment_tgp_farm_asia" + ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_farm_asia" + } + + background = { # Farmland, settled + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + terrain = farmlands + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_farm.dds" + environment = "environment_travel_farmlands" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { # Farmland, unsettled + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + terrain = farmlands + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/farms.dds" + environment = "environment_event_farms" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #Desert, settled + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_desert_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_desert.dds" + environment = "environment_travel_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + background = { #Desert, unsettled + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_desert_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/desert.dds" + environment = "environment_event_bp1_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { #forest snowy + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location ?= { hunt_snowy_forest_trigger = yes } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_hunt_snowy_forest.dds" + environment = "environment_hunt_snowy_forest" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #forest_pine + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_forest_pine_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/forest_pine.dds" + environment = "environment_event_forest_pine" + ambience = "event:/SFX/Events/Backgrounds/coniferous_forest_day" + } + + background = { #forest + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_forest_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/forest.dds" + environment = "environment_event_forest" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #mountains, settled + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_mountains_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_mountains.dds" + environment = "environment_travel_mountain_settlement" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + background = { #mountains, unsettled + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_mountains_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/mountains.dds" + environment = "environment_event_mountains" + ambience = "event:/SFX/Events/Backgrounds/mountains_day" + } + + background = { #steppe, settled + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_steppe_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_steppe.dds" + environment = "environment_travel_steppe_settlement" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + background = { #steppe, unsettled + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_steppe_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/steppe.dds" + environment = "environment_event_steppe" + ambience = "event:/SFX/Events/Backgrounds/steppe_day" + } + + background = { #drylands (formerly desert) + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_drylands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/drylands.dds" + environment = "environment_event_desert" + ambience = "event:/SFX/Events/Backgrounds/desert_day" + } + + background = { #wetlands + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_wetlands_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_wetlands.dds" + environment = "environment_event_bp1_wetlands" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #jungle + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_wilderness_jungle_trigger = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_jungle.dds" + environment = "environment_event_bp1_jungle" + ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" + } + + background = { #plains, settled + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_plains_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + environment = "environment_travel_hills_settlement" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { #plains, unsettled + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_plains_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_plains.dds" + environment = "environment_event_bp1_plains" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #hills, settled + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_hills_trigger = yes + exists = province_owner + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + environment = "environment_travel_hills_settlement" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + background = { #hills, unsettled + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + graphical_hills_trigger = yes + NOT = { exists = province_owner } + } + } + texture = "gfx/interface/illustrations/event_scenes/bp1_hills.dds" + environment = "environment_event_bp1_hills" + ambience = "event:/SFX/Events/Backgrounds/fields_farms_day" + } + + background = { #sea + trigger = { + scope:activity = { is_current_phase_active = no } + OR = { + scope:host.location != scope:activity.activity_location + AND = { + exists = scope:activity.special_guest:spouse_2.location + NOT = { + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + AND = { + exists = scope:activity.special_guest:spouse_1.location + NOT = { + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + } + } + } + scope:host.location = { + is_sea_province = yes + } + } + texture = "gfx/interface/illustrations/event_scenes/fp1_ocean.dds" + environment = "environment_event_fp1_ocean" + ambience = "event:/DLC/FP1/SFX/Events/event_ocean_longship" + } + # End Travel + background = { #Indian + trigger = { + activity_location ?= { + OR = { + culture ?= { has_graphical_india_culture_group_trigger = yes } + steppe_building_gfx_use_indian_trigger = yes + } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_wedding_ceremony_indian.dds" + environment = "environment_indian_wedding" + ambience = "event:/DLC/EP2/SFX/Events/Grand_Activities/Weddings/ep2_event_grand_wedding" + music = "weddingindia_cue" + } + background = { #East Asia + trigger = { + activity_location ?= { + OR = { + culture ?= { has_graphical_east_asia_culture_group_trigger = yes } + steppe_building_gfx_use_east_asian_trigger = yes + } + } + } + texture = "gfx/interface/illustrations/event_scenes/tgp_wedding_ceremony_asia.dds" + environment = "environment_tgp_wedding_ceremony_asia" + ambience = "event:/DLC/EP2/SFX/Events/Grand_Activities/Weddings/ep2_event_grand_wedding" + } + background = { #MENA (also steppes and African ) + trigger = { + OR = { + activity_location.culture = { has_graphical_iranian_culture_group_trigger = yes } + activity_location.culture = { has_graphical_mena_culture_group_trigger = yes } + activity_location.culture = { has_graphical_steppe_culture_group_trigger = yes } + activity_location.culture = { has_graphical_african_culture_group_trigger = yes } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_wedding_ceremony_mena.dds" + environment = "environment_mena_wedding" + ambience = "event:/DLC/EP2/SFX/Events/Grand_Activities/Weddings/ep2_event_grand_wedding" + music = "weddingmena_cue" + } + background = { # Western - Fallback + texture = "gfx/interface/illustrations/event_scenes/ep2_wedding_ceremony_western.dds" + environment = "environment_western_wedding" + ambience = "event:/DLC/EP2/SFX/Events/Grand_Activities/Weddings/ep2_event_grand_wedding" + music = "weddingwest_cue" + } + background = { # Bloody Wedding + trigger = { + scope:activity.var:spouse_2_var ?= { + is_alive = no + } + } + texture = "gfx/interface/illustrations/event_scenes/feast.dds" + environment = "environment_event_feast" + ambience = "event:/SFX/Events/Backgrounds/feasthall" + music = "murderfest_cue" + } + + window_characters = { + + guest = { + camera = camera_event_right + + effect = { + if = { + limit = { + OR = { + scope:activity = { is_current_phase_active = yes } + AND = { + scope:host.location = scope:activity.activity_location + OR = { + scope:host = scope:activity.special_guest:spouse_1 + scope:host = scope:activity.special_guest:spouse_2 + } + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + } + if = { + limit = { + any_attending_character = { + count >= 2 + location = scope:activity.activity_location + NOR = { + this = scope:host + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + OR = { + is_parent_of = scope:activity.special_guest:spouse_1 + is_parent_of = scope:activity.special_guest:spouse_2 + AND = { + exists = scope:activity.special_guest:spouse_2.court_owner + this = scope:activity.special_guest:spouse_2.court_owner + } + AND = { + exists = scope:activity.special_guest:spouse_1.court_owner + this = scope:activity.special_guest:spouse_1.court_owner + } + } + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + OR = { + is_parent_of = scope:activity.special_guest:spouse_1 + is_parent_of = scope:activity.special_guest:spouse_2 + AND = { + exists = scope:activity.special_guest:spouse_2.court_owner + this = scope:activity.special_guest:spouse_2.court_owner + } + AND = { + exists = scope:activity.special_guest:spouse_1.court_owner + this = scope:activity.special_guest:spouse_1.court_owner + } + } + } + add_to_list = characters + } + } + else = { + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + } + add_to_list = characters + } + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + always = yes + } + animation = { toast wedding_happy_cry wedding_drunk } + } + #Fallback + animation = toast + } + } + + host = { + camera = camera_event_center + + effect = { + if = { + limit = { + OR = { + AND = { + scope:activity = { is_current_phase_active = yes } + scope:host.location = scope:activity.activity_location + } + scope:host.location = { is_sea_province = yes } + } + NOR = { + scope:host = scope:activity.special_guest:spouse_1 + scope:host = scope:activity.special_guest:spouse_2 + } + } + scope:host = { + add_to_list = characters + } + } + } + scripted_animation = { + triggered_animation = { + trigger = { + scope:character.location = { is_sea_province = yes } + } + animation = { survey } + } + animation = admiration + } + } + + travel_host = { + camera = camera_event_horse_left + + effect = { + if = { + limit = { + scope:activity = { is_current_phase_active = no } + NOR = { + scope:host.location = scope:activity.activity_location + scope:host.location = { is_sea_province = yes } + } + NOR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + } + scope:host = { + add_to_list = characters + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { scope:character = { has_trait = impatient } } + animation = { jockey_gallop } + } + animation = jockey_walk + } + } + + officiant = { + camera = camera_event_right + + effect = { + if = { + limit = { + OR = { + scope:activity = { is_current_phase_active = yes } + AND = { + scope:host.location = scope:activity.activity_location + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + any_attending_character = { + location = scope:activity.activity_location + NOR = { + this = scope:host + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + has_character_flag = officiant + } + } + + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + has_character_flag = officiant + } + add_to_list = characters + } + } + } + + scripted_animation = { + animation = wedding_priest + } + } + + spouse_1 = { + camera = camera_event_center + + effect = { + if = { + limit = { + OR = { + scope:activity = { is_current_phase_active = yes } + special_guest:spouse_1.location = scope:activity.activity_location + special_guest:spouse_1.location = { is_sea_province = yes } + } + special_guest:spouse_1 = { is_alive = yes } + } + special_guest:spouse_1 = { + add_to_list = characters + } + } + } + scripted_animation = { + triggered_animation = { + trigger = { + scope:character.location = { is_sea_province = yes } + } + animation = { idle } + } + triggered_animation = { + trigger = { + special_guest:spouse_2 = { is_alive = yes } + OR = { + special_guest:spouse_2.location = scope:activity.activity_location + scope:activity = { is_current_phase_active = yes } + } + } + animation = reception_groom_left + } + animation = idle + } + } + + travel_spouse_1 = { + camera = camera_event_horse_left + + effect = { + if = { + limit = { + scope:activity = { is_current_phase_active = no } + NOR = { + special_guest:spouse_1.location = scope:activity.activity_location + special_guest:spouse_1.location = { is_sea_province = yes } + } + special_guest:spouse_1 = { is_alive = yes } + } + special_guest:spouse_1 = { + add_to_list = characters + } + } + } + scripted_animation = { + triggered_animation = { + trigger = { scope:character = { has_trait = impatient } } + animation = { jockey_gallop } + } + animation = jockey_walk + } + } + + spouse_2 = { + camera = camera_event_center + + effect = { + if = { + limit = { + OR = { + scope:activity = { is_current_phase_active = yes } + special_guest:spouse_2.location = scope:activity.activity_location + special_guest:spouse_2.location = { is_sea_province = yes } + } + special_guest:spouse_2 = { is_alive = yes } + } + special_guest:spouse_2 = { + add_to_list = characters + } + } + } + scripted_animation = { + triggered_animation = { + trigger = { + scope:character.location = { is_sea_province = yes } + } + animation = { idle } + } + triggered_animation = { + trigger = { + special_guest:spouse_1 = { is_alive = yes } + OR = { + special_guest:spouse_1.location = scope:activity.activity_location + scope:activity = { is_current_phase_active = yes } + } + } + animation = reception_bride_right + } + animation = idle + } + } + + travel_spouse_2 = { + camera = camera_event_horse_left + + effect = { + if = { + limit = { + scope:activity = { is_current_phase_active = no } + NOR = { + special_guest:spouse_2 = { is_alive = no } + special_guest:spouse_2.location = scope:activity.activity_location + special_guest:spouse_2.location = { is_sea_province = yes } + } + } + special_guest:spouse_2 = { + add_to_list = characters + } + } + } + scripted_animation = { + triggered_animation = { + trigger = { scope:character = { has_trait = impatient } } + animation = { jockey_gallop } + } + animation = jockey_walk + } + } + + guest = { + camera = camera_event_left + + effect = { + if = { + limit = { + OR = { + scope:activity = { is_current_phase_active = yes } + AND = { + scope:host.location = scope:activity.activity_location + scope:activity.special_guest:spouse_1.location ?= scope:activity.activity_location + scope:activity.special_guest:spouse_2.location ?= scope:activity.activity_location + } + } + } + + if = { + limit = { + any_attending_character = { + location = scope:activity.activity_location + NOR = { + this = scope:host + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + OR = { + is_parent_of = scope:activity.special_guest:spouse_1 + is_parent_of = scope:activity.special_guest:spouse_2 + AND = { + exists = scope:activity.special_guest:spouse_2.court_owner + this = scope:activity.special_guest:spouse_2.court_owner + } + AND = { + exists = scope:activity.special_guest:spouse_1.court_owner + this = scope:activity.special_guest:spouse_1.court_owner + } + } + } + } + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + OR = { + is_parent_of = scope:activity.special_guest:spouse_1 + is_parent_of = scope:activity.special_guest:spouse_2 + AND = { + exists = scope:activity.special_guest:spouse_2.court_owner + this = scope:activity.special_guest:spouse_2.court_owner + } + AND = { + exists = scope:activity.special_guest:spouse_1.court_owner + this = scope:activity.special_guest:spouse_1.court_owner + } + } + } + add_to_list = characters + } + } + else = { + every_attending_character = { + limit = { + location = scope:activity.activity_location + NOR = { + this = scope:host + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + } + add_to_list = characters + } + } + } + } + + scripted_animation = { + triggered_animation = { + trigger = { + always = yes + } + animation = { toast wedding_happy_cry wedding_drunk } + } + #Fallback + animation = toast + } + } + } +} diff --git a/common/character_interactions/00_character_interactions.txt b/common/character_interactions/00_character_interactions.txt new file mode 100644 index 00000000..85a81400 --- /dev/null +++ b/common/character_interactions/00_character_interactions.txt @@ -0,0 +1,2696 @@ +# Add general actions here, if any. + +offer_vassalization_interaction = { + category = interaction_category_vassal + icon = icon_vassal + + desc = offer_vassalization_interaction_desc + + ai_targets = { + ai_recipients = neighboring_rulers + } + ai_target_quick_trigger = { + adult = yes + } + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 12 + kingdom = 12 + empire = 12 + hegemony = 12 + } + + is_shown = { + scope:actor = { + is_landed = yes + } + scope:recipient = { + this != scope:actor + is_playable_character = yes + OR = { + AND = { + top_liege = this + is_tributary = no + } + is_tributary_of_suzerain_or_above = scope:actor + } + trigger_if = { + limit = { + scope:actor = { + NOT = { government_has_flag = government_is_mandala } + } + } + highest_held_title_tier < scope:actor.highest_held_title_tier + } + NOR = { + government_has_flag = cannot_be_vassal_or_liege + government_has_flag = government_is_herder + } + } + # Temujin cannot make Jamukha his subject once he leaves him + NOT = { + scope:actor = { + has_variable = had_mpo_temujin_flavor_0010 + var:had_mpo_temujin_flavor_0010 ?= scope:recipient + } + } + } + + is_valid_showing_failures_only = { + scope:actor = { + trigger_if = { + limit = { is_confederation_member = yes } + exists = house.house_confederation + } + trigger_if = { + limit = { + has_title = title:h_china + } + situation:dynastic_cycle ?= { + NOT = { + situation_current_phase = situation_dynastic_cycle_phase_instability + } + trigger_if = { + limit = { + situation_current_phase = situation_dynastic_cycle_phase_stability_advancement + } + scope:recipient = { + custom_tooltip = { + text = recipient_is_not_celestial_desc + government_has_flag = government_is_celestial + } + } + } + } + } + } + scope:recipient = { + is_at_war = no + is_confederation_member = no + + custom_description = { + text = was_recently_granted_independence + NOT = { + has_opinion_modifier = { + modifier = granted_independence_opinion + target = scope:actor + } + } + } + trigger_if = { + limit = { is_tributary = yes } + custom_tooltip = { + text = was_recently_granted_independence + scope:recipient.suzerain = scope:actor + } + } + trigger_if = { + limit = { + scope:actor = { government_has_flag = government_is_mandala } + } + highest_held_title_tier < scope:actor.highest_held_title_tier + } + } + } + + greeting = positive + notification_text = OFFER_VASSALIZATION_INTERACTION_NOTIFICATION + + cost = { + influence = { + value = 0 + if = { + limit = { scope:influence_send_option = yes } + add = scope:actor.medium_influence_value + desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION + } + } + piety = { + value = 0 + scope:actor = { + if = { + limit = { government_has_flag = government_is_mandala } + add = medium_piety_value + } + } + } + } + + ai_min_reply_days = 5 + ai_max_reply_days = 10 + + ai_accept = { + base = -50 + # MAIN + # Heretic/Infidel modifier. + # Tier difference modifier. + # Dejure modifier. + # Distant/Remote Realm modifier. + # Military power difference modifier. + + # MINOR + # Rivalry modifier. + # Same Dynasty modifier. + # Cultural/Cultural Group modifiers. + # Ageism modifier vs kids. + # Ruler Legitimacy modifier. + # Claimant modifier. + # FP3 Piety Level modifier. + + # OPINION SCALES + # Dread + # Compare Opinion modifier. + + #ALL these modifiers are also used in impress_intent_vassalization_acceptance_value, keep them synced + + # PERKS + modifier = { # Perk boost + desc = offer_vassalization_true_ruler_perk_tt + trigger = { + scope:actor = { has_perk = true_ruler_perk } + } + add = true_ruler_value + } + modifier = { # Education 5 boost + desc = offer_vassalization_education_diplomacy_5_tt + trigger = { + scope:actor = { has_trait_with_flag = offer_vassalisation_25 } + } + add = 25 + } + + # EVENTS - temporary bonuses gained by events + modifier = { + desc = event_bonus_to_vassal_accept_tt + trigger = { + scope:actor = { has_character_modifier = event_bonus_to_vassal_accept } + } + add = 20 + } + + + # STRUGGLES - bonus gained by successful Sway scheme during the Persian Struggle + modifier = { + desc = fp3_persian_struggle_previously_swayed_tt + trigger = { + scope:recipient = { + has_opinion_modifier = { + modifier = scheme_sway_and_compelled_to_submit_opinion + target = scope:actor + } + } + } + add = 20 + } + + modifier = { #Rekindler of Iran + desc = fp3_rekindler_of_iran_modifier_reason + trigger = { + AND = { + scope:actor = { dynasty ?={ has_dynasty_modifier = fp3_rekindler_of_iran_modifier } } + scope:recipient = { culture = { has_cultural_pillar = heritage_iranian } } + } + } + add = 20 + } + + # OBEDIENCE + modifier = { + desc = obedient_interaction_reason + trigger = { + is_obedient_to = scope:actor + } + add = 20 + } + + modifier = { # Cultural Acceptance + add = offer_vassalage_acceptance_value + desc = cultural_acceptance_interaction_reason + trigger = { + scope:actor = { + NOR = { + has_same_culture_as = scope:recipient + government_has_flag = government_is_nomadic # Nomads do not care about Culture + has_trait = nomadic_philosophy + } + culture = { + cultural_acceptance = { target = scope:recipient.culture value <= 90 } + } + } + } + } + + modifier = { #Has no Available Vassal Limit + desc = offer_vassalization_interaction_aibehavior_vassal_limit_tt + trigger = { + scope:actor = { + vassal_limit_available < 1 + } + } + add = { + value = -1000 + } + } + + + # MAIN + modifier = { #Different faith, no pluralism. + desc = offer_vassalization_interaction_aibehavior_differentfaith_tt + trigger = { + scope:actor = { + NOR = { # Nomads do not care about Faith + government_has_flag = government_is_nomadic + has_trait = nomadic_philosophy + } + } + scope:recipient = { + NOR = { #Of two different faiths AND the potential vassal's faith is not pluralistic. + faith = scope:actor.faith + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + } + add = { + value = -40 + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_hostile_level + } + } + } + add = -40 + } + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_evil_level + } + } + } + add = -40 + } + } + } + + modifier = { #Different faith, pluralism. + desc = offer_vassalization_interaction_aibehavior_differentfaith_tt + trigger = { + scope:actor = { + NOR = { # Nomads do not care about Faith + government_has_flag = government_is_nomadic + has_trait = nomadic_philosophy + } + } + scope:recipient = { + faith != scope:actor.faith + NOT = { + scope:actor.faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + add = { + value = -20 + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_hostile_level + } + } + } + add = -20 + } + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_evil_level + } + } + } + add = -20 + } + } + } + + modifier = { #Different faith, both have pluralism. + desc = offer_vassalization_interaction_aibehavior_differentfaith_tt + trigger = { + scope:actor = { + NOR = { # Nomads do not care about Faith + government_has_flag = government_is_nomadic + has_trait = nomadic_philosophy + } + } + scope:recipient = { + faith != scope:actor.faith + scope:actor.faith = { has_doctrine = doctrine_pluralism_pluralistic } + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + add = { + value = -10 + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_hostile_level + } + } + } + add = -10 + } + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_evil_level + } + } + } + add = -10 + } + } + } + modifier = { #I am a King! Or Emperor! + desc = offer_vassalization_interaction_aibehavior_hightier_tt + trigger = { + NAND = { + scope:actor = { + government_has_flag = government_is_celestial + highest_held_title_tier >= tier_hegemony + } + scope:recipient = { + government_has_flag = government_is_celestial + } + } + scope:recipient = { highest_held_title_tier >= tier_kingdom } + } + add = { + value = -50 + if = { + limit = { + scope:recipient = { + OR = { + government_has_flag = government_is_republic + government_has_flag = government_is_theocracy + } + } + } + add = -50 + } + if = { + limit = { + scope:recipient.sub_realm_size >= 10 + } + add = -50 + } + if = { + limit = { + scope:recipient.sub_realm_size >= 20 + } + add = -100 + } + if = { + limit = { + scope:recipient = { highest_held_title_tier = tier_empire } + } + multiply = 1.5 # We bump this up for emperors + } + } + } + modifier = { #We just fought against each other. + desc = offer_vassalization_interaction_aibehavior_recent_war_tt + trigger = { + scope:recipient = { + any_truce_holder = { + this = scope:actor + } + } + # Ensure the truce wasn't purchased and is indeed from a war + scope:actor = { + NOT = { + has_purchased_truce_with_char = { TARGET = scope:recipient } + } + } + scope:recipient = { + NOT = { + has_purchased_truce_with_char = { TARGET = scope:actor } + } + } + } + add = -50 + } + modifier = { #I fought an independence war against you. + desc = offer_vassalization_interaction_aibehavior_independence_war_tt + trigger = { + scope:recipient = { + exists = var:independence_war_former_liege + var:independence_war_former_liege = scope:actor + } + } + add = -200 + } + modifier = { # I am Tribal and you are not + desc = interaction_tribal_vs_nontribal + trigger = { + scope:recipient = { + government_has_flag = government_is_tribal + } + scope:actor = { + NOT = { government_has_flag = government_is_tribal } + } + } + add = -20 + } + modifier = { # You are Tribal and I am not + desc = interaction_nontribal_vs_tribal + trigger = { + scope:actor = { + government_has_flag = government_is_tribal + } + scope:recipient = { + NOT = { government_has_flag = government_is_tribal } + } + } + add = -20 + } + modifier = { # I am Nomadic and you are Nomadic + desc = interaction_is_nomadic + trigger = { + scope:recipient = { + government_has_flag = government_is_nomadic + } + scope:actor = { + government_has_flag = government_is_nomadic + } + } + add = -50 + } + modifier = { # I am Nomadic and you are not + desc = interaction_nomadic_vs_nonnomadic + trigger = { + scope:recipient = { + government_has_flag = government_is_nomadic + } + scope:actor = { + NOT = { government_has_flag = government_is_nomadic } + } + } + add = -75 + } + modifier = { # You are Nomadic and I am not + desc = interaction_nonnomadic_vs_nomadic + trigger = { + scope:actor = { + government_has_flag = government_is_nomadic + } + scope:recipient = { + NOT = { government_has_flag = government_is_nomadic } + } + } + add = -75 + } + modifier = { # Isolationist tradition + desc = isolationist_reason + trigger = { + scope:actor.culture != scope:recipient.culture + scope:recipient.culture = { + has_cultural_tradition = tradition_isolationist + } + } + add = -20 + } + modifier = { #Bankrupt + desc = bankrupt_reason + trigger = { + scope:actor.gold <= -1 + } + add = -100 + } + modifier = { #Wide difference in rank + desc = offer_vassalization_interaction_aibehavior_widetitletier_tt + trigger = { + scope:actor = { + OR = { + NOT = { government_has_flag = government_is_celestial } + scope:recipient = { + NOT = { government_has_flag = government_is_celestial } + } + } + tier_difference = { + target = scope:recipient + value > 1 + } + } + } + add = 10 + } + modifier = { #Wide difference in rank (Celestial to Celestial) + desc = offer_vassalization_interaction_aibehavior_widetitletier_tt + trigger = { + scope:actor = { + government_has_flag = government_is_celestial + tier_difference = { + target = scope:recipient + value > 1 + } + } + scope:recipient = { + government_has_flag = government_is_celestial + } + } + add = { + value = 20 + multiply = { + value = scope:actor.highest_held_title_tier + subtract = scope:recipient.highest_held_title_tier + } + } + } + modifier = { # Is a Hegemon + desc = offer_vassalization_interaction_aibehavior_hegemony_tt + trigger = { + scope:actor = { highest_held_title_tier = tier_hegemony } + } + add = 10 + } + modifier = { # Allied + desc = offer_vassalization_interaction_aibehavior_allied_tt + trigger = { + scope:recipient = { + is_allied_to = scope:actor + } + } + add = 20 + } + modifier = { # Is the Rightful Liege of recipient + desc = offer_vassalization_interaction_aibehavior_rightfulliegetitleholder_tt + trigger = { + scope:actor = { is_rightful_liege_of = scope:recipient } + } + add = 20 + } + modifier = { #Is not the Rightful Liege of recipient + desc = offer_vassalization_interaction_aibehavior_not_rightfulliegetitleholder_tt + trigger = { + NOT = { + scope:actor = { is_rightful_liege_of = scope:recipient } + } + } + add = -20 + } + modifier = { # Encircled + desc = offer_vassalization_interaction_aibehavior_encircled_tt + trigger = { + scope:recipient = { + NOT = { + any_neighboring_top_liege_realm_owner = { + this != scope:actor + } + } + NOT = { + any_realm_county = { + is_coastal_county = yes + } + } + } + } + add = 20 + } + modifier = { #Distant Realm — Overseas Connection + desc = offer_vassalization_interaction_aibehavior_distantrealm_tt + trigger = { + scope:actor = { + character_is_realm_neighbor = scope:recipient + NOT = { #Ibiza should want to be a vassal of Mallorca, etc. + character_is_land_realm_neighbor = scope:recipient + scope:actor = { is_rightful_liege_of = scope:recipient } + } + } + } + add = -100 + } + modifier = { #Distant Realm — No Connection + desc = offer_vassalization_interaction_aibehavior_distantrealm_tt + trigger = { + scope:actor = { + NOT = { + character_is_realm_neighbor = scope:recipient + } + } + scope:recipient.capital_province = { squared_distance = { target = scope:actor.capital_province value < 200000 } } + } + add = -250 + } + modifier = { #Remote Realm. + desc = offer_vassalization_interaction_aibehavior_remoterealm_tt + trigger = { + scope:actor = { + NOT = { + character_is_realm_neighbor = scope:recipient + } + } + scope:recipient.capital_province = { squared_distance = { target = scope:actor.capital_province value >= 200000 } } + } + add = -500 + } + modifier = { #Military Strength + desc = offer_vassalization_interaction_aibehavior_power_tt + add = { + value = 1 + subtract = { + value = scope:recipient.max_military_strength # Intended for recipient to use max, to avoid having vassalizations become too easy for weakened realms + divide = { value = scope:actor.current_military_strength min = 1 } + } + multiply = 20 + ceiling = yes + } + } + modifier = { #Vassal opinion + desc = offer_vassalization_interaction_aibehavior_vassal_opinion_tt + trigger = { + scope:actor = { number_of_powerful_vassals >= 1 } + } + + add = { + value = 0 + scope:actor = { + every_powerful_vassal = { + if = { + limit = { + save_temporary_opinion_value_as = { + name = vassal_opinion + target = scope:actor + } + } + add = scope:vassal_opinion + } + } + + if = { + limit = { + number_of_powerful_vassals > 0 + } + divide = number_of_powerful_vassals + } + else = { + divide = 5 + } + } + + divide = 5 + } + } + + # MINOR + modifier = { #Friend modifier. + desc = offer_vassalization_interaction_aibehavior_friend_tt + trigger = { + scope:recipient = { + has_relation_friend = scope:actor + NOT = { has_relation_best_friend = scope:actor } + } + } + add = 10 + } + modifier = { #Best Friend modifier. + desc = offer_vassalization_interaction_aibehavior_best_friend_tt + trigger = { + scope:recipient = { + has_relation_best_friend = scope:actor + } + } + add = 20 + } + modifier = { #Lover modifier. + desc = interaction_lover + trigger = { + scope:recipient = { + has_relation_lover = scope:actor + NOT = { has_relation_soulmate = scope:actor } + } + } + add = 10 + } + modifier = { #Soulmate modifier. + desc = interaction_soulmate + trigger = { + scope:recipient = { + has_relation_soulmate = scope:actor + } + } + add = 20 + } + modifier = { #Rivalry modifier. + desc = offer_vassalization_interaction_aibehavior_rival_tt + trigger = { + scope:recipient = { + has_relation_rival = scope:actor + NOT = { has_relation_nemesis = scope:actor } + } + } + add = -100 + } + modifier = { #Nemesis modifier. + desc = offer_vassalization_interaction_aibehavior_nemesis_tt + trigger = { + scope:recipient = { + has_relation_nemesis = scope:actor + } + } + add = -1000 + } + modifier = { #Same Dynasty modifier. + desc = offer_vassalization_interaction_aibehavior_dynasty_tt + trigger = { + scope:recipient = { + dynasty = scope:actor.dynasty + } + } + add = 5 + } + + modifier = { # Same language + add = 5 + desc = speaks_same_language_interaction_reason + trigger = { + scope:actor = { + knows_language_of_culture = scope:recipient.culture + } + } + } + + modifier = { # Iberian Struggle, less likely for outsiders to vassalize inside + add = -35 + desc = iberian_struggle_reason_reason + trigger = { + scope:actor = { + NOT = { + any_character_struggle = { is_struggle_type = iberian_struggle } + } + } + scope:recipient = { + any_character_struggle = { is_struggle_type = iberian_struggle } + } + } + } + + modifier = { #Ageism modifier vs kids. + desc = offer_vassalization_interaction_aibehavior_child_tt + trigger = { + scope:actor = { + age < 12 + } + scope:recipient = { + age > 16 + } + } + add = -5 + } + modifier = { #Illegitimacy modifier. + desc = offer_vassalization_interaction_aibehavior_illegitimate_tt + trigger = { + scope:actor = { + OR = { + AND = { + has_trait = bastard + scope:recipient = { + faith = { NOT = { has_doctrine = doctrine_bastardry_none } } + } + } + has_trait = denounced + has_trait = disinherited + } + } + } + add = -10 + } + + modifier = { #Claimant modifier. + desc = offer_vassalization_interaction_aibehavior_claimant_tt + trigger = { + scope:actor.primary_title = { + scope:recipient = { + has_claim_on = prev + } + } + } + add = -20 + } + + modifier = { # Ambitious + desc = TAKE_THE_VOWS_AMBITIOUS + trigger = { + scope:recipient = { + has_trait = ambitious + } + } + add = -20 + } + + modifier = { # Paranoid + desc = INTERACTION_PARANOID + trigger = { + scope:recipient = { + has_trait = paranoid + } + } + add = -20 + } + + modifier = { # Arrogant + desc = INTERACTION_ARROGANT + trigger = { + scope:recipient = { + has_trait = arrogant + } + } + add = -20 + } + + modifier = { # Fickle + desc = INTERACTION_FICKLE + trigger = { + scope:recipient = { + has_trait = fickle + } + } + add = -10 + } + + modifier = { # Stubborn + desc = INTERACTION_STUBBORN + trigger = { + scope:recipient = { + has_trait = stubborn + } + } + add = -10 + } + + modifier = { # Trusting + desc = TAKE_THE_VOWS_TRUSTING + trigger = { + scope:recipient = { + has_trait = trusting + } + } + add = 5 + } + + modifier = { # Content + desc = INTERACTION_CONTENT + trigger = { + scope:recipient = { + has_trait = content + } + } + add = 5 + } + + modifier = { # FP3 modifier. + desc = GENERIC_YOUR_PIETY_LEVEL_MODIFIER + trigger = { scope:actor = { any_character_struggle = { has_struggle_phase_parameter = piety_level_affects_vassalage_acceptance } } } + add = { + value = { + value = scope:actor.piety_level + subtract = low_piety_level + } + multiply = 10 + } + } + + # OPINION INFLUENCE + modifier = { + add = intimidated_external_reason_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 1 + } + } + desc = INTIMIDATED_REASON + } + modifier = { + add = cowed_external_reason_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 2 + } + } + desc = COWED_REASON + } + opinion_modifier = { #Compare Opinion modifier - Clans care more about opinion + trigger = { + scope:actor = { + government_has_flag = government_is_clan + } + scope:recipient = { + government_has_flag = government_is_clan + } + } + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.7 + } + opinion_modifier = { #Compare Opinion modifier. + trigger = { + NOT = { + scope:actor = { government_has_flag = government_is_mandala } #Has their own Opinion modifier + } + OR = { + scope:actor = { + NOT = { government_has_flag = government_is_clan } + } + scope:recipient = { + NOT = { government_has_flag = government_is_clan } + } + } + } + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.35 + } + + # DIPLOMATIC COURT GRANDEUR BONUS + modifier = { + trigger = { + scope:actor = { + has_royal_court = yes + has_dlc_feature = royal_court + has_court_type = court_diplomatic + court_grandeur_current_level >= 1 + } + } + add = { + value = scope:actor.court_grandeur_current + if = { + limit = { # Reduce the bonus if you are below your expected level + scope:actor = { + court_grandeur_current_level < court_grandeur_minimum_expected_level + } + } + multiply = 0.15 + } + else = { + multiply = 0.3 + } + } + desc = DIPLOMATIC_COURT_ACCEPTANCE_INCREASE_REASON + } + + # CONTRACT OPTIONS + modifier = { + add = 60 + scope:recipient = { government_has_flag = government_is_feudal } + scope:religious_exemption = yes + desc = CONTRACT_RELIGIOUS_EXEMPTION_REASON + } + modifier = { + add = 30 + scope:recipient = { government_has_flag = government_is_clan } + scope:religious_exemption_clan = yes + desc = CONTRACT_RELIGIOUS_EXEMPTION_REASON + } + modifier = { + add = 30 + scope:recipient = { government_has_flag = government_is_feudal } + scope:low_obligations = yes + desc = CONTRACT_LOW_TAXES_REASON + } + modifier = { + add = -40 + scope:recipient = { government_has_flag = government_is_feudal } + scope:high_obligations = yes + desc = CONTRACT_HIGH_TAXES_REASON + } + + # INSPECTION BONUSES + modifier = { + desc = "INSPECTION_REASON" + add = 5 + scope:recipient = { + has_variable_list = lesser_inspection_bonus + is_target_in_variable_list = { + name = lesser_inspection_bonus + target = scope:actor + } + } + } + modifier = { + desc = "INSPECTION_REASON" + add = 10 + scope:recipient = { + has_variable_list = inspection_bonus + is_target_in_variable_list = { + name = inspection_bonus + target = scope:actor + } + } + } + modifier = { + desc = "INSPECTION_REASON_REWARD" + add = 10 + scope:recipient = { + has_variable_list = inspection_reward + is_target_in_variable_list = { + name = inspection_reward + target = scope:actor + } + } + } + modifier = { + desc = "INSPECTION_REASON_REWARD_FOCUSED" + add = 10 + scope:actor = { has_character_modifier = inspection_reward_focused_vassal_acceptance } + } + + # LOW LEGITIMACY + modifier = { + desc = "LOW_LEGITIMACY_REASON" + add = -25 + scope:actor = { + has_legitimacy_flag = reduced_vassalization_acceptance + } + } + modifier = { + desc = "LOW_LEGITIMACY_REASON" + add = -50 + scope:actor = { + has_legitimacy_flag = very_reduced_vassalization_acceptance + } + } + modifier = { + desc = "LOW_LEGITIMACY_REASON" + add = -75 + scope:actor = { + has_legitimacy_flag = massively_reduced_vassalization_acceptance + } + } + + # HIGH LEGITIMACY + modifier = { + desc = "HIGH_LEGITIMACY_REASON" + add = 25 + scope:actor = { + has_legitimacy_flag = increased_vassalization_acceptance + } + } + modifier = { + desc = "HIGH_LEGITIMACY_REASON" + add = 50 + scope:actor = { + has_legitimacy_flag = very_increased_vassalization_acceptance + } + } + modifier = { + desc = "HIGH_LEGITIMACY_REASON" + add = 75 + scope:actor = { + has_legitimacy_flag = extra_increased_vassalization_acceptance + } + } + + # INFLUENCE + modifier = { + add = 25 + scope:influence_send_option = yes + desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION + } + + #HISTORICALLY ADMIN PEOPLES WANT TO BE ADMIN + modifier = { + add = 30 + scope:actor = { + government_has_flag = government_is_administrative + } + scope:recipient = { + culture = { + OR = { + this = culture:greek + any_parent_culture_or_above = { + this = culture:greek + } + this = culture:han + any_parent_culture_or_above = { + this = culture:han + } + } + } + } + + desc = "HISTORICAL_ADMIN_REASON" + } + + modifier = { # AI-only weights, keep the pope from vassalizing too fast + trigger = { + exists = faith:catholic.religious_head + faith:catholic.religious_head = scope:actor + scope:actor = { is_ai = yes } + } + add = -50 + } + + modifier = { + scope:actor = { + has_variable = severed_head_vassalization + var:severed_head_vassalization = { + this = scope:recipient + } + } + add = 200 + desc = COWED_BY_SEVERED_HEAD_MODIFIER + } + + #ALL these modifiers are also used in impress_intent_vassalization_acceptance_value, keep them synced + + #Mandala + #Mandala Tributaries should not want to be vassals + modifier = { + scope:recipient = { is_tributary_of = scope:actor } + scope:actor = { government_has_flag = government_is_mandala } + add = -35 + desc = is_tributary_of_me_mandala + } + + modifier = { + scope:recipient = { government_has_flag = government_is_mandala } + scope:actor = { government_has_flag = government_is_mandala } + add = -25 + desc = is_mandala_government + } + + #Your Radiance + modifier = { + scope:actor = { has_mandala_capital_trigger = yes } + add = scope:actor.mandala_radiance_value + desc = actor_positive_mandala_radiance + } + + #Tributary Realm Size + subject_realm_size_lose_weight_modifier = { + DEVARAJA = scope:actor + SUBJECT = scope:recipient + } + + #Do they like you? + opinion_modifier = { + trigger = { + scope:actor = { government_has_flag = government_is_mandala } + } + who = scope:recipient + opinion_target = scope:actor + multiplier = 1 + } + } + + # Low starting obligations + send_option = { + is_shown = { + scope:recipient = { + government_has_flag = government_is_feudal + } + } + flag = low_obligations + localization = low_obligations + } + + # Medium starting obligations + send_option = { + is_shown = { + scope:recipient = { + government_has_flag = government_is_feudal + } + } + flag = normal_obligations # If selected then scope:flag_name will be set to yes + localization = normal_obligations # Loc_key for option label + starts_enabled = { always = yes } # Trigger for whether this should be on when the window opens. If not defined, defaults to off + + } + + # High starting obligations + send_option = { + is_shown = { + scope:recipient = { + government_has_flag = government_is_feudal + } + } + flag = high_obligations # If selected then scope:flag_name will be set to yes + localization = high_obligations # Loc_key for option label + } + + # Low starting obligations + religious exemption + send_option = { + is_shown = { + scope:recipient = { + government_has_flag = government_is_feudal + } + } + is_valid = { + scope:recipient.faith != scope:actor.faith + } + flag = religious_exemption + localization = religious_exemption + } + + # Religious exemption, for clans + send_option = { + is_shown = { + scope:recipient = { + government_has_flag = government_is_clan + } + } + is_valid = { + scope:recipient.faith != scope:actor.faith + } + flag = religious_exemption_clan + localization = religious_exemption + } + + # Nothing, for clans + send_option = { + is_shown = { + scope:recipient = { + government_has_flag = government_is_clan + } + } + is_valid = { + always = yes + } + flag = no_exemption_clan + localization = no_exemption + } + + send_option = { # EP3 Influence + is_shown = { + scope:actor = { + government_has_flag = government_has_influence + } + } + is_valid = { + scope:actor = { influence >= medium_influence_value } + } + flag = influence_send_option + localization = TRADE_INFLUENCE_FOR_BETTER_AI_ACCEPTANCE + } + + send_options_exclusive = yes + + on_accept = { + offer_vassalization_interaction_effect = yes + scope:actor = { + trigger_event = char_interaction.0001 + + ## Remove bonus, it's been used + if = { + limit = { has_character_modifier = event_bonus_to_vassal_accept } + remove_character_modifier = event_bonus_to_vassal_accept + } + + if = { # FP3 + limit = { any_character_struggle = { has_struggle_phase_parameter = offer_vassalization_removes_disloyalty } } + scope:recipient = { remove_trait = disloyal } + } + } + } + + on_decline = { + scope:actor = { + trigger_event = char_interaction.0002 + } + } + + ai_potential = { + is_adult = yes + top_liege = this + highest_held_title_tier > tier_county + vassal_limit_available > 1 + } + + ai_will_do = { + base = 100 + + # AI prefers to receive higher obligations from their vassals when possible. + modifier = { + factor = 3 + scope:normal_obligations = yes + } + + modifier = { + factor = 4 + scope:high_obligations = yes + } + + # Cynical rulers are happy to offer religious protection to potential vassals, but only when it makes them accept a vassalization offer they would otherwise refuse. + # Zealous rulers become increasingly reluctant to offer religious protection, as they want to enforce religious homogeneity in their realm. + modifier = { + add = { + value = ai_zeal + multiply = -2 + max = 1 + } + scope:religious_exemption = yes + } + + + modifier = { # If the recipient is a player, do not bother sending + factor = 0 + scope:recipient = { + is_ai = no + } + } + } +} + +offer_fealty_interaction = { + category = interaction_category_vassal + icon = icon_liege + + desc = offer_fealty_interaction_desc + + is_shown = { + scope:recipient = { + this != scope:actor + is_landed = yes + top_liege = this # Target has to be independent + } + scope:actor.highest_held_title_tier < scope:recipient.highest_held_title_tier + scope:actor = { + OR = { + is_landed = yes + AND = { + government_has_flag = government_is_landless_minority + scope:recipient = { + any_held_title = { + title_tier = county + any_county_province = { + this = scope:actor.domicile.domicile_location + } + } + } + } + } + top_liege = this # You have to be independent - This check exists to prevent a lot of edge-cases where you can change liege + NOT = { government_has_flag = cannot_be_vassal_or_liege } + is_confederation_member = no + } + } + + is_valid_showing_failures_only = { + scope:actor = { + is_imprisoned = no + is_at_war = no + } + scope:recipient = { + custom_description = { + text = "offer_fealty_neighboring_condition" + subject = scope:recipient + OR = { + any_neighboring_and_across_water_top_liege_realm_owner = { this = scope:actor } + any_held_title = { + is_de_jure_liege_or_above_target = scope:actor.capital_barony + } + } + } + #making sure that if this gov types got land you won't be able to swear fealty to them + NOR = { + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_holy_order + government_has_flag = government_is_mercenary + } + } + } + + greeting = positive + notification_text = OFFER_FEALTY_INTERACTION_NOTIFICATION + + ai_min_reply_days = 5 + ai_max_reply_days = 10 + + ai_accept = { + base = 50 + # MAIN + # Heretic/Infidel modifier. + # Tier difference modifier. + # Dejure modifier. + # Distant/Remote Realm modifier. + + # MINOR + # Rivalry modifier. + # Same Dynasty modifier. + # Cultural/Cultural Group modifiers. + # Claimant modifier. + + # OPINION SCALES + # Personality modifier. + # Compare Opinion modifier. + + modifier = { # Different faith, no pluralism. + desc = offer_vassalization_interaction_aibehavior_differentfaith_tt + trigger = { + scope:actor = { + NOR = { # Of two different faiths AND the potential vassal's faith is not pluralistic. + faith = scope:recipient.faith + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + } + add = { + value = -25 + if = { + limit = { + scope:actor.faith = { + faith_hostility_level = { + target = scope:recipient.faith + value >= faith_hostile_level + } + } + } + add = -10 + } + if = { + limit = { + scope:actor.faith = { + faith_hostility_level = { + target = scope:recipient.faith + value >= faith_evil_level + } + } + } + add = -25 + } + } + } + + modifier = { # I am a King! + desc = offer_fealty_interaction_aibehavior_hightier_tt + trigger = { + scope:actor = { + highest_held_title_tier >= tier_kingdom + } + } + add = -10 + } + modifier = { # Wide difference in rank + desc = offer_vassalization_interaction_aibehavior_widetitletier_tt + trigger = { + scope:actor = { + tier_difference = { + target = scope:recipient + value > 1 + } + } + } + add = 20 + } + modifier = { # They are my Rightful Liege + desc = offer_vassalization_interaction_aibehavior_rightfulvassaltitleholder_tt + trigger = { + scope:recipient = { is_rightful_liege_of = scope:actor } + } + add = 25 + } + modifier = { # Distant Realm. + desc = offer_vassalization_interaction_aibehavior_distantrealm_tt + trigger = { + scope:actor = { + NOT = { + any_neighboring_top_liege_realm_owner = { this = scope:recipient } + } + } + scope:actor.capital_province = { squared_distance = { target = scope:recipient.capital_province value < 200000 } } + } + add = -15 + } + modifier = { # Remote Realm. + desc = offer_vassalization_interaction_aibehavior_remoterealm_tt + trigger = { + scope:actor = { + NOT = { + any_neighboring_top_liege_realm_owner = { this = scope:recipient } + } + } + trigger_if = { + limit = { + exists = scope:recipient.suzerain + scope:recipient.suzerain != scope:actor + } + } + scope:actor.capital_province = { squared_distance = { target = scope:recipient.capital_province value >= 200000 } } + } + add = -25 + } + + # MINOR + modifier = { # Rivalry modifier. + desc = offer_vassalization_interaction_aibehavior_rival_tt + trigger = { + scope:recipient = { + has_relation_rival = scope:actor + NOT = { has_relation_nemesis = scope:actor } + } + } + add = -10 + } + modifier = { # Nemesis modifier. + desc = offer_vassalization_interaction_aibehavior_nemesis_tt + trigger = { + scope:recipient = { + has_relation_nemesis = scope:actor + } + } + add = -100 + } + modifier = { # Same Dynasty modifier. + desc = offer_vassalization_interaction_aibehavior_dynasty_tt + trigger = { + scope:recipient = { + dynasty = scope:actor.dynasty + } + } + add = 10 + } + + modifier = { # Cultural Acceptance + add = -5 + desc = cultural_acceptance_interaction_reason + trigger = { + scope:actor = { + NOT = { has_same_culture_as = scope:recipient } + culture = { + cultural_acceptance = { target = scope:recipient.culture value < 50 } + } + } + } + } + + modifier = { # Same language + add = 5 + desc = speaks_same_language_interaction_reason + trigger = { + scope:actor = { + knows_language_of_culture = scope:recipient.culture + } + } + } + + modifier = { # Claimant modifier. + desc = offer_vassalization_interaction_aibehavior_claimant_tt + trigger = { + scope:actor.primary_title = { + scope:recipient = { + has_claim_on = prev + } + } + } + add = -15 + } + + # PERSONALITY + ai_value_modifier = { + ai_greed = 0.75 + min = 0 + } + + # OPINION INFLUENCE + opinion_modifier = { # Compare Opinion modifier. + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.5 + } + + # CONTRACT OPTIONS + modifier = { + add = { + value = -10 + if = { + limit = { scope:recipient = { has_trait = zealous } } + add = -30 + } + else_if = { + limit = { scope:recipient = { has_trait = cynical } } + add = 30 + } + } + scope:actor = { government_has_flag = government_is_feudal } + scope:religious_taxation = yes + desc = CONTRACT_RELIGIOUS_TAXATION_REASON + } + modifier = { + add = -40 + scope:actor = { government_has_flag = government_is_feudal } + scope:low_obligations = yes + desc = CONTRACT_LOW_TAXES_REASON + } + modifier = { + add = 40 + scope:actor = { government_has_flag = government_is_feudal } + scope:high_obligations = yes + desc = CONTRACT_HIGH_TAXES_REASON + } + modifier = { + add = { + value = -10 + if = { + limit = { scope:recipient = { has_trait = zealous } } + add = -30 + } + else_if = { + limit = { scope:recipient = { has_trait = cynical } } + add = 30 + } + } + scope:actor = { government_has_flag = government_is_clan } + scope:religious_exemption_clan = yes + desc = CONTRACT_RELIGIOUS_EXEMPTION_REASON + } + # EP3 + modifier = { # cowed from an emperor's impressive visit + add = 10 + desc = cowed_from_visit_interaction_reason + trigger = { + scope:actor = { + has_character_flag = cowed_increased_vassalization_acceptance + } + } + } + #Confederation wants same-culture rulers + modifier = { + add = 100 + desc = CONFEDERATION_CULTURE_REASON + scope:recipient = { + is_confederation_member = yes + culture = { + this = scope:actor.culture + } + } + } + + #Greatest of Khans and Mongol Emperor would prefer submission with tribute + modifier = { + add = -150 + desc = GOK_PREFER_SUBMISSION + scope:recipient = { + highest_held_title_tier >= tier_empire + any_owned_story = { + OR = { + story_type = story_mongol_invasion + story_type = story_greatest_of_khans + } + } + } + } + } + + # Low starting obligations + send_option = { + is_shown = { + scope:actor = { + government_has_flag = government_is_feudal + } + } + flag = low_obligations + localization = low_obligations + } + + # Medium starting obligations + send_option = { + is_shown = { + scope:actor = { + government_has_flag = government_is_feudal + } + } + flag = normal_obligations + localization = normal_obligations + starts_enabled = { always = yes } + + } + + # High starting obligations + send_option = { + is_shown = { + scope:actor = { + government_has_flag = government_is_feudal + } + } + flag = high_obligations + localization = high_obligations + } + + # Medium-high starting obligations + religious protection + send_option = { + is_shown = { + scope:actor = { + government_has_flag = government_is_feudal + } + } + is_valid = { + scope:recipient.faith != scope:actor.faith + } + flag = religious_taxation + localization = religious_taxation + } + + # Religious exemption, for clans + send_option = { + is_shown = { + scope:actor = { + government_has_flag = government_is_clan + } + } + is_valid = { + scope:recipient.faith != scope:actor.faith + } + flag = religious_exemption_clan + localization = religious_exemption + } + + # Nothing, for clans + send_option = { + is_shown = { + scope:actor = { + government_has_flag = government_is_clan + } + } + is_valid = { + always = yes + } + flag = no_exemption_clan + localization = no_exemption + } + + send_options_exclusive = yes + + on_accept = { + offer_fealty_interaction_effect = yes + + scope:actor = { + trigger_event = char_interaction.0010 + if = { + limit = { + government_has_flag = government_is_administrative + scope:recipient = { NOT = { government_has_flag = government_is_administrative } } + } + custom_tooltip = will_change_from_administrative_tt + custom_tooltip = will_lose_administrative_government_type_tt + } + if = { + limit = { + scope:recipient = { + is_confederation_member = yes + } + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + add_character_modifier = { + modifier = mpo_confederation_member_modifier + years = 5 + } + every_vassal_or_below = { + limit = { + highest_held_title_tier >= tier_county + government_has_flag = government_is_nomadic + } + add_character_modifier = { + modifier = mpo_confederation_member_modifier + years = 5 + } + } + } + + add_character_flag = { + flag = new_confederate + years = 3 + } + every_vassal_or_below = { + limit = { + highest_held_title_tier >= tier_county + } + add_character_flag = { + flag = new_confederate + years = 3 + } + } + } + + # If you have a suzerain, they will get a lower opinion of you for not paying tribute anymore + suzerain ?= { + if = { + limit = { + this != scope:actor + this != scope:recipient + } + add_opinion = { + modifier = tributary_ceased_payments_opinion + target = scope:actor + } + } + } + } + scope:recipient = { + if = { + limit = { + has_imprisonment_reason = scope:actor + } + consume_imprisonment_reasons = scope:actor + } + if = { + limit = { + has_revoke_title_reason = scope:actor + } + consume_revoke_title_reason = scope:actor + } + if = { + limit = { + has_banish_reason = scope:actor + } + consume_banish_reasons = scope:actor + } + if = { + limit = { + has_execute_reason = scope:actor + } + consume_execute_reasons = scope:actor + } + } + } + + on_intermediary_accept = { + } + + on_decline = { + scope:actor = { + trigger_event = char_interaction.0011 + } + } +} + +force_vote_in_succession_election_interaction = { + category = interaction_category_uncategorized + hidden = yes + special_interaction = force_vote_in_succession_election + icon = scroll_scales + + greeting = positive + notification_text = FORCE_VOTE_INTERACTION_NOTIFICATION + force_notification = yes + + desc = force_vote_in_succession_election_interaction_desc + + auto_accept = yes + + is_valid_showing_failures_only = { + custom_description = { + text = must_have_usable_hook_blocker + subject = scope:actor + object = scope:recipient + + scope:actor = { + has_usable_hook = scope:recipient + } + } + } + + extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" + + on_accept = { + scope:actor = { + send_interface_message = { + type = event_title_good + title = force_vote_in_succession_election_interaction + right_icon = scope:recipient + + show_as_tooltip = { + scope:actor = { + use_hook = scope:recipient + custom_tooltip = msg_force_vote_in_succession_election_message + } + } + } + hidden_effect = { + use_hook = scope:recipient + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_gain + DESC = clan_unity_voted.desc + REVERSE_NON_HOUSE_TARGET = no + } + } +} + +set_primary_spouse_interaction = { + category = interaction_category_diplomacy + desc = set_primary_spouse_interaction_desc + icon = icon_marriage + + auto_accept = yes + + is_shown = { + scope:actor = { + is_spouse_of = scope:recipient + } + scope:actor.primary_spouse != scope:recipient + } + is_valid_showing_failures_only = { + scope:recipient = { + NOT = { + has_trait = incapable + } + } + } + + on_accept = { + scope:actor.primary_spouse = { + if = { + limit = { + has_opinion_modifier = { + target = scope:actor + modifier = spouse_made_primary_opinion + } + } + remove_opinion = { + modifier = spouse_made_primary_opinion + target = scope:actor + } + } + add_opinion = { + target = scope:actor + modifier = spouse_made_secondary_opinion + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_bad + title = set_primary_spouse_interaction_toast + left_icon = scope:actor + right_icon = scope:recipient + + custom_tooltip = set_primary_spouse_interaction_toast_removed + } + } + } + scope:actor = { + if = { + limit = { + scope:actor.primary_spouse = { + is_lowborn = no + } + scope:recipient = { + is_lowborn = yes + } + } + add_legitimacy = { + value = medium_legitimacy_loss + multiply = scope:actor.primary_title.tier + } + every_vassal_or_below = { + limit = { has_vassal_stance = courtly } + custom = every_courtly_vassal + add_opinion = { + modifier = married_lowborn_opinion + target = scope:actor + opinion = -50 + } + } + every_vassal_or_below = { + limit = { has_vassal_stance = glory_hound } + custom = every_glory_hound_vassal + add_opinion = { + modifier = married_lowborn_opinion + target = scope:actor + opinion = -30 + } + } + } + set_primary_spouse = scope:recipient + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_neutral + title = set_primary_spouse_interaction_toast + left_icon = scope:actor + right_icon = scope:recipient + + custom_tooltip = set_primary_spouse_interaction_toast_changed + } + } + } + scope:recipient = { + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_good + title = set_primary_spouse_interaction_toast + left_icon = scope:actor + right_icon = scope:recipient + + custom_tooltip = set_primary_spouse_interaction_toast_added + } + } + + if = { + limit = { + has_opinion_modifier = { + target = scope:actor + modifier = spouse_made_secondary_opinion + } + } + remove_opinion = { + modifier = spouse_made_secondary_opinion + target = scope:actor + } + } + add_opinion = { + target = scope:actor + modifier = spouse_made_primary_opinion + } + } + } + + ai_targets = { + ai_recipients = spouses + } + ai_target_quick_trigger = { + adult = yes + } + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 72 + kingdom = 72 + empire = 72 + hegemony = 72 + } + + ai_potential = { + any_spouse = { + count >= 2 + } + } + + ai_will_do = { + base = 0 + + modifier = { + add = 100 + scope:recipient = { + is_lowborn = no + sum_of_all_skills_value > scope:actor.primary_spouse.sum_of_all_skills_value + } + scope:actor = { + NOR = { + has_relation_friend = scope:actor.primary_spouse + has_relation_lover = scope:actor.primary_spouse + } + } + } + } +} + +grant_independence_interaction = { + category = interaction_category_vassal + force_notification = yes + greeting = positive + notification_text = GRANT_INDEPENDENCE_INTERACTION_NOTIFICATION + icon = independence + interface_priority = 120 + + desc = grant_independence_interaction_desc + + is_shown = { + scope:actor = { + trigger_if = { + limit = { is_confederation_member = yes } + exists = house.house_confederation + } + } + scope:recipient = { + is_vassal_of = scope:actor + OR = { + is_landed = yes + AND = { + government_has_flag = government_is_landless_minority + } + } + } + scope:recipient != scope:actor + } + + is_valid_showing_failures_only = { + NOT = { scope:actor = { is_at_war_with = scope:recipient } } + scope:actor = { + top_liege = this + NOT = { + is_at_war = yes + } + } + custom_description = { + text = is_at_war_with_another_vassal + object = scope:recipient + NOT = { + scope:actor = { + any_vassal_or_below = { + is_at_war_with = scope:recipient + } + } + } + } + custom_description = { + text = is_de_jure_vassal_check + object = scope:recipient + + trigger_if = { # Admin rulers can grant tribal vassals independence regardless of de jure + limit = { + scope:actor = { government_has_flag = government_is_administrative } + scope:recipient = { government_has_flag = government_is_tribal } + } + # Always possible + } + trigger_else = { + NOT = { #Cannot be used against de jure vassals + scope:recipient.primary_title = { + any_this_title_or_de_jure_above = { + holder = scope:actor + } + } + } + } + + } + custom_tooltip = { + text = can_only_remove_diarch_by_elevating_them.tt + NOT = { scope:recipient ?= scope:actor.diarch } + } + tgp_blocked_action_against_tenno_trigger = { + ACTOR = scope:actor + TARGET = scope:recipient + } + } + + auto_accept = yes + + on_accept = { + scope:actor = { + stress_impact = { + ambitious = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_neutral + title = grant_vassal_independence_interaction_toast + left_icon = scope:actor + right_icon = scope:recipient + + custom_tooltip = grant_vassal_independence_interaction_toast_desc + + # Struggle Parameter + if = { + limit = { + exists = dynasty + NOT = { + any_held_title = { + is_de_jure_liege_or_above_target = scope:recipient.primary_title + } + } + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = granting_independence_to_non_dejure_gives_renown + } + } + dynasty = { + add_dynasty_prestige = medium_dynasty_prestige_value + } + } + } + } + } + + scope:recipient = { + #Send notifications + if = { + limit = { + any_liege_or_above = { + is_ai = no + this != scope:actor + } + } + every_liege_or_above = { + limit = { + is_ai = no + this != scope:actor + } + trigger_event = vassal_interaction.0023 + } + } + if = { + limit = { + any_liege_or_above = { + any_vassal = { + is_ai = no + NOR = { + this = scope:recipient + this = scope:actor + } + } + } + } + every_liege_or_above = { + limit = { + any_vassal = { + is_ai = no + NOR = { + this = scope:recipient + this = scope:actor + } + } + } + every_vassal = { + limit = { + is_ai = no + this != scope:recipient + } + trigger_event = { + id = vassal_interaction.0022 + days = 3 + } + } + } + } + + add_opinion = { + target = scope:actor + modifier = granted_independence_opinion + } + + add_truce_both_ways = { + character = scope:actor + days = 3650 + name = TRUCE_GRANT_INDEPENDENCE + } + + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = yes + } + becomes_independent = { + change = scope:change + } + + resolve_title_and_vassal_change = scope:change + } + + # Struggle Catalysts. + scope:actor = { + if = { + limit = { + catalyst_gave_independence_to_powerful_diff_faith_culture_vassal_preliminary_trigger = { + CHAR1 = scope:actor + CHAR2 = scope:recipient + } + any_character_struggle = { + involvement = involved + activate_struggle_catalyst_secondary_character_involvement_either_trigger = { + CATALYST = catalyst_gave_independence_to_powerful_diff_faith_culture_vassal + CHAR = scope:recipient + } + } + } + every_character_struggle = { + involvement = involved + limit = { + activate_struggle_catalyst_secondary_character_involvement_either_trigger = { + CATALYST = catalyst_gave_independence_to_powerful_diff_faith_culture_vassal + CHAR = scope:recipient + } + } + activate_struggle_catalyst = { + catalyst = catalyst_gave_independence_to_powerful_diff_faith_culture_vassal + character = scope:actor + } + } + } + + if = { + limit = { + NOT = { + any_held_title = { + is_de_jure_liege_or_above_target = scope:recipient.primary_title + } + } + any_character_struggle = { + involvement = involved + activate_struggle_catalyst_secondary_character_involvement_either_trigger = { + CATALYST = catalyst_independence_from_non_dejure_vassal + CHAR = scope:recipient + } + } + } + every_character_struggle = { + involvement = involved + limit = { + activate_struggle_catalyst_secondary_character_involvement_either_trigger = { + CATALYST = catalyst_independence_from_non_dejure_vassal + CHAR = scope:recipient + } + } + activate_struggle_catalyst = { + catalyst = catalyst_independence_from_non_dejure_vassal + character = scope:actor + } + } + } + } + + # Grant independence to non de_jure + + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_loss + DESC = clan_unity_grant_independence.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + ai_will_do = { + base = 0 #The AI should never do this! + + # Except in the context of Struggle + modifier = { + scope:recipient = { + any_character_struggle = { + involvement = involved + } + } + scope:actor = { + any_character_struggle = { + involvement = involved + } + NOT = { + any_held_title = { + is_de_jure_liege_or_above_target = scope:recipient.primary_title + } + } + } + add = { + value = 0 + if = { + limit = { + scope:actor = { + any_character_struggle = { + phase_has_catalyst = catalyst_independence_from_non_dejure_vassal + } + has_character_flag = agenda_towards_escalation + } + } + add = -50 + } + else_if = { + limit = { + scope:actor = { + any_character_struggle = { + phase_has_catalyst = catalyst_independence_from_non_dejure_vassal + } + } + } + add = 100 + } + } + } + + # Unity modifiers + evaluate_action_decreasing_house_unity = { + VALUE = 10 + } + } +} + +expose_secret_interaction = { + interface_priority = 120 + common_interaction = no + category = interaction_category_hostile + interface = blackmail + icon = secret + + desc = expose_secret_interaction_desc + + is_shown = { + scope:recipient = { + any_secret = { + is_known_by = scope:actor + } + this != scope:actor + age > 10 + } + } + + is_valid_showing_failures_only = { + } + + on_accept = { + scope:actor = { + if = { + limit = { + is_landless_adventurer = yes + has_perk = court_of_shadows_perk + } + add_prestige = { + value = 100 + multiply = { + value = scope:recipient.highest_held_title_tier + add = 1 + } + min = 50 + } + } + if = { + limit = { + exists = scope:target + } + scope:target = { + expose_secret = scope:actor + } + } + else = { + every_known_secret = { + limit = { + secret_owner = scope:recipient + } + expose_secret = scope:actor + } + } + if = { + limit = { + has_title = title:e_minister_of_justice + top_participant_group:dynastic_cycle ?= { + NOT = { participant_group_type = other_rulers } + } + OR = { + scope:recipient = { + top_participant_group:dynastic_cycle ?= { + NOT = { participant_group_type = other_rulers } + } + } + scope:target.secret_target = { + top_participant_group:dynastic_cycle ?= { + NOT = { participant_group_type = other_rulers } + } + } + } + } + add_merit_if_relevant_effect = { + MERIT = minor_merit_value + } + if = { + limit = { + government_has_flag = government_has_influence + } + change_influence = { + value = minor_influence_gain + multiply = scope:recipient.highest_held_title_tier + } + } + situation:dynastic_cycle = { + if = { + limit = { + situation_top_has_catalyst = catalyst_minister_exposed_secret + } + trigger_situation_catalyst = { + catalyst = catalyst_minister_exposed_secret + character = scope:actor + } + } + } + } + + stress_impact = { + honest = minor_stress_impact_loss + just = minor_stress_impact_loss + shy = miniscule_stress_impact_gain + } + } + + scope:recipient = { + stress_impact = { + honest = minor_stress_impact_loss + just = minor_stress_impact_loss + deceitful = minor_stress_impact_gain + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = major_unity_loss + DESC = clan_unity_secret_exposure.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + auto_accept = yes + + ai_will_do = { + base = 0 + + # Struggle + modifier = { + scope:recipient = { + any_character_struggle = { + involvement = involved + } + is_important_or_vip_struggle_character = yes + } + scope:actor = { + any_character_struggle = { + involvement = involved + } + } + add = { + value = 0 + if = { + limit = { + scope:actor = { + any_character_struggle = { + phase_has_catalyst = catalyst_reveal_secret_important + } + has_character_flag = agenda_towards_escalation + } + } + add = 200 + } + else_if = { + limit = { + scope:actor = { + any_character_struggle = { + phase_has_catalyst = catalyst_reveal_secret_important + } + } + } + add = -100 + } + } + } + modifier = { + scope:recipient = { + any_character_struggle = { + involvement = involved + } + has_trait = fp3_struggle_supporter + } + scope:actor = { + any_character_struggle = { + involvement = involved + } + } + add = { + value = 0 + if = { + limit = { + scope:actor = { + any_character_struggle = { + phase_has_catalyst = catalyst_reveal_secret_supporter + } + has_trait = fp3_struggle_detractor + } + } + add = 200 + } + else_if = { + limit = { + scope:actor = { + any_character_struggle = { + phase_has_catalyst = catalyst_reveal_secret_supporter + } + } + } + add = -100 + } + } + } + modifier = { + scope:recipient = { + any_character_struggle = { + involvement = involved + } + has_trait = fp3_struggle_detractor + } + scope:actor = { + any_character_struggle = { + involvement = involved + } + } + add = { + value = 0 + if = { + limit = { + scope:actor = { + any_character_struggle = { + phase_has_catalyst = catalyst_reveal_secret_detractor + } + has_trait = fp3_struggle_supporter + } + } + add = 200 + } + else_if = { + limit = { + scope:actor = { + any_character_struggle = { + phase_has_catalyst = catalyst_reveal_secret_detractor + } + } + } + add = -100 + } + } + } + + # Unity modifiers + evaluate_action_decreasing_house_unity = { + VALUE = 100 + } + } +} diff --git a/common/character_interactions/00_culture_interactions.txt b/common/character_interactions/00_culture_interactions.txt new file mode 100644 index 00000000..c71c6e77 --- /dev/null +++ b/common/character_interactions/00_culture_interactions.txt @@ -0,0 +1,388 @@ +# Interaction used to convert people when you hybridize or diverge culture +# Note that it will only be applied to vassals of the parent culture(s) +# Acceptance is checked *before* culture conversion happens so that it'll be correct in the UI +# This has the culture traits available in the traits list: +# modifier = { +# add = 10 +# desc = TEST +# culture_pillar:ethos_bellicose = { is_in_list = traits } +# } + +request_culture_conversion_interaction = { + category = interaction_category_religion + special_interaction = request_culture_conversion_interaction + popup_on_receive = yes + + desc = ask_for_conversion_interaction_desc + + hidden = yes + + is_shown = { + scope:actor.culture != scope:recipient.culture + scope:recipient.liege = scope:actor + NOT = { scope:recipient = { government_has_flag = government_is_landless_minority } } + } + + is_valid_showing_failures_only = { + } + + ai_accept = { + base = -10 + opinion_modifier = { + opinion_target = scope:actor + who = scope:recipient + multiplier = 1 + } + + modifier = { + desc = ASK_FOR_CONVERSION_SAME_CULTURE_PRESTIGE_LEVEL + add = { + value = 10 + multiply = scope:actor.prestige_level + } + scope:actor.prestige_level > 0 + scope:recipient.culture = scope:actor.culture + } + + modifier = { + desc = ASK_FOR_CONVERSION_RECIPIENT_DIPLOMACY + add = { + value = scope:actor.diplomacy + subtract = scope:recipient.diplomacy + multiply = 5 + } + } + + modifier = { + desc = ASK_FOR_CONVERSION_RECIPIENT_IS_CYNICAL + add = 30 + scope:recipient = { + has_trait = cynical + } + } + + modifier = { + desc = ASK_FOR_CONVERSION_RECIPIENT_IS_STUBBORN + add = -30 + scope:recipient = { + has_trait = stubborn + } + } + + modifier = { + add = intimidated_external_reason_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 1 + } + } + desc = INTIMIDATED_REASON + } + modifier = { + add = cowed_external_reason_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 2 + } + } + desc = COWED_REASON + } + # Unity modifiers + evaluate_action_increasing_house_unity = { + VALUE = 100 + } + } + + ai_min_reply_days = 1 + ai_max_reply_days = 5 + + on_accept = { + new_culture_created_vassal_conversion_effect = { + CONVERTEE = scope:recipient + CONVERTER = scope:actor + CULTURE = scope:actor.culture + } + } +} + +ai_cultural_hybridization_interaction = { + + hidden = yes + + auto_accept = yes + + ai_potential = { + has_dlc_feature = hybridize_culture + OR = { + top_liege = this + highest_held_title_tier >= tier_kingdom + } + sub_realm_size >= 4 + is_physically_able_adult = yes + is_at_war = no + NOT = { + has_game_rule = none_hybrid_culture_ai_frequency + } + } + + is_shown = { + scope:actor = { + is_ai = yes + } + } + + has_valid_target = { + exists = scope:target + } + + ai_set_target = { + scope:actor = { + if = { + limit = { + any_sub_realm_county = { + culture != scope:actor.culture + culture = { + cultural_acceptance = { target = scope:actor.culture value >= hybridization_ai_threshold_value } + scope:actor = { + can_hybridize = prev + } + } + } + } + every_sub_realm_county = { + limit = { + culture != scope:actor.culture + culture = { + cultural_acceptance = { target = scope:actor.culture value >= hybridization_ai_threshold_value } + scope:actor = { + can_hybridize = prev + } + } + } + culture = { + add_to_list = culture_list + } + } + + ordered_in_list = { + list = culture_list + limit = { culture_realm_size >= 3 } + order_by = culture_realm_size + + save_scope_as = target + } + } + } + } + + on_accept = { + # Global cooldowns for the lower frequency game rule settings + if = { + limit = { + has_game_rule = less_common_hybrid_culture_ai_frequency + } + set_global_variable = { name = has_ai_hybrid_event_cooldown value = yes days = 3650 } + } + scope:actor = { + create_hybrid_culture_with_side_effects = scope:target + } + } + + ai_targets = { + ai_recipients = self + } + + ai_frequency_by_tier = { + barony = 0 + county = 120 + duchy = 60 + kingdom = 60 + empire = 60 + hegemony = 60 + } + + ai_will_do = { + base = 100 + + # Unity modifiers + evaluate_action_increasing_house_unity = { + VALUE = 100 + } + + modifier = { + factor = 0.2 + has_game_rule = less_common_hybrid_culture_ai_frequency + } + + modifier = { + factor = 0 + exists = global_var:has_ai_hybrid_event_cooldown + } + + modifier = { + factor = 0 + culture = { + has_cultural_parameter = harder_to_hybridize + } + } + + modifier = { # The AI should only want to hybridize if they're the second ruler of their culture for their primary title + factor = 0 + OR = { + NOT = { + exists = primary_title.previous_holder + } + AND = { + exists = primary_title.previous_holder + primary_title.previous_holder.culture != scope:actor.culture + } + } + } + + modifier = { # The AI doesn't want to hybridize if their culture is more than X% bigger than the targeted culture within the same realm (unless it's in the capital, and the capital is the De Jure capital of the primary title) + factor = 0 + scope:actor.culture.culture_realm_size > scope:target.culture_realm_size_larger_30_percent + NAND = { + scope:actor.primary_title.title_capital_county = scope:actor.capital_county + scope:actor.capital_county.culture = scope:target + } + } + + modifier = { # Do not hybridize if 30% or more of your vassals of the relevant culture/s dislike you + factor = 0 + scope:actor = { + any_vassal = { + percent >= 0.3 + OR = { + culture = scope:actor.culture + culture = scope:target + } + highest_held_title_tier >= tier_county + opinion = { + target = scope:actor + value <= 0 + } + } + } + } + + modifier = { # The AI does not want to create multiple hybrids from the same cultures + factor = 0 + any_in_global_list = { + variable = hybrid_cultures + any_parent_culture = { this = scope:target } + any_parent_culture = { this = scope:actor.culture } + } + } + + # Loose requirements + modifier = { # The AI does not want to create a hybrid with a hybrid culture that has the same roots + factor = 0 + has_game_rule = very_relaxed_hybrid_culture_ai_restrictions + scope:target = { is_hybrid_culture = yes } + scope:actor.culture = { + is_hybrid_culture = yes + any_parent_culture = { + save_temporary_scope_as = parent_culture_check + scope:target = { + any_parent_culture = { + this = scope:parent_culture_check + } + } + } + } + } + + modifier = { # The AI does not want to create a hybrid with a hybrid culture (unless a historical hybrid) + factor = 0 + has_game_rule = relaxed_hybrid_culture_ai_restrictions + scope:target = { + is_hybrid_culture = yes + culture_is_not_historical_hybrid_trigger = yes + } + scope:actor.culture = { + is_hybrid_culture = yes + culture_is_not_historical_hybrid_trigger = yes + } + } + + modifier = { # The AI does not want to create a hybrid with a hybrid culture or if the target is a hybrid (unless a historical hybrid) + factor = 0 + has_game_rule = default_hybrid_culture_ai_restrictions + OR = { + scope:target = { + is_hybrid_culture = yes + culture_is_not_historical_hybrid_trigger = yes + } + scope:actor.culture = { + is_hybrid_culture = yes + culture_is_not_historical_hybrid_trigger = yes + } + } + } + + modifier = { # The AI does not want to create a hybrid with a hybrid culture that their culture is a parent of, or share heritage of + factor = 0 + scope:target = { + is_hybrid_culture = yes + any_parent_culture = { + OR = { + this = scope:actor.culture + has_same_culture_heritage = scope:actor.culture + } + } + } + } + + modifier = { # The AI does not want to create a hybrid if their culture is a hybrid of the target culture, or share heritage of + factor = 0 + scope:actor.culture = { + is_hybrid_culture = yes + any_parent_culture = { + OR = { + this = scope:target + has_same_culture_heritage = scope:target + } + } + } + } + + modifier = { # Avoid hybridizing if your realm is of a significant size and elective, we don't want the HRE Emperor to hybdridize in ugly ways... + factor = 0 + primary_title = { + has_order_of_succession = election + tier >= tier_kingdom + } + realm_size >= 50 + any_vassal = { + highest_held_title_tier >= tier_county + culture != scope:actor.culture + } + } + + modifier = { # Theocrats such as the Pope shouldn't hybridize; they have an influx of different cultures, it's just weird + factor = 0 + government_has_flag = government_is_theocracy + } + + modifier = { # Block for Scots and Gaelic specifically + factor = 0 + scope:actor.culture = { + OR = { + this = culture:scottish + this = culture:gaelic + } + } + scope:target = { + OR = { + this = culture:scottish + this = culture:gaelic + } + } + } + + # Note: As we're checking if we can hybridize with a culture *right now*, a suboptimal culture might be checked. A buffer of 10 acceptance is used by the AI to alleviate this. + } +} diff --git a/common/character_interactions/00_marriage_interactions.txt b/common/character_interactions/00_marriage_interactions.txt new file mode 100644 index 00000000..a27e8af3 --- /dev/null +++ b/common/character_interactions/00_marriage_interactions.txt @@ -0,0 +1,5531 @@ + + +### +# SPECIAL NOTE +# +# When evaluating whether or not the AI can send this interaction to the +# player, the AI will use the ai_accept value and send a proposal to the +# player IF AND ONLY IF the player, as an AI actor, would have positive +# ai_accept value. This is a special case for this specific interaction, +# and is being calculated specifically in code. +# +arrange_marriage_interaction = { + icon = icon_marriage + category = interaction_category_diplomacy + common_interaction = yes + filter_tags = { ceremonial_liege } + + override_background = { reference = relaxing_room } + + special_interaction = arrange_marriage_interaction + interface = marriage + use_diplomatic_range = { + trigger_if = { + limit = { exists = scope:secondary_actor.betrothed } + NOT = { + scope:secondary_actor = { + betrothed = scope:secondary_recipient + } + } + } + } + + recipient_recieve_cooldown = { + years = marriage_recieve_proposal_cooldown + } + + ignore_recipient_recieve_cooldown = { + AND = { + is_ai = no + scope:recipient = { is_ai = no } + } + } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:actor = scope:recipient + } + desc = arrange_marriage_interaction_desc_ruler_at_own_court + } + triggered_desc = { + trigger = { + scope:actor = { + can_marry_character_trigger = { + CHARACTER = scope:recipient + } + } + scope:recipient = { is_ruler = yes } + } + desc = arrange_marriage_interaction_desc_both_rulers_can_marry + } + triggered_desc = { + trigger = { + scope:recipient = { + is_ruler = yes + can_marry_trigger = yes + } + } + desc = arrange_marriage_interaction_desc_both_rulers_recipient_only_can_marry + } + triggered_desc = { + trigger = { + scope:recipient = { + is_ruler = yes + } + } + desc = arrange_marriage_interaction_desc_both_rulers_recipient_neither_can_marry + } + triggered_desc = { + trigger = { + scope:actor = { + can_marry_character_trigger = { + CHARACTER = scope:recipient + } + } + } + desc = arrange_marriage_interaction_desc_one_ruler_can_marry + } + desc = arrange_marriage_interaction_desc_recipient_one_ruler_cannot_marry + } + } + + redirect = { + # If the define MARRIAGE_OWNER_IS_MATCHMAKER is set to yes, the actor must end up as the "matchmaker" link for courtiers + scope:actor = { + if = { + limit = { + exists = matchmaker + NOT = { this = matchmaker } + } + save_scope_as = secondary_actor + matchmaker = { + save_scope_as = actor + } + } + if = { + limit = { + is_betrothed = yes + betrothed = scope:recipient + } + + save_scope_as = secondary_actor + } + } + + scope:recipient = { + if = { + limit = { + is_betrothed = yes + betrothed.matchmaker = scope:actor + is_adult = yes + betrothed = { + is_adult = yes + } + } + + save_scope_as = secondary_recipient + matchmaker = { + save_scope_as = recipient + } + betrothed = { + save_scope_as = secondary_actor + } + } + + # marriage interactions are special, and code sets scopes in an unusual way + # secondary recipient must always be set for marriage script, + # but marriage UI only sets primary recipient + # make sure redirect solves this issue + if = { + limit = { + exists = matchmaker + this = matchmaker + NOT = { exists = scope:secondary_recipient } + } + save_scope_as = secondary_recipient + } + if = { + limit = { + exists = matchmaker + NOT = { this = matchmaker } + } + save_scope_as = secondary_recipient + matchmaker = { + save_scope_as = recipient + } + } + } + } + + populate_actor_list = { + scope:actor = { + add_to_list = characters + every_courtier = { + limit = { + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + can_marry_character_trigger = { CHARACTER = scope:actor } + } + } + add_to_list = characters + } + every_courtier_away = { + limit = { + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + can_marry_character_trigger = { CHARACTER = scope:actor } + } + } + add_to_list = characters + } + every_child = { + even_if_dead = yes + if = { + limit = { + is_alive = yes + NOT = { is_in_list = characters } + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + can_marry_character_trigger = { CHARACTER = scope:actor } + } + } + add_to_list = characters + } + every_child = { + even_if_dead = yes + if = { + limit = { + is_alive = yes + NOT = { is_in_list = characters } + OR = { + top_liege = scope:actor + house.house_head = scope:actor + dynasty.dynast = scope:actor + } + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + can_marry_character_trigger = { CHARACTER = scope:actor } + } + } + add_to_list = characters + } + every_child = { + if = { + limit = { + is_alive = yes + NOT = { is_in_list = characters } + OR = { + top_liege = scope:actor + house.house_head = scope:actor + dynasty.dynast = scope:actor + } + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + can_marry_character_trigger = { CHARACTER = scope:actor } + } + } + add_to_list = characters + } + } + } + } + } + } + + populate_recipient_list = { + scope:recipient = { + add_to_list = characters + every_courtier = { + add_to_list = characters + } + every_courtier_away = { + add_to_list = characters + } + every_child = { + limit = { + NOT = { is_in_list = characters } + } + add_to_list = characters + } + } + } + + interface_priority = 60 + + cost = { + prestige = { + value = 0 + if = { + limit = { + exists = scope:actor + exists = scope:recipient + exists = scope:secondary_recipient + exists = scope:secondary_actor + scope:secondary_actor = { is_close_family_of = scope:actor } + scope:recipient = { + OR = { + AND = { + vassal_contract_has_flag = vassal_contract_marriage_favor + is_allied_to = scope:actor + } + NOT = { vassal_contract_has_flag = vassal_contract_marriage_favor} + } + } + } + add = { + scope:actor = { + every_vassal = { + limit = { + vassal_contract_has_flag = vassal_contract_marriage_favor + NOT = { is_allied_to = scope:actor } + NOR = { + this = scope:recipient + this = scope:secondary_recipient + } + } + add = medium_prestige_value + } + } + desc = VASSAL_WITH_MARRIAGE_FAVOR + } + } + } + + piety = { + value = 0 + if = { + limit = { scope:piety_cost_reduction = yes } + add = scope:actor.medium_piety_value + desc = STRUGGLE_MARRIAGE_ACCEPTANCE_USING_PIETY_AS_CURRENCY + } + } + + influence = { + value = 0 + if = { + limit = { scope:influence_send_option = yes } + add = scope:actor.medium_influence_value + desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION + } + } + } + + # actor, recipient ... characters arranging the marriage + # secondary_actor, secondary_recipient ... characters that should marry + + is_shown = { + scope:actor = { + OR = { + is_ruler = yes #Can arrange marriages for others + #You're just a courtier? Only use the interaction on characters you can marry + can_marry_character_trigger = { CHARACTER = scope:recipient } + } + } + # Block further marriage proposals for people who have a pending grand wedding + NOR = { + scope:secondary_actor ?= { has_been_promised_grand_wedding = yes } + scope:secondary_recipient ?= { has_been_promised_grand_wedding = yes } + } + #If you're interacting with someone who isn't their own matchmaker, only show the interaction if they can get married. (If someone isn't their own matchmaker, they will be set as secondary_recipient by code and their matchmaker becomes recipient) + trigger_if = { + limit = { + exists = scope:secondary_recipient + scope:secondary_recipient.matchmaker != scope:secondary_recipient + } + scope:secondary_recipient = { + OR = { + marriage_interaction_can_be_picked_trigger = yes #Can marry anyone + AND = { + ready_to_marry_betrothed_trigger = yes + OR = { + betrothed = scope:secondary_actor + trigger_if = { + limit = { exists = betrothed.liege } + betrothed.liege = scope:actor + } + } + } + } + #To account for a person marrying their concubines + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + can_marry_character_trigger = { CHARACTER = scope:actor } + } + } + } + #allow landless adventurers to marry only within their camp, or with Contact list courtiers (after using request_marriage option in contact_list_request_interaction), or prieviously betrothed characters + trigger_if = { + limit = { + scope:actor = { + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + trigger_if = { + limit = { + OR = { + scope:actor = { + is_target_in_variable_list = { + name = contact_list_marriage + target = scope:recipient + } + } + scope:recipient = { + is_betrothed = yes + betrothed = { + OR = { + scope:actor = this + scope:secondary_actor ?= this + } + } + } + scope:secondary_recipient ?= { + is_betrothed = yes + betrothed = { + OR = { + scope:actor = this + scope:secondary_actor ?= this + } + } + } + } + } + always = yes + } + trigger_else = { + scope:recipient = scope:actor + } + } + } + + is_valid_showing_failures_only = { + #If we're opening this interaction through the interaction menu (i.e. not all scopes exist yet) + #This was giving double-warnings about a marry-able character existing so it's commented out for now + #custom_description = { + # text = character_to_marry_exists + # object = scope:recipient + # scope:recipient = { + # OR = { + # any_courtier = { + # is_at_home = yes + # marriage_interaction_can_be_picked_trigger= yes + # } + # any_child = { + # marriage_interaction_can_be_picked_trigger= yes + # } + # } + # } + #} + trigger_if = { + limit = { + NAND = { + exists = scope:secondary_actor + exists = scope:secondary_recipient + } + } + #There is an available marriage + custom_description = { + text = "basic_can_marry_check_recipient" + subject = scope:actor + object = scope:recipient + scope:recipient = { + OR = { + AND = { + #Recipient can marry + can_marry_trigger = yes + #To account for a person marrying their concubines + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + can_marry_character_trigger = { CHARACTER = scope:actor } + } + } + AND = { + is_ruler = yes #(Following are only for rulers) + OR = { + any_child = { + matchmaker = scope:actor + OR = { + #Any of recipient's children can marry + AND = { + can_marry_trigger = yes + #To account for a person marrying their concubines + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + } + } + #Any of recipient's children are ready to marry their betrothed + AND = { + ready_to_marry_betrothed_trigger = yes + betrothed.matchmaker = scope:actor + } + } + } + any_courtier = { + OR = { + #Any of recipient's courtiers can marry + AND = { + can_marry_trigger = yes + #To account for a person marrying their concubines + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + } + } + #Any of recipient's courtiers are ready to marry their betrothed + AND = { + ready_to_marry_betrothed_trigger = yes + betrothed.matchmaker = scope:actor + } + } + } + } + } + } + } + } + } + #Diplomatic availability & prison + scope:recipient = { + is_imprisoned = no + } + NOT = { + scope:actor = { + is_at_war_with = scope:recipient + } + } + trigger_if = { #(must be here because secondary_recipient can be set at the start) + limit = { + exists = scope:secondary_recipient + scope:secondary_recipient != scope:recipient + } + scope:secondary_recipient = { + is_imprisoned = no + bp2_valid_for_standard_interactions_trigger = yes + } + } + trigger_if = { #(must be here because secondary_recipient can be set at the start) + limit = { + exists = scope:secondary_actor + scope:secondary_actor != scope:actor + } + scope:secondary_actor = { + is_imprisoned = no + bp2_valid_for_standard_interactions_trigger = yes + } + } + # Account for regents being bolshy. + marriage_interaction_non_loyal_diarchs_refuse_secondary_marriage_trigger = { TARGET = secondary_actor } + marriage_interaction_non_loyal_diarchs_refuse_secondary_marriage_trigger = { TARGET = secondary_recipient } + marriage_interaction_non_loyal_diarchs_refuse_secondary_marriage_trigger = { TARGET = actor } + marriage_interaction_non_loyal_diarchs_refuse_secondary_marriage_trigger = { TARGET = recipient } + } + + # whether a character can be picked for the interaction, interface only (e.g. picking the first character in the marriage interaction) + # in character scope, actor and recipient event targets can be used, but not the secondary characters (because none exist yet) + can_be_picked = { + OR = { + marriage_interaction_can_be_picked_trigger = yes + AND = { + exists = scope:secondary_actor + exists = scope:secondary_recipient + scope:secondary_actor.betrothed = scope:secondary_recipient + } + } + } + + #Is evaluated only after secondary_recipient and secondary_actor are both chosen + has_valid_target_showing_failures_only = { + marriage_interaction_valid_target_trigger = yes #Checks marriage status, betrothed, gender, consanguinity, faith hostility etc. + + #Blocks AI from marrying player guests + scope:secondary_recipient = { + trigger_if = { + limit = { + is_pool_guest = yes + host = { + is_ai = no + this != scope:actor + } + } + NOT = { is_pool_guest_of = host } + } + } + + #Blocks most AI's from marrying Evil faiths + trigger_if = { + limit = { + scope:actor = { + is_ai = yes + NOT = { has_trait = cynical } + #AI should honor betrothal even if faiths change + scope:secondary_actor.betrothed != scope:secondary_recipient + } + } + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value < faith_hostility_prevents_marriage_level + } + } + } + + #Blocks AI from marrying single mayors in their area unless they are also mayors + trigger_if = { + limit = { + scope:actor = { + is_ai = yes + NOT = { government_has_flag = government_is_republic } + } + } + NOT = { + scope:recipient = { government_has_flag = government_is_republic } + } + } + + trigger_if = { # Cultural Traditions, for AI + limit = { + scope:actor = { + is_ai = yes + culture = { + has_cultural_parameter = dislikes_marrying_outside_of_culture + } + } + } + OR = { + scope:actor.culture = scope:recipient.culture + scope:actor.culture = scope:secondary_recipient.culture + } + } + } + + pre_auto_accept = { + if = { + limit = { + NOR = { + scope:recipient = scope:actor + scope:secondary_actor = { has_been_promised_grand_wedding = yes } + scope:secondary_recipient = { has_been_promised_grand_wedding = yes } + } + } + scope:recipient = { + if = { + limit = { scope:secondary_actor.betrothed = scope:secondary_recipient } + send_interface_toast = { + type = msg_betrothal_fulfilled + left_icon = scope:secondary_actor + right_icon = scope:secondary_recipient + } + } + else = { + send_interface_toast = { + type = msg_marriage_forced + left_icon = scope:secondary_actor + right_icon = scope:secondary_recipient + } + } + } + } + } + + on_send = { + if = { + limit = { + scope:grand_wedding_promise = yes + } + scope:actor = { + set_variable = { + name = grand_wedding_promise_pending + days = 10 + } + if = { + limit = { + is_ai = yes + } + remove_short_term_gold = ai_wedding_promise_gold_actor + } + #if = { # Activity count debugging, left in for QA purposes + # limit = { + # NOT = { + # exists = global_var:wedding_promise + # } + # } + # set_global_variable = { + # name = wedding_promise + # value = 1 + # } + #} + #else = { + # change_global_variable = { + # name = wedding_promise + # add = 1 + # } + #} + } + } + } + + on_accept = { + marriage_interaction_on_accept_effect = yes + scope:actor = { + if = { + limit = { + scope:herd_send_option = yes + } + pay_herd = { + target = scope:recipient + value = scope:actor.domicile.medium_herd_value + } + } + if = { + limit = { + has_variable = grand_wedding_promise_pending + } + remove_variable = grand_wedding_promise_pending + } + if = { + limit = { + is_target_in_variable_list = { + name = contact_list_marriage + target = scope:recipient + } + } + remove_list_variable = { + name = contact_list_marriage + target = scope:recipient + } + } + } + } + + on_decline = { + scope:actor = { + if = { + limit = { this != scope:recipient } + trigger_event = marriage_interaction.0011 + } + if = { + limit = { + has_variable = grand_wedding_promise_pending + } + remove_variable = grand_wedding_promise_pending + } + } + scope:secondary_actor = { + add_character_flag = { + flag = player_declined_marriage + years = 5 + } + } + } + + auto_accept = { + marriage_interaction_auto_accept_trigger = yes #Strong hook conditions + } + + ai_accept = { + base = 0 + + marriage_ai_accept_modifier = yes + } + + # If you want the AI to set these options then it needs to be hooked into the code as well + send_option = { + flag = grand_wedding_promise + localization = GRAND_WEDDING_PROMISE + + is_shown = { + scope:actor = { #Can organize a Grand Wedding + highest_held_title_tier > tier_barony + is_landed_or_landless_administrative = yes + trigger_if = { + limit = { + is_ai = yes + } + is_at_war = no + } + # DLC locked + has_dlc_feature = tours_and_tournaments + has_dlc_feature = advanced_activities + } + } + + current_description = { + desc = "GRAND_WEDDING_PROMISE_INFO" + } + + is_valid = { + scope:actor = { + gold >= real_wedding_cost_actor_scope + is_available = yes + custom_tooltip = { + text = grand_wedding_already_promised_tt + NOR = { + AND = { + has_variable = promised_grand_wedding_marriage_countdown + var:promised_grand_wedding_marriage_countdown = { is_alive = yes } + } + has_variable = grand_wedding_promise_pending + } + } + } + trigger_if = { + limit = { + exists = scope:secondary_actor + } + custom_tooltip = { + text = grand_wedding_only_dominant_side + trigger_if = { + limit = { + scope:secondary_actor ?= { + is_female = yes + } + } + OR = { + scope:secondary_actor ?= { matrilinear_betrothal = yes } + scope:matrilineal = yes + } + } + trigger_else = { + NOR = { + scope:secondary_actor ?= { matrilinear_betrothal = yes } + scope:matrilineal = yes + } + } + } + custom_tooltip = { + text = grand_wedding_only_family + scope:secondary_actor ?= { + is_close_or_extended_family_of = scope:actor + } + } + # Cannot promise grand weddings with regents due to regency and travel limitations + custom_tooltip = { + text = grand_wedding_secondary_regent + NOT = { + scope:secondary_actor.liege = { + diarch = scope:secondary_actor + has_active_diarchy = yes + } + } + } + } + # Safety check because players shouldn't be spouse_2 + trigger_if = { + limit = { + has_multiple_players = yes + } + custom_tooltip = { + text = grand_wedding_mp_ai + trigger_if = { + limit = { + OR = { + scope:actor = { is_ai = no } + scope:secondary_actor ?= { is_ai = no } + } + } + scope:secondary_recipient ?= { + is_ai = yes + } + } + } + } + trigger_if = { + limit = { + exists = scope:secondary_recipient.liege + scope:secondary_recipient.liege = { + diarch = scope:secondary_recipient + has_active_diarchy = yes + } + } + # Cannot promise grand weddings with regents due to regency and travel limitations + custom_tooltip = { + text = grand_wedding_secondary_regent + NOT = { + scope:secondary_recipient.liege = { + diarch = scope:secondary_recipient + has_active_diarchy = yes + } + } + } + } + } + } + + send_option = { + flag = matrilineal + localization = MATRILINEAL_OFFER + is_shown = { + OR = { + NOT = { exists = scope:secondary_actor } + NOT = { exists = scope:secondary_recipient } + scope:secondary_actor = { sex_opposite_of = scope:secondary_recipient } + } + } + current_description = { + triggered_desc = { + trigger = { + exists = scope:secondary_actor + scope:secondary_actor = { + betrothed = scope:secondary_recipient + matrilinear_betrothal = yes + } + } + desc = "MATRILINEAL_OFFER_BETROTHAL_INFO" + } + } + is_valid = { + custom_tooltip = { # TGP TENNO EXCEPTION + text = tgp_blocked_ceremonial_house_matrilineal_marriage_trigger + NOT = { + scope:secondary_actor.top_liege.primary_title.var:administrative_ui_special_title.holder ?= { + scope:recipient ?= this + NOR = { + faith = { has_doctrine = doctrine_gender_female_dominated } + AND = { + scope:secondary_recipient ?= { is_female = yes } + faith = { has_doctrine = doctrine_gender_equal } + } + } + } + } + } + } + can_be_changed = { + trigger_if = { + limit = { + exists = scope:secondary_actor + } + OR = { + NOT = { + exists = scope:secondary_recipient + } + scope:secondary_actor = { + betrothed != scope:secondary_recipient + } + } + } + } + starts_enabled = { + trigger_if = { + limit = { + exists = scope:secondary_actor + scope:secondary_actor = { + betrothed = scope:secondary_recipient + } + } + scope:secondary_actor = { + matrilinear_betrothal = yes + } + } + trigger_else_if = { + limit = { + exists = scope:secondary_actor + scope:actor = scope:secondary_actor + scope:actor = { + is_female = yes + is_ai = no + } + } + always = yes + } + trigger_else = { + scope:actor = { + OR = { + faith = { + has_doctrine = doctrine_gender_female_dominated + } + AND = { + this = scope:recipient + exists = scope:secondary_recipient + scope:secondary_recipient = { + is_female = yes + } + faith = { has_doctrine = doctrine_gender_equal } + } + AND = { + exists = scope:secondary_actor + scope:actor = scope:secondary_actor + is_female = yes + is_ai = no + } + } + } + } + } + } + + send_option = { + is_shown = { + scope:secondary_actor = { + betrothed != scope:secondary_recipient + } + } + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + flag = hook + localization = MARRIAGE_HOOK + } + + send_option = { # FP3 + is_shown = { + scope:actor = { + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = can_trade_piety_for_marriage_acceptance + } + } + } + is_valid = { + scope:actor = { + any_character_struggle = { + involvement = involved + is_struggle_type = persian_struggle + } + } + scope:recipient = { + any_character_struggle = { + involvement = involved + is_struggle_type = persian_struggle + } + } + } + flag = piety_cost_reduction + localization = TRADE_PIETY_FOR_BETTER_AI_ACCEPTANCE + } + + send_option = { # EP3 Influence + is_shown = { # Actor must have a government that uses influence + scope:actor = { + government_has_flag = government_has_influence + } + } + is_valid = { + # Actor has enough influence + scope:actor = { influence >= medium_influence_value } + # Both characters are within the same top realm + custom_tooltip = { + text = not_same_realm_tt + scope:recipient.top_liege = scope:actor.top_liege + } + } + flag = influence_send_option + localization = TRADE_INFLUENCE_FOR_BETTER_AI_ACCEPTANCE + } + + send_option = { # MPO Herd + is_shown = { # Actor must have a government that uses Herd + scope:actor = { + government_has_flag = government_is_nomadic + is_ai = no + } + # Recipient must care about Herd + scope:recipient = { + government_has_flag = government_is_nomadic + } + } + is_valid = { + # Actor has enough Herd + scope:actor = { domicile.herd >= domicile.medium_herd_value } + } + flag = herd_send_option + localization = TRADE_HERD_FOR_BETTER_AI_ACCEPTANCE + } + + should_use_extra_icon = { + scope:actor = { has_usable_hook = scope:recipient } + } + extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" + + send_options_exclusive = no + + show_effects_in_notification = no + greeting = positive + + notification_text = { + first_valid = { + triggered_desc = { + trigger = { + scope:secondary_actor = { + is_adult = yes + } + scope:secondary_recipient = { + is_adult = yes + } + NOR = { + scope:secondary_actor = { has_been_promised_grand_wedding = yes } + scope:secondary_recipient = { has_been_promised_grand_wedding = yes } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:matrilineal = yes + scope:secondary_actor = scope:actor + scope:secondary_recipient = scope:recipient + } + desc = MARRIAGE_NOTIFICATION_BOTH_PERSONAL_MATRI + } + triggered_desc = { + trigger = { + scope:matrilineal = yes + scope:secondary_actor = scope:actor + } + desc = MARRIAGE_NOTIFICATION_ACTOR_PERSONAL_MATRI + } + triggered_desc = { + trigger = { + scope:matrilineal = yes + scope:secondary_recipient = scope:recipient + } + desc = MARRIAGE_NOTIFICATION_RECIPIENT_PERSONAL_MATRI + } + triggered_desc = { + trigger = { + scope:matrilineal = yes + } + desc = MARRIAGE_NOTIFICATION_MATRI + } + triggered_desc = { + trigger = { + scope:secondary_actor = scope:actor + scope:secondary_recipient = scope:recipient + } + desc = MARRIAGE_NOTIFICATION_BOTH_PERSONAL + } + triggered_desc = { + trigger = { + scope:secondary_actor = scope:actor + } + desc = MARRIAGE_NOTIFICATION_ACTOR_PERSONAL + } + triggered_desc = { + trigger = { + scope:secondary_recipient = scope:recipient + } + desc = MARRIAGE_NOTIFICATION_RECIPIENT_PERSONAL + } + desc = MARRIAGE_NOTIFICATION + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:matrilineal = yes + scope:secondary_actor = scope:actor + scope:secondary_recipient = scope:recipient + } + desc = BETROTHAL_NOTIFICATION_BOTH_PERSONAL_MATRI + } + triggered_desc = { + trigger = { + scope:matrilineal = yes + scope:secondary_actor = scope:actor + } + desc = BETROTHAL_NOTIFICATION_ACTOR_PERSONAL_MATRI + } + triggered_desc = { + trigger = { + scope:matrilineal = yes + scope:secondary_recipient = scope:recipient + } + desc = BETROTHAL_NOTIFICATION_RECIPIENT_PERSONAL_MATRI + } + triggered_desc = { + trigger = { + scope:matrilineal = yes + } + desc = BETROTHAL_NOTIFICATION_MATRI + } + triggered_desc = { + trigger = { + scope:secondary_actor = scope:actor + scope:secondary_recipient = scope:recipient + } + desc = BETROTHAL_NOTIFICATION_BOTH_PERSONAL + } + triggered_desc = { + trigger = { + scope:secondary_actor = scope:actor + } + desc = BETROTHAL_NOTIFICATION_ACTOR_PERSONAL + } + triggered_desc = { + trigger = { + scope:secondary_recipient = scope:recipient + } + desc = BETROTHAL_NOTIFICATION_RECIPIENT_PERSONAL + } + desc = BETROTHAL_NOTIFICATION + } + } + } + } +} + +#This interaction is referenced in code! If it's renamed you have to ping a coder +marry_off_interaction = { + icon = icon_marriage + category = interaction_category_diplomacy + common_interaction = yes + + desc = marry_off_interaction_desc + + send_name = marry_off_send + needs_recipient_to_open = no + special_interaction = arrange_marriage_interaction + interface = marriage + redirect = { + if = { + limit = { + exists = scope:secondary_actor + } + scope:recipient = { + save_scope_as = secondary_recipient + matchmaker = { + save_scope_as = recipient + } + } + + } + else = { + scope:recipient = { + save_scope_as = secondary_actor + } + clear_saved_scope = recipient + } + } + + populate_recipient_list = { + #populate only with your courtiers or children/grandchildren if you are a landless adventurer + if = { + limit = { + scope:actor = { + has_government = landless_adventurer_government + } + } + scope:secondary_actor = { + if = { + limit = { + scope:actor != this + } + add_to_list = characters + } + every_courtier = { + limit = { + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + can_marry_character_trigger = { CHARACTER = scope:actor } + } + } + add_to_list = characters + } + every_courtier_away = { + limit = { + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + can_marry_character_trigger = { CHARACTER = scope:actor } + } + } + add_to_list = characters + } + every_child = { + even_if_dead = yes + if = { + limit = { + is_alive = yes + NOT = { is_in_list = characters } + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + can_marry_character_trigger = { CHARACTER = scope:actor } + } + } + add_to_list = characters + } + every_child = { + even_if_dead = yes + if = { + limit = { + is_alive = yes + NOT = { is_in_list = characters } + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + can_marry_character_trigger = { CHARACTER = scope:actor } + } + } + add_to_list = characters + } + every_child = { + if = { + limit = { + is_alive = yes + NOT = { is_in_list = characters } + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + can_marry_character_trigger = { CHARACTER = scope:actor } + } + } + add_to_list = characters + } + } + } + } + } + } + #otherwise, populate with anyone eligible + else = { + scope:secondary_actor = { + every_opposite_sex_spouse_candidate = { add_to_list = characters } + if = { + limit = { allowed_to_marry_same_sex_trigger = yes } + every_same_sex_spouse_candidate = { + limit = { + scope:secondary_actor != this + } + add_to_list = characters + } + } + } + # Cleanup list if insular culture + if = { + limit = { + scope:secondary_actor.culture = { has_cultural_parameter = reduced_marriage_acceptance_distant_realms } + } + every_in_list = { + list = characters + limit = { + NOT = { top_liege.culture = scope:secondary_actor.top_liege.culture } + } + remove_from_list = characters + } + } + } + } + + cost = { + prestige = { + value = 0 + if = { + limit = { + exists = scope:actor + exists = scope:recipient + exists = scope:secondary_recipient + exists = scope:secondary_actor + scope:secondary_actor = { is_close_family_of = scope:actor } + scope:recipient = { + OR = { + AND = { + vassal_contract_has_flag = vassal_contract_marriage_favor + is_allied_to = scope:actor + } + NOT = { vassal_contract_has_flag = vassal_contract_marriage_favor} + } + } + } + add = { + scope:actor = { + every_vassal = { + limit = { + vassal_contract_has_flag = vassal_contract_marriage_favor + NOT = { is_allied_to = scope:actor } + NOR = { + this = scope:recipient + this = scope:secondary_recipient + } + } + add = medium_prestige_value + } + } + desc = VASSAL_WITH_MARRIAGE_FAVOR + } + } + } + + influence = { + value = 0 + if = { + limit = { scope:influence_send_option = yes } + add = scope:actor.medium_influence_value + desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION + } + } + } + + interface_priority = 60 + + # actor, recipient ... characters arranging the marriage + # secondary_actor, secondary_recipient ... characters that should marry + + is_shown = { + # Enable only for yourself if you're a landless adventurer + trigger_if = { + limit = { + scope:actor = { + has_government = landless_adventurer_government + } + } + scope:secondary_actor = { + scope:actor = this + } + } + scope:secondary_actor = { + #Is this someone I can marry off? + OR = { + is_courtier_of = scope:actor + AND = { + is_child_of = scope:actor + target_is_liege_or_above = scope:actor + } + scope:actor = this + } + #They can be married + can_marry_trigger = yes + #To account for a person marrying their concubines + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + can_marry_character_trigger = { CHARACTER = scope:actor } + } + } + # Block further marriage proposals for people who have a pending grand wedding + NOR = { + scope:secondary_actor ?= { has_been_promised_grand_wedding = yes } + scope:secondary_recipient ?= { has_been_promised_grand_wedding = yes } + } + } + + is_valid_showing_failures_only = { + #Diplomatic availability & prison + scope:secondary_actor = { + is_imprisoned = no + bp2_valid_for_standard_interactions_trigger = yes + } + marriage_interaction_non_loyal_diarchs_refuse_secondary_marriage_trigger = { TARGET = secondary_actor } + trigger_if = { + limit = { + scope:secondary_actor != scope:secondary_recipient + } + marriage_interaction_non_loyal_diarchs_refuse_secondary_marriage_trigger = { TARGET = secondary_recipient } + } + marriage_interaction_non_loyal_diarchs_refuse_secondary_marriage_trigger = { TARGET = actor } + marriage_interaction_non_loyal_diarchs_refuse_secondary_marriage_trigger = { TARGET = recipient } + } + + has_valid_target_showing_failures_only = { + marriage_interaction_valid_target_trigger = yes #Checks marriage status, betrothed, gender, consanguinity, faith hostility etc. + + #Diplomatic availability & prison (located here because these will never be set at the start) + scope:recipient = { + is_imprisoned = no + } + NOT = { + scope:actor = { + is_at_war_with = scope:recipient + } + } + trigger_if = { + limit = { scope:recipient != scope:secondary_recipient } + scope:secondary_recipient = { + is_imprisoned = no + bp2_valid_for_standard_interactions_trigger = yes + } + } + #secondary_actor is checked above because they are always available + + #Blocks AI from marrying player guests + scope:secondary_recipient = { + trigger_if = { + limit = { + is_pool_guest = yes + host = { + is_ai = no + this != scope:actor + } + } + NOT = { is_pool_guest_of = host } + } + } + } + + on_send = { + if = { + limit = { + scope:grand_wedding_promise = yes + } + scope:actor = { + set_variable = { + name = grand_wedding_promise_pending + days = 10 + } + if = { + limit = { + is_ai = yes + } + remove_short_term_gold = ai_wedding_promise_gold_actor + } + #if = { # Activity count debugging, left in for QA purposes + # limit = { + # NOT = { + # exists = global_var:wedding_promise + # } + # } + # set_global_variable = { + # name = wedding_promise + # value = 1 + # } + #} + #else = { + # change_global_variable = { + # name = wedding_promise + # add = 1 + # } + #} + } + } + } + + on_accept = { + marriage_interaction_on_accept_effect = yes + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_gain + DESC = clan_unity_marry_off.desc + REVERSE_NON_HOUSE_TARGET = no + } + + scope:actor = { + if = { + limit = { + scope:herd_send_option = yes + } + pay_herd = { + target = scope:recipient + value = scope:actor.domicile.medium_herd_value + } + } + if = { + limit = { + has_variable = grand_wedding_promise_pending + } + remove_variable = grand_wedding_promise_pending + } + } + } + + on_decline = { + scope:actor = { + if = { + limit = { this != scope:recipient } + trigger_event = marriage_interaction.0011 + } + if = { + limit = { + has_variable = grand_wedding_promise_pending + } + remove_variable = grand_wedding_promise_pending + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_loss + DESC = clan_unity_marry_off_decline.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + auto_accept = { + marriage_interaction_auto_accept_trigger = yes #Strong hook conditions + } + + ai_accept = { + base = 0 # Should be 0 for all interactions + + marriage_ai_accept_modifier = yes + + # Unity modifiers + evaluate_action_increasing_house_unity = { + VALUE = 100 + } + } + + send_option = { + flag = grand_wedding_promise + localization = GRAND_WEDDING_PROMISE + + is_shown = { + scope:actor = { #Can organize a Grand Wedding + highest_held_title_tier > tier_barony + is_landed_or_landless_administrative = yes + trigger_if = { + limit = { + is_ai = yes + } + is_at_war = no + } + # DLC locked + has_dlc_feature = tours_and_tournaments + has_dlc_feature = advanced_activities + } + } + + current_description = { + desc = "GRAND_WEDDING_PROMISE_INFO" + } + + is_valid = { + scope:actor = { + gold >= real_wedding_cost_actor_scope + is_available = yes + custom_tooltip = { + text = grand_wedding_already_promised_tt + NOR = { + AND = { + has_variable = promised_grand_wedding_marriage_countdown + var:promised_grand_wedding_marriage_countdown = { is_alive = yes } + } + has_variable = grand_wedding_promise_pending + } + } + } + custom_tooltip = { + text = grand_wedding_only_dominant_side + trigger_if = { + limit = { + scope:secondary_actor ?= { + is_female = yes + } + } + OR = { + scope:secondary_actor ?= { matrilinear_betrothal = yes } + scope:matrilineal = yes + } + } + trigger_else = { + NOR = { + scope:secondary_actor ?= { matrilinear_betrothal = yes } + scope:matrilineal = yes + } + } + } + custom_tooltip = { + text = grand_wedding_only_family + scope:secondary_actor ?= { + is_close_or_extended_family_of = scope:actor + } + } + } + } + + send_option = { + flag = matrilineal + localization = "MATRILINEAL_OFFER" + starts_enabled = { + scope:actor = { + OR = { + faith = { + has_doctrine = doctrine_gender_female_dominated + } + AND = { + scope:secondary_actor = { is_female = yes } + faith = { has_doctrine = doctrine_gender_equal } + } + AND = { + exists = scope:secondary_actor + scope:actor = scope:secondary_actor + is_female = yes + is_ai = no + } + } + } + } + } + + send_option = { + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + flag = hook + localization = MARRIAGE_HOOK + } + #This option cannot be linked with the hook icon, because recipient isn't known in the right-click menu + + send_option = { # EP3 Influence + is_shown = { # Actor must have a government that uses influence + scope:actor = { + government_has_flag = government_has_influence + } + } + is_valid = { + # Actor has enough influence + scope:actor = { influence >= medium_influence_value } + # Both characters are within the same top realm + custom_tooltip = { + text = not_same_realm_tt + scope:recipient.top_liege = scope:actor.top_liege + } + } + flag = influence_send_option + localization = TRADE_INFLUENCE_FOR_BETTER_AI_ACCEPTANCE + } + send_option = { # MPO Herd + is_shown = { # Actor must have a government that uses Herd + scope:actor = { + government_has_flag = government_is_nomadic + is_ai = no + } + # Recipient must care about Herd + scope:recipient = { + government_has_flag = government_is_nomadic + } + } + is_valid = { + # Actor has enough Herd + scope:actor = { domicile.herd >= domicile.medium_herd_value } + } + flag = herd_send_option + localization = TRADE_HERD_FOR_BETTER_AI_ACCEPTANCE + } + + send_options_exclusive = no + + show_effects_in_notification = no + greeting = positive + + notification_text = { + first_valid = { + triggered_desc = { + trigger = { + scope:secondary_actor = { + is_adult = yes + } + scope:secondary_recipient = { + is_adult = yes + } + NOR = { + scope:secondary_actor = { has_been_promised_grand_wedding = yes } + scope:secondary_recipient = { has_been_promised_grand_wedding = yes } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:matrilineal = yes + scope:secondary_actor = scope:actor + scope:secondary_recipient = scope:recipient + } + desc = MARRIAGE_NOTIFICATION_BOTH_PERSONAL_MATRI + } + triggered_desc = { + trigger = { + scope:matrilineal = yes + scope:secondary_actor = scope:actor + } + desc = MARRIAGE_NOTIFICATION_ACTOR_PERSONAL_MATRI + } + triggered_desc = { + trigger = { + scope:matrilineal = yes + scope:secondary_recipient = scope:recipient + } + desc = MARRIAGE_NOTIFICATION_RECIPIENT_PERSONAL_MATRI + } + triggered_desc = { + trigger = { + scope:matrilineal = yes + } + desc = MARRIAGE_NOTIFICATION_MATRI + } + triggered_desc = { + trigger = { + scope:secondary_actor = scope:actor + scope:secondary_recipient = scope:recipient + } + desc = MARRIAGE_NOTIFICATION_BOTH_PERSONAL + } + triggered_desc = { + trigger = { + scope:secondary_actor = scope:actor + } + desc = MARRIAGE_NOTIFICATION_ACTOR_PERSONAL + } + triggered_desc = { + trigger = { + scope:secondary_recipient = scope:recipient + } + desc = MARRIAGE_NOTIFICATION_RECIPIENT_PERSONAL + } + desc = MARRIAGE_NOTIFICATION + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:matrilineal = yes + scope:secondary_actor = scope:actor + scope:secondary_recipient = scope:recipient + } + desc = BETROTHAL_NOTIFICATION_BOTH_PERSONAL_MATRI + } + triggered_desc = { + trigger = { + scope:matrilineal = yes + scope:secondary_actor = scope:actor + } + desc = BETROTHAL_NOTIFICATION_ACTOR_PERSONAL_MATRI + } + triggered_desc = { + trigger = { + scope:matrilineal = yes + scope:secondary_recipient = scope:recipient + } + desc = BETROTHAL_NOTIFICATION_RECIPIENT_PERSONAL_MATRI + } + triggered_desc = { + trigger = { + scope:matrilineal = yes + } + desc = BETROTHAL_NOTIFICATION_MATRI + } + triggered_desc = { + trigger = { + scope:secondary_actor = scope:actor + scope:secondary_recipient = scope:recipient + } + desc = BETROTHAL_NOTIFICATION_BOTH_PERSONAL + } + triggered_desc = { + trigger = { + scope:secondary_actor = scope:actor + } + desc = BETROTHAL_NOTIFICATION_ACTOR_PERSONAL + } + triggered_desc = { + trigger = { + scope:secondary_recipient = scope:recipient + } + desc = BETROTHAL_NOTIFICATION_RECIPIENT_PERSONAL + } + desc = BETROTHAL_NOTIFICATION + } + } + } + } +} + +break_betrothal_interaction = { + category = interaction_category_diplomacy + special_interaction = break_betrothal_interaction + use_diplomatic_range = no + icon = icon_marriage + interface_priority = 30 + + is_shown = { + OR = { + #Betrothed to betrothed + scope:actor.betrothed = scope:recipient + + #Actor breaking recipient's betrothal with their courtier/vassal child + scope:actor = { + any_courtier = { + is_ai = yes + is_betrothed = yes + betrothed = { this = scope:recipient } + OR = { + is_playable_character = no + any_parent = { this = scope:actor } + } + } + } + + #Actor breaking the betrothal of their courtier/vassal child + scope:recipient = { + is_ai = yes + is_betrothed = yes + OR = { + AND = { + is_playable_character = no + liege = scope:actor + } + AND = { + is_child_of = scope:actor + NOT = { + matchmaker = { + is_parent_of = prev + this != scope:actor + } + } + OR = { + is_playable_character = no + target_is_liege_or_above = scope:actor + } + } + } + betrothed = { always = yes } + } + + #Break recipient's betrothal with actor's vassal child/courtier + scope:recipient = { + is_betrothed = yes + betrothed = { + is_ai = yes + OR = { + AND = { + is_child_of = scope:actor + target_is_liege_or_above = scope:actor + NOT = { + matchmaker = { + is_parent_of = prev + this != scope:actor + } + } + } + AND = { + is_playable_character = no + liege = scope:actor + } + } + } + } + + #Actor breaking their betrothal to recipient's courtier/vassal child + AND = { + scope:actor = { is_betrothed = yes } + scope:recipient = { + OR = { + #Check for courtiers + any_courtier = { + is_betrothed = yes + betrothed = scope:actor + liege = scope:recipient + } + #Check for vassal children + any_child = { + is_betrothed = yes + betrothed = scope:actor + OR = { + is_playable_character = no + target_is_liege_or_above = scope:recipient + } + NOT = { + matchmaker = { + is_parent_of = prev + this != scope:actor + } + } + } + } + } + } + } + } + + is_valid = { + + } + + is_valid_showing_failures_only = { + scope:recipient = { NOT = { has_strong_hook = scope:actor } } + # Recipient is the betrothed + custom_description = { + text = break_betrothal_hook_used + object = scope:recipient + trigger_if = { + limit = { + exists = scope:recipient.betrothed + OR = { + scope:recipient.betrothed = scope:actor + scope:recipient.betrothed = { + is_ai = yes + OR = { + AND = { + is_child_of = scope:actor + target_is_liege_or_above = scope:actor + NOT = { + matchmaker = { + is_parent_of = prev + this != scope:actor + } + } + } + AND = { + is_playable_character = no + liege = scope:actor + } + } + } + } + exists = scope:recipient.var:hook_used_for_betrothal + } + scope:recipient.var:hook_used_for_betrothal = { + this != scope:recipient.betrothed + } + } + } + + custom_description = { + text = break_betrothal_hook_used + object = scope:recipient + trigger_if = { + limit = { + exists = scope:recipient.betrothed + OR = { + scope:recipient = scope:actor + scope:recipient = { + is_ai = yes + OR = { + AND = { + is_child_of = scope:actor + target_is_liege_or_above = scope:actor + NOT = { + matchmaker = { + is_parent_of = prev + this != scope:actor + } + } + } + AND = { + is_playable_character = no + liege = scope:actor + } + } + } + } + exists = scope:recipient.betrothed.var:hook_used_for_betrothal + } + scope:recipient.betrothed.var:hook_used_for_betrothal = { + this != scope:recipient + } + } + } + + # Secondary Recipient is the betrothed + custom_description = { + text = break_betrothal_hook_used + object = scope:recipient + trigger_if = { + limit = { + scope:recipient = { + OR = { + #Check for courtiers + any_courtier = { + is_betrothed = yes + betrothed = scope:actor + liege = scope:recipient + exists = var:hook_used_for_betrothal + var:hook_used_for_betrothal = { + this = scope:actor + } + } + #Check for vassal children + any_child = { + is_betrothed = yes + betrothed = scope:actor + OR = { + is_playable_character = no + target_is_liege_or_above = scope:recipient + } + NOT = { + matchmaker = { + is_parent_of = prev + this != scope:actor + } + } + exists = var:hook_used_for_betrothal + var:hook_used_for_betrothal = { + this = scope:actor + } + } + } + } + } + always = no + } + } + + # Secondary Actor and Recipient were promised a Grand Wedding, and the Activity has already been organized and is ongoing + custom_description = { + text = break_betrothal_gwedding_ongoing + trigger_if = { + limit = { + OR = { + scope:recipient = { has_been_promised_grand_wedding = yes } + scope:recipient.betrothed = { has_been_promised_grand_wedding = yes } + } + } + NOR = { + scope:recipient.involved_activity ?= { + has_activity_type = activity_wedding + OR = { + special_guest:spouse_1 ?= scope:recipient + special_guest:spouse_2 ?= scope:recipient + special_guest:spouse_1 ?= scope:recipient.betrothed + special_guest:spouse_2 ?= scope:recipient.betrothed + } + } + scope:recipient.betrothed.involved_activity ?= { + has_activity_type = activity_wedding + OR = { + special_guest:spouse_1 ?= scope:recipient + special_guest:spouse_2 ?= scope:recipient + special_guest:spouse_1 ?= scope:recipient.betrothed + special_guest:spouse_2 ?= scope:recipient.betrothed + } + } + } + } + } + } + + on_accept = { + #Identifies the "injured party" + scope:recipient = { + if = { + limit = { matchmaker = scope:actor } + betrothed = { save_scope_as = rejected_betrothed } + save_scope_as = rejecting_betrothed + } + else_if = { + limit = { + OR = { + #Check for courtiers + any_courtier = { + is_betrothed = yes + is_ai = yes + betrothed = scope:actor + liege = scope:recipient + } + #Check for vassal children + any_child = { + is_betrothed = yes + is_ai = yes + betrothed = scope:actor + target_is_liege_or_above = scope:recipient + } + } + } + scope:actor.betrothed = { + save_scope_as = rejected_betrothed + } + scope:actor = { + save_scope_as = rejecting_betrothed + } + } + + else = { + save_scope_as = rejected_betrothed + betrothed = { save_scope_as = rejecting_betrothed } + } + } + + # If it was a Grand Wedding, find the host + scope:rejecting_betrothed.var:promised_grand_wedding_by ?= { + save_scope_as = promising_host + } + + scope:recipient = { trigger_event = marriage_interaction.0020 } + + #Tooltip for betrothal breakage + show_as_tooltip = { + scope:rejected_betrothed = { + break_betrothal = scope:rejecting_betrothed + } + } + + #Figures out if the liege of rejected_betrothed cares + scope:rejected_betrothed = { + if = { + limit = { #The liege matter when assigning prestige/opinion hits + matchmaker = { + this != scope:rejected_betrothed + is_close_or_extended_family_of = scope:rejected_betrothed + } + } + + matchmaker = { save_scope_as = rejected_betrothal_owner } + } + + else = { #The liege doesn't matter, only the betrothed + save_scope_as = rejected_betrothal_owner + } + } + + if = { + limit = { #Only if you had no reason to break the betrothal + scope:rejected_betrothed = { is_eunuch_trigger = no } + scope:rejecting_betrothed = { is_eunuch_trigger = no } + NOR = { + scope:rejected_betrothed = { has_trait_with_flag = can_not_marry } + scope:rejecting_betrothed = { has_trait_with_flag = can_not_marry } + scope:rejected_betrothed = { + allowed_to_marry_same_sex_trigger = no + sex_same_as = scope:rejecting_betrothed + } + scope:rejecting_betrothed = { + allowed_to_marry_same_sex_trigger = no + sex_same_as = scope:rejected_betrothed + } + # Prestige loss for Grand Weddings is handled below in the specific effect + scope:rejecting_betrothed = { has_been_promised_grand_wedding = yes } + scope:rejected_betrothed = { has_been_promised_grand_wedding = yes } + } + } + #Prestige penalty + if = { + limit = { + OR = { + scope:rejected_betrothed = { highest_held_title_tier = tier_empire } + scope:rejected_betrothal_owner = { highest_held_title_tier = tier_empire } + } + #Only applied for relevant characters + OR = { + scope:rejected_betrothed = { + OR = { + is_close_family_of = scope:actor + AND = { + exists = dynasty + exists = scope:actor.dynasty + dynasty = scope:actor.dynasty + } + } + } + scope:rejecting_betrothed = { + OR = { + is_close_family_of = scope:actor + AND = { + exists = dynasty + exists = scope:actor.dynasty + dynasty = scope:actor.dynasty + } + } + } + scope:actor = { + yields_alliance = { + candidate = scope:rejecting_betrothed + target = scope:rejected_betrothal_owner + target_candidate = scope:rejected_betrothed + } + } + } + } + scope:actor = { add_prestige = massive_prestige_loss } + } + + else_if = { + limit = { + OR = { + scope:rejected_betrothed = { highest_held_title_tier = tier_kingdom } + scope:rejected_betrothal_owner = { highest_held_title_tier = tier_kingdom } + } + #Only applied for relevant characters + OR = { + scope:rejected_betrothed = { + OR = { + is_close_family_of = scope:actor + AND = { + exists = dynasty + exists = scope:actor.dynasty + dynasty = scope:actor.dynasty + } + } + } + scope:rejecting_betrothed = { + OR = { + is_close_family_of = scope:actor + AND = { + exists = dynasty + exists = scope:actor.dynasty + dynasty = scope:actor.dynasty + } + } + } + scope:actor = { + yields_alliance = { + candidate = scope:rejecting_betrothed + target = scope:rejected_betrothal_owner + target_candidate = scope:rejected_betrothed + } + } + } + } + scope:actor = { add_prestige = major_prestige_loss } + } + + else_if = { + limit = { + OR = { + scope:rejected_betrothed = { highest_held_title_tier = tier_duchy } + scope:rejected_betrothal_owner = { highest_held_title_tier = tier_duchy } + } + #Only applied for relevant characters + OR = { + scope:rejected_betrothed = { + OR = { + is_close_family_of = scope:actor + AND = { + exists = dynasty + exists = scope:actor.dynasty + dynasty = scope:actor.dynasty + } + } + } + scope:rejecting_betrothed = { + OR = { + is_close_family_of = scope:actor + AND = { + exists = dynasty + exists = scope:actor.dynasty + dynasty = scope:actor.dynasty + } + } + } + scope:actor = { + yields_alliance = { + candidate = scope:rejecting_betrothed + target = scope:rejected_betrothal_owner + target_candidate = scope:rejected_betrothed + } + } + } + } + scope:actor = { add_prestige = medium_prestige_loss } + } + + else_if = { + limit = { + OR = { + scope:rejected_betrothed = { highest_held_title_tier = tier_county } + scope:rejected_betrothal_owner = { highest_held_title_tier = tier_county } + } + #Only applied for relevant characters + OR = { + scope:rejected_betrothed = { + OR = { + is_close_family_of = scope:actor + AND = { + exists = dynasty + exists = scope:actor.dynasty + dynasty = scope:actor.dynasty + } + } + } + scope:rejecting_betrothed = { + OR = { + is_close_family_of = scope:actor + AND = { + exists = dynasty + exists = scope:actor.dynasty + dynasty = scope:actor.dynasty + } + } + } + scope:actor = { + yields_alliance = { + candidate = scope:rejecting_betrothed + target = scope:rejected_betrothal_owner + target_candidate = scope:rejected_betrothed + } + } + } + } + scope:actor = { add_prestige = minor_prestige_loss } + } + + else_if = { + limit = { + OR = { + scope:rejected_betrothed = { highest_held_title_tier = tier_barony } + scope:rejected_betrothal_owner = { highest_held_title_tier = tier_barony } + } + #Only applied for relevant characters + OR = { + scope:rejected_betrothed = { + OR = { + is_close_family_of = scope:actor + AND = { + exists = dynasty + exists = scope:actor.dynasty + dynasty = scope:actor.dynasty + } + } + } + scope:rejecting_betrothed = { + OR = { + is_close_family_of = scope:actor + AND = { + exists = dynasty + exists = scope:actor.dynasty + dynasty = scope:actor.dynasty + } + } + } + scope:actor = { + yields_alliance = { + candidate = scope:rejecting_betrothed + target = scope:rejected_betrothal_owner + target_candidate = scope:rejected_betrothed + } + } + } + } + scope:actor = { add_prestige = miniscule_prestige_loss } + } + } + + ############################################ + # EP2 - Breaking a Grand Wedding Betrothal # + ############################################ + if = { + limit = { + # There is no forced reason for breaking the betrothal + scope:rejected_betrothed = { is_eunuch_trigger = no } + scope:rejecting_betrothed = { is_eunuch_trigger = no } + NOR = { + scope:rejected_betrothed = { has_trait_with_flag = can_not_marry } + scope:rejecting_betrothed = { has_trait_with_flag = can_not_marry } + scope:rejecting_betrothed = { + allowed_to_marry_same_sex_trigger = no + sex_same_as = scope:rejected_betrothed + } + scope:rejected_betrothed = { + allowed_to_marry_same_sex_trigger = no + sex_same_as = scope:rejecting_betrothed + } + } + # A Grand Wedding was promised + OR = { + scope:rejecting_betrothed = { + has_been_promised_grand_wedding = yes + } + scope:rejected_betrothed = { + has_been_promised_grand_wedding = yes + } + } + } + scope:actor = { break_grand_wedding_betrothal_effect = yes } + scope:rejected_betrothed = { trigger_event = marriage_interaction.0001 } + } + + ###################################### + # Opinion hits & notification events # + ###################################### + #Personal opinion hit for the rejected_betrothed + else_if = { + limit = { scope:rejected_betrothed != scope:actor } + scope:rejected_betrothed = { + if = { + limit = { + is_eunuch_trigger = no + scope:rejecting_betrothed = { is_eunuch_trigger = no } + NOR = { + has_trait_with_flag = can_not_marry + scope:rejecting_betrothed = { has_trait_with_flag = can_not_marry } + scope:rejecting_betrothed = { + allowed_to_marry_same_sex_trigger = no + sex_same_as = scope:rejected_betrothed + } + AND = { + allowed_to_marry_same_sex_trigger = no + sex_same_as = scope:rejecting_betrothed + } + } + } + show_as_tooltip = { + add_opinion = { + target = scope:actor + modifier = broke_betrothal_opinion + } + } + } + + hidden_effect = { trigger_event = marriage_interaction.0001 } + } + } + else = { + hidden_effect = { + scope:rejecting_betrothed = { + break_betrothal = scope:rejected_betrothed + } + } + } + + #Personal opinion hit for the rejected_betrothal_owner + if = { + limit = { + NOR = { + scope:rejected_betrothed = { + this = scope:rejected_betrothal_owner + } + scope:actor = { + this = scope:rejected_betrothal_owner + } + scope:actor = { + this = scope:rejected_betrothed + } + } + } + scope:rejected_betrothal_owner = { + if = { + limit = { + scope:rejected_betrothed = { is_eunuch_trigger = no } + scope:rejecting_betrothed = { is_eunuch_trigger = no } + NOR = { + scope:rejected_betrothed = { has_trait_with_flag = can_not_marry } + scope:rejecting_betrothed = { has_trait_with_flag = can_not_marry } + scope:rejected_betrothed = { + allowed_to_marry_same_sex_trigger = no + sex_same_as = scope:rejecting_betrothed + } + scope:rejecting_betrothed = { + allowed_to_marry_same_sex_trigger = no + sex_same_as = scope:rejected_betrothed + } + } + } + if = { + limit = { + NOR = { + scope:rejected_betrothed = { has_been_promised_grand_wedding = yes } + scope:rejecting_betrothed = { has_been_promised_grand_wedding = yes } + } + } + show_as_tooltip = { + add_opinion = { + target = scope:actor + modifier = broke_betrothal_opinion + } + } + } + } + + hidden_effect = { trigger_event = marriage_interaction.0001 } + } + } + + if = { + limit = { + scope:rejected_betrothed = { is_eunuch_trigger = no } + scope:rejecting_betrothed = { is_eunuch_trigger = no } + NOR = { + scope:rejected_betrothed = { has_trait_with_flag = can_not_marry } + scope:rejecting_betrothed = { has_trait_with_flag = can_not_marry } + scope:rejected_betrothed = { + allowed_to_marry_same_sex_trigger = no + sex_same_as = scope:rejecting_betrothed + } + scope:rejecting_betrothed = { + allowed_to_marry_same_sex_trigger = no + sex_same_as = scope:rejected_betrothed + } + } + } + #Opinion hit for close relatives of the rejected_betrothed (that are not rejected_betrothed_owner) + if = { + limit = { + scope:rejected_betrothed != scope:actor + scope:rejected_betrothed = { + any_close_or_extended_family_member = { + this != scope:rejected_betrothal_owner + count >= 1 + } + } + } + if = { + limit = { + OR = { + scope:rejected_betrothed = { has_been_promised_grand_wedding = yes } + scope:rejecting_betrothed = { has_been_promised_grand_wedding = yes } + } + } + scope:rejected_betrothed = { + every_close_or_extended_family_member = { + limit = { + this != scope:rejected_betrothal_owner + } + custom = all_family_members + + add_opinion = { + target = scope:actor + modifier = broke_betrothal_grand_wedding_opinion + opinion = -50 + } + } + } + } + else = { + scope:rejected_betrothed = { + every_close_or_extended_family_member = { + limit = { + this != scope:rejected_betrothal_owner + } + custom = all_family_members + add_opinion = { + target = scope:actor + modifier = broke_betrothal_opinion + } + } + } + } + } + + #Opinion hit for close relatives of the rejecting_betrothed (that are not also close relatives to rejected_betrothed) + if = { + limit = { + NOR = { + scope:rejecting_betrothed = scope:actor + scope:rejected_betrothed = scope:actor + } + scope:rejecting_betrothed = { + any_close_or_extended_family_member = { + NOR = { + is_close_or_extended_family_of = scope:rejected_betrothed + this = scope:rejected_betrothal_owner + this = scope:rejected_betrothed + } + count >= 1 + } + } + } + if = { + limit = { + OR = { + scope:rejected_betrothed = { has_been_promised_grand_wedding = yes } + scope:rejecting_betrothed = { has_been_promised_grand_wedding = yes } + } + } + scope:rejecting_betrothed = { + every_close_or_extended_family_member = { + limit = { + NOR = { + this = scope:rejected_betrothal_owner + is_close_or_extended_family_of = scope:rejected_betrothed + this = scope:rejected_betrothed + } + } + custom = all_family_members + + add_opinion = { + target = scope:actor + modifier = broke_betrothal_grand_wedding_opinion + opinion = -50 + } + } + } + } + else = { + scope:rejecting_betrothed = { + every_close_or_extended_family_member = { + limit = { + NOR = { + is_close_or_extended_family_of = scope:rejected_betrothed + this = scope:rejected_betrothal_owner + this = scope:rejected_betrothed + } + } + custom = all_family_members + add_opinion = { + target = scope:actor + modifier = broke_betrothal_opinion + } + } + } + } + } + } + + scope:actor = { + # Was the marriage of relevence to the player? + if = { + limit = { + scope:rejecting_betrothed = { + is_player_heir_of = scope:actor + } + } + hidden_effect = { + send_interface_toast = { + type = msg_break_betrothal_player_heir + title = msg_break_betrothal + left_icon = scope:rejecting_betrothed + right_icon = scope:rejected_betrothed + custom_tooltip = break_betrothal_hook_toast_desc + } + } + } + else_if = { + limit = { + scope:actor != scope:rejecting_betrothed + } + hidden_effect = { + send_interface_message = { + type = msg_break_betrothal + title = msg_break_betrothal + left_icon = scope:rejecting_betrothed + right_icon = scope:rejected_betrothed + custom_tooltip = break_betrothal_hook_toast_desc + } + } + } + + #Was the marriage promised to a vassal? + if = { + limit = { + exists = var:promised_to_marry_1 + var:promised_to_marry_1 = { + this = scope:rejected_betrothed + any_parent = { + is_vassal_of = scope:actor + } + } + exists = var:promised_to_marry_2 + var:promised_to_marry_2 = { + this = scope:rejecting_betrothed + is_close_family_of = scope:actor + } + } + remove_variable = promised_to_marry_1 + remove_variable = promised_to_marry_2 + trigger_event = clan.1002 + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = major_unity_loss + DESC = clan_unity_betrothal_breakage.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + auto_accept = yes +} + +# Stripped down version of make_concubine_interaction for the AI +# Avoids redirection logic and recipient list building to improve performance +ai_make_concubine_interaction = { + hidden = yes + + ai_targets = { + ai_recipients = prisoners + } + ai_targets = { + ai_recipients = courtiers + max = 10 + } + ai_target_quick_trigger = { + adult = yes + owner_attracted = yes # Not optimal, but saves a lot of performance + } + ai_frequency_by_tier = { + barony = 0 + county = 60 + duchy = 12 + kingdom = 12 + empire = 12 + hegemony = 3 + } + + ai_potential = { + is_playable_character = yes + is_adult = yes + fertility > 0 + allowed_more_concubines = yes + NOR = { + has_trait = chaste + has_trait = celibate + has_sexuality = asexual + } + } + + is_shown = { + make_concubine_is_shown_trigger = yes + } + + is_valid_showing_failures_only = { + make_concubine_is_valid_trigger = yes + } + + auto_accept = yes + + ai_will_do = { + base = 0 + + modifier = { # Basic Filtering + add = 100 + scope:actor = { + number_of_concubines < number_of_desired_concubines + } + scope:recipient = { + can_have_children_with = { CHARACTER = scope:actor } # Only if you can have kids since this is about fertility and genetic traits + fertility > 0.2 + is_young_character = yes + } + } + + modifier = { + add = 100 + scope:recipient = { + is_imprisoned_by = scope:actor + can_have_children_with = { CHARACTER = scope:actor } # Only if you can have kids since this is about fertility and genetic traits + OR = { + is_lowborn = no + num_of_good_genetic_traits > 0 + } + fertility > 0.1 + trigger_if = { + limit = { + is_female = yes + } + is_aging_character = no + } + } + } + + modifier = { + add = 100 + scope:actor = { + allowed_to_marry_same_sex_trigger = yes + sex_same_as = scope:recipient + is_attracted_to_gender_of = scope:recipient + OR = { #If they're not in need of kids, or someone who they can have kids with + any_child = { + count >= 2 + } + any_consort = { + can_have_children_with = { CHARACTER = scope:actor } + fertility > 0.1 + } + } + } + } + + modifier = { #Even if you're allowed to take same-sex concubines we don't want the AI to do so without a good reason if they're not attracted to the person + add = -200 + scope:actor = { + allowed_to_marry_same_sex_trigger = yes + sex_same_as = scope:recipient + NOT = { is_attracted_to_gender_of = scope:recipient } + } + } + + modifier = { # If they don't have a batch of kids and opposite sex consorts to handle that situation + add = -200 + scope:actor = { + allowed_to_marry_same_sex_trigger = yes + sex_same_as = scope:recipient + NOT = { + any_child = { + count >= 2 + } + } + NOT = { + any_consort = { + can_have_children_with = { CHARACTER = scope:actor } + fertility > 0.1 + } + } + } + } + + # Unity modifiers + evaluate_action_increasing_house_unity = { + VALUE = 100 + } + + modifier = { # Incest Filtering: Hard NO! + factor = 0 + scope:actor = { + relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:recipient } + NOR = { + accepts_incest_with_trigger = { CHARACTER = scope:recipient } + sexually_liberal_trigger = yes + AND = { + primary_heir ?= { dynasty != root.dynasty } + NOT = { + primary_title = { + any_title_heir = { dynasty = root.dynasty } + } + } + } + } + } + } + + modifier = { # Incest Filtering: Not likely, but keep the door open... + factor = 0.2 + scope:actor = { + relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:recipient } + OR = { + accepts_incest_with_trigger = { CHARACTER = scope:recipient } + sexually_liberal_trigger = yes + AND = { + primary_heir ?= { dynasty != root.dynasty } + NOT = { + primary_title = { + any_title_heir = { dynasty = root.dynasty } + } + } + } + } + } + } + + modifier = { # Less likely if married to a player and the target is the player heir + factor = 0.4 + scope:actor = { + any_spouse = { + is_ai = no + scope:recipient = { + OR = { + is_primary_heir_of = prev + is_heir_of = prev + } + } + } + } + } + } + + on_accept = { + scope:actor = { + save_scope_as = secondary_actor + } + scope:recipient = { + save_scope_as = secondary_recipient + } + concubine_on_accept_effect = yes + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_gain + DESC = clan_unity_concubinage.desc + REVERSE_NON_HOUSE_TARGET = no + } + } +} + +make_concubine_interaction = { + category = interaction_category_diplomacy + icon = concubine_icon + + desc = make_concubine_interaction_desc + + interface = concubine_list + + redirect = { + # The UI will open to the already filled left and right first if we don't tell it we've got both sides filled + scope:actor = { + save_scope_as = secondary_actor + } + scope:recipient = { + save_scope_as = secondary_recipient + } + } + + populate_recipient_list = { + scope:actor = { + every_courtier = { + limit = { + can_become_concubine_of_character_trigger = { CHARACTER = scope:actor } + } + add_to_list = characters + } + every_prisoner = { + limit = { + NOT = { is_in_list = characters } + can_become_concubine_of_character_trigger = { CHARACTER = scope:actor } + } + add_to_list = characters + } + } + } + + is_shown = { + make_concubine_is_shown_trigger = yes + } + + is_valid_showing_failures_only = { + make_concubine_is_valid_trigger = yes + } + + auto_accept = yes + + on_accept = { + concubine_on_accept_effect = yes + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_gain + DESC = clan_unity_concubinage.desc + REVERSE_NON_HOUSE_TARGET = no + } + } +} + +find_concubine = { + category = interaction_category_diplomacy + icon = concubine_icon + + desc = find_concubine_desc + + interface = concubine_list + + needs_recipient_to_open = no + + redirect = { + scope:actor = { # The UI will open to the already filled left first if we don't tell it we've got "our side" actor which is always ourselves + save_scope_as = secondary_actor + } + if = { + limit = { + # This is needed for the UI to function properly. Initially UI opens with player as both actor and recipient + # After UI opens with empty recipient, player can click on a candidate + # When candidate is selected both primary and secondary recipient must be set for the interaction to work + scope:actor != scope:recipient + } + scope:recipient = { + save_scope_as = secondary_recipient + } + } + } + + populate_recipient_list = { + scope:actor = { + every_courtier = { + limit = { + can_become_concubine_of_character_trigger = { CHARACTER = scope:actor } + } + add_to_list = characters + } + every_prisoner = { + limit = { + NOT = { is_in_list = characters } + can_become_concubine_of_character_trigger = { CHARACTER = scope:actor } + } + add_to_list = characters + } + } + } + + is_shown = { + scope:actor = { + allowed_concubines = yes + is_adult = yes + trigger_if = { #So that we show the recipient list, but can also only use this on ourselves, we have to do this check in the beginning + limit = { + NOT = { exists = scope:secondary_recipient } + } + scope:actor = scope:recipient + } + } + trigger_if = { + limit = { + scope:actor != scope:recipient + } + scope:actor = { + trigger_if = { + limit = { + allowed_to_marry_same_sex_trigger = no + } + sex_opposite_of = scope:recipient + } + NOT = { relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:recipient } } + } + scope:recipient = { + can_become_concubine_of_character_trigger = { CHARACTER = scope:actor } + is_adult = yes + OR = { + is_imprisoned_by = scope:actor + is_courtier_of = scope:actor + } + } + } + } + + is_valid_showing_failures_only = { + custom_description = { + text = take_concubine_allowed_more + object = scope:recipient + scope:actor = { + allowed_more_concubines = yes + } + } + custom_description = { + text = take_concubine_available_character_opp + object = scope:actor + scope:actor = { + OR = { + any_courtier = { + can_become_concubine_of_character_trigger = { CHARACTER = scope:actor } + } + any_prisoner = { + can_become_concubine_of_character_trigger = { CHARACTER = scope:actor } + } + } + } + } + trigger_if = { + limit = { + scope:actor != scope:recipient + } + scope:recipient = { + can_become_concubine_of_character_trigger = { CHARACTER = scope:actor } + } + } + } + + can_be_picked = { + is_adult = yes + } + + auto_accept = yes + + ai_will_do = { + base = 0 + } + + on_accept = { + concubine_on_accept_effect = yes + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_gain + DESC = clan_unity_concubinage.desc + REVERSE_NON_HOUSE_TARGET = no + } + } +} + +offer_concubine = { + category = interaction_category_diplomacy + icon = concubine_icon + + desc = offer_concubine_desc + + ai_targets = { + ai_recipients = neighboring_rulers + ai_recipients = suzerain + ai_recipients = liege + max = 5 + } + ai_target_quick_trigger = { + adult = yes + } + ai_frequency_by_tier = { + barony = 0 + county = 36 + duchy = 36 + kingdom = 0 + empire = 0 + hegemony = 0 + } + + greeting = positive + notification_text = OFFER_CONCUBINE_NOTIFICATION + + #interface = concubine_list + + populate_recipient_list = { + scope: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 = { + scope:actor != scope:recipient + scope:actor = { + OR = { + culture = { has_cultural_tradition = tradition_concubines } + faith = { has_doctrine = doctrine_concubines } + } + } + scope:recipient = { + NOT = { government_has_flag = government_is_herder } + allowed_concubines = yes + is_adult = yes + } + } + + is_valid_showing_failures_only = { + custom_description = { + text = take_concubine_available_character_opp + object = scope:recipient + scope: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 + } + } + + trigger_if = { #Landless adventurers check range + limit = { + scope:actor = { + is_landless_adventurer = yes + } + } + ep3_laamp_diplo_range_trigger = { + TARGET = scope:recipient + LAAMP = scope:actor + } + } + } + + can_be_picked = { + is_adult = yes + } + + can_send = { + custom_description = { + text = character_unavailable_to_be_offered_as_concubine + object = scope:secondary_recipient + scope:secondary_recipient = { + can_be_offered_as_concubine_to_character_trigger = { + GIVER = scope:actor + CHARACTER = scope:recipient + } + } + } + } + + auto_accept = no + + ai_accept = { + base = 50 + + modifier = { + add = { + value = 50 + multiply = scope:secondary_recipient.num_of_good_genetic_traits + } + scope:secondary_recipient = { + num_of_good_genetic_traits > 0 + trigger_if = { + limit = { + is_female = yes + } + is_aging_character = no + } + } + desc = AI_POSITIVE_TRAIT_REASON + } + + modifier = { + add = { + value = 50 + } + scope:secondary_recipient = { + is_lowborn = no + trigger_if = { + limit = { + is_female = yes + } + is_aging_character = no + } + } + desc = AI_DYNASTY_PRESTIGE_REASON_NOBLE + } + + modifier = { + add = { + value = -50 + multiply = scope:secondary_recipient.num_of_bad_genetic_traits + } + scope:secondary_recipient = { + num_of_bad_genetic_traits > 0 + + trigger_if = { + limit = { + is_female = yes + } + is_aging_character = no + } + } + desc = AI_NEGATIVE_TRAIT_REASON + } + + modifier = { + add = { + value = -50 + } + scope:secondary_recipient = { + is_lowborn = yes + num_of_good_genetic_traits = 0 + trigger_if = { + limit = { + is_female = yes + } + is_aging_character = no + } + } + desc = AI_DYNASTY_PRESTIGE_REASON_LOWBORN_NO_POSITIVE_TRAIT + } + + opinion_modifier = { # Opinion of you + who = scope:recipient + opinion_target = scope:actor + multiplier = 1.0 + desc = AI_OPINION_REASON + } + + opinion_modifier = { # Opinion of concubine + who = scope:recipient + opinion_target = scope:secondary_recipient + multiplier = 0.25 + desc = AI_OPINION_REASON + } + + compare_modifier = { # Recipient is reluctant to marry old women (procreation is a key factor) + trigger = { + scope:secondary_recipient = { + is_young_character = no + is_female = yes + } + } + target = scope:secondary_recipient + value = age + multiplier = -5.0 + step = 1 + offset = -29 + desc = MARRY_AGE + } + + modifier = { # A Recipient is unwilling to take a same-sex concubine if their faith doesn't support it + add = -1000 + + scope:recipient = { + allowed_to_marry_same_sex_trigger = no + sex_same_as = scope:secondary_recipient + } + desc = SAME_SEX_MARRIAGE_FAITH_REASON_RECIPIENT + } + + modifier = { # Unwilling if they don't have a batch of kids and opposite sex consorts to handle that situation + add = -200 + scope:recipient = { + allowed_to_marry_same_sex_trigger = yes + sex_same_as = scope:secondary_recipient + trigger_if = { + limit = { + NOT = { + any_consort = { + can_have_children_with = { CHARACTER = scope:recipient } + fertility > 0.1 + } + } + } + any_child = { is_player_heir_of = root } + } + trigger_else = { + always = no + } + } + desc = AI_NO_FERTILITY_REASON + } + + modifier = { + add = 50 + scope:recipient = { + is_attracted_to_gender_of = scope:secondary_recipient + } + desc = AI_ATTRACTION_REASON + } + + modifier = { # A Recipient is more likely to agree if you're their liege + add = 40 + scope:actor = { is_landed = yes } + scope:recipient = { + is_landed = yes + 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_recipient = { + has_std_trigger = yes + } + desc = AI_STD_REASON + } + modifier = { + add = -250 + scope:secondary_recipient = { + has_trait_with_flag = epidemic_disease + } + desc = AI_CONTAGIOUS_REASON + } + modifier = { + add = -5000 + scope:secondary_recipient = { + fertility <= 0 + } + desc = AI_FERTILITY_REASON + } + modifier = { + scope:hook = yes + add = 500 + scope: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 + } + + # Unity modifiers + evaluate_action_increasing_house_unity = { + VALUE = 100 + } + } + + ai_potential = { + is_adult = yes + NOT = { has_trait = incapable } + is_at_war = no + NOR = { + has_trait = greedy + ai_greed > very_high_positive_ai_value + } + OR = { + culture = { has_cultural_tradition = tradition_concubines } + faith = { has_doctrine = doctrine_concubines } + } + } + + ai_will_do = { + base = 0 + + modifier = { # Basic Filtering + add = 100 + scope:recipient = { + number_of_concubines < number_of_desired_concubines + } + scope:secondary_recipient = { + trigger_if = { + limit = { + allowed_to_marry_same_sex_trigger = no + } + sex_opposite_of = scope:recipient + } + fertility > 0.2 + is_young_character = yes + NOR = { + is_councillor_of = scope:actor + is_of_major_interest_trigger = { + CHARACTER = scope:actor + } + is_concubine_of = scope:actor + } + } + } + + modifier = { # If secondary_recipient is close to actor, a good character, or if actor should take them as concubine + add = -100 + scope:secondary_recipient = { + is_of_minor_interest_trigger = { + CHARACTER = scope:actor + } + AND = { + can_become_concubine_of_character_trigger = { CHARACTER = scope:actor } + scope:actor = { number_of_concubines < number_of_desired_concubines } + } + } + } + + modifier = { # If secondary_recipient could be an agent... + add = 25 + scope:actor = { + any_scheme = { + scheme_target_character ?= scope:recipient + save_temporary_scope_as = scheme_check + } + } + scope:secondary_recipient = { + char_can_fit_into_scheme_trigger = { SCHEME = scope:scheme_check } + } + } + + modifier = { # More likely if it's a neighboring ruler that you want to like you + add = 50 + scope:recipient = { + any_neighboring_top_liege_realm_owner = { this = scope:actor } + max_military_strength > scope:actor.max_military_strength + } + } + + modifier = { # More likely if it's your friend and it's a nice concubine + add = 50 + scope:recipient = { + OR = { + has_relation_friend = scope:actor + has_relation_best_friend = scope:actor + } + } + scope:secondary_recipient = { + fertility > 0.2 + is_young_character = yes + OR = { + has_trait = lustful + num_of_good_genetic_traits > 0 + } + } + } + + modifier = { #Even if they're allowed to take same-sex concubines we don't want the AI to suggest it without a good reason if they're not attracted to the person + add = -200 + scope:recipient = { + allowed_to_marry_same_sex_trigger = yes + sex_same_as = scope:secondary_recipient + NOT = { is_attracted_to_gender_of = scope:secondary_recipient } + } + } + + # Unity modifiers + evaluate_action_increasing_house_unity = { + VALUE = 100 + } + + modifier = { # No if it's a same-sex concubinage and actor isn't accepting of it + factor = 0 + scope:actor = { + allowed_to_marry_same_sex_trigger = no + scope:recipient = { sex_same_as = scope:secondary_recipient } + } + } + + modifier = { # No if it's a same-sex concubinage and recipient isn't accepting of it + factor = 0 + scope:recipient = { + allowed_to_marry_same_sex_trigger = no + sex_same_as = scope:secondary_recipient + } + } + + modifier = { # Age considerations + factor = 0 + scope:recipient = { + OR = { + age >= scope:secondary_actor.age_plus_10 + age <= scope:secondary_actor.age_minus_10 + scope:secondary_actor.age >= 30 # Concubines are meant to be young... + } + } + } + + modifier = { # Incest Filtering: Hard NO! + factor = 0 + scope:recipient = { + relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_recipient } + NOR = { + accepts_incest_with_trigger = { CHARACTER = scope:secondary_recipient } + sexually_liberal_trigger = yes + } + } + } + + modifier = { # Incest Filtering: Not likely, but keep the door open... + factor = 0.2 + scope:recipient = { + relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_recipient } + OR = { + accepts_incest_with_trigger = { CHARACTER = scope:secondary_recipient } + sexually_liberal_trigger = yes + } + } + } + + modifier = { # Faith considerations + factor = 0 + scope:recipient = { + faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_hostile_level + } + } + NOR = { + has_relation_friend = scope:actor + has_relation_best_friend = scope:actor + } + } + } + } + + on_send = { + scope:secondary_recipient = { # to block the same character from being offered twice + add_character_flag = { + flag = has_been_offered_as_concubine + days = 5 + } + } + } + + on_accept = { + concubine_offer_on_accept_effect = yes + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_gain + DESC = clan_unity_concubinage_offer.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = msg_concubine_offer_rejected_title + right_icon = scope:recipient + left_icon = scope:secondary_recipient + custom_tooltip = msg_concubine_offer_rejected + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_loss + DESC = clan_unity_concubinage_offer_decline.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + send_options_exclusive = no + send_option = { + is_valid = { + scope: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" +} + +dismiss_concubine_interaction = { + category = interaction_category_diplomacy + use_diplomatic_range = no + icon = concubine_icon + + is_shown = { + scope:recipient = { + is_concubine_of = scope:actor + } + } + + is_valid_showing_failures_only = { + scope:recipient = { NOT = { has_strong_hook = scope:actor } } + scope:actor = { + custom_tooltip = { + NOT = { + var:family_widow_forbidden_divorce ?= scope:target + } + text = BOUND_TO_FAMILY_WIDOW + } + } + } + + auto_accept = yes + + on_accept = { + scope:actor = { + stress_impact = { + compassionate = minor_stress_impact_gain + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_neutral + title = msg_concubine_dismissed_title + right_icon = scope:recipient + remove_concubine = scope:recipient + } + } + } + + scope:recipient = { + # No point in sending a notification since the player can't be an unlanded concubine in any case + # trigger_event = marriage_interaction.0050 + + # Being thrown aside is humiliating, even if you didn't want to be a concubine in the first place. + add_opinion = { + modifier = set_me_aside_opinion + target = scope:actor + } + if = { + limit = { scope:actor = { has_relation_lover = scope:recipient } } + lover_breakup_effect = { + BREAKER = scope:actor + LOVER = scope:recipient + } + } + + # Figure out where we should go now that we're no longer a concubine. + if = { + limit = { + is_councillor_of = scope:actor + } + # Then they should remain in court + } + else_if = { #Dismiss to relevant court, or to pool + limit = { + any_close_family_member = { + is_landed_or_landless_administrative = yes + } + } + random_close_family_member = { + limit = { + is_child_of = scope:recipient + is_landed_or_landless_administrative = yes + } + alternative_limit = { + is_parent_of = scope:recipient + is_landed_or_landless_administrative = yes + } + alternative_limit = { + is_landed_or_landless_administrative = yes + } + add_courtier = scope:recipient + } + } + else = { + move_to_pool = yes + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_loss + DESC = clan_unity_concubinage_dismissal.desc + REVERSE_NON_HOUSE_TARGET = no + } + } +} + +divorce_character_interaction = { + category = interaction_category_diplomacy + use_diplomatic_range = no + icon = icon_marriage + + desc = divorce_character_interaction_desc + cost = { piety = divorce_cost } + + is_shown = { + scope:actor.faith = { + # We are not required to seek approval of a spiritual HoF + NAND = { + has_doctrine = doctrine_divorce_approval + has_doctrine = doctrine_spiritual_head + exists = religious_head + } + # We are not required to seek approval of a house head + NAND = { + has_doctrine = doctrine_divorce_approval + exists = scope:actor.house + exists = scope:actor.house.house_head + scope:actor = { is_house_head = no } + } + } + scope:recipient = { + is_spouse_of = scope:actor + is_concubine = no # Can set aside Concubines at any time + } + } + + is_valid_showing_failures_only = { + custom_tooltip = { + NOT = { + scope:actor.culture = { + has_cultural_parameter = cannot_divorce + } + } + text = CULTURE_FORBIDS_DIVORCE + } + NOT = { + scope:actor.faith = { + has_doctrine = doctrine_divorce_disallowed + } + } + scope:recipient = { NOT = { has_strong_hook = scope:actor } } + scope:actor = { + custom_tooltip = { + NOT = { + var:family_widow_forbidden_divorce ?= scope:target + } + text = BOUND_TO_FAMILY_WIDOW + } + } + } + + auto_accept = yes + + on_accept = { + scope:actor = { + divorce_effect = { + DIVORCER = scope:actor + DIVORCEE = scope:recipient + } + if = { + limit = { + allowed_concubines = yes + } + custom_tooltip = divorce_cannot_concubine_ex_wife + } + } + scope:recipient = { + trigger_event = marriage_interaction.0030 + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = major_unity_loss + DESC = clan_unity_divorce.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + # AI + ai_targets = { + ai_recipients = spouses + } + ai_frequency_by_tier = { + barony = 0 + county = 72 + duchy = 36 + kingdom = 36 + empire = 36 + hegemony = 36 + } + + ai_potential = { + is_ruler = yes + } + + ai_will_do = { + base = 0 + + modifier = { # The AI wants to divorce should they not have an heir that is their own child, and their spouse is infertile + add = 100 + scope:actor = { + fertility > 0.1 + NOT = { + any_child = { + is_heir_of = scope:actor + } + } + } + scope:recipient = { + is_ai = yes + fertility < 0.1 + } + } + + modifier = { # The AI will divorce if they're in a same-sex marriage and their faith changes its stance on the topic + add = 100 + scope:actor = { + sex_same_as = scope:recipient + allowed_to_marry_same_sex_trigger = no + } + } + } +} + +divorce_character_house_head_interaction = { + category = interaction_category_diplomacy + use_diplomatic_range = no + icon = icon_marriage + + cost = { + piety = divorce_cost + } + + redirect = { + scope:recipient = { + save_scope_as = secondary_recipient + } + if = { + limit = { + exists = scope:actor.house.house_head + } + scope:actor.house.house_head = { + save_scope_as = recipient + } + } + } + + greeting = positive + notification_text = ASK_FOR_DIVORCE_NOTIFICATION + + is_shown = { + exists = scope:actor.house.house_head + scope:actor != scope:actor.house.house_head # no need to ask yourself + scope:actor.faith = { + has_doctrine = doctrine_divorce_approval + } + NAND = { + exists = scope:actor.faith.religious_head + scope:actor.faith = { + has_doctrine = doctrine_spiritual_head + } + } + scope:secondary_recipient = { + is_spouse_of = scope:actor + is_concubine = no # Can set aside Concubines at any time + } + } + + is_valid_showing_failures_only = { + custom_tooltip = { + NOT = { + scope:actor.culture = { + has_cultural_parameter = cannot_divorce + } + } + text = CULTURE_FORBIDS_DIVORCE + } + NOT = { + scope:secondary_recipient = { has_strong_hook = scope:actor } + } + scope:actor = { + custom_tooltip = { + NOT = { + var:family_widow_forbidden_divorce ?= scope:target + } + text = BOUND_TO_FAMILY_WIDOW + } + } + } + + ai_accept = { + base = 0 # Should be 0 for all interactions + + divorce_character_ai_accept_modifier = yes + + modifier = { # Infertility + add = 20 + desc = DIVORCE_INFERTILE + scope:actor = { + fertility > 0.1 + } + scope:secondary_recipient = { + fertility < 0.1 + is_eunuch_trigger = no + NOT = { + any_child = { + is_child_of = scope:actor + } + } + } + } + + modifier = { # Negative for having given you children + add = -50 + desc = DIVORCE_GIVEN_CHILDREN + scope:secondary_recipient = { + any_child = { + count >= 3 + is_child_of = scope:actor + dynasty ?= scope:actor.dynasty + + } + } + } + + modifier = { # They are of the same dynasty as the House Head + trigger = { scope:recipient != scope:secondary_recipient } + add = -10 + desc = THEY_ARE_MY_DYNASTY_MEMBER + scope:recipient = { + is_lowborn = no + exists = dynasty + NOR = { + is_cousin_of = scope:secondary_recipient + is_close_or_extended_family_of = scope:secondary_recipient + } + dynasty = scope:secondary_recipient.dynasty + NOR = { + house = scope:secondary_recipient.house + is_close_or_extended_family_of = scope:actor + is_cousin_of = scope:actor + is_child_of = scope:actor + AND = { + exists = scope:actor.dynasty + scope:recipient.dynasty = scope:actor.dynasty + } + } + } + } + + modifier = { # They are of the same house as the House Head + trigger = { scope:recipient != scope:secondary_recipient } + add = -20 + desc = THEY_ARE_MY_HOUSE_MEMBER + scope:recipient = { + is_lowborn = no + NOR = { + is_cousin_of = scope:secondary_recipient + is_close_or_extended_family_of = scope:secondary_recipient + } + house = scope:secondary_recipient.house + NOR = { + house = scope:actor.house + is_close_or_extended_family_of = scope:actor + is_cousin_of = scope:actor + is_child_of = scope:actor + scope:recipient.house = scope:actor.house + } + } + } + + modifier = { # They are close kin to the House Head + trigger = { scope:recipient != scope:secondary_recipient } + add = -35 + desc = THEY_ARE_MY_CLOSE_KIN + scope:recipient = { + OR = { + is_cousin_of = scope:secondary_recipient + is_close_or_extended_family_of = scope:secondary_recipient + } + } + } + + modifier = { + add = intimidated_reason_value + scope:recipient = { + target_is_liege_or_above = scope: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 = { # You're in a same-sex marriage and your faith doesn't allow it + add = 100 + desc = SAME_SEX_MARRIAGE_FAITH_REASON_ACTOR + scope:actor.faith = scope:recipient.faith + scope:actor = { + sex_same_as = scope:secondary_recipient + allowed_to_marry_same_sex_trigger = no + } + } + + modifier = { # You're in a same-sex marriage and their faith doesn't allow it + add = 100 + desc = SAME_SEX_MARRIAGE_FAITH_REASON + scope:secondary_recipient.faith = scope:recipient.faith + scope:secondary_recipient = { + sex_same_as = scope:actor + allowed_to_marry_same_sex_trigger = no + } + } + + # Unity modifiers + evaluate_action_decreasing_house_unity = { + VALUE = 100 + } + } + + auto_accept = { + custom_description = { + text = "spending_hook" + subject = scope:actor + object = scope:recipient + scope:divorce_hook = yes + } + } + + send_option = { + is_shown = { + scope:actor != scope:recipient + } + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + flag = divorce_hook + localization = GENERIC_SPEND_A_HOOK + } + should_use_extra_icon = { + scope:actor = { has_usable_hook = scope:recipient } + } + extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" + + send_options_exclusive = no + + ai_min_reply_days = 1 + ai_max_reply_days = 5 + + on_accept = { + if = { + limit = { always = scope:divorce_hook } + scope:actor = { + if = { + limit = { + has_usable_hook = scope:recipient + } + use_hook = scope:recipient + } + } + } + if = { + limit = { + scope:actor = scope:actor.house.house_head + } + scope:actor = { + divorce_effect = { + DIVORCER = scope:actor + DIVORCEE = scope:secondary_recipient + } + } + } + else = { + show_as_tooltip = { + scope:actor = { + divorce_effect = { + DIVORCER = scope:actor + DIVORCEE = scope:secondary_recipient + } + } + } + scope:actor = { + trigger_event = religious_interaction.2 + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = major_unity_loss + DESC = clan_unity_divorce_grant.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = divorce_character_rel_head_interaction_decline_notification + right_icon = scope:actor.house.house_head + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_loss + DESC = clan_unity_divorce_grant_refusal.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + # AI + ai_targets = { + ai_recipients = spouses + } + ai_frequency_by_tier = { + barony = 0 + county = 72 + duchy = 36 + kingdom = 36 + empire = 36 + hegemony = 36 + } + + ai_potential = { + is_ruler = yes + } + + ai_will_do = { + base = 0 + + modifier = { # The AI wants to divorce should they not have an heir that is their own child, and their spouse is infertile + add = 100 + scope:actor = { + fertility > 0.1 + NOT = { + any_child = { + is_heir_of = scope:actor + } + } + } + scope:secondary_recipient = { + is_ai = yes + fertility < 0.1 + } + } + + modifier = { # The AI will only use a Hook if they couldn't otherwise do this + scope:divorce_hook = yes + add = -1 + } + + modifier = { # You're in a same-sex marriage and your faith doesn't allow it + add = 100 + scope:actor = { + sex_same_as = scope:secondary_recipient + allowed_to_marry_same_sex_trigger = no + } + } + } +} + +divorce_character_rel_head_interaction = { + category = interaction_category_diplomacy + use_diplomatic_range = no + icon = icon_marriage + + cost = { + piety = divorce_cost + } + + redirect = { + scope:recipient = { + save_scope_as = secondary_recipient + } + + if = { + limit = { + exists = scope:actor.faith.religious_head + } + scope:actor.faith.religious_head = { + save_scope_as = recipient + } + } + } + + greeting = positive + notification_text = ASK_FOR_DIVORCE_NOTIFICATION + + is_shown = { + exists = scope:actor.faith.religious_head + scope:actor.faith = { + has_doctrine = doctrine_spiritual_head + has_doctrine = doctrine_divorce_approval + } + scope:secondary_recipient = { + is_spouse_of = scope:actor + is_concubine = no # Can set aside Concubines at any time + } + } + + is_valid_showing_failures_only = { + scope:actor = { + NOT = { has_trait = excommunicated } + } + custom_tooltip = { + NOT = { + scope:actor.culture = { + has_cultural_parameter = cannot_divorce + } + } + text = CULTURE_FORBIDS_DIVORCE + } + NOT = { + scope:secondary_recipient = { has_strong_hook = scope:actor } + } + scope:actor = { + custom_tooltip = { + NOT = { + var:family_widow_forbidden_divorce ?= scope:recipient + } + text = BOUND_TO_FAMILY_WIDOW + } + } + } + + ai_accept = { + base = 0 # Should be 0 for all interactions + + divorce_character_ai_accept_modifier = yes + + modifier = { # Divine Family is part of the faith + add = -100 + desc = DIVORCE_INCESTUOUS + + scope:actor = { + is_close_or_extended_family_of = scope:secondary_recipient + faith = { has_doctrine = tenet_divine_marriage } + } + } + + modifier = { # More likely if the marriage is incestuous, unless Divine Family is part of the faith + add = 100 + desc = DIVORCE_INCESTUOUS + + scope:actor = { + relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_recipient } + } + } + + modifier = { # They are of the same dynasty as the Head of Faith + add = -5 + desc = THEY_ARE_MY_DYNASTY_MEMBER + scope:recipient = { + is_lowborn = no + exists = dynasty + exists = scope:secondary_recipient.dynasty + dynasty = scope:secondary_recipient.dynasty + NOR = { + house = scope:secondary_recipient.house + is_close_or_extended_family_of = scope:actor + is_cousin_of = scope:actor + is_child_of = scope:actor + scope:recipient.dynasty = scope:actor.dynasty + } + } + } + + modifier = { # You are of the same dynasty as the Head of Faith + add = 5 + desc = YOU_ARE_MY_DYNASTY_MEMBER + scope:recipient = { + is_lowborn = no + exists = dynasty + exists = scope:actor.dynasty + dynasty = scope:actor.dynasty + NOR = { + is_close_or_extended_family_of = scope:actor + is_cousin_of = scope:actor + is_child_of = scope:actor + scope:recipient.dynasty = scope:secondary_recipient.dynasty + } + } + } + + modifier = { # They are of the same house as the Head of Faith + add = -10 + desc = THEY_ARE_MY_HOUSE_MEMBER + scope:recipient = { + is_lowborn = no + exists = house + exists = scope:secondary_recipient.house + house = scope:secondary_recipient.house + NOR = { + house = scope:actor.house + is_close_or_extended_family_of = scope:actor + is_cousin_of = scope:actor + is_child_of = scope:actor + scope:recipient.house = scope:actor.house + } + } + } + + modifier = { # You are of the same house as the Head of Faith + add = 10 + desc = YOU_ARE_MY_HOUSE_MEMBER + scope:recipient = { + is_lowborn = no + exists = house + exists = scope:actor.house + house = scope:actor.house + NOR = { + is_close_or_extended_family_of = scope:actor + is_cousin_of = scope:actor + is_child_of = scope:actor + scope:recipient.house = scope:secondary_recipient.house + } + } + } + + modifier = { # Related to the Head of Faith + add = 25 + desc = YOU_ARE_MY_RELATIVE + scope:recipient = { + OR = { + is_close_or_extended_family_of = scope:actor + is_cousin_of = scope:actor + } + NOT = { is_child_of = scope:actor } + } + } + + modifier = { # Parent of the Head of Faith + add = 50 + desc = PARENTS #YOU_ARE_MY_PARENT + scope:recipient = { + is_child_of = scope:actor + } + } + + modifier = { + add = { + add = 10 + multiply = scope:actor.num_virtuous_traits + } + scope:actor.num_virtuous_traits > 0 + desc = I_AM_VIRTUOUS + } + + modifier = { + add = { + add = -10 + multiply = scope:secondary_recipient.num_virtuous_traits + } + scope:secondary_recipient.num_virtuous_traits > 0 + desc = THEY_ARE_VIRTUOUS + } + + modifier = { + add = { + add = -10 + multiply = scope:actor.num_sinful_traits + } + scope:actor.num_sinful_traits > 0 + desc = I_AM_SINFUL + } + + modifier = { + add = { + add = 10 + multiply = scope:secondary_recipient.num_sinful_traits + } + scope:secondary_recipient.num_sinful_traits > 0 + desc = THEY_ARE_SINFUL + } + + modifier = { # You're in a same-sex marriage and your faith doesn't allow it + add = 100 + desc = SAME_SEX_MARRIAGE_FAITH_REASON_ACTOR + scope:actor.faith = scope:recipient.faith + scope:actor = { + sex_same_as = scope:secondary_recipient + allowed_to_marry_same_sex_trigger = no + } + } + + modifier = { # You're in a same-sex marriage and their faith doesn't allow it + add = 100 + desc = SAME_SEX_MARRIAGE_FAITH_REASON + scope:secondary_recipient.faith = scope:recipient.faith + scope:secondary_recipient = { + sex_same_as = scope:actor + allowed_to_marry_same_sex_trigger = no + } + } + + modifier = { # You have denounced them as impotent (ep2_wedding.1061) + add = 30 + desc = THEY_ARE_ACCUSED_IMPOTENCY + scope:secondary_recipient = { + has_character_modifier = wedding_accused_impotency_modifier + } + } + # Unity modifiers + evaluate_action_decreasing_house_unity = { + VALUE = 100 + } + } + + auto_accept = { + custom_description = { + text = "spending_hook" + subject = scope:actor + object = scope:recipient + scope:divorce_hook = yes + } + } + + send_option = { + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + flag = divorce_hook + localization = GENERIC_SPEND_A_HOOK + } + should_use_extra_icon = { + scope:actor = { has_usable_hook = scope:recipient } + } + extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" + + send_options_exclusive = no + + ai_min_reply_days = 1 + ai_max_reply_days = 5 + + on_accept = { + if = { + limit = { always = scope:divorce_hook } + scope:actor = { + if = { + limit = { + has_usable_hook = scope:recipient + } + use_hook = scope:recipient + } + } + } + show_as_tooltip = { + scope:actor = { + divorce_effect = { + DIVORCER = scope:actor + DIVORCEE = scope:secondary_recipient + } + } + } + scope:actor = { + trigger_event = religious_interaction.1 + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = major_unity_loss + DESC = clan_unity_alliance.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = divorce_character_rel_head_interaction_decline_notification + + right_icon = scope:actor.faith.religious_head + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_loss + DESC = clan_unity_alliance.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + # AI + ai_targets = { + ai_recipients = spouses + } + ai_frequency_by_tier = { + barony = 0 + county = 72 + duchy = 36 + kingdom = 36 + empire = 36 + hegemony = 36 + } + + ai_potential = { + is_ruler = yes + } + + ai_will_do = { + base = 0 + + modifier = { # The AI wants to divorce should they not have an heir that is their own child, and their spouse is infertile + add = 100 + scope:actor = { + fertility > 0.1 + NOT = { + any_child = { + is_heir_of = scope:actor + } + } + } + scope:secondary_recipient = { + is_ai = yes + fertility < 0.1 + } + } + + modifier = { # The AI will only use a Hook if they couldn't otherwise do this + scope:divorce_hook = yes + add = -1 + } + + modifier = { # You're in a same-sex marriage and your faith doesn't allow it + add = 100 + scope:actor = { + sex_same_as = scope:secondary_recipient + allowed_to_marry_same_sex_trigger = no + } + } + } +} + +divorce_character_dynast_request_interaction = { + category = interaction_category_diplomacy + use_diplomatic_range = no + icon = icon_dynasty + + desc = divorce_character_dynast_request_interaction_desc + + cost = { + piety = divorce_cost + renown = scope:actor.dynasty.minor_dynasty_prestige_value + } + + redirect = { + scope:recipient = { + save_scope_as = secondary_actor + } + + if = { + limit = { + exists = scope:recipient.primary_spouse + } + scope:recipient.primary_spouse = { + save_scope_as = recipient + } + } + } + + is_shown = { + scope:secondary_actor != scope:actor + scope:secondary_actor.dynasty.dynast = scope:actor + + scope:actor.faith = { + # We are not required to seek approval of a spiritual HoF + NAND = { + has_doctrine = doctrine_divorce_approval + has_doctrine = doctrine_spiritual_head + exists = religious_head + } + } + OR = { + AND = { + scope:actor.faith != scope:secondary_actor.faith + # They are not required to seek approval of a spiritual HoF of the Dynasty Member + scope:secondary_actor.faith = { + NOT = { + has_doctrine = doctrine_divorce_approval + } + } + } + scope:actor.faith = scope:secondary_actor.faith + } + + scope:recipient = { + is_spouse_of = scope:secondary_actor + is_concubine = no # Can set aside Concubines at any time + } + } + + is_valid_showing_failures_only = { + custom_tooltip = { + NOT = { + scope:actor.culture = { + has_cultural_parameter = cannot_divorce + } + } + text = CULTURE_FORBIDS_DIVORCE + } + NOT = { + scope:actor.faith = { + has_doctrine = doctrine_divorce_disallowed + } + } + scope:actor.dynasty = { + dynasty_prestige >= minor_dynasty_prestige_value + } + + NOT = { + scope:secondary_actor.faith = { + has_doctrine = doctrine_divorce_disallowed + } + } + scope:secondary_actor = { NOT = { has_strong_hook = scope:actor } } + trigger_if = { + limit = { + scope:secondary_actor = { + NOR = { + is_child_of = scope:actor + is_grandchild_of = scope:actor + is_great_grandchild_of = scope:actor + } + } + } + custom_description = { + scope:secondary_actor.top_liege = scope:actor.top_liege + text = "same_realm_as" + } + } + scope:actor = { + custom_tooltip = { + NOT = { + var:family_widow_forbidden_divorce ?= scope:target + } + text = BOUND_TO_FAMILY_WIDOW + } + } + } + + auto_accept = yes + + on_accept = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_good + title = divorce_character_dynast_request_interaction_title + custom_tooltip = divorce_character_dynast_request_interaction_desc + + left_icon = scope:secondary_actor + right_icon = scope:recipient + } + } + + + scope:secondary_actor = { + divorce_effect = { + DIVORCER = scope:secondary_actor + DIVORCEE = scope:recipient + } + + add_opinion = { + modifier = forced_divorce_opinion + target = scope:actor + } + } + if = { + limit = { + scope:recipient != scope:actor + } + scope:recipient = { + trigger_event = marriage_interaction.0030 + + add_opinion = { + modifier = forced_divorce_opinion + target = scope:actor + } + } + } + } + + # AI + ai_targets = { + ai_recipients = dynasty + max = 10 + } + ai_frequency_by_tier = { + barony = 0 + county = 144 + duchy = 72 + kingdom = 72 + empire = 72 + hegemony = 72 + } + + ai_potential = { + is_ruler = yes + } + + ai_will_do = { + base = 0 + + modifier = { # The AI wants to force a divorce if their heir is not from their dynasty and current marriage within the dynasty are not promising + add = 100 + scope:secondary_actor = { + fertility > 0.1 + } + scope:recipient = { + is_ai = yes + fertility < 0.1 + } + exists = scope:actor.primary_heir + exists = scope:actor.primary_heir.dynasty + scope:actor.primary_heir.dynasty != this.dynasty + } + + #Players should not be targeted + modifier = { + add = -1000 + OR = { + scope:secondary_actor = { is_ai = no } + scope:recipient = { is_ai = no } + } + } + } +} + +divorce_character_dynast_request_rel_head_interaction = { + category = interaction_category_diplomacy + use_diplomatic_range = no + icon = icon_dynasty + + cost = { + piety = divorce_cost + renown = scope:actor.dynasty.minor_dynasty_prestige_value + } + + redirect = { + scope:recipient = { + save_scope_as = secondary_actor + } + + if = { + limit = { + exists = scope:recipient.primary_spouse + } + scope:recipient.primary_spouse = { + save_scope_as = secondary_recipient + } + } + + if = { + limit = { + exists = scope:actor.faith.religious_head + } + scope:actor.faith.religious_head = { + save_scope_as = recipient + } + } + } + + greeting = positive + notification_text = ASK_FOR_DIVORCE_NOTIFICATION + + is_shown = { + scope:secondary_actor != scope:actor + scope:secondary_actor.dynasty.dynast = scope:actor + NOT = { + scope:secondary_actor = { is_spouse_of = scope:actor } + } + + exists = scope:secondary_recipient + + scope:actor.faith = scope:secondary_actor.faith + exists = scope:actor.faith.religious_head + scope:actor.faith = { + has_doctrine = doctrine_spiritual_head + has_doctrine = doctrine_divorce_approval + } + } + + is_valid_showing_failures_only = { + custom_tooltip = { + NOT = { + scope:actor.culture = { + has_cultural_parameter = cannot_divorce + } + } + text = CULTURE_FORBIDS_DIVORCE + } + scope:actor.dynasty = { + dynasty_prestige >= minor_dynasty_prestige_value + } + + scope:secondary_actor = { NOT = { has_strong_hook = scope:actor } } + trigger_if = { + limit = { + scope:secondary_actor = { + NOR = { + is_child_of = scope:actor + is_grandchild_of = scope:actor + is_great_grandchild_of = scope:actor + } + } + } + custom_description = { + scope:secondary_actor.top_liege = scope:actor.top_liege + text = "same_realm_as" + } + } + scope:actor = { + custom_tooltip = { + NOT = { + var:family_widow_forbidden_divorce ?= scope:target + } + text = BOUND_TO_FAMILY_WIDOW + } + } + } + + ai_accept = { + base = 0 # Should be 0 for all interactions + + divorce_character_ai_accept_modifier = yes + + modifier = { # Divine Family is part of the faith + add = -100 + desc = DIVORCE_INCESTUOUS + + scope:secondary_actor = { + is_close_or_extended_family_of = scope:secondary_recipient + faith = { has_doctrine = tenet_divine_marriage } + } + } + + modifier = { # More likely if the marriage is incestuous, unless Divine Family is part of the faith + add = 100 + desc = DIVORCE_INCESTUOUS + + scope:secondary_actor = { + relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_recipient } + } + } + + modifier = { # You are of the same dynasty as the Head of Faith + add = 5 + desc = YOU_ARE_MY_DYNASTY_MEMBER + scope:recipient = { + is_lowborn = no + dynasty = scope:actor.dynasty + NOR = { + is_close_or_extended_family_of = scope:actor + is_cousin_of = scope:actor + is_child_of = scope:actor + scope:recipient.dynasty = scope:secondary_recipient.dynasty + } + } + } + + + modifier = { # You are of the same house as the Head of Faith + add = 10 + desc = YOU_ARE_MY_HOUSE_MEMBER + scope:recipient = { + is_lowborn = no + house = scope:actor.house + NOR = { + is_close_or_extended_family_of = scope:actor + is_cousin_of = scope:actor + is_child_of = scope:actor + scope:recipient.house = scope:secondary_recipient.house + } + } + } + + modifier = { # Related to the Head of Faith + add = 25 + desc = YOU_ARE_MY_RELATIVE + scope:recipient = { + OR = { + is_close_or_extended_family_of = scope:actor + is_cousin_of = scope:actor + } + NOT = { is_child_of = scope:actor } + } + } + + modifier = { # Parent of the Head of Faith + add = 50 + desc = PARENTS #YOU_ARE_MY_PARENT + scope:recipient = { + is_child_of = scope:actor + } + } + + modifier = { + add = { + add = 10 + multiply = scope:actor.num_virtuous_traits + } + scope:actor.num_virtuous_traits > 0 + desc = I_AM_VIRTUOUS + } + + modifier = { + add = { + add = -10 + multiply = scope:secondary_recipient.num_virtuous_traits + } + scope:secondary_recipient.num_virtuous_traits > 0 + desc = THEY_ARE_VIRTUOUS + } + + modifier = { + add = { + add = -10 + multiply = scope:actor.num_sinful_traits + } + scope:actor.num_sinful_traits > 0 + desc = I_AM_SINFUL + } + + modifier = { + add = { + add = 10 + multiply = scope:secondary_recipient.num_sinful_traits + } + scope:secondary_recipient.num_sinful_traits > 0 + desc = THEY_ARE_SINFUL + } + } + + auto_accept = { + custom_description = { + text = "spending_hook" + subject = scope:actor + object = scope:recipient + scope:divorce_hook = yes + } + } + + send_option = { + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + flag = divorce_hook + localization = GENERIC_SPEND_A_HOOK + } + should_use_extra_icon = { + scope:actor = { has_usable_hook = scope:recipient } + } + extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" + + send_options_exclusive = no + + ai_min_reply_days = 1 + ai_max_reply_days = 5 + + on_accept = { + if = { + limit = { always = scope:divorce_hook } + scope:actor = { + if = { + limit = { + has_usable_hook = scope:recipient + } + use_hook = scope:recipient + } + } + } + scope:actor = { + trigger_event = religious_interaction.6 + } + + scope:secondary_actor = { + divorce_effect = { + DIVORCER = scope:secondary_actor + DIVORCEE = scope:secondary_recipient + } + add_opinion = { + modifier = forced_divorce_opinion + target = scope:actor + } + } + + scope:secondary_recipient = { + add_opinion = { + modifier = forced_divorce_opinion + target = scope:actor + } + } + } + + on_decline = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = divorce_character_dynast_request_rel_head_interaction_decline_notification + + right_icon = scope:actor.faith.religious_head + } + } + } + + # AI + ai_targets = { + ai_recipients = dynasty + max = 10 + } + ai_frequency_by_tier = { + barony = 0 + county = 144 + duchy = 72 + kingdom = 72 + empire = 72 + hegemony = 72 + } + + ai_potential = { + is_ruler = yes + } + + ai_will_do = { + base = 0 + + modifier = { # The AI wants to force a divorce if their heir is not from their dynasty and current marriage within the dynasty are not promising + add = 100 + scope:secondary_actor = { + fertility > 0.1 + } + scope:secondary_recipient = { + is_ai = yes + fertility < 0.1 + } + exists = scope:actor.primary_heir + exists = scope:actor.primary_heir.dynasty + scope:actor.primary_heir.dynasty != this.dynasty + } + + modifier = { # The AI will only use a Hook if they couldn't otherwise do this + scope:divorce_hook = yes + add = -1 + } + + #Players should not be targeted + modifier = { + add = -1000 + OR = { + scope:secondary_actor = { is_ai = no } + scope:secondary_recipient = { is_ai = no } + } + } + } +} + +elope_interaction = { + icon = icon_scheme_elope + category = interaction_category_friendly + + scheme = elope + + desc = elope_interaction_desc + + notification_text = elope_interaction_notification + + ai_targets = { + ai_recipients = realm_characters + chance = 0.25 + } + + ai_target_quick_trigger = { + adult = yes + attracted_to_owner = yes + owner_attracted = yes + } + ai_frequency_by_tier = { + barony = 0 + county = 144 + duchy = 36 + kingdom = 0 + empire = 0 + hegemony = 0 + } + + redirect = { + scope:recipient = { + save_scope_as = secondary_recipient + } + } + + is_shown = { + scope:actor = { + OR = { + has_relation_lover = scope:recipient + has_relation_soulmate = scope:recipient + AND = { + has_government = landless_adventurer_government + has_perk = accomplished_forger_perk + } + } + } + scope:recipient = { + is_adult = yes + is_courtier = yes + NOR = { + is_courtier_of = scope:actor + is_consort_of = scope:actor + } + could_marry_character_trigger = { CHARACTER = scope:actor } + } + } + + + is_valid_showing_failures_only = { + scope:actor = { + can_start_scheme = { + type = elope + target_character = scope:recipient + } + } + + trigger_if = { #For landless adventurers we check range. + limit = { + scope:actor = { + is_landless_adventurer = yes + } + } + ep3_laamp_diplo_range_trigger = { + TARGET = scope:recipient + LAAMP = scope:actor + } + } + } + + + ai_accept = { + base = 0 + + elopment_ai_accept_modifier = yes + } + + ai_potential = { + is_adult = yes + OR = { + any_relation = { type = lover } + any_relation = { type = soulmate } + } + NOR = { + has_trait = celibate + scheme_generic_ai_blocker_trigger = yes + } + } + + ai_min_reply_days = 1 + ai_max_reply_days = 3 + + on_accept = { + scope:actor = { + stress_impact = { + honest = minor_stress_impact_gain + just = minor_stress_impact_gain + } + show_as_tooltip = { + elope_success_effect = { + TARGET = scope:recipient + OWNER = scope:actor + } + } + } + hidden_effect = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_good + title = elope_interaction_notification + + left_icon = scope:actor + right_icon = scope:recipient + + begin_scheme_basic_effect = { + SCHEME_TYPE = elope + TARGET_TYPE = target_character + TARGET_SCOPE = scope:recipient + } + + show_as_tooltip = { + stress_impact = { + honest = minor_stress_impact_gain + just = minor_stress_impact_gain + } + } + } + } + } + } + + on_decline = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = elope_interaction_decline_toast + left_icon = scope:recipient + } + } + } + + ai_will_do = { + base = 100 + } +} diff --git a/common/character_interactions/00_religious_interactions.txt b/common/character_interactions/00_religious_interactions.txt new file mode 100644 index 00000000..f7493a8a --- /dev/null +++ b/common/character_interactions/00_religious_interactions.txt @@ -0,0 +1,7703 @@ +# Interaction used to convert people when you reform or create a faith +ask_for_conversion_interaction = { + category = interaction_category_religion + special_interaction = request_conversion_interaction + popup_on_receive = yes + + desc = compel_conversion_interaction_desc + + hidden = yes + + is_shown = { + scope:actor.faith != scope:recipient.faith + scope:recipient.liege = scope:actor + NOT = { scope:recipient = { government_has_flag = government_is_landless_minority } } + } + + is_valid_showing_failures_only = { + valid_ask_for_conversion_conditions_trigger = yes + } + + ai_accept = { + base = 0 + religion_demand_conversion_default_modifier = yes + + # We add a few extra modifiers if you have a state faith, to make the initial conversion rate more immersive and plausible + modifier = { + scope:actor = { + government_allows = state_faith + + # If you fulfill a minimum amount of the below triggers, we consider that you hold enough sway within the realm to make it easier for others to abandon the state faith + calc_true_if = { + amount >= 4 + + diplomacy >= excellent_skill_level + learning >= excellent_skill_level + has_trait = august # You finished the August lifestyle tree + has_trait = theologian # You finished the Theologian lifestyle tree + AND = { + top_liege = this + legitimacy_level >= 4 + } + influence_level >= 3 + house = { + OR = { + is_dominant_family = yes + is_powerful_family = yes + } + } + } + } + add = { + value = 50 + if = { + limit = { + scope:actor.influence_level = 5 + } + add = 50 + } + else_if = { + limit = { + scope:actor.influence_level >= 4 + } + add = 25 + } + if = { + limit = { + scope:actor = { + top_liege = this + legitimacy_level >= 5 + } + } + add = 50 + } + } + desc = STATE_FAITH_CREATE_FAITH_REASON + } + modifier = { # If you have the prophet perk, let's increase acceptance equal to half your diplomacy and learning + scope:actor = { + government_allows = state_faith + has_perk = prophet_perk + } + add = { value = scope:actor.learning add = scope:actor.diplomacy multiply = 0.5 } + desc = HAS_PERK_PROPHET_REASON + } + } + + ai_min_reply_days = 1 + ai_max_reply_days = 5 + + on_accept = { + new_faith_created_conversion_effect = yes + + # If we're a clan this interaction affects unity + accept_faith_conversion_add_clan_unity_effect = yes + + # If character is converting to the state faith, we add influence + state_faith_conversion_add_piety_effect = yes + + scope:actor = { + if = { + limit = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = piety_from_converting_involved_rulers + is_secondary_character_involvement_involved_trigger = { + CHAR = scope:recipient + } + } + } + add_piety = medium_piety_gain + } + } + } + + on_decline = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = ask_for_conversion_decline_notification + right_icon = scope:recipient + } + } + + # If we're a clan this interaction affects unity + refuse_faith_conversion_add_clan_unity_effect = yes + + state_faith_refuse_conversion_add_piety_effect = yes + } + + #Use hook + send_option = { + is_valid = { + always = no # Only here to ensure that religion_demand_conversion_default_modifier doesn't error + } + flag = hook + localization = SCHEME_HOOK + } + send_options_exclusive = no +} + +ask_for_conversion_courtier_interaction = { + category = interaction_category_religion + icon = religious + + special_interaction = request_conversion_interaction + ai_maybe = yes + can_send_despite_rejection = yes + + desc = { + desc = ask_for_conversion_interaction_desc + triggered_desc = { + trigger = { + scope:actor = { + refusing_conversion_is_crime_trigger = { + CHARACTER = scope:recipient + } + } + scope:recipient = { + target_is_liege_or_above = scope:actor + } + } + desc = demand_conversion_vassal_ruler_is_crime + } + } + + ai_targets = { + ai_recipients = courtiers + chance = 0.25 + } + ai_target_quick_trigger = { + adult = yes + } + ai_frequency_by_tier = { + barony = 0 + county = 36 + duchy = 12 + kingdom = 12 + empire = 12 + hegemony = 12 + } + + is_shown = { + scope:actor.faith != scope:recipient.faith + scope:recipient = { is_courtier_of = scope:actor } + scope:recipient = { is_ruler = no } + scope:recipient = { is_imprisoned = no } + NOT = { scope:recipient = { government_has_flag = government_is_landless_minority } } + } + + cooldown_against_recipient = { years = 15 } + + is_valid_showing_failures_only = { + valid_demand_conversion_conditions_trigger = yes + } + + ai_accept = { + base = 0 + # Increase base chance + modifier = { + add = 50 + desc = EDUCATE_CHILD_ACTOR_IS_MY_LIEGE + } + religion_demand_conversion_default_modifier = yes + } + + auto_accept = { + custom_description = { + text = "spending_hook" + subject = scope:actor + object = scope:recipient + scope:hook = yes + scope:actor = { has_strong_hook = scope:recipient } + NOT = { scope:recipient = { has_character_flag = ai_will_not_convert } } + } + } + + ai_min_reply_days = 1 + ai_max_reply_days = 5 + + on_accept = { + demand_conversion_interaction_effect = yes + hidden_effect = { + scope:actor = { + send_interface_message = { + type = event_religious_good + title = ask_for_conversion_courtier_interaction.tt + left_icon = scope:recipient + scope:recipient = { + show_as_tooltip = { demand_conversion_interaction_effect = yes } + } + } + } + } + if = { + limit = { scope:hook = yes } + scope:actor = { + if = { + limit = { + has_usable_hook = scope:recipient + } + use_hook = scope:recipient + } + } + scope:recipient = { + # trigger_event = char_interaction.0180 + trigger_event = false_conversion.0900 + save_scope_value_as = { + name = forcibly_converted + value = yes + } + } + } + if = { + limit = { scope:recipient = { is_imprisoned_by = scope:actor } } + scope:recipient = { release_from_prison = yes } + scope:recipient = { + # trigger_event = char_interaction.0180 + trigger_event = false_conversion.0900 + save_scope_value_as = { + name = forcibly_converted + value = yes + } + } + } + + # If we're a clan this interaction affects unity + accept_faith_conversion_add_clan_unity_effect = yes + + # If character is converting to the state faith, we add influence + state_faith_conversion_add_piety_effect = yes + + scope:actor = { + if = { + limit = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = piety_from_converting_involved_rulers + is_secondary_character_involvement_involved_trigger = { + CHAR = scope:recipient + } + } + } + add_piety = medium_piety_gain + } + } + } + + on_decline = { + #Negative opinions + scope:recipient = { + if = { + limit = { + scope:actor = { + refusing_conversion_is_crime_trigger = { + CHARACTER = scope:recipient + } + } + scope:recipient = { + target_is_liege_or_above = scope:actor + } + } + reverse_add_opinion = { + target = scope:actor + modifier = illegal_resisted_conversion_opinion + years = 10 + } + } + else = { + add_opinion = { + modifier = demanded_my_conversion_opinion + target = scope:actor + opinion = -10 + } + } + } + scope:actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = ask_for_conversion_decline_notification + left_icon = scope:recipient + } + } + + # If we're a clan this interaction affects unity + refuse_faith_conversion_add_clan_unity_effect = yes + + state_faith_refuse_conversion_add_piety_effect = yes + } + + cost = { + influence = { + value = 0 + if = { + limit = { scope:influence_send_option = yes } + add = scope:actor.medium_influence_value + desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION + } + } + } + + # Use hook + send_option = { + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + NOT = { + scope:recipient = { is_imprisoned_by = scope:actor } + } + } + 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" + + send_option = { # EP3 Influence + is_shown = { # Actor must have a government that uses influence + scope:actor = { + government_has_flag = government_has_influence + } + } + is_valid = { + # Actor has enough influence + scope:actor = { influence >= medium_influence_value } + # Both characters are within the same top realm + custom_tooltip = { + text = not_same_realm_tt + scope:recipient.top_liege = scope:actor.top_liege + } + } + flag = influence_send_option + localization = TRADE_INFLUENCE_FOR_BETTER_AI_ACCEPTANCE + } + send_options_exclusive = no + + + ai_potential = { + is_adult = yes + } + + ai_will_do = { + base = 100 + + modifier = { # The AI will only use a Hook if they couldn't otherwise do this + scope:hook = yes + add = -1 + } + + modifier = { # The AI doesn't really want to convert Diasporic culture courtiers + scope:recipient = { + faith.religion = religion:judaism_religion + culture = { + has_cultural_tradition = tradition_diasporic + } + } + factor = 0 + } + + modifier = { # Do not convert Righteous faith subjects, unless disturbingly zealous + factor = 0 + scope:actor = { + ai_zeal < 100 + ai_rationality > -50 + faith = { + faith_hostility_level = { + target = scope:recipient.faith + value <= faith_fully_accepted_level + } + } + } + } + + modifier = { # Astray faiths require specific circumstances to demand conversion of + factor = 0 + scope:actor = { + has_tolerant_faith_or_culture_trigger = yes + ai_zeal < 100 + faith = { + faith_hostility_level = { + target = scope:recipient.faith + value <= faith_astray_level + } + } + } + NOT = { + scope:recipient = { + is_close_family_of = scope:actor + } + } + } + + modifier = { # Astray faiths require specific circumstances to demand conversion of + factor = 0 + scope:actor = { + faith = { has_doctrine = doctrine_pluralism_fundamentalist } + ai_zeal < -10 + faith = { + faith_hostility_level = { + target = scope:recipient.faith + value <= faith_astray_level + } + } + } + NOT = { + scope:recipient = { + is_close_family_of = scope:actor + } + } + } + + modifier = { # Astray faiths require specific circumstances to demand conversion of + factor = 0 + scope:actor = { + NOR = { + faith = { has_doctrine = doctrine_pluralism_fundamentalist } + has_tolerant_faith_or_culture_trigger = yes + } + ai_zeal < 25 + faith = { + faith_hostility_level = { + target = scope:recipient.faith + value <= faith_astray_level + } + } + } + NOT = { + scope:recipient = { + is_close_family_of = scope:actor + } + } + } + + modifier = { # Rulers with State Faith won't try to convert people with faiths that are astray or better + factor = 0 + scope:actor = { + government_allows = state_faith + primary_title.state_faith ?= { + faith_hostility_level = { + target = scope:recipient.faith + value <= faith_astray_level + } + } + } + } + } +} + +# House head demand conversion +demand_conversion_interaction = { + icon = religious + category = interaction_category_religion + popup_on_receive = yes + pause_on_receive = yes + can_send_despite_rejection = yes + ai_maybe = yes + + notification_text = HOUSE_HEAD_DEMAND_CONVERSION + + is_shown = { + scope:recipient != scope:actor + scope:actor = { + is_house_head = yes + faith != scope:recipient.faith + OR = { + house = scope:recipient.house + AND = { # House Bloc + house.house_confederation ?= { + scope:recipient.house.house_confederation ?= this + has_cohesion_level_parameter = bloc_members_join_leaders_faith + } + } + } + } + NOT = { + scope:recipient = { # Use the vassal-liege interaction instead. + is_ruler = yes + target_is_liege_or_above = scope:actor + } + } + scope:recipient = { # To avoid you converting someone's entire family, and then asking them. Restricting it to landed rulers at least gives them a chance to create their own cadet house. + is_ruler = yes + } + NOT = { scope:recipient = { government_has_flag = government_is_landless_minority } } + } + + cooldown_against_recipient = { years = 15 } + + desc = { + desc = demand_conversion_interaction_desc + triggered_desc = { + trigger = { + scope:actor = { + refusing_conversion_is_crime_trigger = { + CHARACTER = scope:recipient + } + } + scope:recipient = { + target_is_liege_or_above = scope:actor + } + } + desc = demand_conversion_vassal_ruler_is_crime + } + } + + is_valid_showing_failures_only = { + valid_demand_conversion_conditions_trigger = yes + } + + cost = { + influence = { + value = 0 + if = { + limit = { scope:influence_send_option = yes } + add = scope:actor.medium_influence_value + desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION + } + } + } + + on_accept = { + demand_conversion_interaction_effect = yes + if = { + limit = { scope:hook = yes } + scope:actor = { + use_hook = scope:recipient + } + scope:recipient = { + # trigger_event = char_interaction.0180 + trigger_event = false_conversion.0900 + save_scope_value_as = { + name = forcibly_converted + value = yes + } + } + } + if = { + limit = { scope:recipient = { is_imprisoned_by = scope:actor } } + scope:recipient = { release_from_prison = yes } + scope:recipient = { + # trigger_event = char_interaction.0180 + trigger_event = false_conversion.0900 + save_scope_value_as = { + name = forcibly_converted + value = yes + } + } + } + else = { + scope:actor = { + trigger_event = char_interaction.0181 + } + } + + scope:actor = { + if = { + limit = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = piety_from_converting_involved_rulers + is_secondary_character_involvement_involved_trigger = { + CHAR = scope:recipient + } + } + } + add_piety = medium_piety_gain + } + } + + # If we're a clan this interaction affects unity + accept_faith_conversion_add_clan_unity_effect = yes + + # If character is converting to the state faith, we add influence + state_faith_conversion_add_piety_effect = yes + } + + on_decline = { + scope:recipient = { + execute_decision = create_cadet_branch_decision + show_as_tooltip = { create_cadet_branch = {} } + } + #Negative opinions + scope:recipient = { + if = { + limit = { + scope:actor = { + refusing_conversion_is_crime_trigger = { + CHARACTER = scope:recipient + } + } + scope:recipient = { + target_is_liege_or_above = scope:actor + } + } + add_opinion = { + target = scope:recipient + modifier = illegal_resisted_conversion_opinion + years = 10 + } + } + else = { + add_opinion = { + modifier = demanded_my_conversion_opinion + target = scope:actor + opinion = -10 + } + } + } + scope:actor = { + trigger_event = char_interaction.0182 + } + + # If we're a clan this interaction affects unity + refuse_faith_conversion_add_clan_unity_effect = yes + + state_faith_refuse_conversion_add_piety_effect = yes + } + + auto_accept = { + custom_description = { + text = "spending_hook" + subject = scope:actor + object = scope:recipient + scope:hook = yes + scope:actor = { has_strong_hook = scope:recipient } + } + } + + #For loc + on_auto_accept = { + scope:recipient = { + save_scope_value_as = { + name = forcibly_converted + value = yes + } + } + } + + ai_accept = { + base = 0 + # Increase base chance + modifier = { + add = 50 + desc = EDUCATE_CHILD_ACTOR_IS_MY_LIEGE + } + modifier = { + add = 100 + NOT = { + scope:recipient = { + can_execute_decision = create_cadet_branch_decision + } + } + desc = ASK_FOR_CONVERSION_CAN_NOT_CREATE_CADET_BRANCH + } + modifier = { + add = -10 + scope:recipient = { + can_execute_decision = create_cadet_branch_decision + } + desc = ASK_FOR_CONVERSION_CAN_CREATE_CADET_BRANCH + } + religion_demand_conversion_default_modifier = yes + } + + can_send_despite_rejection = yes + force_notification = yes + + #Use hook + send_option = { + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + NOT = { + scope:recipient = { is_imprisoned_by = scope:actor } + } + } + 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" + + send_option = { # EP3 Influence + is_shown = { # Actor must have a government that uses influence + scope:actor = { + government_has_flag = government_has_influence + } + } + is_valid = { + # Actor has enough influence + scope:actor = { influence >= medium_influence_value } + # Both characters are within the same top realm + custom_tooltip = { + text = not_same_realm_tt + scope:recipient.top_liege = scope:actor.top_liege + } + } + flag = influence_send_option + localization = TRADE_INFLUENCE_FOR_BETTER_AI_ACCEPTANCE + } + send_options_exclusive = no +} + +demand_conversion_vassal_ruler_interaction = { + category = interaction_category_religion + icon = religious + notification_text = LIEGE_DEMAND_CONVERSION + + ai_maybe = yes + ai_min_reply_days = 4 + ai_max_reply_days = 9 + can_send_despite_rejection = yes + ai_accept_negotiation = yes + popup_on_receive = yes + + ai_targets = { + ai_recipients = vassals + } + ai_target_quick_trigger = { + adult = yes + } + ai_frequency_by_tier = { + barony = 0 + county = 120 + duchy = 24 + kingdom = 12 + empire = 12 + hegemony = 12 + } + + desc = { + desc = ask_for_conversion_interaction_desc + desc = line_break + triggered_desc = { + trigger = { + NOT = { scope:recipient = { is_imprisoned_by = scope:actor } } + } + desc = might_ask_for_something_in_return_warning + } + triggered_desc = { + trigger = { + scope:actor = { + refusing_conversion_is_crime_trigger = { + CHARACTER = scope:recipient + } + } + } + desc = demand_conversion_vassal_ruler_is_crime + } + } + + on_decline_summary = stop_attacker_vassal_war_decline_summary + + is_shown = { + scope:recipient = { + OR = { + target_is_liege_or_above = scope:actor + is_tributary_of = scope:actor + } + faith != scope:actor.faith + is_ai = yes + is_ruler = yes + } + NOT = { scope:recipient = { government_has_flag = government_is_landless_minority } } + } + + cooldown_against_recipient = { years = 15 } + + is_valid_showing_failures_only = { + valid_demand_conversion_conditions_trigger = yes + trigger_if = { + limit = { + scope:actor.domicile ?= { + domicile_uses_culture_and_faith = yes + } + scope:recipient = { + is_ruler = yes + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + } + custom_tooltip = { + text = nomads_must_inspire_tt + NOT = { + scope:recipient = { + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + } + } + } + } + + auto_accept = { + custom_description = { + text = "spending_hook" + subject = scope:actor + object = scope:recipient + scope:hook = yes + scope:actor = { has_strong_hook = scope:recipient } + NOT = { scope:recipient = { has_character_flag = ai_will_not_convert } } + } + } + + on_send = { + } + + cost = { + influence = { + value = 0 + if = { + limit = { scope:influence_send_option = yes } + add = scope:actor.medium_influence_value + desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION + } + } + } + + on_accept = { + scope:actor = { + trigger_event = religious_interaction.2002 + } + demand_conversion_vassal_ruler_interaction_effect = yes + + # If we're a clan this interaction affects unity + accept_faith_conversion_add_clan_unity_effect = yes + + # If character is converting to the state faith, we add influence + state_faith_conversion_add_piety_effect = yes + + scope:actor = { + if = { + limit = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = piety_from_converting_involved_rulers + is_secondary_character_involvement_involved_trigger = { + CHAR = scope:recipient + } + } + } + add_piety = medium_piety_gain + } + } + } + + on_decline = { + scope:recipient = { + hidden_effect = { + random_list = { + 80 = { # Conditional acceptance + modifier = { + factor = 0 # Heresiarchs never agree to convert + scope:recipient = { + has_trait = heresiarch + } + } + ai_value_modifier = { + ai_greed = 0.5 + } + random_list = { + 50 = { #They ask for gold + modifier = { + add = 50 # More likely to ask for gold if they're poor + scope:recipient.short_term_gold < medium_gold_value + } + modifier = { + add = { # Much more likely to ask for gold involved in one of their own wars (they want to win). + value = 50 + if = { + # Especially true if they're in debt! + limit = { gold < 0 } + add = 150 + } + } + is_at_war = yes + any_character_war = { + is_war_leader = scope:recipient + } + } + scope:actor = { + trigger_event = { + id = religious_interaction.2011 + } + } + } + 500 = { #They ask for a favor + trigger = { + exists = scope:recipient.capital_county + NOT = { has_hook = scope:actor } + } + # Direct feudal vassals appreciate favors more (they can improve their contract). + modifier = { + add = { + value = 50 + # This goes double for your Powerful Vassals. A better contract is likely to be much more important than a short-term payout. + if = { + limit = { is_powerful_vassal_of = scope:actor } + add = 100 + } + } + this.liege = scope:actor + government_has_flag = government_is_feudal + } + scope:actor = { + trigger_event = { + id = religious_interaction.2012 + } + } + } + } + + } + 20 = { # Full refuse + modifier = { + add = 20 + scope:recipient.demand_conversion_likelihood_calculation < 40 + } + modifier = { + add = 20 + scope:recipient.demand_conversion_likelihood_calculation < 20 + } + modifier = { + add = 50 + scope:recipient.demand_conversion_likelihood_calculation < 0 + } + scope:actor = { + trigger_event = { + id = religious_interaction.2003 + } + } + } + } + } + custom_tooltip = demand_conversion_vassal_ruler_does_not_convert + show_as_tooltip = { + #Negative opinions + add_opinion = { + modifier = demanded_my_conversion_opinion + target = scope:actor + opinion = -10 + } + scope:actor = { + if = { + limit = { + refusing_conversion_is_crime_trigger = { + CHARACTER = scope:recipient + } + } + custom_tooltip = action_can_lawfully_imprison_label + } + } + # If appropriate, give 'em piety. + give_piety_for_clinging_to_state_faith_effect = yes + } + } + + # If we're a clan this interaction affects unity + refuse_faith_conversion_add_clan_unity_effect = yes + } + + ai_potential = { + is_adult = yes + } + + # Use hook + send_option = { + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + NOT = { + scope:recipient = { is_imprisoned_by = scope:actor } + } + } + 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" + + send_option = { # EP3 Influence + is_shown = { # Actor must have a government that uses influence + scope:actor = { + government_has_flag = government_has_influence + } + } + is_valid = { + # Actor has enough influence + scope:actor = { influence >= medium_influence_value } + # Both characters are within the same top realm + custom_tooltip = { + text = not_same_realm_tt + scope:recipient.top_liege = scope:actor.top_liege + } + } + flag = influence_send_option + localization = TRADE_INFLUENCE_FOR_BETTER_AI_ACCEPTANCE + } + send_options_exclusive = no + + ai_will_do = { + base = 100 + + modifier = { # Make sure the AI uses hooks for this as it's % based + scope:hook = yes + add = 1 + } + + modifier = { + factor = 0 + scope:recipient.demand_conversion_likelihood_calculation < 10 + NOT = { + scope:actor = { + refusing_conversion_is_crime_trigger = { + CHARACTER = scope:recipient + } + } + } + } + + modifier = { + factor = 0 + scope:recipient.demand_conversion_likelihood_calculation < 70 + scope:actor = { + gold < demand_conversion_bribe_size + } + } + + modifier = { + factor = 0 + scope:recipient.demand_conversion_likelihood_calculation < 90 + scope:actor = { + culture = { + has_cultural_parameter = less_likely_to_force_conversion + } + } + } + + modifier = { # Do not convert Righteous faith subjects, unless disturbingly zealous + factor = 0 + scope:actor = { + ai_zeal < 100 + ai_rationality > -50 + faith = { + faith_hostility_level = { + target = scope:recipient.faith + value <= faith_fully_accepted_level + } + } + } + NOT = { # If the subject has one of your holy sites, always try to convert + scope:recipient = { + any_sub_realm_county = { + any_county_province = { + barony = { + is_holy_site_of = scope:actor.faith + } + } + } + } + } + } + + modifier = { # Astray faiths require specific circumstances to demand conversion of + factor = 0 + scope:actor = { + has_tolerant_faith_or_culture_trigger = yes + ai_zeal < 100 + faith = { + faith_hostility_level = { + target = scope:recipient.faith + value <= faith_astray_level + } + } + } + NOT = { # If the subject has one of your holy sites, always try to convert + scope:recipient = { + any_sub_realm_county = { + any_county_province = { + barony = { + is_holy_site_of = scope:actor.faith + } + } + } + } + } + NOT = { + scope:recipient = { + is_close_family_of = scope:actor + } + } + } + + modifier = { # Astray faiths require specific circumstances to demand conversion of + factor = 0 + scope:actor = { + faith = { has_doctrine = doctrine_pluralism_fundamentalist } + ai_zeal < -10 + faith = { + faith_hostility_level = { + target = scope:recipient.faith + value <= faith_astray_level + } + } + } + NOT = { # If the subject has one of your holy sites, always try to convert + scope:recipient = { + any_sub_realm_county = { + any_county_province = { + barony = { + is_holy_site_of = scope:actor.faith + } + } + } + } + } + NOT = { + scope:recipient = { + is_close_family_of = scope:actor + } + } + } + + modifier = { # Astray faiths require specific circumstances to demand conversion of + factor = 0 + scope:actor = { + NOR = { + faith = { has_doctrine = doctrine_pluralism_fundamentalist } + has_tolerant_faith_or_culture_trigger = yes + } + ai_zeal < 25 + faith = { + faith_hostility_level = { + target = scope:recipient.faith + value <= faith_astray_level + } + } + } + NOT = { # If the subject has one of your holy sites, always try to convert + scope:recipient = { + any_sub_realm_county = { + any_county_province = { + barony = { + is_holy_site_of = scope:actor.faith + } + } + } + } + } + } + + modifier = { # Rulers with state faith won't try to convert people with faiths that are astray or better + factor = 0 + scope:actor = { + government_allows = state_faith + primary_title.state_faith ?= { + faith_hostility_level = { + target = scope:recipient.faith + value <= faith_astray_level + } + } + } + } + } + ai_accept = { + base = 0 + # Increase base chance + modifier = { + add = 50 + desc = EDUCATE_CHILD_ACTOR_IS_MY_LIEGE + } + religion_demand_conversion_default_modifier = yes + + modifier = { + desc = might_ask_for_something_in_return_warning_line_break + add = 0 + } + } +} + +demand_conversion_player_ruler_interaction = { + category = interaction_category_religion + desc = ask_for_conversion_interaction_desc + notification_text = LIEGE_DEMAND_CONVERSION + popup_on_receive = yes + pause_on_receive = yes + icon = religious + + ai_targets = { + ai_recipients = vassals + } + ai_target_quick_trigger = { + adult = yes + } + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 120 + kingdom = 120 + empire = 120 + hegemony = 120 + } + + is_shown = { + scope:recipient = { + is_ai = no + target_is_liege_or_above = scope:actor + faith != scope:actor.faith + } + NOT = { scope:recipient = { government_has_flag = government_is_landless_minority } } + } + + cooldown_against_recipient = { years = 15 } + + is_valid_showing_failures_only = { + valid_demand_conversion_conditions_trigger = yes + } + + send_option = { + is_valid = { + scope:actor = { + has_strong_usable_hook = scope:recipient + } + } + flag = demand_conversion_hook + localization = GENERIC_SPEND_A_HOOK + } + should_use_extra_icon = { + scope:actor = { has_strong_usable_hook = scope:recipient } + } + extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" + + + send_options_exclusive = no + + auto_accept = { + custom_description = { + text = "spending_hook" + subject = scope:actor + object = scope:recipient + scope:demand_conversion_hook = yes + } + } + + on_auto_accept = { + demand_conversion_player_ruler_interaction_effect = yes + + scope:actor = { + trigger_event = char_interaction.0190 + } + + scope:recipient = { + save_scope_value_as = { + name = forcibly_converted + value = yes + } + trigger_event = religious_interaction.2021 + } + } + + on_accept = { + # Do conversion + demand_conversion_player_ruler_interaction_effect = yes + scope:actor = { + trigger_event = char_interaction.0190 + } + + # If we're a clan this interaction affects unity + accept_faith_conversion_add_clan_unity_effect = yes + + # If character is converting to the state faith, we add influence + state_faith_conversion_add_piety_effect = yes + + scope:actor = { + if = { + limit = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = piety_from_converting_involved_rulers + is_secondary_character_involvement_involved_trigger = { + CHAR = scope:recipient + } + } + } + add_piety = medium_piety_gain + } + } + } + + on_decline = { + scope:actor = { + #Crime if relevant + if = { + limit = { + refusing_conversion_is_crime_trigger = { + CHARACTER = scope:recipient + } + } + add_opinion = { + target = scope:recipient + modifier = illegal_resisted_conversion_opinion + years = 15 + } + } + else = { + add_opinion = { + target = scope:recipient + modifier = resisted_conversion_opinion + years = 15 + } + } + trigger_event = char_interaction.0191 + } + + # If we're a clan this interaction affects unity + refuse_faith_conversion_add_clan_unity_effect = yes + + state_faith_refuse_conversion_add_piety_effect = yes + } + + ai_potential = { + is_adult = yes + } + + ai_will_do = { + base = 100 + + modifier = { + scope:hook = yes + add = 1 + } + + modifier = { + factor = 0 + scope:recipient.demand_conversion_likelihood_calculation < 10 + } + + modifier = { # Do not convert Righteous faith subjects, unless disturbingly zealous + factor = 0 + scope:actor = { + ai_zeal < 100 + ai_rationality > -50 + faith = { + faith_hostility_level = { + target = scope:recipient.faith + value <= faith_fully_accepted_level + } + } + } + NOT = { # If the subject has one of your holy sites, always try to convert + scope:recipient = { + any_sub_realm_county = { + any_county_province = { + barony = { + is_holy_site_of = scope:actor.faith + } + } + } + } + } + } + + modifier = { # Astray faiths require specific circumstances to demand conversion of + factor = 0 + scope:actor = { + has_tolerant_faith_or_culture_trigger = yes + ai_zeal < 100 + faith = { + faith_hostility_level = { + target = scope:recipient.faith + value <= faith_astray_level + } + } + } + NOT = { # If the subject has one of your holy sites, always try to convert + scope:recipient = { + any_sub_realm_county = { + any_county_province = { + barony = { + is_holy_site_of = scope:actor.faith + } + } + } + } + } + NOT = { + scope:recipient = { + is_close_family_of = scope:actor + } + } + } + + modifier = { # Astray faiths require specific circumstances to demand conversion of + factor = 0 + scope:actor = { + faith = { has_doctrine = doctrine_pluralism_fundamentalist } + ai_zeal < -10 + faith = { + faith_hostility_level = { + target = scope:recipient.faith + value <= faith_astray_level + } + } + } + NOT = { # If the subject has one of your holy sites, always try to convert + scope:recipient = { + any_sub_realm_county = { + any_county_province = { + barony = { + is_holy_site_of = scope:actor.faith + } + } + } + } + } + NOT = { + scope:recipient = { + is_close_family_of = scope:actor + } + } + } + + modifier = { # Astray faiths require specific circumstances to demand conversion of + factor = 0 + scope:actor = { + NOR = { + faith = { has_doctrine = doctrine_pluralism_fundamentalist } + has_tolerant_faith_or_culture_trigger = yes + } + ai_zeal < 25 + faith = { + faith_hostility_level = { + target = scope:recipient.faith + value <= faith_astray_level + } + } + } + NOT = { # If the subject has one of your holy sites, always try to convert + scope:recipient = { + any_sub_realm_county = { + any_county_province = { + barony = { + is_holy_site_of = scope:actor.faith + } + } + } + } + } + NOT = { + scope:recipient = { + is_close_family_of = scope:actor + } + } + } + + modifier = { # Rulers with state faith won't try to convert people with faiths that are astray or better + factor = 0 + scope:actor = { + government_allows = state_faith + primary_title.state_faith ?= { + faith_hostility_level = { + target = scope:recipient.faith + value <= faith_astray_level + } + } + } + } + } +} + +# Compel Conversion +demand_conversion_minister_rites_interaction = { + category = interaction_category_religion + icon = religious + notification_text = CONVERT_TO_RELIGION + + ai_maybe = yes + ai_min_reply_days = 4 + ai_max_reply_days = 9 + can_send_despite_rejection = no + popup_on_receive = yes + + desc = { + desc = ask_for_conversion_interaction_desc + desc = line_break + desc = demand_conversion_vassal_ruler_is_crime + } + + on_decline_summary = stop_attacker_vassal_war_decline_summary + + is_shown = { + scope:actor = { + is_ai = no + has_title = title:e_minister_of_rites + } + scope:recipient = { + top_liege = scope:actor.top_liege + this != top_liege + faith = { + OR = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_hostile_level + } + faith_hostility_level = { + target = scope:actor.top_liege.faith + value >= faith_hostile_level + } + } + } + is_ai = yes + is_ruler = yes + } + } + + cooldown_against_recipient = { years = 15 } + + is_valid_showing_failures_only = { + valid_demand_conversion_conditions_trigger = yes + } + + on_send = { + } + + cost = { + treasury = { + value = 0 + add = scope:actor.minor_treasury_value + multiply = { + value = scope:recipient.primary_title.tier + } + } + } + + on_accept = { + switch = { + trigger = yes + scope:convert_to_minister_faith = { + scope:actor.faith = { + save_scope_as = conversion_faith + } + } + scope:convert_to_top_liege_faith = { + scope:actor.top_liege.faith = { + save_scope_as = conversion_faith + } + } + scope:convert_to_realm_capital_faith = { + scope:actor.top_liege.capital_county.faith = { + save_scope_as = conversion_faith + } + } + } + scope:actor = { + trigger_event = religious_interaction.2002 + } + demand_conversion_vassal_ruler_interaction_effect = yes + + # If we're a clan this interaction affects unity + accept_faith_conversion_add_clan_unity_effect = yes + + show_as_tooltip = { + scope:actor = { + change_influence = { + value = minor_influence_gain + multiply = scope:recipient.primary_title.tier + } + add_piety = { + value = minor_piety_gain + multiply = scope:recipient.primary_title.tier + } + } + } + } + + on_decline = { + switch = { + trigger = yes + scope:convert_to_minister_faith = { + scope:actor.faith = { + save_scope_as = conversion_faith + } + } + scope:convert_to_top_liege_faith = { + scope:actor.top_liege.faith = { + save_scope_as = conversion_faith + } + } + scope:convert_to_realm_capital_faith = { + scope:actor.top_liege.capital_county.faith = { + save_scope_as = conversion_faith + } + } + } + scope:recipient = { + hidden_effect = { + random_list = { + 80 = { # Conditional acceptance + modifier = { + factor = 0 # Heresiarchs never agree to convert + scope:recipient = { + has_trait = heresiarch + } + } + ai_value_modifier = { + ai_greed = 0.5 + } + random_list = { + 50 = { #They ask for gold + modifier = { + add = 50 # More likely to ask for gold if they're poor + scope:recipient.short_term_gold < medium_gold_value + } + modifier = { + add = { # Much more likely to ask for gold involved in one of their own wars (they want to win). + value = 50 + if = { + # Especially true if they're in debt! + limit = { gold < 0 } + add = 150 + } + } + is_at_war = yes + any_character_war = { + is_war_leader = scope:recipient + } + } + scope:actor = { + trigger_event = { + id = religious_interaction.2011 + } + } + } + 500 = { #They ask for a favor + trigger = { + exists = scope:recipient.capital_county + NOT = { has_hook = scope:actor } + } + # Direct feudal vassals appreciate favors more (they can improve their contract). + modifier = { + add = { + value = 50 + # This goes double for your Powerful Vassals. A better contract is likely to be much more important than a short-term payout. + if = { + limit = { is_powerful_vassal_of = scope:actor } + add = 100 + } + } + this.liege = scope:actor + government_has_flag = government_is_feudal + } + scope:actor = { + trigger_event = { + id = religious_interaction.2012 + } + } + } + } + + } + 20 = { # Full refuse + modifier = { + add = 20 + scope:recipient.demand_conversion_likelihood_calculation < 40 + } + modifier = { + add = 20 + scope:recipient.demand_conversion_likelihood_calculation < 20 + } + modifier = { + add = 50 + scope:recipient.demand_conversion_likelihood_calculation < 0 + } + scope:actor = { + trigger_event = { + id = religious_interaction.2003 + } + } + } + } + } + custom_tooltip = demand_conversion_vassal_ruler_does_not_convert + show_as_tooltip = { + #Negative opinions + add_opinion = { + modifier = compelled_me_to_convert_opinion + target = scope:actor + opinion = -10 + } + scope:actor = { + if = { + limit = { + refusing_conversion_is_crime_trigger = { + CHARACTER = scope:recipient + } + } + custom_tooltip = action_can_lawfully_imprison_label + } + } + # If appropriate, give 'em piety. + give_piety_for_clinging_to_state_faith_effect = yes + } + } + } + + # Use hook + send_option = { + flag = convert_to_minister_faith + localization = MINISTER_FAITH + } + + send_option = { + is_shown = { + scope:actor.top_liege.faith != scope:actor.faith + } + flag = convert_to_top_liege_faith + localization = TOP_LIEGE_FAITH + } + + send_option = { + is_shown = { + scope:actor.top_liege.capital_county.faith = { + NOR = { + this = scope:actor.top_liege.faith + this = scope:actor.faith + } + } + } + flag = convert_to_realm_capital_faith + localization = CAPITAL_FAITH + } + + ai_accept = { + base = 0 + # Increase base chance + modifier = { + add = 50 + desc = ACTOR_IS_MINISTER_OF_RITES + } + modifier = { + add = 25 + trigger = { + scope:actor.top_liege = { + OR = { + has_realm_law = celestial_bureaucracy_0 + has_realm_law = celestial_bureaucracy_1 + } + } + } + desc = IMPRESSED_BY_AUTHORITY + } + modifier = { + add = 50 + trigger = { + scope:actor.top_liege = { + has_realm_law = celestial_bureaucracy_2 + } + } + desc = OVERWHELMED_BY_AUTHORITY + } + modifier = { + add = 75 + trigger = { + scope:actor.top_liege = { + has_realm_law = celestial_bureaucracy_3 + } + } + desc = OVERWHELMED_BY_AUTHORITY + } + modifier = { + add = 25 + trigger = { + scope:actor = { + has_hook = scope:recipient + } + } + desc = HAS_A_HOOK + } + religion_demand_conversion_default_modifier = yes + modifier = { + desc = might_ask_for_something_in_return_warning_line_break + add = 0 + } + } +} + +convert_to_religion_interaction = { + category = interaction_category_religion + icon = religious + + + desc = convert_to_religion_interaction_desc + + notification_text = CONVERT_TO_RELIGION + ignores_pending_interaction_block = yes + + is_shown = { + scope:actor.faith != scope:recipient.faith + scope:actor = { + is_landless_ruler = no + # They're either your liege, your spouse or your tributary + OR = { + target_is_liege_or_above = scope:recipient + any_consort = { + this = scope:recipient + } + is_tributary_of = scope:recipient + } + # And you've never HumSac'd a tolerated HoF. + NAND = { + has_variable_list = humsacd_hofs + is_target_in_variable_list = { + name = humsacd_hofs + target = scope:recipient.faith + } + } + } + } + + is_valid_showing_failures_only = { + } + + auto_accept = yes + + ai_min_reply_days = 1 + ai_max_reply_days = 5 + + on_send = { + # Show conversion preview - this can be canceled, but it's fine since the conversion is voluntary + ## If we have a valid state faith, we go there. + if = { + limit = { + scope:actor = { + government_allows = state_faith + } + scope:actor.top_liege.primary_title.state_faith ?= scope:recipient.faith + } + decision:adopt_state_faith = { + open_view_data = { + view = decision_detail + player = scope:actor + } + } + } + ## Otherwise, go to the usual place. + else = { + scope:recipient.faith = { + open_view_data = { + view = faith_conversion + player = scope:actor # interaction effects are executed for all clients, make sure to open the window only for the actor + } + } + } + } + + on_accept = { + custom_tooltip = { + text = open_faith_conversion_view_tt + } + } + + ai_accept = { + base = 0 + } + + ai_will_do = { + base = 0 + } +} + +convert_to_religion_adventurer_interaction = { + category = interaction_category_religion + icon = religious + + + desc = convert_to_religion_interaction_desc + + notification_text = CONVERT_TO_RELIGION + ignores_pending_interaction_block = yes + + is_shown = { + scope:actor.faith != scope:recipient.faith + scope:actor = { + has_government = landless_adventurer_government + # They're either your friend or your spouse + OR = { + target_is_liege_or_above = scope:recipient + any_consort = { + this = scope:recipient + } + any_relation = { + type = friend + this = scope:recipient + } + } + # And you've never HumSac'd a tolerated HoF. + NAND = { + has_variable_list = humsacd_hofs + is_target_in_variable_list = { + name = humsacd_hofs + target = scope:recipient.faith + } + } + } + } + + is_valid_showing_failures_only = { + } + + auto_accept = yes + + ai_min_reply_days = 1 + ai_max_reply_days = 5 + + on_accept = { + scope:actor = { + hidden_effect = { faith = { save_scope_as = old_faith } } + set_character_faith = scope:recipient.faith + trigger_event = { + on_action = on_faith_conversion + } + } + } + + ai_accept = { + base = 0 + } + + ai_will_do = { + base = 0 + } +} + +convert_at_war_interaction = { + category = interaction_category_religion + icon = religious + + + desc = convert_at_war_interaction_desc + + notification_text = CONVERT_AT_WAR_INTERACTION_NOTIFICATION + + is_shown = { + scope:actor.faith != scope:recipient.faith + scope:actor = { + any_character_war = { + primary_defender = scope:actor + primary_attacker = scope:recipient + using_non_ghw_holy_war_cb_trigger = yes + } + NOR = { + #They're neither your liege nor your spouse (so this isn't shown with convert_to_religion_interaction) + target_is_liege_or_above = scope:recipient + any_spouse = { + this = scope:recipient + } + #They can convert + scope:actor = scope:actor.faith.religious_head + government_has_flag = government_is_holy_order + # And you've never HumSac'd a tolerated HoF. + AND = { + has_variable_list = humsacd_hofs + is_target_in_variable_list = { + name = humsacd_hofs + target = scope:recipient.faith + } + } + } + } + } + + + is_valid_showing_failures_only = { + } + + + ai_accept = { + base = 100 #Ai always says yes + } + + ai_min_reply_days = 1 + ai_max_reply_days = 3 + + cooldown_against_recipient = { years = 10 } + + on_accept = { + scope:actor = { + trigger_event = religious_interaction.2500 + convert_at_war_interaction_effect = yes + } + } + + on_decline = { + scope:actor = { + show_as_tooltip = { + add_piety_level = -1 + stress_impact = { zealous = major_stress_impact_gain } + } + trigger_event = religious_interaction.2501 + } + } + + ai_potential = { + ai_zeal < 100 + faith = { + OR = { + has_doctrine_parameter = unreformed + fervor <= 25 + has_doctrine_parameter = unattractive_for_character_conversions + } + } + } + + ai_targets = { + ai_recipients = primary_war_enemies + } + + ai_frequency_by_tier = { + barony = 0 + county = 36 + duchy = 24 + kingdom = 24 + empire = 24 + hegemony = 24 + } + + ai_will_do = { + base = 0 + + ai_value_modifier = { + who = scope:actor + ai_zeal = -1 + ai_boldness = -0.5 + max = 40 + } + modifier = { + scope:actor = { + any_character_war = { + primary_attacker = scope:recipient + primary_defender = scope:actor + attacker_war_score >= 30 + } + } + add = 5 + } + modifier = { + scope:actor = { + any_character_war = { + primary_attacker = scope:recipient + primary_defender = scope:actor + attacker_war_score >= 50 + } + } + add = 10 + } + modifier = { + scope:actor = { + any_character_war = { + primary_attacker = scope:recipient + primary_defender = scope:actor + attacker_war_score >= 80 + } + } + add = 15 + } + modifier = { + scope:actor.faith = { + fervor < 50 + } + scope:recipient.faith = { + fervor >= 50 + } + add = 5 + } + modifier = { + scope:actor.faith = { + fervor <= 25 + } + scope:recipient.faith = { + fervor >= 50 + } + add = 5 + } + modifier = { + scope:actor.faith = { + fervor <= 25 + } + scope:recipient.faith = { + fervor >= 75 + } + add = 5 + } + modifier = { + scope:actor.faith = { + fervor >= 75 + } + add = -10 + } + modifier = { + scope:actor.faith = { + fervor >= 50 + } + add = -5 + } + modifier = { + scope:recipient.faith = { + fervor <= 25 + } + add = -10 + } + modifier = { + scope:recipient.faith = { + fervor <= 15 + } + add = -20 + } + modifier = { + scope:recipient.faith = { + fervor <= 10 + } + add = -30 + } + modifier = { + scope:recipient.faith.fervor < scope:actor.faith.fervor + factor = 0 + } + modifier = { # Big rulers shouldn't convert arbitrarily + scope:actor = { + highest_held_title_tier >= tier_kingdom + sub_realm_size >= 10 + NOT = { + has_trait = lunatic + } + } + factor = 0 + } + } +} + + +#################### +# Communion tenets # +# by Sean Hughes # +#################### + +seek_indulgences_interaction = { + icon = religious + category = interaction_category_religion + + desc = seek_indulgences_interaction_desc + + notification_text = RELIGIOUS_HEAD_SEEK_INDULGENCES + + is_shown = { + scope:recipient != scope:actor + scope:actor.faith = { + religious_head = scope:recipient + has_doctrine = tenet_communion + } + } + + cooldown = { years = 5 } + + is_valid_showing_failures_only = { + scope:actor = { + trigger_if = { + limit = { + has_trait = kinslayer_3 + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_3 GENDER_CHARACTER = scope:actor } + } + gold >= seek_indulgences_major_criminal_trait_value + } + trigger_else_if = { + limit = { + OR = { + AND = { + has_trait = kinslayer_2 + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_2 GENDER_CHARACTER = scope:actor } + } + AND = { + has_trait = witch + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = witch GENDER_CHARACTER = scope:actor } + } + AND = { + has_trait = deviant + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = deviant GENDER_CHARACTER = scope:actor } + } + AND = { + has_trait = sodomite + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = sodomite GENDER_CHARACTER = scope:actor } + } + } + } + gold >= seek_indulgences_medium_criminal_trait_value + } + trigger_else_if = { + limit = { + OR = { + AND = { + has_trait = kinslayer_1 + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_1 GENDER_CHARACTER = scope:actor } + } + AND = { + has_trait = fornicator + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = fornicator GENDER_CHARACTER = scope:actor } + } + AND = { + has_trait = adulterer + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = adulterer GENDER_CHARACTER = scope:actor } + } + } + } + gold >= seek_indulgences_minor_criminal_trait_value + } + trigger_else = { + gold >= seek_indulgences_buy_piety_value + } + custom_description = { + text = "seek_indulgences_excommunicated" + NOT = { has_trait = excommunicated } + } + } + scope:actor = { + custom_description = { + text = "hof_interaction_unreformed_faith" + NOT = { + faith = { has_doctrine_parameter = unreformed } + } + } + NOT = { + is_at_war_with = scope:recipient + } + } + } + + ai_accept = { + base = 50 + + opinion_modifier = { + opinion_target = scope:actor + who = scope:recipient + multiplier = 1 + } + + modifier = { # Same language + add = 5 + desc = speaks_same_language_interaction_reason + trigger = { + scope:actor = { + knows_language_of_culture = scope:recipient.culture + } + } + } + + evaluate_action_increasing_house_unity = { + VALUE = 50 + } + + evaluate_action_decreasing_house_unity = { + VALUE = -100 + } + } + + ai_min_reply_days = 1 + ai_max_reply_days = 5 + + on_accept = { + seek_indulgences_interaction_effect = yes + scope:actor = { + trigger_event = religious_interaction.1010 + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_gain + DESC = clan_unity_indulgences_accepted.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + scope:actor = { + trigger_event = religious_interaction.1011 + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_loss + DESC = clan_unity_indulgences_declined.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + # AI will do + + ai_potential = { + short_term_gold >= head_of_faith_gold_value + NOT = { + has_trait = cynical + } + } + + ai_targets = { + ai_recipients = head_of_faith + } + + ai_frequency_by_tier = { + barony = 0 + county = 36 + duchy = 36 + kingdom = 36 + empire = 36 + hegemony = 36 + } + + ai_will_do = { + base = -25 + + ai_value_modifier = { # +50 to -50 + who = scope:actor + ai_zeal = 0.5 + } + + modifier = { + add = 50 + scope:actor = { + piety < 0 + } + } + + modifier = { + add = 75 + scope:actor = { + piety_level < 0 + } + } + + modifier = { + add = 50 + scope:actor = { + piety < major_piety_value + short_term_gold >= head_of_faith_gold_value + short_term_gold >= monumental_gold_value + } + } + + modifier = { + add = -25 + scope:actor = { + piety > major_piety_value + piety_level > 0 + } + } + + evaluate_action_increasing_house_unity = { + VALUE = 50 + } + } +} + +declaration_of_repentance_interaction = { + icon = religious + category = interaction_category_religion + + desc = { + desc = declaration_of_repentance_interaction_desc + triggered_desc = { + trigger = { scope:actor = { has_hook = scope:recipient } } + desc = declaration_of_repentance_interaction_desc_hook + } + } + + notification_text = RELIGIOUS_HEAD_DECLARATION_OF_REPENTANCE + + is_shown = { + scope:recipient != scope:actor + scope:actor = { + has_trait = excommunicated + faith = { + religious_head = scope:recipient + has_doctrine = tenet_communion + } + } + } + + is_valid_showing_failures_only = { + scope:actor = { + NOT = { + has_character_modifier = recent_excommunication + } + NOT = { + is_at_war_with = scope:recipient + } + } + } + + send_option = { + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + flag = declaration_hook + localization = DECLARATION_OF_REPENTANCE_HOOK + } + should_use_extra_icon = { + scope:actor = { has_usable_hook = scope:recipient } + } + extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" + + send_options_exclusive = no + + auto_accept = { + custom_description = { + text = "spending_hook" + subject = scope:actor + object = scope:recipient + scope:declaration_hook = yes + scope:actor = { has_strong_hook = scope:recipient } + } + } + + ai_accept = { + base = 25 + + modifier = { + scope:declaration_hook = yes + add = 20 + desc = SCHEME_WEAK_HOOK_USED + } + opinion_modifier = { + opinion_target = scope:actor + who = scope:recipient + multiplier = 1 + } + modifier = { # Same language + add = 5 + desc = speaks_same_language_interaction_reason + trigger = { + scope:actor = { + knows_language_of_culture = scope:recipient.culture + } + } + } + modifier = { + add = { + add = 10 + multiply = scope:actor.num_virtuous_traits + } + scope:actor.num_virtuous_traits > 0 + desc = DECLARATION_OF_REPENTANCE_VIRTUES + } + modifier = { + add = { + add = -10 + multiply = scope:actor.num_sinful_traits + } + scope:actor.num_sinful_traits > 0 + desc = DECLARATION_OF_REPENTANCE_SINS + } + modifier = { + desc = RELIGIOUS_HEAD_INTERACTION_PARAGON + add = 15 + scope:actor = { + has_trait = paragon + } + } + modifier = { + desc = RELIGIOUS_HEAD_INTERACTION_CONSECRATED_BLOOD + add = 5 + scope:actor = { + has_trait = consecrated_blood + } + } + modifier = { + desc = RELIGIOUS_HEAD_INTERACTION_UNPLEDGED_GHW + add = -25 + scope:recipient = { + has_opinion_modifier = { + target = scope:actor + modifier = unpledged_from_ghw_opinion + } + } + } + modifier = { + add = 20 + scope:recipient = { + is_landed = no + } + OR = { + scope:recipient.liege ?= scope:actor + scope:recipient.top_liege ?= scope:actor + } + desc = I_AM_LIEGE_TOP_LIEGE + } + modifier = { + add = 10 + scope:recipient = { + is_landed = yes + } + OR = { + scope:recipient.liege ?= scope:actor + scope:recipient.top_liege ?= scope:actor + } + desc = I_AM_LIEGE_TOP_LIEGE + } + + evaluate_action_increasing_house_unity = { + VALUE = 50 + } + + evaluate_action_decreasing_house_unity = { + VALUE = -100 + } + } + + ai_min_reply_days = 1 + ai_max_reply_days = 5 + + on_accept = { + declaration_of_repentance_interaction_effect = yes + + scope:actor = { + #Letter event to inform character that their excommunication has been lifted. + trigger_event = { + id = religious_interaction.1024 + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_gain + DESC = clan_unity_repentance.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + scope:actor = { + + #Letter event to inform character the pope refused to lift the excommunication. + trigger_event = { + id = religious_interaction.1025 + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_loss + DESC = clan_unity_repentance_declined.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + # AI will do + + ai_potential = { + has_trait = excommunicated + } + + ai_targets = { + ai_recipients = head_of_faith + } + + ai_frequency_by_tier = { + barony = 0 + county = 72 + duchy = 72 + kingdom = 36 + empire = 36 + hegemony = 36 + } + + ai_will_do = { + base = 100 + } +} + +excommunicate_interaction = { + category = interaction_category_hostile + common_interaction = yes #suppress error + icon = excommunication + + desc = excommunicate_interaction_desc + + is_shown = { + scope:actor = scope:actor.faith.religious_head + scope:actor.faith = { + this = scope:recipient.faith + has_doctrine = tenet_communion + has_doctrine = doctrine_spiritual_head + } + + NOT = { + scope:recipient = { + has_trait = excommunicated + } + } + + NOT = { #Don't do this to yourself + scope:recipient = scope:actor + } + } + + is_valid_showing_failures_only = { + NOR = { + scope:recipient = { + has_character_modifier = excommunication_recently_lifted + } + AND = { + exists = scope:actor.faith.great_holy_war + scope:actor.faith.great_holy_war = { + has_pledged_attacker = scope:recipient + } + } + } + scope:recipient = { + age >= 12 + } + scope:actor = { + piety >= major_piety_value + } + scope:actor = { + custom_description = { + text = "hof_interaction_unreformed_faith" + NOT = { + faith = { has_doctrine_parameter = unreformed } + } + } + } + scope:recipient = { NOT = { has_strong_hook = scope:actor } } + custom_tooltip = { + text = cannot_take_overt_hostile_actions_against_diarch.tt + NOT = { scope:recipient ?= scope:actor.diarch } + } + } + + auto_accept = yes + force_notification = yes + notification_text = religious_interaction.1021 + #answer_accept_key = religious_interaction.1000.strong_negative + + on_accept = { + scope:actor = { + add_piety = major_piety_loss + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_neutral + title = excommunicate_interaction_desc.tt + left_icon = scope:recipient + scope:recipient = { + show_as_tooltip = { add_trait = excommunicated } + } + } + } + } + excommunicate_character = { + REQUESTING_CHARACTER = scope:actor + TARGET_CHARACTER = scope:recipient + } + + scope:recipient = { + hidden_effect = { #Nudge towards rivalry + if = { + limit = { + NOR = { + has_relation_rival = scope:actor + has_relation_potential_rival = scope:actor + } + } + set_relation_potential_rival = scope:actor + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_loss + DESC = clan_unity_excommunication.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + # AI will do + + ai_potential = { + is_adult = yes + piety >= major_piety_value + } + + ai_target_quick_trigger = { + adult = yes + } + + ai_targets = { + ai_recipients = scripted_relations + ai_recipients = primary_war_enemies + } + + ai_frequency_by_tier = { + barony = 0 + county = 72 + duchy = 36 + kingdom = 12 + empire = 12 + hegemony = 12 + } + + ai_will_do = { + base = 50 + + ai_value_modifier = { # +50 to -50 + who = scope:actor + ai_vengefulness = 0.5 + } + + modifier = { + factor = 0 + scope:recipient = { + NOR = { + has_relation_rival = scope:actor + has_relation_nemesis = scope:actor + is_at_war_with = scope:actor + } + } + } + + modifier = { + factor = 0 + scope:recipient = { + involved_activity ?= { + has_activity_type = activity_coronation + activity_host = prev + } + } + } + } +} + +lift_excommunication_interaction = { + category = interaction_category_religion + icon = excommunication + + common_interaction = yes + + desc = lift_excommunication_interaction_desc + + is_shown = { + scope:actor = scope:actor.faith.religious_head + scope:actor.faith = scope:recipient.faith + scope:recipient = { + has_trait = excommunicated + } + } + + is_valid_showing_failures_only = { + scope:actor = { + NOT = { + is_at_war_with = scope:recipient + } + } + } + + auto_accept = yes + force_notification = yes + notification_text = religious_interaction.1024 + #answer_accept_key = religious_interaction.1024.positive + + on_accept = { + lift_character_excommunication_effect = { + TARGET_CHARACTER = scope:recipient + REQUESTING_CHARACTER = scope:actor + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_gain + DESC = clan_unity_excommunication_lifted + REVERSE_NON_HOUSE_TARGET = no + } + } + + # AI will do + + ai_potential = { + is_adult = yes + piety >= major_piety_value + } + + ai_target_quick_trigger = { + adult = yes + } + + ai_targets = { + ai_recipients = scripted_relations + ai_recipients = war_allies + } + + ai_frequency_by_tier = { + barony = 0 + county = 96 + duchy = 72 + kingdom = 12 + empire = 12 + hegemony = 12 + } + + ai_will_do = { + base = 10 + + ai_value_modifier = { # +50 to -50 + who = scope:actor + ai_compassion = 0.5 + } + + modifier = { + factor = 0 + scope:recipient = { + NOR = { + has_relation_friend = scope:actor + has_relation_best_friend = scope:actor + is_allied_to = scope:actor + } + } + } + } +} + +request_excommunication_interaction = { + category = interaction_category_hostile + icon = excommunication + interface_priority = 30 + + desc = request_excommunication_interaction_desc + redirect = { + if = { + limit = { + exists = scope:actor.faith.religious_head + } + scope:recipient = { + save_scope_as = secondary_recipient + } + scope:actor.faith.religious_head = { + save_scope_as = recipient + } + } + scope:actor.faith = { + if = { + limit = { exists = religious_head } + religious_head = { + save_scope_as = recipient + } + } + } + } + + notification_text = RELIGIOUS_HEAD_REQUEST_EXCOMMUNICATION + + is_shown = { + exists = scope:actor.faith.religious_head + NOR = { + scope:actor = scope:secondary_recipient + scope:actor.faith.religious_head = scope:actor + scope:actor.faith.religious_head = scope:secondary_recipient + } + scope:actor.faith = { + exists = religious_head + this = scope:secondary_recipient.faith + has_doctrine = tenet_communion + has_doctrine = doctrine_spiritual_head + } + } + + is_valid_showing_failures_only = { + scope:actor = { + piety >= massive_piety_value + } + scope:secondary_recipient = { #Excommunication target + NOT = { has_trait = excommunicated } + age >= 12 + } + scope:actor = { + custom_description = { + text = "hof_interaction_unreformed_faith" + NOT = { + faith = { has_doctrine_parameter = unreformed } + } + } + NOT = { + is_at_war_with = scope:recipient + } + } + scope:secondary_recipient = { NOT = { has_strong_hook = scope:actor } } + custom_tooltip = { + text = cannot_take_overt_hostile_actions_against_diarch.tt + NOT = { scope:recipient ?= scope:actor.diarch } + } + } + + send_option = { + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + flag = excommunication_hook + localization = EXCOMMUNICATION_HOOK + } + should_use_extra_icon = { + scope:actor = { has_usable_hook = scope:recipient } + } + extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" + + send_options_exclusive = no + + auto_accept = { + custom_description = { + text = "spending_hook" + subject = scope:actor + object = scope:recipient + scope:excommunication_hook = yes + scope:actor = { has_strong_hook = scope:recipient } + } + } + + ai_accept = { + base = -50 + + modifier = { + scope:excommunication_hook = yes + add = 50 + desc = SCHEME_WEAK_HOOK_USED + } + opinion_modifier = { + who = scope:actor.faith.religious_head + opinion_target = scope:actor + multiplier = 1 + } + opinion_modifier = { + who = scope:actor.faith.religious_head + opinion_target = scope:secondary_recipient #Excommunication target + multiplier = -1 + min = 0 + } + modifier = { + add = -100 + scope:actor.faith.religious_head = { + opinion = { + value > 0 + target = scope:secondary_recipient #Excommunication target + } + } + desc = EXCOMMUNICATION_OPINION + } + modifier = { + add = { + add = -10 + multiply = scope:secondary_recipient.num_virtuous_traits + } + scope:secondary_recipient.num_virtuous_traits > 0 + desc = EXCOMMUNICATION_VIRTUES + } + modifier = { + add = { + add = 10 + multiply = scope:secondary_recipient.num_sinful_traits + } + scope:secondary_recipient.num_sinful_traits > 0 + desc = EXCOMMUNICATION_SINS + } + modifier = { + desc = RELIGIOUS_HEAD_INTERACTION_PARAGON + add = 15 + scope:actor = { + has_trait = paragon + } + } + modifier = { + desc = RELIGIOUS_HEAD_INTERACTION_CONSECRATED_BLOOD + add = 5 + scope:actor = { + has_trait = consecrated_blood + } + } + } + + ai_min_reply_days = 1 + ai_max_reply_days = 5 + + on_accept = { + if = { + limit = { + scope:secondary_recipient = { is_alive = yes } + } + if = { + limit = { scope:excommunication_hook = yes } + scope:actor = { + use_hook = scope:recipient + } + } + + scope:actor = { + #Spend piety for the excommunication. + add_piety = massive_piety_loss + + #Letter event to inform character the pope agreed to their request. + trigger_event = { + id = religious_interaction.1022 + } + } + excommunicate_character = { + TARGET_CHARACTER = scope:secondary_recipient + REQUESTING_CHARACTER = scope:actor + } + scope:secondary_recipient = { + #Letter event to inform character that they have been excommunicated. + trigger_event = { + id = religious_interaction.1020 + } + hidden_effect = { #Nudge towards rivalry + if = { + limit = { + NOR = { + has_relation_rival = scope:actor + has_relation_potential_rival = scope:actor + } + scope:actor = { is_alive = yes } + } + set_relation_potential_rival = scope:actor + } + } + } + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_loss + DESC = clan_unity_request_excommunication.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + } + + on_decline = { + scope:actor = { + #Letter event to inform character the pope refused their request. + trigger_event = { + id = religious_interaction.1023 + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = miniscule_unity_gain + DESC = clan_unity_excommunication_request_denied.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + # AI will do + + ai_potential = { + is_adult = yes + piety >= major_piety_value + } + + ai_target_quick_trigger = { + adult = yes + } + + ai_targets = { + ai_recipients = scripted_relations + ai_recipients = primary_war_enemies + } + + ai_frequency_by_tier = { + barony = 0 + county = 48 + duchy = 36 + kingdom = 12 + empire = 12 + hegemony = 12 + } + + ai_will_do = { + base = 25 + + ai_value_modifier = { # +50 to -50 + who = scope:actor + ai_vengefulness = 0.5 + } + + modifier = { + factor = 0 + scope:secondary_recipient = { + NOR = { + has_relation_rival = scope:actor + has_relation_nemesis = scope:actor + is_at_war_with = scope:actor + } + } + } + } +} + +### End Communion tenets ### + +#Ask to take the vows to join Holy order +#by Linnéa Thimrén & Bianca Savazzi +send_to_holy_order_interaction = { + category = interaction_category_friendly + icon = holy_order + + ai_maybe = yes + ai_min_reply_days = 4 + ai_max_reply_days = 9 + #can_send_despite_rejection = yes + popup_on_receive = yes + pause_on_receive = yes + + common_interaction = yes + cooldown_against_recipient = { years = 10 } + + desc = send_to_holy_order_interaction_desc + + on_decline_summary = take_vows_decline_summary + + greeting = negative + notification_text = REQUEST_VOWS_NOTIFICATION_TEXT + + is_shown = { + scope:recipient = { + OR = { + is_courtier_of = scope:actor + is_child_of = scope:actor + } + NOR = { + has_trait = devoted + has_trait = order_member + } + } + NOT = { #Not your bishop + scope:actor = { + any_learning_councillor = { this = scope:recipient } + } + } + scope:actor.faith = { + any_faith_holy_order = { #Your faith must have a Holy Order + always = yes + } + } + } + + is_valid_showing_failures_only = { + scope:recipient = { + is_courtier_of = scope:actor + #Triggers that applies to both Monastery or Holy Order requirements + can_take_religious_vows_trigger = yes + + can_be_warrior_trigger = { ARMY_OWNER = scope:recipient } + custom_description = { + text = TAKE_VOWS_INTERACTION_MARTIAL_EDUCATION + object = scope:recipient + has_education_martial_trigger = yes + } + custom_description = { #At least one Holy Order whose leader you're not a rival of + text = not_rival_leader_check + object = scope:recipient + scope:actor.faith = { + any_faith_holy_order = { + leader = { + NOT = { has_relation_rival = scope:recipient } + } + } + } + } + } + custom_tooltip = { + text = cannot_take_overt_hostile_actions_against_diarch.tt + NOT = { scope:recipient ?= scope:actor.diarch } + } + } + + #Use hook + auto_accept = { + custom_description = { + text = "spending_hook" + subject = scope:actor + object = scope:recipient + scope:hook = yes + scope:actor = { has_strong_hook = scope:recipient } + } + } + + 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" + + send_options_exclusive = no + + cost = { + piety = scope:recipient.ask_to_take_vows_piety_cost + } + + on_send = { + scope:recipient = { + set_variable = { + name = vows_piety_spent + value = ask_to_take_vows_piety_cost + days = 10 + } + } + } + + on_accept = { + scope:actor = { + if = { + limit = { scope:hook = yes } + use_hook = scope:recipient + } + + # Legitimacy loss if you're doing this to your children + if = { + limit = { + scope:recipient = { is_primary_heir_of = scope:actor } + } + add_legitimacy = { + value = minor_legitimacy_loss + multiply = scope:actor.primary_title.tier + } + } + else_if = { + limit = { + scope:recipient = { is_child_of = scope:actor } + } + add_legitimacy = { + value = miniscule_legitimacy_loss + multiply = scope:actor.primary_title.tier + } + } + + trigger_event = holy_order.0001 + show_as_tooltip = { + send_child_to_holy_order_tooltip_effect = yes + scope:recipient = { kick_from_court_interaction_warning_tooltip_effect = yes } + } + } + hidden_effect = { + scope:recipient = { + remove_variable = vows_piety_spent + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_gain + DESC = clan_unity_send_to_holy_order.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + scope:recipient = { + add_opinion = { + target = scope:actor + modifier = asked_me_to_take_vows_opinion + years = 10 + } + } + #Letter event informing the character about the rejection. + scope:actor = { + trigger_event = { + id = religious_interaction.1031 + } + } + + # Refund piety cost + show_as_tooltip = { + scope:actor = { + add_piety_no_experience = { + value = scope:recipient.ask_to_take_vows_piety_cost + } + } + } + hidden_effect = { + if = { + limit = { + scope:recipient = { + has_variable = vows_piety_spent + } + } + scope:actor = { + add_piety_no_experience = { + value = scope:recipient.var:vows_piety_spent + } + } + scope:recipient = { + remove_variable = vows_piety_spent + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_loss + DESC = clan_unity_join_holy_order_refusal.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + auto_accept = no + + ai_accept = { + base = 0 # Try to make it 0 for most interactions + + modifier = { + scope:hook = yes + add = 50 + desc = SCHEME_WEAK_HOOK_USED + } + opinion_modifier = { # Opinion Factor + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.25 + desc = AI_SIMPLE_OPINION_REASON + } + modifier = { + add = ai_zeal + ai_zeal < 0 + desc = TAKE_THE_VOWS_SKEPTIC + } + modifier = { + add = { + value = ai_zeal + divide = 2 + } + ai_zeal > 0 + desc = TAKE_THE_VOWS_ZEALOUS + } + modifier = { + add = { + value = ai_zeal + multiply = ai_boldness + divide = 100 + min = 10 + } + ai_zeal > 0 + ai_boldness > 0 + desc = TAKE_THE_VOWS_FIGHT_FOR_FAITH + } + modifier = { + add = { + value = ai_boldness + } + ai_boldness < 0 + desc = TAKE_THE_VOWS_AFRAID_TO_DIE + } + modifier = { + add = { + value = ai_greed + multiply = -1 + } + ai_greed > 0 + desc = TAKE_THE_VOWS_GREED + } + modifier = { + add = 50 + exists = scope:actor.cp:councillor_court_chaplain + scope:recipient = { + OR = { + has_relation_lover = scope:actor.cp:councillor_court_chaplain + has_relation_friend = scope:actor.cp:councillor_court_chaplain + has_secret_relation_lover = scope:actor.cp:councillor_court_chaplain + has_relation_soulmate = scope:actor.cp:councillor_court_chaplain + has_relation_best_friend = scope:actor.cp:councillor_court_chaplain + opinion = { + target = scope:actor.cp:councillor_court_chaplain + value >= very_high_positive_opinion + } + } + } + desc = TAKE_THE_VOWS_INSPIRING_COURT_CHAPLAIN + } + modifier = { + add = 50 + scope:recipient = { + OR = { + any_relation = { + type = friend + is_clergy = yes + } + any_relation = { + type = best_friend + is_clergy = yes + } + any_relation = { + type = lover + is_clergy = yes + } + any_relation = { + type = soulmate + is_clergy = yes + } + any_secret = { + type = secret_lover + secret_target = { + is_clergy = yes + } + } + } + } + desc = TAKE_THE_VOWS_INSPIRING_CLERGY + } + + modifier = { + add = { + add = 20 + multiply = scope:recipient.num_virtuous_traits + } + scope:recipient.num_virtuous_traits > 0 + desc = TAKE_THE_VOWS_VIRTUOUS + } + + modifier = { + add = { + add = -20 + multiply = scope:recipient.num_sinful_traits + } + scope:recipient.num_sinful_traits > 0 + desc = TAKE_THE_VOWS_SINFUL + } + modifier = { # Has fought for the faith before + add = 20 + scope:recipient = { + has_trait = holy_warrior + } + desc = TAKE_THE_VOWS_HOLY_WARRIOR + } + + modifier = { + add = 25 + scope:recipient = { + has_trait = temperate + } + desc = TAKE_THE_VOWS_TEMPERATE + } + + modifier = { + add = 25 + scope:recipient = { + has_trait = content + } + desc = TAKE_THE_VOWS_CONTENT + } + modifier = { + add = 25 + scope:recipient = { + has_trait = humble + } + desc = TAKE_THE_VOWS_HUMBLE + } + + #Negative Personality Modifiers + modifier = { + add = -500 + scope:recipient = { + has_trait = pregnant + } + desc = TAKE_THE_VOWS_PREGNANT + } + modifier = { + add = -500 + scope:recipient = { + has_trait = ambitious + } + desc = TAKE_THE_VOWS_AMBITIOUS + } + + modifier = { + add = -50 + scope:recipient = { + OR = { + is_married = yes + exists = betrothed + } + } + desc = TAKE_THE_VOWS_MARRIED_OR_BETROTHED + } + + modifier = { + add = -150 + scope:recipient = { + is_primary_heir_of = scope:actor + } + desc = TAKE_THE_VOWS_PRIMARY_HEIR + } + + modifier = { + add = -75 + scope:recipient = { + NOT = { + is_primary_heir_of = scope:actor + } + } + scope:actor.primary_title = { + place_in_line_of_succession = { + target = prev + value = 2 + } + } + desc = TAKE_THE_VOWS_SECOND_HEIR + } + + modifier = { + add = -50 + scope:recipient = { + NOT = { + is_primary_heir_of = scope:actor + } + } + scope:actor.primary_title = { + place_in_line_of_succession = { + target = prev + value = 3 + } + } + desc = TAKE_THE_VOWS_THIRD_HEIR + } + + modifier = { + add = -25 + scope:recipient = { + NOT = { + is_primary_heir_of = scope:actor + } + } + scope:actor.primary_title = { + place_in_line_of_succession = { + target = prev + value >= 4 + value <= 10 + } + } + desc = TAKE_THE_VOWS_HEIR + } + + modifier = { + add = -100 + scope:recipient = { + NOT = { is_heir_of = scope:actor } + any_heir_title = { + exists = holder + holder != scope:actor + } + NOT = { + is_primary_heir_of = scope:actor + } + } + desc = TAKE_THE_VOWS_HEIR_TO_OTHER_TITLE + } + + modifier = { + add = -50 + scope:recipient = { + NOT = { is_heir_of = scope:actor } + any_parent = { + any_held_title = { + place_in_line_of_succession = { + target = scope:recipient + value < 5 + } + NOT = { + place_in_line_of_succession = { + target = scope:recipient + value < 2 + } + } + } + } + NOT = { + is_primary_heir_of = scope:actor + } + } + desc = TAKE_THE_VOWS_IN_LINE_TO_OTHER_TITLE + } + + modifier = { #Rivalry modifier. + desc = offer_vassalization_interaction_aibehavior_rival_tt + trigger = { + scope:recipient = { + has_relation_rival = scope:actor + NOT = { has_relation_nemesis = scope:actor } + } + } + add = -50 + } + modifier = { #Nemesis modifier. + desc = offer_vassalization_interaction_aibehavior_nemesis_tt + trigger = { + scope:recipient = { + has_relation_nemesis = scope:actor + } + } + add = -100 + } + + #Dread modifiers + modifier = { + add = intimidated_halved_reason_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 1 + } + } + desc = INTIMIDATED_REASON + } + modifier = { + add = cowed_halved_reason_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 2 + } + } + desc = COWED_REASON + } + } + + # AI will do + + ai_potential = { + is_adult = yes + piety >= major_piety_value + } + + ai_target_quick_trigger = { + adult = yes + } + + ai_targets = { + ai_recipients = courtiers + max = 5 + } + + ai_targets = { + ai_recipients = family + } + + ai_frequency_by_tier = { + barony = 0 + county = 144 + duchy = 72 + kingdom = 24 + empire = 24 + hegemony = 24 + } + + ai_will_do = { + base = 0 + + modifier = { # The AI will always use a Hook + scope:hook = yes + add = 1 + } + + modifier = { # Try to send rivals + add = 100 + scope:actor = { + OR = { + has_relation_rival = scope:recipient + has_relation_nemesis = scope:recipient + } + } + } + + modifier = { # Try to send people who would make poor heirs + add = 50 + scope:recipient = { + OR = { + has_trait = murderer + has_trait = incestuous + has_trait = sodomite + has_trait = cannibal + has_trait = deviant + has_trait = kinslayer + has_trait = adulterer + has_trait = fornicator + has_trait = maimed + has_trait = drunkard + has_trait = hashishiyah + has_trait = flagellant + has_trait = reclusive + num_of_bad_genetic_traits >= 1 + num_sinful_traits >= 2 + } + scope:actor.primary_title = { + place_in_line_of_succession = { + target = prev + value <= 7 + } + } + } + } + + modifier = { # Try to send people who would make poor heirs + add = 25 + scope:recipient = { + is_adult = yes + calc_true_if = { + amount >= 3 + + diplomacy < 8 + stewardship < 8 + martial < 8 + intrigue < 8 + learning < 8 + } + scope:actor.primary_title = { + place_in_line_of_succession = { + target = prev + value <= 7 + } + } + } + } + + modifier = { # Sending one of your heirs is almost customary + add = 100 + scope:actor = { + any_child = { + count >= 3 + } + NOT = { + any_child = { + OR = { + has_trait = devoted + has_trait = order_member + } + } + } + } + scope:recipient = { + is_child_of = scope:actor + has_education_martial_trigger = yes + } + } + + modifier = { # Zealous characters generally want to send characters to the Holy Order + add = 50 + scope:actor = { + ai_zeal >= high_positive_ai_value + } + scope:recipient = { + has_education_martial_trigger = yes + } + } + + modifier = { # Greedy characters want to rid their court of potential threats + add = 50 + scope:actor = { + ai_greed >= medium_positive_ai_value + any_child = { } + } + scope:recipient = { + NOT = { + is_child_of = scope:actor + } + any_claim = { + holder ?= scope:actor + } + } + } + + modifier = { # The AI doesn't ask married/betrothed people + factor = 0 + scope:recipient = { + OR = { + exists = betrothed + is_married = yes + } + } + } + + modifier = { # Never ask Primary Heir + factor = 0 + scope:recipient = { + is_primary_heir_of = scope:actor + } + } + + modifier = { # Only care about family + factor = 0 + scope:recipient = { + NOT = { + is_close_or_extended_family_of = scope:actor + } + } + } + } +} + + +#Ask to take the vows for a monastery +#by Linnéa Thimrén & Bianca Savazzi +take_vows_interaction = { + category = interaction_category_vassal + icon = religious + + ai_maybe = yes + ai_min_reply_days = 4 + ai_max_reply_days = 9 + #can_send_despite_rejection = yes + popup_on_receive = yes + pause_on_receive = yes + + common_interaction = yes + cooldown_against_recipient = { years = 10 } + + desc = take_vows_interaction_desc + + on_decline_summary = take_vows_decline_summary + + greeting = negative + notification_text = REQUEST_VOWS_NOTIFICATION_TEXT + + is_shown = { + scope:recipient = { + is_courtier_of = scope:actor + NOR = { + has_trait = devoted + has_trait = order_member + } + } + NOT = { #Not your bishop + scope:actor = { + any_learning_councillor = { this = scope:recipient } + } + } + scope:actor = { + take_vows_available_trigger = yes # Faith has Monastery order that recipient can be sent to + } + } + + is_valid_showing_failures_only = { + scope:recipient = { + age >= 10 + is_courtier_of = scope:actor + can_take_religious_vows_trigger = yes #Triggers that applies to both Monastery or Holy Order requirements + } + custom_tooltip = { + text = cannot_take_overt_hostile_actions_against_diarch.tt + NOT = { scope:recipient ?= scope:actor.diarch } + } + } + + #Use hook + auto_accept = { + custom_description = { + text = "spending_hook" + subject = scope:actor + object = scope:recipient + scope:hook = yes + scope:actor = { has_strong_hook = scope:recipient } + } + } + + 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" + + send_options_exclusive = no + + cost = { + piety = scope:recipient.ask_to_take_vows_piety_cost + } + + on_send = { + scope:recipient = { + set_variable = { + name = vows_piety_spent + value = ask_to_take_vows_piety_cost + days = 10 + } + } + } + + on_accept = { + scope:actor = { + if = { + limit = { scope:hook = yes } + use_hook = scope:recipient + } + + # Legitimacy loss if you're doing this to your children + if = { + limit = { + scope:recipient = { is_primary_heir_of = scope:actor } + } + add_legitimacy = { + value = minor_legitimacy_loss + multiply = scope:actor.primary_title.tier + } + } + else_if = { + limit = { + scope:recipient = { is_child_of = scope:actor } + has_legitimacy = yes + } + add_legitimacy = { + value = miniscule_legitimacy_loss + multiply = scope:actor.primary_title.tier + } + } + + show_as_tooltip = { + send_child_to_clergy_effect = yes + } + scope:recipient = { + if = { + limit = { + scope:actor.top_liege = { + any_vassal_or_below = { + government_has_flag = government_is_theocracy + primary_title.tier > tier_barony + faith = scope:actor.faith + } + } + } + scope:actor.top_liege = { + random_vassal_or_below = { + limit = { + government_has_flag = government_is_theocracy + primary_title.tier > tier_barony + faith = scope:actor.faith + } + save_scope_as = theocratic_travel_target + } + } + visit_court_of = scope:theocratic_travel_target + } + else_if = { + limit = { + exists = scope:actor.capital_province + } + move_to_pool_at = scope:actor.capital_province + } + kick_from_court_interaction_warning_tooltip_effect = yes + } + trigger_event = holy_order.0002 + if = { + limit = { + exists = cp:councillor_court_chaplain + scope:recipient = { + is_close_family_of = scope:actor + } + } + cp:councillor_court_chaplain = { + add_opinion = { + target = scope:actor + modifier = pious_opinion + opinion = 25 + } + } + } + if = { + limit = { + exists = faith.religious_head + faith.religious_head != scope:actor + scope:recipient = { + is_close_family_of = scope:actor + } + } + faith.religious_head = { + add_opinion = { + target = scope:actor + modifier = pious_opinion + opinion = 10 + } + } + } + if = { + limit = { + house = { + has_house_power_parameter = humility_take_the_vows_bonus + } + } + add_piety_experience = 100 + add_character_modifier = { + modifier = tgp_humility_take_the_vows_bonus_modifier + years = 10 + } + } + } + + hidden_effect = { + scope:recipient = { + remove_variable = vows_piety_spent + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_gain + DESC = clan_unity_take_vows.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + scope:recipient = { + add_opinion = { + target = scope:actor + modifier = asked_me_to_take_vows_opinion + years = 10 + } + } + #Letter event informing the character about the rejection. + scope:actor = { + trigger_event = { + id = religious_interaction.1031 + } + } + + # Refund piety cost + show_as_tooltip = { + scope:actor = { + add_piety_no_experience = { + value = scope:recipient.ask_to_take_vows_piety_cost + } + } + } + # Refund piety cost + hidden_effect = { + if = { + limit = { + scope:recipient = { + has_variable = vows_piety_spent + } + } + scope:actor = { + add_piety_no_experience = { + value = scope:recipient.var:vows_piety_spent + } + } + scope:recipient = { + remove_variable = vows_piety_spent + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_loss + DESC = clan_unity_refused_to_take_vows.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + auto_accept = no + + ai_accept = { + base = 0 # Try to make it 0 for most interactions + + modifier = { + scope:hook = yes + add = 50 + desc = SCHEME_WEAK_HOOK_USED + } + opinion_modifier = { # Opinion Factor + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.25 + desc = AI_SIMPLE_OPINION_REASON + } + modifier = { + add = ai_zeal + ai_zeal < 0 + desc = TAKE_THE_VOWS_SKEPTIC + } + modifier = { + add = { + value = ai_zeal + divide = 2 + } + ai_zeal > 0 + desc = TAKE_THE_VOWS_ZEALOUS + } + modifier = { + add = { + value = ai_greed + multiply = -1 + } + ai_greed > 0 + desc = TAKE_THE_VOWS_GREED + } + modifier = { + add = 50 + scope:recipient = { + age >= 45 + is_visibly_fertile = no + NOT = { + any_heir_title = { + exists = holder + } + } + } + desc = TAKE_THE_VOWS_RETIRE_IN_CHURCH + } + modifier = { + add = 50 + exists = scope:actor.cp:councillor_court_chaplain + scope:recipient = { + OR = { + has_relation_lover = scope:actor.cp:councillor_court_chaplain + has_relation_friend = scope:actor.cp:councillor_court_chaplain + has_secret_relation_lover = scope:actor.cp:councillor_court_chaplain + has_relation_soulmate = scope:actor.cp:councillor_court_chaplain + has_relation_best_friend = scope:actor.cp:councillor_court_chaplain + opinion = { + target = scope:actor.cp:councillor_court_chaplain + value >= very_high_positive_opinion + } + } + } + desc = TAKE_THE_VOWS_INSPIRING_COURT_CHAPLAIN + } + modifier = { + add = 50 + scope:recipient = { + OR = { + any_relation = { + type = friend + is_clergy = yes + } + any_relation = { + type = best_friend + is_clergy = yes + } + any_relation = { + type = lover + is_clergy = yes + } + any_relation = { + type = soulmate + is_clergy = yes + } + any_relation = { + type = crush + is_clergy = yes + } + any_secret = { + type = secret_lover + secret_target = { + is_clergy = yes + } + } + } + } + desc = TAKE_THE_VOWS_INSPIRING_CLERGY + } + modifier = { + add = 50 + scope:recipient = { + has_education_learning_trigger = yes + } + desc = TAKE_THE_VOWS_LEARNING_EDUCATION + } + + modifier = { + add = { + add = 20 + multiply = scope:recipient.num_virtuous_traits + } + scope:recipient.num_virtuous_traits > 0 + desc = TAKE_THE_VOWS_VIRTUOUS + } + + modifier = { + add = { + add = -20 + multiply = scope:recipient.num_sinful_traits + } + scope:recipient.num_sinful_traits > 0 + desc = TAKE_THE_VOWS_SINFUL + } + + #Positive Personality Modifiers + modifier = { # Wants to help people + add = { + value = ai_compassion + divide = 2 + } + scope:recipient = { + ai_compassion > 0 + has_trait = lifestyle_physician + } + desc = TAKE_THE_VOWS_PHYSICIAN_WANTS_TO_HELP + } + modifier = { + add = 1200 + scope:recipient = { + has_trait = reclusive + } + desc = TAKE_THE_VOWS_RECLUSIVE + } + modifier = { + add = 25 + scope:recipient = { + has_trait = curious + } + desc = TAKE_THE_VOWS_CURIOUS + } + modifier = { + add = 50 + scope:recipient = { + has_trait = pensive + } + desc = TAKE_THE_VOWS_PENSIVE + } + modifier = { # Loves books & knowledge! + add = 20 + scope:recipient = { + has_trait = lifestyle_mystic + } + desc = TAKE_THE_VOWS_MYSTIC + } + modifier = { # Loves books & knowledge! + add = 20 + scope:recipient = { + has_trait = scholar + } + desc = TAKE_THE_VOWS_SCHOLAR + } + modifier = { # Loves books & knowledge! + add = 20 + scope:recipient = { + has_trait = theologian + } + desc = TAKE_THE_VOWS_THEOLOGIAN + } + modifier = { # Plants! + add = 20 + scope:recipient = { + has_trait = lifestyle_herbalist + } + desc = TAKE_THE_VOWS_HERBALIST + } + modifier = { + add = 25 + scope:recipient = { + has_trait = temperate + } + desc = TAKE_THE_VOWS_TEMPERATE + } + modifier = { + add = 50 + scope:recipient = { + has_trait = celibate + } + desc = TAKE_THE_VOWS_CELIBATE + } + modifier = { + add = 25 + scope:recipient = { + has_trait = chaste + } + desc = TAKE_THE_VOWS_CHASTE + } + modifier = { + add = 25 + scope:recipient = { + has_trait = content + } + desc = TAKE_THE_VOWS_CONTENT + } + modifier = { + add = 25 + scope:recipient = { + has_trait = humble + } + desc = TAKE_THE_VOWS_HUMBLE + } + modifier = { + add = 10 + scope:recipient = { + has_trait = drunkard + } + desc = TAKE_THE_VOWS_DRUNKARD + } + modifier = { + add = 10 + scope:recipient = { + has_trait = hashishiyah + } + desc = TAKE_THE_VOWS_HASHISHIYAH + } + modifier = { + add = 50 + scope:recipient = { + has_trait = trusting + } + desc = TAKE_THE_VOWS_TRUSTING + } + + #Negative Personality Modifiers + modifier = { + add = -50 + scope:recipient = { + has_trait = rowdy + } + desc = TAKE_THE_VOWS_ROWDY + } + modifier = { + add = -25 + scope:recipient = { + has_trait = bossy + } + desc = TAKE_THE_VOWS_BOSSY + } + modifier = { + add = -20 + scope:recipient = { + has_trait = gluttonous + } + desc = TAKE_THE_VOWS_GLUTTONOUS + } + modifier = { + add = -20 + scope:recipient = { + has_trait = lustful + } + desc = TAKE_THE_VOWS_LUSTFUL + } + modifier = { + add = -500 + scope:recipient = { + has_trait = pregnant + } + desc = TAKE_THE_VOWS_PREGNANT + } + modifier = { + add = -500 + scope:recipient = { + has_trait = ambitious + } + desc = TAKE_THE_VOWS_AMBITIOUS + } + + modifier = { + add = -50 + scope:recipient = { + OR = { + is_married = yes + exists = betrothed + } + } + desc = TAKE_THE_VOWS_MARRIED_OR_BETROTHED + } + + modifier = { + add = -150 + scope:recipient = { + is_primary_heir_of = scope:actor + } + desc = TAKE_THE_VOWS_PRIMARY_HEIR + } + + modifier = { + add = -75 + scope:recipient = { + NOT = { + is_primary_heir_of = scope:actor + } + } + scope:actor.primary_title = { + place_in_line_of_succession = { + target = prev + value = 2 + } + } + desc = TAKE_THE_VOWS_SECOND_HEIR + } + + modifier = { + add = -50 + scope:recipient = { + NOT = { + is_primary_heir_of = scope:actor + } + } + scope:actor.primary_title = { + place_in_line_of_succession = { + target = prev + value = 3 + } + } + desc = TAKE_THE_VOWS_THIRD_HEIR + } + + modifier = { + add = -25 + scope:recipient = { + NOT = { + is_primary_heir_of = scope:actor + } + } + scope:actor.primary_title = { + place_in_line_of_succession = { + target = prev + value >= 4 + value <= 10 + } + } + desc = TAKE_THE_VOWS_HEIR + } + + modifier = { + add = -100 + scope:recipient = { + NOT = { is_heir_of = scope:actor } + any_heir_title = { + exists = holder + holder != scope:actor + } + NOT = { + is_primary_heir_of = scope:actor + } + } + desc = TAKE_THE_VOWS_HEIR_TO_OTHER_TITLE + } + + modifier = { + add = -50 + scope:recipient = { + NOT = { is_heir_of = scope:actor } + any_parent = { + any_held_title = { + place_in_line_of_succession = { + target = scope:recipient + value < 5 + } + NOT = { + place_in_line_of_succession = { + target = scope:recipient + value < 2 + } + } + } + } + NOT = { + is_primary_heir_of = scope:actor + } + } + desc = TAKE_THE_VOWS_IN_LINE_TO_OTHER_TITLE + } + + modifier = { #Rivalry modifier. + desc = offer_vassalization_interaction_aibehavior_rival_tt + trigger = { + scope:recipient = { + has_relation_rival = scope:actor + NOT = { has_relation_nemesis = scope:actor } + } + } + add = -50 + } + modifier = { #Nemesis modifier. + desc = offer_vassalization_interaction_aibehavior_nemesis_tt + trigger = { + scope:recipient = { + has_relation_nemesis = scope:actor + } + } + add = -100 + } + + #Dread modifiers + modifier = { + add = 25 + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 1 + } + } + desc = INTIMIDATED_REASON + } + modifier = { + add = 50 + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 2 + } + } + desc = COWED_REASON + } + + # Culture Tradition modifiers + + modifier = { + add = { + value = 25 + if = { + limit = { + scope:recipient = { + is_adult = no + is_child_of = scope:actor + } + } + add = 100 + } + } + scope:actor.culture = { has_cultural_parameter = monastic_expectations } + desc = MONASTIC_EXPECTATIONS_REASON + } + } + + # AI will do + + ai_potential = { + is_adult = yes + piety >= major_piety_value + } + + ai_target_quick_trigger = { + adult = yes + } + + ai_targets = { + ai_recipients = courtiers + max = 5 + } + + ai_targets = { + ai_recipients = children + } + + ai_frequency_by_tier = { + barony = 0 + county = 144 + duchy = 72 + kingdom = 24 + empire = 24 + hegemony = 24 + } + + ai_will_do = { + base = 0 + + modifier = { + add = -50 + scope:actor = { + OR = { + legitimacy_level = 0 + legitimacy_level = 1 + } + } + scope:recipient = { is_primary_heir_of = scope:actor } + } + + modifier = { # The AI will always use a Hook + scope:hook = yes + add = 1 + } + + modifier = { # Try to send rivals + add = 100 + scope:actor = { + OR = { + has_relation_rival = scope:recipient + has_relation_nemesis = scope:recipient + } + } + } + + modifier = { # Try to send people who would make poor heirs + add = 50 + scope:recipient = { + OR = { + has_trait = murderer + has_trait = incestuous + has_trait = sodomite + has_trait = cannibal + has_trait = deviant + has_trait = kinslayer + has_trait = adulterer + has_trait = fornicator + has_trait = maimed + has_trait = drunkard + has_trait = hashishiyah + has_trait = flagellant + has_trait = reclusive + num_of_bad_genetic_traits >= 1 + num_sinful_traits >= 2 + } + scope:actor.primary_title = { + place_in_line_of_succession = { + target = prev + value <= 7 + } + } + } + } + + modifier = { # Try to send people who would make poor heirs + add = 25 + scope:recipient = { + is_adult = yes + calc_true_if = { + amount >= 3 + + diplomacy < 8 + stewardship < 8 + martial < 8 + intrigue < 8 + learning < 8 + } + scope:actor.primary_title = { + place_in_line_of_succession = { + target = prev + value <= 7 + } + } + } + } + + modifier = { # Sending one of your heirs is almost customary + add = 100 + scope:actor = { + any_child = { + count >= 3 + } + NOT = { + any_child = { + OR = { + has_trait = devoted + has_trait = order_member + } + } + } + } + scope:recipient = { + is_child_of = scope:actor + has_education_learning_trigger = yes + } + } + + modifier = { # Zealous characters generally want to send characters to the clergy + add = 50 + scope:actor = { + ai_zeal >= high_positive_ai_value + } + scope:recipient = { + has_education_learning_trigger = yes + } + } + + modifier = { # Greedy characters want to rid their court of potential threats + add = 50 + scope:actor = { + ai_greed >= medium_positive_ai_value + any_child = { } + } + scope:recipient = { + NOT = { + is_child_of = scope:actor + } + any_claim = { + holder ?= scope:actor + } + } + } + + modifier = { # The AI doesn't ask married/betrothed people + factor = 0 + scope:recipient = { + OR = { + exists = betrothed + is_married = yes + } + } + } + + modifier = { # Never ask Primary Heir + factor = 0 + scope:recipient = { + is_primary_heir_of = scope:actor + } + } + + modifier = { # Only care about family + factor = 0 + scope:recipient = { + NOT = { + is_close_or_extended_family_of = scope:actor + } + } + } + + modifier = { + factor = 0 + scope:recipient.liege ?= { is_ai = no } + } + } +} + +### End Monasticism tenets ### + +######################### +# Temporal Condemnation +# by Petter Vilberg +######################### + +temporal_condemnation_interaction = { + category = interaction_category_religion + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:actor.faith = faith:quranist } + desc = temporal_condemnation_interaction_desc_fasiq + } + desc = temporal_condemnation_interaction_desc + } + } + icon = religious + + is_shown = { + scope:actor != scope:recipient + scope:actor.faith = { + has_doctrine_parameter = temporal_condemnation_enabled + } + scope:recipient = { + liege = scope:actor + } + scope:recipient = { + is_playable_character = yes + } + } + + cooldown = { years = 5 } + + is_valid = { + scope:actor = { + piety >= medium_piety_value + } + custom_description = { + text = temporal_condemnation_learning_requirement + subject = scope:actor + object = scope:recipient + value = religious_legal_pronouncement_learning_requirement + religious_legal_pronouncement_requirements >= 0 + scope:actor = { learning >= 1 } + } + } + + is_valid_showing_failures_only = { + scope:recipient.religion = scope:actor.religion + custom_description = { + text = temporal_condemnation_is_not_sinful + object = scope:recipient + scope:recipient = { + num_sinful_traits = { value > 0 target = scope:actor.faith } + } + } + trigger_if = { + limit = { + scope:recipient.num_sinful_traits > 0 + scope:actor.num_sinful_traits > 0 + } + custom_description = { + text = temporal_condemnation_less_sinful_than_me + object = scope:recipient + scope:actor.num_sinful_traits < scope:recipient.num_sinful_traits + } + } + custom_description = { + text = temporal_condemnation_has_been_condemned + object = scope:recipient + scope:recipient = { + NOT = { + has_character_modifier = temporal_condemnation_modifier + } + } + } + NAND = { + exists = scope:actor.faith.great_holy_war + scope:actor.faith.great_holy_war = { + has_pledged_attacker = scope:recipient + } + } + scope:recipient = { + is_adult = yes + } + scope:recipient = { NOT = { has_strong_hook = scope:actor } } + } + + auto_accept = yes + force_notification = yes + notification_text = temporal_condemnation_interaction.notification + + on_accept = { + scope:actor = { + add_piety = medium_piety_loss + add_opinion = { + target = scope:recipient + modifier = temporal_condemnation_opinion + years = 10 + } + custom_tooltip = temporal_condemnation_revoke_reason + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_good + title = temporal_condemnation_interaction.tt + left_icon = scope:recipient + show_as_tooltip = { custom_tooltip = temporal_condemnation_got_revoke_reason } + } + } + stress_impact = { + cynical = minor_stress_impact_gain + } + } + scope:recipient = { + add_character_modifier = { + modifier = temporal_condemnation_modifier + years = 15 + } + add_opinion = { + target = scope:actor + modifier = temporal_condemnation_condemned_me_opinion + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_gain + DESC = clan_unity_condemn_sins.desc + REVERSE_NON_HOUSE_TARGET = no + } + } +} + +######################### +# Host Honored Guest +# by Sean Hughes +######################### + +host_honored_guest_interaction = { + icon = religious + category = interaction_category_friendly + + desc = host_honored_guest_interaction_desc + + ai_targets = { + ai_recipients = vassals + } + ai_target_quick_trigger = { + adult = yes + } + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 60 + kingdom = 60 + empire = 60 + hegemony = 60 + } + + cooldown = { years = 1 } + + is_shown = { + scope:recipient != scope:actor + scope:actor = { + is_playable_character = yes + is_adult = yes + faith = { + has_doctrine_parameter = host_honored_guests_active + } + } + } + + is_valid_showing_failures_only = { + # Target faith is Hostile. + custom_description = { + text = host_honored_guest_is_hostile + object = scope:recipient + NOT = { + scope:recipient = { + faith = { + faith_hostility_level = { + target = scope:actor.faith + value = faith_hostile_level + } + } + } + } + } + # Target faith is Evil. + custom_description = { + text = host_honored_guest_is_evil + object = scope:recipient + NOT = { + scope:recipient = { + faith = { + faith_hostility_level = { + target = scope:actor.faith + value = faith_evil_level + } + } + } + } + } + # Target is sick + custom_description = { + text = host_honored_guest_is_unwell + object = scope:recipient + scope:recipient = { + is_healthy = yes + } + } + # Target is commanding an army + custom_description = { + text = host_honored_guest_is_commanding + object = scope:recipient + scope:recipient = { + is_commanding_army = no + } + } + # Target is imprisoned + custom_description = { + text = host_honored_guest_is_imprisoned + object = scope:recipient + scope:recipient = { + is_imprisoned = no + } + } + # At war with target + custom_description = { + text = host_honored_guest_is_at_war + object = scope:recipient + scope:recipient = { + NOT = { is_at_war_with = scope:actor } + } + } + # Is my courtier + custom_description = { + text = host_honored_guest_is_my_courtier + object = scope:recipient + scope:recipient = { + NOT = { is_courtier_of = scope:actor } + } + } + } + + auto_accept = yes + force_notification = yes + notification_text = host_honored_guest_interaction.notification + #answer_accept_key = host_honored_guest_interaction.response + + on_accept = { + scope:actor = { + stress_impact = { + cynical = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + } + scope:recipient = { + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_good + title = host_honored_guest_interaction_recipient.notification + left_icon = scope:actor + } + } + # Spend piety based on recipient's tier. + if = { + limit = { + highest_held_title_tier <= tier_county + } + scope:actor = { + add_piety = minor_piety_loss + } + } + else_if = { + limit = { + highest_held_title_tier = tier_duchy + } + scope:actor = { + add_piety = medium_piety_loss + } + } + else_if = { + limit = { + highest_held_title_tier = tier_kingdom + } + scope:actor = { + add_piety = major_piety_loss + } + } + else_if = { + limit = { + highest_held_title_tier = tier_empire + } + scope:actor = { + add_piety = massive_piety_loss + } + } + + # Increase opinion of recipient. + add_opinion = { + modifier = pleased_opinion + target = scope:actor + opinion = { + value = 20 + + # Zealous characters more likely to appreciate the religious ceremony (if of your faith) + if = { + limit = { + has_trait = zealous + faith = scope:actor.faith + } + add = 10 + } + # Cynical characters, or characters who do not believe in the hospitality ritual, are less likely to be appreciative. + else_if = { + limit = { + OR = { + has_trait = cynical + NOT = { + faith = { + has_doctrine_parameter = host_honored_guests_active + } + } + } + } + subtract = 10 + } + + # But arrogant characters like it more regardless. + if = { + limit = { + has_trait = arrogant + } + add = 10 + } + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = miniscule_unity_gain + DESC = clan_unity_honored_guest.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + ai_potential = { + piety >= major_piety_value + } + + ai_will_do = { + base = 0 + + modifier = { + add = 100 + scope:recipient = { + OR = { + is_powerful_vassal_of = scope:actor + liege = root + } + opinion = { + target = scope:actor + value = {-15 0 } + } + } + } + + modifier = { + add = 75 + scope:recipient = { + OR = { + is_powerful_vassal_of = scope:actor + liege = root + } + opinion = { + target = scope:actor + value = { 0 20 } + } + } + } + + modifier = { + add = 40 + scope:recipient = { + OR = { + is_powerful_vassal_of = scope:actor + liege = root + } + opinion = { + target = scope:actor + value = { 20 60 } + } + } + } + + modifier = { + add = 10 + scope:recipient = { + OR = { + is_powerful_vassal_of = scope:actor + liege = root + } + opinion = { + target = scope:actor + value = { 60 100 } + } + } + } + } +} + +# Spiritual Head of Faith Actions + +hof_ask_for_gold_interaction = { + icon = icon_gold + category = interaction_category_religion + + desc = hof_ask_for_gold_interaction_desc + + ai_targets = { + ai_recipients = head_of_faith + } + ai_target_quick_trigger = { + adult = yes + } + ai_frequency_by_tier = { + barony = 0 + county = 36 + duchy = 24 + kingdom = 6 + empire = 6 + hegemony = 6 + } + + cooldown_against_recipient = { years = 3 } + + is_shown = { + scope:recipient != scope:actor + scope:actor.faith = { + religious_head = scope:recipient + has_doctrine = doctrine_spiritual_head + } + scope:actor = { + is_playable_character = yes + } + } + + is_valid_showing_failures_only = { + scope:recipient = { + gold >= scope:actor.head_of_faith_gold_value + } + scope:actor = { + piety >= major_piety_value + custom_description = { + text = "hof_ask_for_gold_excommunicated" + NOT = { has_trait = excommunicated } + } + NOT = { + is_at_war_with = scope:recipient + } + } + scope:actor = { + custom_description = { + text = "hof_interaction_unreformed_faith" + NOT = { + faith = { has_doctrine_parameter = unreformed } + } + } + } + } + + cost = { + influence = { + value = 0 + if = { + limit = { scope:influence_send_option = yes } + add = scope:actor.medium_influence_value + desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION + } + } + } + + ai_accept = { + base = -40 + + compare_modifier = { + value = scope:recipient.gold + trigger = { + scope:recipient.gold > 2500 + } + offset = -2500 + multiplier = 0.1 + max = 50 + desc = ASK_FOR_GOLD_OVERFLOWING_COFFERS + } + + opinion_modifier = { + opinion_target = scope:actor + who = scope:recipient + multiplier = 0.5 + } + + modifier = { # Same language + add = 5 + desc = speaks_same_language_interaction_reason + trigger = { + scope:actor = { + knows_language_of_culture = scope:recipient.culture + } + } + } + + modifier = { # Attacking a co-religionist + add = -50 + desc = I_AM_ATTACKING_A_CORELIGIONIST + scope:actor = { + is_at_war = yes + any_character_war = { + primary_attacker = scope:actor + primary_defender.faith = scope:actor.faith + primary_defender = { + NOT = { + has_trait = excommunicated + } + } + } + } + } + + modifier = { # Offensive holy war/excommunication war + add = 30 + desc = I_AM_WAGING_AN_OFFENSIVE_HOLY_OR_EXCOMMUNICATION_WAR + scope:actor = { + is_at_war = yes + any_character_war = { + is_attacker = scope:actor + OR = { + using_non_ghw_holy_war_cb_trigger = yes + using_cb = excommunication_war + } + } + } + } + + modifier = { # Defensive Holy War + add = 50 + desc = I_AM_DEFENDING_AGAINST_A_HOLY_WAR + scope:actor = { + is_at_war = yes + any_character_war = { + is_defender = scope:actor + using_non_ghw_holy_war_cb_trigger = yes + } + } + } + + modifier = { # HoF wants the money for themselves! + add = -20 + desc = THEY_ARE_GREEDY + scope:recipient = { + ai_greed >= high_positive_greed + } + } + + modifier = { # I am rich already + add = -25 + desc = I_AM_RICH + scope:actor = { + gold >= scope:actor.medium_treasury_value + NOT = { + gold >= scope:actor.major_treasury_value + } + } + } + + modifier = { # I am rich already + add = -50 + desc = I_AM_RICH + scope:actor = { + gold >= scope:actor.major_treasury_value + NOT = { + gold >= scope:actor.massive_treasury_value + } + } + } + + modifier = { # I am very rich already + add = -75 + desc = I_AM_RICH + scope:actor = { + gold >= scope:actor.massive_treasury_value + } + } + + modifier = { # I am Adulterer/Fornicator + add = -25 + desc = I_AM_ADULTERER + scope:actor = { + OR = { + AND = { + has_trait = fornicator + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = fornicator GENDER_CHARACTER = scope:actor } + } + AND = { + has_trait = adulterer + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = adulterer GENDER_CHARACTER = scope:actor } + } + } + } + } + + modifier = { # I am a Murderer + add = -50 + desc = I_AM_MURDERER + scope:actor = { + has_trait = murderer + } + } + + modifier = { # I am Incestous + add = -50 + desc = I_AM_INCESTOUS + scope:actor = { + NOT = { scope:recipient = { faith = { has_doctrine = doctrine_consanguinity_unrestricted } } } + has_trait = incestuous + } + } + + modifier = { # I am a Kinslayer + add = -50 + desc = I_AM_A_KINSLAYER + scope:actor = { + OR = { + AND = { + has_trait = kinslayer_1 + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_1 GENDER_CHARACTER = scope:actor } + } + AND = { + has_trait = kinslayer_2 + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_2 GENDER_CHARACTER = scope:actor } + } + AND = { + has_trait = kinslayer_3 + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_3 GENDER_CHARACTER = scope:actor } + } + } + } + } + modifier = { + desc = RELIGIOUS_HEAD_INTERACTION_SAVIOR + add = 15 + scope:actor = { + has_trait = savior + } + } + modifier = { + desc = RELIGIOUS_HEAD_INTERACTION_DIVINE_BLOOD + add = 5 + scope:actor = { + has_trait = divine_blood + } + } + modifier = { + desc = RELIGIOUS_HEAD_INTERACTION_PARAGON + add = 15 + scope:actor = { + has_trait = paragon + } + } + modifier = { + desc = RELIGIOUS_HEAD_INTERACTION_CONSECRATED_BLOOD + add = 5 + scope:actor = { + has_trait = consecrated_blood + } + } + + modifier = { # You are of the same dynasty as the Head of Faith + add = 5 + desc = YOU_ARE_MY_DYNASTY_MEMBER + scope:recipient = { + is_lowborn = no + dynasty = scope:actor.dynasty + NOR = { + is_close_or_extended_family_of = scope:actor + is_cousin_of = scope:actor + is_child_of = scope:actor + scope:recipient.dynasty = scope:secondary_recipient.dynasty + } + } + } + + modifier = { # You are of the same house as the Head of Faith + add = 10 + desc = YOU_ARE_MY_HOUSE_MEMBER + scope:recipient = { + is_lowborn = no + house = scope:actor.house + NOR = { + is_close_or_extended_family_of = scope:actor + is_cousin_of = scope:actor + is_child_of = scope:actor + scope:recipient.house = scope:secondary_recipient.house + } + } + } + + modifier = { # Related to the Head of Faith + add = 10 + desc = YOU_ARE_MY_RELATIVE + scope:recipient = { + OR = { + is_close_or_extended_family_of = scope:actor + is_cousin_of = scope:actor + } + NOT = { is_child_of = scope:actor } + } + } + + modifier = { # Parent of the Head of Faith + add = 25 + desc = YOU_ARE_MY_PARENT + scope:recipient = { + is_child_of = scope:actor + } + } + + modifier = { # Friend of the Head of Faith + add = 25 + desc = WE_ARE_FRIENDS + scope:recipient = { + has_relation_friend = scope:actor + } + } + + modifier = { # Best Friend of the Head of Faith + add = 50 + desc = WE_ARE_BEST_FRIENDS + scope:recipient = { + has_relation_best_friend = scope:actor + } + } + + modifier = { # Lover of the Head of Faith + add = 10 + desc = WE_ARE_LOVERS + scope:recipient = { + has_relation_lover = scope:actor + } + } + + modifier = { # Rival of the Head of Faith + add = -100 + desc = WE_ARE_RIVALS + scope:recipient = { + has_relation_rival = scope:actor + } + } + + modifier = { # Nemesis of the Head of Faith + add = -500 + desc = WE_ARE_NEMESES + scope:recipient = { + has_relation_nemesis = scope:actor + } + } + + modifier = { + add = { + add = 10 + multiply = scope:actor.num_virtuous_traits + } + scope:actor.num_virtuous_traits > 0 + desc = I_AM_VIRTUOUS + } + + modifier = { + add = { + add = 5 + multiply = scope:actor.piety_level + } + scope:actor.piety_level > 1 + desc = I_AM_PIOUS + } + + modifier = { + add = { + add = 5 + multiply = scope:actor.piety_level + } + scope:actor.piety_level > 2 + scope:actor.gold < 0 + desc = I_AM_PIOUS_AND_BROKE + } + + modifier = { + add = { + add = -10 + multiply = scope:actor.num_sinful_traits + } + scope:actor.num_sinful_traits > 0 + desc = I_AM_SINFUL + } + + modifier = { + add = 25 + scope:influence_send_option = yes + desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION + } + + modifier = { + add = -25 + desc = BASE_RELUCTANCE + trigger = { + has_game_rule = hard_difficulty + scope:actor = { + is_ai = no + } + } + } + + modifier = { + add = -75 + desc = BASE_RELUCTANCE + trigger = { + has_game_rule = very_hard_difficulty + scope:actor = { + is_ai = no + } + } + } + } + + auto_accept = { + custom_description = { + text = "spending_hook" + subject = scope:actor + object = scope:recipient + scope:hook = yes + } + } + + send_option = { + is_shown = { + scope:actor != scope:recipient + } + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + flag = hook + localization = GENERIC_SPEND_A_HOOK + } + should_use_extra_icon = { + scope:actor = { has_usable_hook = scope:recipient } + } + extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" + + send_option = { # EP3 Influence + is_shown = { # Actor must have a government that uses influence + scope:actor = { + government_has_flag = government_has_influence + } + } + is_valid = { + # Actor has enough influence + scope:actor = { influence >= medium_influence_value } + # Both characters are within the same top realm + custom_tooltip = { + text = not_same_realm_tt + scope:recipient.top_liege = scope:actor.top_liege + } + } + flag = influence_send_option + localization = TRADE_INFLUENCE_FOR_BETTER_AI_ACCEPTANCE + } + + send_options_exclusive = no + + ai_min_reply_days = 1 + ai_max_reply_days = 5 + + on_accept = { + hof_ask_for_gold_interaction_effect = yes + + scope:actor = { + trigger_event = religious_interaction.3 + } + } + + on_decline = { + scope:actor = { + trigger_event = religious_interaction.32 + } + } + + ai_potential = { + is_playable_character = yes + piety >= major_piety_value + NOT = { has_trait = excommunicated } + exists = faith.religious_head + } + + ai_will_do = { + base = 0 + + modifier = { # The AI will only use a Hook if they couldn't otherwise do this + scope:hook = yes + add = -1 + } + + modifier = { # Counts get a bad 'exchange rate' due to their low income. + highest_held_title_tier < tier_county + scope:recipient.gold < 3000 + add = -50 + } + modifier = { # Dukes are also somewhat reluctant to request gold if not independent. + highest_held_title_tier = tier_duchy + top_liege != this + scope:recipient.gold < 3000 + add = -25 + } + + modifier = { # I am low on money while at war + add = 300 + scope:actor = { + is_at_war = yes + gold < medium_gold_value + } + } + modifier = { # I am in debt + add = 300 + scope:actor = { + gold < 0 + } + } + + modifier = { # Piety to burn, and no reason to keep it. + add = 25 + scope:actor = { + piety > massive_piety_value + NOR = { + has_character_modifier = vow_of_poverty_modifier + has_trait = generous + } + } + } + modifier = { # Or when greedy + add = scope:actor.ai_greed + scope:actor = { + ai_greed > 0 + } + } + + modifier = { # If the Pope has overflowing coffers, it'd be rather impious to NOT ask him to give some to a fellow, poor and struggling christian! + add = 50 + scope:actor = { + piety > major_piety_value + } + scope:recipient.gold >= 3000 + } + + modifier = { + add = 100 + scope:actor = { + ai_has_economical_boom_personality = yes + } + scope:recipient.gold >= 1000 + } + + modifier = { + add = 100 + scope:actor = { + ai_has_warlike_personality = yes + war_chest_gold < war_chest_gold_maximum + } + scope:recipient.gold >= 1000 + } + + modifier = { #That's _my_ piety + add = -100 + scope:actor = { ai_has_builder_or_pious_builder_personality = yes } + } + + modifier = { #Go on! Git! + add = -100 + scope:actor = { government_has_flag = government_is_mandala } + } + } +} + +hof_ask_for_claim_interaction = { + category = interaction_category_diplomacy + icon = religious_claim + interface_priority = 35 + + desc = hof_ask_for_claim_interaction_desc + target_type = title + target_filter = secondary_recipient_domain_titles + redirect = { + if = { + limit = { + exists = scope:actor.faith.religious_head + } + scope:recipient = { + save_scope_as = secondary_recipient + } + scope:actor.faith.religious_head = { + save_scope_as = recipient + } + } + } + + has_valid_target_showing_failures_only = { + scope:target = { + tier >= tier_county + is_noble_family_title = no + } + trigger_if = { # Admin can't request claim on other admin titles, only the top liege's primary title is up for grabs + limit = { + scope:secondary_recipient = { + government_allows = administrative + top_liege = this + } + scope:actor = { + government_allows = administrative + } + } + scope:target = { + this = scope:secondary_recipient.primary_title + } + } + } + + is_shown = { + exists = scope:actor.faith.religious_head + scope:actor.faith = scope:secondary_recipient.faith + NOR = { + scope:actor = scope:secondary_recipient + scope:secondary_recipient = scope:recipient + } + exists = scope:actor.faith.religious_head + scope:actor.faith = { + has_doctrine = doctrine_spiritual_head + } + scope:secondary_recipient = { + is_landed_or_landless_administrative = yes + primary_title = { tier >= tier_county } + NOT = { government_has_flag = government_is_holy_order } + } + } + + is_valid_showing_failures_only = { + trigger_if = { # Can't request on titles you already have a pressed claim on + limit = { + exists = scope:target + scope:actor = { + has_strong_claim_on = scope:target + } + } + custom_description = { + text = "hof_ask_for_claim_has_pressed_claim_already" + always = no + } + } + trigger_if = { # Can't request claims on baronies + limit = { + OR = { + scope:recipient.highest_held_title_tier = tier_barony + AND = { + exists = scope:target + scope:target = { + tier = tier_barony + } + } + } + } + custom_description = { + text = "hof_ask_for_claim_no_baronies" + always = no + } + } + trigger_if = { # Can't request claims on theocratic lessees or theocracies (= Prince-Bishops) + limit = { + scope:secondary_recipient = { + government_has_flag = government_is_theocracy + } + } + custom_description = { + text = "hof_ask_for_claim_theocratic_lessee" + always = no + } + } + trigger_if = { # Admin can't request claims on other admin titles + limit = { + scope:secondary_recipient = { + government_allows = administrative + NOT = { top_liege = this } + } + scope:actor = { + government_allows = administrative + } + } + custom_description = { + text = "hof_ask_for_claim_on_admin_titles" + always = no + } + } + scope:actor = { # Variable piety cost depending on tier + trigger_if = { + limit = { + exists = scope:target + } + piety >= claim_piety_value + } + custom_description = { + text = "hof_ask_for_claim_excommunicated" + NOT = { has_trait = excommunicated } + } + NOT = { + is_at_war_with = scope:recipient + } + } + scope:actor = { + custom_description = { + text = "hof_interaction_unreformed_faith" + NOT = { + faith = { has_doctrine_parameter = unreformed } + } + } + } + scope:secondary_recipient = { NOT = { has_strong_hook = scope:actor } } + # Ceremonial Monarchs cannot do this + scope:actor = { tgp_is_ceremonial_liege_trigger = no } + } + + cost = { + influence = { + value = 0 + if = { + limit = { scope:influence_send_option = yes } + add = scope:actor.medium_influence_value + desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION + } + } + } + + ai_targets = { + ai_recipients = neighboring_rulers + ai_recipients = peer_vassals + ai_recipients = liege + } + ai_frequency_by_tier = { + barony = 0 + county = 108 + duchy = 36 + kingdom = 12 + empire = 12 + hegemony = 12 + } + + ai_potential = { + is_playable_character = yes + OR = { + ai_greed >= 50 + ai_has_warlike_personality = yes + } + piety >= major_piety_value + NOT = { has_trait = excommunicated } + exists = faith.religious_head + } + + ai_will_do = { + base = 0 + + modifier = { + add = scope:actor.ai_greed + } + + modifier = { + add = scope:target.tier + } + + modifier = { + add = 500 + has_variable = conqueror + NOR = { + has_relation_friend = scope:secondary_recipient + has_relation_lover = scope:secondary_recipient + } + } + + modifier = { + add = -100 + scope:actor = { + OR = { + has_relation_friend = scope:secondary_recipient + has_relation_lover = scope:secondary_recipient + opinion = { + target = scope:secondary_recipient + value >= high_positive_opinion + } + } + } + } + + modifier = { + factor = 0 + NOT = { + scope:target = { + is_neighbor_to_realm = scope:actor + } + } + } + } + + ai_accept = { + base = 0 # Should be 0 for all interactions + + modifier = { + scope:claim_hook ?= yes + add = 100 + desc = SCHEME_WEAK_HOOK_USED + } + + modifier = { + add = -100 + desc = BASE_RELUCTANCE + } + + modifier = { # Very difficult to claim Kingdoms/Empires when already King/Emperor + add = -100 + desc = I_AM_ALREADY_HIGH_TIER + scope:actor.primary_title ?= { + tier >= tier_kingdom + } + scope:target = { + tier >= tier_kingdom + } + } + + modifier = { # Characters with a pressed claim on a kingdom or empire already has a reduced chance of getting a claim on a kingdom or empire + add = -50 + desc = I_ALREADY_HAVE_A_KINGDOM_OR_EMPIRE_CLAIM + scope:actor = { + any_claim = { + pressed = yes + tier >= tier_kingdom + } + } + scope:target = { + tier >= tier_kingdom + } + } + + opinion_modifier = { # More likely if Recipient likes Actor + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.5 + desc = AI_OPINION_REASON + } + + modifier = { # Same language + add = 5 + desc = speaks_same_language_interaction_reason + trigger = { + scope:actor = { + knows_language_of_culture = scope:recipient.culture + } + } + } + modifier = { # Unlikely if recipient likes Secondary Recipient + desc = AI_OPINION_RECIPIENT_REASON + add = { + if = { + limit = { + scope:recipient != scope:secondary_recipient + } + subtract = "scope:recipient.opinion(scope:secondary_recipient)" + } + } + } + + modifier = { # Less likely the lower their tier is compared to you + add = { + add = -10 + if = { + limit = { + scope:actor = { + tier_difference = { + target = scope:secondary_recipient + value >= 2 + } + } + } + add = -10 + } + if = { + limit = { + scope:actor = { + tier_difference = { + target = scope:secondary_recipient + value >= 3 + } + } + } + add = -10 + } + } + desc = THEY_ARE_LOWER_TIER + scope:actor = { + tier_difference = { + target = scope:secondary_recipient + value >= 1 + } + } + } + + modifier = { # Penalty for asking claims on your own vassals + add = -50 + desc = THEY_ARE_YOUR_VASSAL + scope:actor = { + any_vassal_or_below = { + this = scope:secondary_recipient + } + } + } + + modifier = { # Bonus for adults to ask on children + add = 25 + desc = THEY_ARE_A_CHILD + scope:secondary_recipient = { + is_adult = no + } + scope:actor = { + is_adult = yes + } + } + + modifier = { # Penalty for children to ask on adults + add = -25 + desc = I_AM_A_CHILD + scope:secondary_recipient = { + is_adult = yes + } + scope:actor = { + is_adult = no + } + } + + modifier = { # Bonus for men if a woman under male preference + add = 15 + desc = THEY_ARE_FEMALE_WHEN_MALE_IS_PREFERRED + scope:secondary_recipient = { + is_adult = yes + is_female = yes + } + scope:actor = { + is_adult = yes + is_female = no + faith = { + has_doctrine = doctrine_gender_male_dominated + } + } + } + + modifier = { # Bonus for women if a man under female preference + add = 15 + desc = THEY_ARE_MALE_WHEN_FEMALE_IS_PREFERRED + scope:secondary_recipient = { + is_adult = yes + is_female = no + } + scope:actor = { + is_adult = yes + is_female = yes + faith = { + has_doctrine = doctrine_gender_female_dominated + } + } + } + + modifier = { # Penalty for women to ask claims on men under male preference + add = -15 + desc = I_AM_FEMALE_WHEN_MALE_IS_PREFERRED + scope:actor = { + is_adult = yes + is_female = yes + faith = { + has_doctrine = doctrine_gender_male_dominated + } + } + scope:secondary_recipient = { + is_adult = yes + is_female = no + } + } + + modifier = { # Penalty for men to ask claims on women under female preference + add = -15 + desc = I_AM_MALE_WHEN_FEMALE_IS_PREFERRED + scope:actor = { + is_adult = yes + is_female = no + faith = { + has_doctrine = doctrine_gender_female_dominated + } + } + scope:secondary_recipient = { + is_adult = yes + is_female = yes + } + } + + modifier = { # They are Excommunicated + add = 25 + desc = THEY_ARE_EXCOMMUNICATED + scope:secondary_recipient = { + has_trait = excommunicated + } + } + + modifier = { # I am Adulterer/Fornicator + add = -25 + desc = I_AM_ADULTERER + scope:actor = { + OR = { + AND = { + has_trait = fornicator + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = fornicator GENDER_CHARACTER = scope:actor } + } + AND = { + has_trait = adulterer + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = adulterer GENDER_CHARACTER = scope:actor } + } + } + } + } + + modifier = { # They are Adulterer/Fornicator + add = 15 + desc = THEY_ARE_ADULTERER + scope:secondary_recipient = { + OR = { + AND = { + has_trait = fornicator + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = fornicator GENDER_CHARACTER = scope:secondary_recipient } + } + AND = { + has_trait = adulterer + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = adulterer GENDER_CHARACTER = scope:secondary_recipient } + } + } + } + } + + modifier = { # I am Incestous + add = -50 + desc = I_AM_INCESTOUS + scope:actor = { + NOT = { scope:recipient = { faith = { has_doctrine = doctrine_consanguinity_unrestricted } } } + has_trait = incestuous + } + } + + modifier = { # I am a Murderer + add = -50 + desc = I_AM_MURDERER + scope:actor = { + has_trait = murderer + } + } + + modifier = { # They are a Murderer + add = 15 + desc = THEY_ARE_MURDERER + scope:secondary_recipient = { + has_trait = murderer + } + } + + modifier = { # They are Incestous + add = 15 + desc = THEY_ARE_INCESTOUS + scope:secondary_recipient = { + NOT = { scope:recipient = { faith = { has_doctrine = doctrine_consanguinity_unrestricted } } } + has_trait = incestuous + } + } + + modifier = { # I am a Kinslayer + add = -50 + desc = I_AM_A_KINSLAYER + scope:actor = { + OR = { + AND = { + has_trait = kinslayer_1 + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_1 GENDER_CHARACTER = scope:actor } + } + AND = { + has_trait = kinslayer_2 + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_2 GENDER_CHARACTER = scope:actor } + } + AND = { + has_trait = kinslayer_3 + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_3 GENDER_CHARACTER = scope:actor } + } + } + } + } + + modifier = { # They are a Kinslayer + add = 15 + desc = THEY_ARE_A_KINSLAYER + scope:secondary_recipient = { + OR = { + AND = { + has_trait = kinslayer_1 + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_1 GENDER_CHARACTER = scope:secondary_recipient } + } + AND = { + has_trait = kinslayer_2 + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_2 GENDER_CHARACTER = scope:secondary_recipient } + } + AND = { + has_trait = kinslayer_3 + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_3 GENDER_CHARACTER = scope:secondary_recipient } + } + } + } + } + + modifier = { # They are of the same dynasty as the Head of Faith + add = -50 + desc = THEY_ARE_MY_DYNASTY_MEMBER + scope:recipient = { + is_lowborn = no + dynasty = scope:secondary_recipient.dynasty + NOR = { + house = scope:secondary_recipient.house + is_close_or_extended_family_of = scope:actor + is_cousin_of = scope:actor + is_child_of = scope:actor + scope:recipient.dynasty = scope:actor.dynasty + } + } + } + + modifier = { # You are of the same dynasty as the Head of Faith + add = 10 + desc = YOU_ARE_MY_DYNASTY_MEMBER + scope:recipient = { + is_lowborn = no + dynasty = scope:actor.dynasty + NOR = { + is_close_or_extended_family_of = scope:actor + is_cousin_of = scope:actor + is_child_of = scope:actor + scope:recipient.dynasty = scope:secondary_recipient.dynasty + } + } + } + + modifier = { # They are of the same house as the Head of Faith + add = -50 + desc = THEY_ARE_MY_HOUSE_MEMBER + scope:recipient = { + is_lowborn = no + house = scope:secondary_recipient.house + NOR = { + house = scope:actor.house + is_close_or_extended_family_of = scope:actor + is_cousin_of = scope:actor + is_child_of = scope:actor + scope:recipient.house = scope:actor.house + } + } + } + + modifier = { # You are of the same house as the Head of Faith + add = 10 + desc = YOU_ARE_MY_HOUSE_MEMBER + scope:recipient = { + is_lowborn = no + house = scope:actor.house + NOR = { + is_close_or_extended_family_of = scope:actor + is_cousin_of = scope:actor + is_child_of = scope:actor + scope:recipient.house = scope:secondary_recipient.house + } + } + } + + modifier = { # Related to the Head of Faith + add = 25 + desc = YOU_ARE_MY_RELATIVE + scope:recipient = { + OR = { + is_close_or_extended_family_of = scope:actor + is_cousin_of = scope:actor + } + NOT = { is_child_of = scope:actor } + } + } + + modifier = { # Parent of the Head of Faith + add = 50 + desc = YOU_ARE_MY_PARENT + scope:recipient = { + is_child_of = scope:actor + } + } + + modifier = { # Friend of the Head of Faith + add = 15 + desc = WE_ARE_FRIENDS + scope:recipient = { + has_relation_friend = scope:actor + } + } + + modifier = { # Best Friend of the Head of Faith + add = 20 + desc = WE_ARE_BEST_FRIENDS + scope:recipient = { + has_relation_best_friend = scope:actor + } + } + + modifier = { # Lover of the Head of Faith + add = 10 + desc = WE_ARE_LOVERS + scope:recipient = { + has_relation_lover = scope:actor + } + } + + modifier = { # Rival of the Head of Faith + add = -100 + desc = WE_ARE_RIVALS + scope:recipient = { + has_relation_rival = scope:actor + } + } + + modifier = { # Nemesis of the Head of Faith + add = -500 + desc = WE_ARE_NEMESES + scope:recipient = { + has_relation_nemesis = scope:actor + } + } + + modifier = { + add = { + add = 5 + multiply = scope:actor.num_virtuous_traits + } + scope:actor.num_virtuous_traits > 0 + desc = I_AM_VIRTUOUS + } + + modifier = { + add = { + add = -10 + multiply = scope:secondary_recipient.num_virtuous_traits + } + scope:secondary_recipient.num_virtuous_traits > 0 + desc = THEY_ARE_VIRTUOUS + } + + modifier = { + add = { + add = -20 + multiply = scope:actor.num_sinful_traits + } + scope:actor.num_sinful_traits > 0 + desc = I_AM_SINFUL + } + + modifier = { + add = { + add = 10 + multiply = scope:secondary_recipient.num_sinful_traits + } + scope:secondary_recipient.num_sinful_traits > 0 + desc = THEY_ARE_SINFUL + } + modifier = { + desc = RELIGIOUS_HEAD_INTERACTION_SAVIOR + add = 15 + scope:actor = { + has_trait = savior + } + } + modifier = { + desc = RELIGIOUS_HEAD_INTERACTION_DIVINE_BLOOD + add = 5 + scope:actor = { + has_trait = divine_blood + } + } + modifier = { + desc = RELIGIOUS_HEAD_INTERACTION_PARAGON + add = 15 + scope:actor = { + has_trait = paragon + } + } + modifier = { + desc = RELIGIOUS_HEAD_INTERACTION_CONSECRATED_BLOOD + add = 5 + scope:actor = { + has_trait = consecrated_blood + } + } + modifier = { + add = 25 + scope:influence_send_option = yes + desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION + } + } + + auto_accept = { + custom_description = { + text = "spending_hook" + subject = scope:actor + object = scope:recipient + scope:claim_hook = yes + scope:actor = { has_strong_hook = scope:recipient } + } + } + + send_option = { # EP3 Influence + is_shown = { # Actor must have a government that uses influence + scope:actor = { + government_has_flag = government_has_influence + } + } + is_valid = { + # Actor has enough influence + scope:actor = { influence >= medium_influence_value } + # Both characters are within the same top realm + custom_tooltip = { + text = not_same_realm_tt + scope:recipient.top_liege = scope:actor.top_liege + } + } + flag = influence_send_option + localization = TRADE_INFLUENCE_FOR_BETTER_AI_ACCEPTANCE + } + send_option = { + is_shown = { + scope:actor != scope:recipient + } + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + flag = claim_hook + localization = GENERIC_SPEND_A_HOOK + } + should_use_extra_icon = { + scope:actor = { has_usable_hook = scope:recipient } + } + extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" + + send_options_exclusive = no + + ai_min_reply_days = 1 + ai_max_reply_days = 5 + + on_accept = { + hof_ask_for_claim_interaction_effect = yes + scope:secondary_recipient = { + trigger_event = religious_interaction.5 + } + scope:actor = { + trigger_event = religious_interaction.4 + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:secondary_recipient + VALUE = minor_unity_loss + DESC = clan_unity_granted_claim.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + scope:actor = { + trigger_event = religious_interaction.42 + } + } +} + +#This interaction is referenced in code! If it's renamed you have to ping a coder +hof_redirect_great_holy_war_interaction = { + hidden = yes + + target_type = title + target_filter = secondary_recipient_de_jure_titles + redirect = { + scope:recipient = { + save_scope_as = secondary_recipient + } + scope:actor.faith.religious_head = { + save_scope_as = recipient + } + } + + auto_accept = yes + + is_shown = { + #exists = scope:actor.faith.religious_head #Called by Autonomous Faiths too. + exists = scope:actor.faith.great_holy_war + scope:actor.faith = { is_hostile_enough_for_holy_war_trigger = { FAITH = scope:secondary_recipient.faith } } + scope:secondary_recipient = { top_liege = this } + NOT = { exists = scope:actor.faith.great_holy_war.ghw_war } + scope:target != scope:actor.faith.great_holy_war.ghw_target_title #Do not show the title already targeted in the list. + } + + can_be_picked_title = { + scope:target.tier = tier_kingdom + scope:target != scope:actor.faith.great_holy_war.ghw_target_title #Do not show the title already targeted in the list. + } + + is_valid_showing_failures_only = { + scope:actor = { piety >= faith.great_holy_war.var:redirect_cost } + scope:actor.faith.great_holy_war = { days_until_ghw_launch >= 100 } #No last minute changes. + } + + has_valid_target_showing_failures_only = { + exists = scope:target + scope:target.tier = tier_kingdom + scope:target != scope:actor.faith.great_holy_war.ghw_target_title #Do not show the title already targeted in the list. + } + + cost = { + piety = scope:actor.faith.great_holy_war.var:redirect_cost + } + + on_accept = { + scope:actor.faith.great_holy_war = { + #Toast for attackers + every_pledged_attacker = { + limit = { + is_ai = no + } + send_interface_toast = { + type = event_toast_effect_good + title = hof_redirected_ghw.0001.desc + left_icon = scope:actor + right_icon = scope:secondary_recipient + } + } + #Event for former defenders. + every_pledged_defender = { + limit = { + is_ai = no + } + add_to_temporary_list = former_defenders + } + } + scope:actor = { + faith.great_holy_war = { + save_scope_as = the_ghw + set_great_holy_war_target = { target_character = scope:secondary_recipient target_title = scope:target } + #Old defenders that are no longer in the area are notified. + every_in_list = { + list = former_defenders + limit = { + is_ai = no + NOT = { + scope:actor.faith.great_holy_war = { has_pledged_defender = prev } + } + } + trigger_event = great_holy_war.0081 + } + #New defenders are notified. + every_pledged_defender = { + limit = { + is_ai = no + } + trigger_event = { id = great_holy_war.0082 } + } + change_variable = { + name = redirect_cost + multiply = 2 + } + set_variable = { + name = last_redirector + value = scope:actor + } + } + hidden_effect = { + scope:actor.faith = { save_scope_as = the_faith } + scope:target = { save_scope_as = target_kingdom } + scope:secondary_recipient = { + save_scope_as = target_character + faith = { save_scope_as = target_faith } + } + every_ruler = { #Defenders Pledge to the Crusade again. (AI only) + limit = { + faith = scope:target_character.faith + is_ai = yes + is_playable_character = yes + highest_held_title_tier >= tier_county + NOT = { + scope:actor.faith.great_holy_war = { has_pledged_defender = prev } + } + } + trigger_event = { id = great_holy_war.0021 days = { 25 150 } } #AI counterpledging. Unlike attackers, defenders should be selected much faster during the preparation phase and then stop. + } + scope:target_character = { + faith = { + every_faith_holy_order = { + trigger_event = { id = great_holy_war.0091 days = { 25 60 } } #Holy order counterpledging + } + } + } + scope:actor.faith.great_holy_war = { #Recalculate Recipient. + faith = { save_scope_as = the_faith } + ghw_target_title = { save_scope_as = target_kingdom } + if = { #If Pope died in the meantime. + limit = { + OR = { + NOT = { + exists = scope:the_faith.great_holy_war.ghw_war_declarer + } + NOT = { + scope:the_faith.great_holy_war.ghw_war_declarer = { is_alive = yes } + } + } + } + scope:the_faith = { ghw_set_new_war_declarer_effect = yes } + } + scope:the_faith.great_holy_war.ghw_war_declarer = { save_scope_as = ghw_sponsor } + #Check and set sponsor if needed. + undirected_ghw_recipient_selection_effect = yes + } + } + } + } + + ai_will_do = { + base = 0 + } +} + +select_ghw_beneficiary_interaction = { + category = interaction_category_religion + icon = religious + + + populate_recipient_list = { + scope:recipient = { + #Any member of your own house. + house = { + every_house_member = { + limit = { + # Cannot select them self as beneficiary + this != scope:recipient + } + add_to_list = characters + } + } + #Any nearby family member who is of your dynasty, even if they're a separate house. + every_close_or_extended_family_member = { + limit = { + dynasty = scope:recipient.dynasty + house != scope:recipient.house + } + add_to_list = characters + } + #And then any landless heads of minor houses in your dynasty. + dynasty = { + every_dynasty_member = { + limit = { + this = this.house.house_head + NOR = { + this.house = scope:recipient.house + any_close_or_extended_family_member = { this = scope:recipient } + } + is_ruler = no + } + add_to_list = characters + } + } + # If you're a laamp, add you too. + if = { + limit = { OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } } + add_to_list = characters + } + } + } + + auto_accept = yes + + is_shown = { + exists = scope:actor.faith.great_holy_war + scope:actor = { + exists = faith.great_holy_war + this = scope:recipient + is_pledged_ghw_attacker = yes + } + scope:actor != scope:recipient.faith.great_holy_war.ghw_war_declarer #Not for the Caliph himself. + } + + can_be_picked = { + is_adult = yes + is_ruler = no + faith = scope:actor.faith + custom_tooltip = { + text = ghw_heir_to_a_title + NOT = { + any_heir_title = {} # Not heir to anything + } + } + custom_tooltip = { + text = ghw_married_to_a_ruler + OR = { #Either not married, or not married to a ruler. + is_married = no + NOT = { + any_spouse = { + is_ruler = yes + } + } + } + } + custom_tooltip = { + text = ghw_devoted_to_their_faith + NOR = { # not dedicated to a religious career + has_trait = devoted + has_trait = order_member + } + } + } + + has_valid_target_showing_failures_only = { + scope:secondary_recipient = { + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + has_trait_with_flag = debilitating_illness + custom_description = { + text = "ghw_recipient_must_not_be_realm_priest" + faith = { + has_doctrine = doctrine_theocracy_temporal + } + has_council_position = councillor_court_chaplain + } + } + faith = scope:actor.faith + is_adult = yes + trigger_if = { + limit = { + NOT = { OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } } + } + is_ruler = no + } + NOT = { + any_heir_title = {} # Not heir to anything + } + OR = { #Either not married, or not married to a ruler. + is_married = no + NOT = { + any_spouse = { + is_ruler = yes + } + } + } + } + } + + on_accept = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_neutral + title = select_ghw_beneficiary_interaction_notification + + right_icon = scope:secondary_recipient + + set_beneficiary = scope:secondary_recipient + } + } + } + ai_will_do = { + base = 0 #Assigned directly by event for the AI. + } +} + +sun_trial_interaction = { + interface_priority = 30 + icon = religious + + category = interaction_category_prison + + is_shown = { + scope:actor = { faith = { has_doctrine_parameter = trial_by_sun_active } } + scope:recipient = { + is_imprisoned_by = scope:actor + is_adult = yes + } + } + + is_valid_showing_failures_only = { + scope:actor = { + has_imprisonment_reason = scope:recipient + } + } + + + on_accept = { + scope:actor = { + save_scope_as = imprisoner + + sun_trial_interaction_piety_effect = yes + } + + scope:recipient = { + save_scope_as = prisoner + show_as_tooltip = { + #Prisoner has a random outcome (toast sent through prisoner's events) + random_list = { + desc = outcome_in_a_few_days + 50 = { #they die without consequences! (must match event religious_interaction.2100) + sun_trial_death_modifier = yes + desc = sun_trial_interaction.success.tt + sun_trial_death_effect = yes + } + 50 = { #they are freed and super cool! (must match event religious_interaction.2100) + sun_trial_survival_modifier = yes + desc = sun_trial_interaction.failure.tt + sun_trial_survival_effect = yes + } + } + } + hidden_effect = { #Nudge towards rivalry + if = { + limit = { + NOR = { + has_relation_rival = scope:actor + has_relation_potential_rival = scope:actor + } + } + set_relation_potential_rival = scope:actor + } + } + #Event for outcome + trigger_event = { + id = religious_interaction.2100 + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = major_unity_loss + DESC = clan_unity_sun_trial.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + auto_accept = yes +} + +######################### +# Literalism tenets +# by Ewan Cowhig Croft +######################### + +#Engage in literalist debate. +#by Ewan Cowhig Croft +literalist_debate_interaction = { + icon = religious + category = interaction_category_religion + desc = literalist_debate_interaction_desc + + is_shown = { + scope:actor != scope:recipient + scope:actor.faith = { + has_doctrine_parameter = literalist_debate_enabled + } + scope:recipient = { + is_playable_character = yes + OR = { + liege = scope:actor #You may debate direct vassals. + liege = scope:actor.liege #You may debate vassals with whom you share a liege. + scope:actor.liege = scope:recipient #You may debate your direct liege. + } + } + } + + is_valid_showing_failures_only = { + scope:actor = { + is_available_adult = yes + NOT = { + is_at_war_with = scope:recipient + } + } + scope:recipient = { + faith = scope:actor.faith + is_available_adult = yes + NOT = { has_strong_hook = scope:actor } + } + custom_description = { + text = literalist_debate_interaction_has_been_debated + object = scope:recipient + scope:recipient = { + NOT = { has_character_modifier = used_literalist_debate_modifier } #To prevent back and forth & back-to-back challenges + NOT = { has_character_modifier = literally_debated_modifier } + } + } + custom_description = { + text = literalist_debate_timing + scope:actor = { + NOT = { has_character_modifier = used_literalist_debate_modifier } + } + } + } + + auto_accept = yes + + on_accept = { + hidden_effect = { + scope:actor = { + add_character_modifier = { + modifier = used_literalist_debate_modifier + years = 2 + } + } + scope:recipient = { + trigger_event = { id = religious_interaction.2400 } + add_character_modifier = { + modifier = literally_debated_modifier + years = 10 + } + } + } + custom_tooltip = literalist_debate_interaction.tt_modifiers + scope:actor = { + stress_impact = { + cynical = minor_stress_impact_gain + } + custom_tooltip = literalist_debate_interaction.tt_winnings_actor + } + scope:recipient = { + custom_tooltip = literalist_debate_interaction.tt_winnings_recipient + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_loss + DESC = clan_unity_literalist_debate.desc + REVERSE_NON_HOUSE_TARGET = no + } + } +} + +attempt_conversion_of_local_ruler_interaction = { + category = interaction_category_laamp + icon = religious + + ai_maybe = yes + ai_min_reply_days = 1 + ai_max_reply_days = 3 + popup_on_receive = yes + common_interaction = yes + + desc = attempt_conversion_of_local_ruler_interaction_desc + + is_shown = { + scope:actor = { + has_government = landless_adventurer_government + has_perk = prophet_perk + } + scope:recipient = { + faith != scope:actor.faith + is_ai = yes + is_ruler = yes + is_landed = yes + } + } + + is_highlighted = { + scope:actor = { + is_character_interaction_potentially_accepted = { + recipient = scope:recipient + interaction = attempt_conversion_of_local_ruler_interaction + } + } + } + + cooldown_against_recipient = { years = 15 } + + can_send = { + custom_tooltip = { + text = must_be_in_domain_tt + scope:recipient = { + OR = { + capital_province ?= scope:actor.domicile.domicile_location + any_held_title = { + title_tier = county + any_county_province = { + this = scope:actor.domicile.domicile_location + } + } + } + } + } + } + + # Use Stress + send_option = { + flag = piety + localization = USE_PIETY + } + send_option = { + flag = stress + localization = USE_STRESS + } + send_option = { + is_valid = { + scope:actor.intrigue >= scope:recipient.intrigue + } + flag = lie + localization = USE_INTRIGUE + } + send_option = { + is_valid = { + scope:actor.domicile ?= { + provisions >= { + value = 300 + multiply = scope:recipient.highest_held_title_tier + } + } + NOR = { + scope:recipient = { has_trait = arbitrary } + scope:recipient = { has_trait = sadistic } + scope:recipient = { has_trait = callous } + } + } + flag = provisions + localization = USE_PROVISIONS + } + send_option = { + is_valid = { + scope:actor = { + gold >= scope:recipient.medium_gold_value + } + NOR = { + scope:recipient = { has_trait = generous } + scope:recipient = { has_trait = humble } + } + } + flag = gold + localization = USE_GOLD + } + send_option = { + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + NOT = { + scope:recipient = { is_imprisoned_by = scope:actor } + } + } + flag = hook + localization = SCHEME_HOOK + } + send_options_exclusive = no + should_use_extra_icon = { + scope:actor = { has_usable_hook = scope:recipient } + } + extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" + + is_valid_showing_failures_only = { + scope:recipient = { + is_available = yes + } + valid_demand_conversion_conditions_trigger = yes + } + + on_send = { + } + + cost = { + piety = { + value = { + add = medium_piety_value + multiply = scope:recipient.highest_held_title_tier + if = { + limit = { + scope:piety = yes + } + multiply = 2 + } + } + } + } + + on_accept = { + scope:actor = { + trigger_event = religious_interaction.2002 + show_as_tooltip = { + if = { + limit = { + has_government = landless_adventurer_government + scope:recipient.highest_held_title_tier >= tier_barony + } + faith = { + change_fervor = { + value = { + add = 1 + multiply = scope:recipient.highest_held_title_tier + } + desc = imperial_capital_sacked_fervor_gain + } + } + add_prestige = { + value = 200 + multiply = scope:recipient.highest_held_title_tier + if = { + limit = { + scope:recipient.highest_held_title_tier >= tier_kingdom + } + multiply = 2 + } + } + } + } + if = { + limit = { + scope:stress = yes + } + add_stress = medium_stress_impact_gain + } + if = { + limit = { + scope:lie = yes + } + stress_impact = { + honest = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + } + } + if = { + limit = { + scope:gold = yes + } + pay_short_term_gold = { + target = scope:recipient + gold = scope:recipient.medium_gold_value + } + } + if = { + limit = { + scope:provisions = yes + } + domicile ?= { + change_provisions = { + value = 300 + multiply = scope:recipient.highest_held_title_tier + multiply = -1 + } + } + } + } + demand_conversion_interaction_effect = yes + scope:recipient = { + if = { + limit = { + scope:lie = yes + } + stress_impact = { + base = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + } + custom_tooltip = { + text = will_not_convert_away_tt + add_character_flag = ai_will_not_convert + } + add_opinion = { + modifier = showed_me_the_light_opinion + target = scope:actor + opinion = 40 + } + if = { + limit = { + top_liege != this + liege ?= { + faith != scope:actor.faith + } + } + liege = { + add_opinion = { + modifier = annoyed_opinion + target = scope:actor + opinion = -20 + } + } + } + } + + scope:actor = { + if = { + limit = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = piety_from_converting_involved_rulers + is_secondary_character_involvement_involved_trigger = { + CHAR = scope:recipient + } + } + } + add_piety = medium_piety_gain + } + } + } + + on_decline = { + scope:actor = { + trigger_event = { + id = religious_interaction.2003 + } + if = { + limit = { + scope:stress = yes + } + add_stress = medium_stress_impact_gain + } + if = { + limit = { + scope:lie = yes + } + stress_impact = { + honest = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + } + } + if = { + limit = { + scope:gold = yes + } + pay_short_term_gold = { + target = scope:recipient + gold = scope:recipient.medium_gold_value + } + } + if = { + limit = { + scope:provisions = yes + } + domicile ?= { + change_provisions = { + value = 300 + multiply = scope:recipient.highest_held_title_tier + multiply = -1 + } + } + } + } + scope:recipient = { + if = { + limit = { + scope:lie = yes + } + stress_impact = { + base = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + } + show_as_tooltip = { + #Negative opinions + add_opinion = { + modifier = unwanted_religious_conversion_opinion + target = scope:actor + } + if = { + limit = { + top_liege != this + liege ?= { + faith != scope:actor.faith + } + } + liege = { + add_opinion = { + modifier = religious_rebel_opinion + target = scope:actor + } + } + } + } + } + } + + ai_accept = { + base = 0 + modifier = { + desc = SCHEME_WEAK_HOOK_USED + add = 20 + scope:hook = yes + } + modifier = { + desc = ASK_FOR_CONVERSION_RECIPIENT_INTRIGUE + scope:lie = yes + add = { + value = scope:actor.intrigue + subtract = scope:recipient.intrigue + min = 1 + } + } + modifier = { + add = 20 + scope:piety = yes + desc = USING_PIETY + } + modifier = { + add = 20 + scope:stress = yes + desc = USING_STRESS + } + modifier = { + add = 20 + scope:gold = yes + desc = USING_GOLD + } + modifier = { + add = 20 + scope:provisions = yes + desc = USING_PROVISIONS + } + modifier = { + scope:recipient = { + has_trait = trusting + } + add = 20 + desc = DEMAND_SUBMISSION_RECIPIENT_IS_TRUSTING + } + modifier = { + scope:recipient = { + has_relation_lover = scope:actor + } + add = 25 + desc = AI_YOUR_LOVER + } + modifier = { + scope:recipient = { + has_relation_friend = scope:actor + } + add = 25 + desc = AI_YOUR_FRIEND + } + modifier = { + scope:recipient = { + is_child_of = scope:actor + } + add = 50 + desc = AI_YOUR_CHILD + } + modifier = { + add = { + value = scope:actor.piety_level + multiply = 10 + } + scope:actor = { + piety_level > 1 + } + desc = ASK_FOR_CONVERSION_ACTOR_IS_PIOUS + } + modifier = { + add = { + value = scope:recipient.highest_held_title_tier + subtract = 2 + multiply = -25 + if = { + limit = { + scope:recipient.highest_held_title_tier >= tier_duchy + } + multiply = 2 + } + } + scope:recipient.highest_held_title_tier >= tier_duchy + desc = ASK_FOR_CONVERSION_RECIPIENT_TIER + } + modifier = { + add = -25 + scope:recipient = { + top_liege != this + faith = liege.faith + faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_hostile_level + } + } + } + desc = ASK_FOR_CONVERSION_RECIPIENT_CRIME + } + modifier = { + add = -50 + scope:recipient = { + faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_astray_level + } + faith_hostility_level = { + target = scope:actor.faith + value < faith_hostile_level + } + } + } + desc = ASK_FOR_CONVERSION_RECIPIENT_ASTRAY + } + modifier = { + add = -75 + scope:recipient = { + faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_hostile_level + } + faith_hostility_level = { + target = scope:actor.faith + value < faith_evil_level + } + } + } + desc = ASK_FOR_CONVERSION_RECIPIENT_HOSTILE + } + modifier = { + add = -100 + scope:recipient = { + faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_evil_level + } + } + } + desc = ASK_FOR_CONVERSION_RECIPIENT_EVIL + } + religion_demand_conversion_default_modifier = yes + } +} + +######################### +# Exaltation of Pain tenet +######################### + +revel_in_pain_interaction = { + icon = religious + category = interaction_category_religion + desc = revel_in_pain_interaction_desc + + use_diplomatic_range = yes + + greeting = positive + notification_text = REVEL_IN_PAIN_INTERACTION_NOTIFICATION + + is_shown = { + NOT = { scope:actor = scope:recipient } + scope:actor = { + faith = { has_doctrine_parameter = self_mutilation_active } + OR = { + has_relation_friend = scope:recipient + has_relation_lover = scope:recipient + } + } + } + + is_valid_showing_failures_only = { + scope:actor = { + is_adult = yes + is_available = yes + custom_tooltip = { + text = actor_is_severely_injured_tt + NOT = { has_trait = wounded_2 } + } + } + scope:recipient = { + custom_tooltip = { + text = recipient_involved_in_revel_in_pain_recently_tt + NOT = { has_character_flag = involved_in_revel_in_pain_recently } + } + is_adult = yes + NOT = { has_trait = craven } + faith = { has_doctrine_parameter = self_mutilation_active } + NOT = { is_at_war_with = scope:actor } + custom_tooltip = { + text = recipient_is_severely_injured_tt + NOT = { has_trait = wounded_2 } + } + custom_tooltip = { + text = recipient_not_in_the_same_location_tt + location = scope:actor.location + } + is_available = yes + } + } + + auto_accept = { + scope:recipient = { is_ai = yes } + } + + on_accept = { + scope:actor = { + trigger_event = religious_interaction.2600 + show_as_tooltip = { revel_in_pain_effect = yes } + } + scope:recipient = { + if = { + limit = { is_ai = no } + trigger_event = religious_interaction.2600 + show_as_tooltip = { + revel_in_pain_effect = yes + revel_in_pain_opinion_effect = yes + } + } + else = { + revel_in_pain_effect = yes + revel_in_pain_opinion_effect = yes + } + } + } + + on_decline = { + scope:actor = { + trigger_event = religious_interaction.2610 + } + } + + ai_targets = { + ai_recipients = family + ai_recipients = scripted_relations + ai_recipients = vassals + ai_recipients = courtiers + max = 5 + } + + ai_frequency_by_tier = { + barony = 0 + county = 72 + duchy = 36 + kingdom = 36 + empire = 36 + hegemony = 36 + } + + ai_potential = { + faith = { has_doctrine_parameter = self_mutilation_active } + is_at_war = no + OR = { + has_trait = zealous + has_trait = sadistic + } + NOR = { + has_trait = craven + has_trait = wounded_1 + has_trait = wounded_2 + } + } + + ai_will_do = { + base = 0 + modifier = { + add = ai_boldness + } + modifier = { + has_trait = flagellant + add = 25 + } + } +} diff --git a/common/character_interactions/02_ep1_interactions.txt b/common/character_interactions/02_ep1_interactions.txt new file mode 100644 index 00000000..a26cdc5f --- /dev/null +++ b/common/character_interactions/02_ep1_interactions.txt @@ -0,0 +1,492 @@ +# Character Interactions for EP1 + +################## +# Fund someone's inspiration +# by Linnéa Thimrén +################## +fund_inspiration_interaction = { + icon = inspiration + interface_priority = 30 + common_interaction = yes + category = interaction_category_vassal + desc = fund_inspiration_interaction_desc + + is_shown = { + scope:recipient = { + is_ruler = no + inspiration ?= { + NOT = { + exists = inspiration_sponsor + } + } + } + scope:actor = { + any_courtier_or_guest = { + this = scope:recipient + } + } + } + + is_highlighted = { + always = yes + } + + is_valid_showing_failures_only = { + scope:recipient = { + is_physically_able = yes + is_ruler = no + trigger_if = { + limit = { + NOT = { is_courtier_of = scope:actor } + } + can_recruit_character_to_court_trigger = { + RECRUITER = scope:actor + RECRUITEE = scope:recipient + } + } + } + scope:actor = { + can_sponsor_inspiration = scope:recipient.inspiration + gold >= scope:recipient.inspiration.base_inspiration_gold_cost + } + } + + on_accept = { + fund_inspiration_effect = yes + + if = { + limit = { scope:recipient.inspiration = { has_inspiration_type = weapon_inspiration } } + custom_description_no_bullet = { text = weapon_inspiration_cost_tt } + } + else_if = { + limit = { scope:recipient.inspiration = { has_inspiration_type = armor_inspiration } } + custom_description_no_bullet = { text = armor_inspiration_cost_tt } + } + else_if = { + limit = { scope:recipient.inspiration = { has_inspiration_type = book_inspiration } } + custom_description_no_bullet = { text = book_inspiration_cost_tt } + } + else_if = { + limit = { scope:recipient.inspiration = { has_inspiration_type = weaver_inspiration } } + custom_description_no_bullet = { text = weaver_inspiration_cost_tt } + } + else_if = { + limit = { scope:recipient.inspiration = { has_inspiration_type = adventure_inspiration } } + custom_description_no_bullet = { text = adventure_inspiration_cost_tt } + } + else_if = { + limit = { scope:recipient.inspiration = { has_inspiration_type = artisan_inspiration } } + custom_description_no_bullet = { text = artisan_inspiration_cost_tt } + } + else_if = { + limit = { scope:recipient.inspiration = { has_inspiration_type = smith_inspiration } } + custom_description_no_bullet = { text = smith_inspiration_cost_tt } + } + else_if = { + limit = { scope:recipient.inspiration = { has_inspiration_type = alchemy_inspiration } } + custom_description_no_bullet = { text = alchemy_inspiration_cost_tt } + } + else_if = { + limit = { scope:recipient.inspiration = { has_inspiration_type = bow_inspiration } } + custom_description_no_bullet = { text = bow_inspiration_cost_tt } + } + + # Add a flag on AI to have an extra cooldown of 3 years + if = { + limit = { + scope:actor = { + is_ai = yes + NOT = { + gold >= 1000 + } + OR = { + short_term_gold < ai_inspiration_desired_gold_value + ai_greed >= 50 + } + } + } + scope:actor = { + add_character_flag = { + flag = recently_fund_inspiration + years = 3 + } + } + + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = miniscule_unity_gain + DESC = clan_unity_inspo.desc + REVERSE_NON_HOUSE_TARGET = no + } + + #Mandala Creation Aspect + scope:actor = { + if = { + limit = { government_has_flag = government_is_mandala } + increment_variable_effect = { + VAR = num_commissioned_artifacts + VAL = 1 + } + } + } + } + + auto_accept = { + custom_description = { + text = auto_accept_interaction_ai + object = scope:recipient + scope:recipient = { + is_ai = yes + } + } + } + + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 0 + kingdom = 10 + empire = 10 + hegemony = 10 + } + + ai_targets = { + ai_recipients = guests + ai_recipients = courtiers + } + + ai_target_quick_trigger = { + adult = yes + } + + ai_potential = { + is_at_war = no + OR = { + has_royal_court = yes + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + gold > ai_inspiration_desired_gold_value + NOT = { has_character_flag = recently_fund_inspiration } + NOT = { has_variable = conqueror } + ai_should_focus_on_building_in_their_capital = no + } + + ai_will_do = { + base = 100 + + modifier = { # Not as likely to fund inspirations if they already have some going (max three for very prestigious courts) + add = { + if = { + limit = { + highest_held_title_tier >= tier_empire + any_sponsored_inspiration = { + count >= 3 + } + } + add = -50 + } + else_if = { + limit = { + highest_held_title_tier >= tier_kingdom + any_sponsored_inspiration = { + count >= 2 + } + } + add = -50 + } + } + } + + # Do not pointlessly fund inspirations you do not need + modifier = { # Weapons + factor = 0 + scope:recipient.inspiration = { + has_inspiration_type = weapon_inspiration + } + OR = { + any_character_artifact = { # Has a fantastic item already + artifact_slot_type = primary_armament + rarity = illustrious + } + AND = { # Have a lot of artifacts already, and the inspired person isn't even very good + scope:recipient = { + weapon_inspiration_average_skill_value < 15 + } + any_character_artifact = { + count >= 2 + artifact_slot_type = primary_armament + } + } + } + } + modifier = { # Armor + factor = 0 + scope:recipient.inspiration = { + has_inspiration_type = armor_inspiration + } + OR = { + any_character_artifact = { # Has a fantastic item already + artifact_slot_type = armor + rarity = illustrious + } + AND = { # Have a lot of artifacts already, and the inspired person isn't even very good + scope:recipient = { + armor_inspiration_average_skill_value < 15 + } + any_character_artifact = { + count >= 2 + artifact_slot_type = armor + } + } + } + } + modifier = { # Warlike AI's only sponsor if they've been at peace for a long time + factor = 0 + ai_has_warlike_personality = yes + days_of_continuous_peace < 1825 # 5 years + } + modifier = { # Cautious AI's only sponsor if they feel safe enough + factor = 0 + ai_has_cautious_personality = yes + war_chest_gold < cautious_ai_minimum_war_chest_gold + } + } +} + +################## +# Indebt Guest +# by Ewan Cowhig Croft +################## + +indebt_guest_interaction = { + icon = icon_hostile + interface_priority = 120 + common_interaction = yes + ai_max_reply_days = 0 + cooldown = { years = 5 } + + category = interaction_category_hostile + ai_maybe = yes + + desc = indebt_guest_interaction_desc + + greeting = negative + pre_answer_maybe_key = ANSWER_MIGHT_SUCCEED + pre_answer_no_key = ANSWER_CANT_SUCCEED + pre_answer_yes_key = ANSWER_WILL_SUCCEED + pre_answer_maybe_breakdown_key = ANSWER_SUM_CHANCE + + ai_potential = { + # Repeat some is_shown triggers for performance gains. + indebt_guest_interaction_basic_checks_trigger = { ACTOR = this } + } + + is_shown = { + scope:actor != scope:recipient + # Repeat some ai_potential triggers for performance gains. + indebt_guest_interaction_basic_checks_trigger = { ACTOR = scope:actor } + # Scope:recipient must be a guest. + scope:recipient = { is_pool_guest_of = scope:actor } + } + + is_valid_showing_failures_only = { + scope:actor = { is_imprisoned = no } + scope:actor = { is_commanding_army = no } + # Scope:actor can't have a hook of any kind on scope:recipient already. + NOT = { + scope:actor = { has_hook = scope:recipient } + } + # Scope:actor must be able to afford the cost of the decision going wrong. + scope:actor.court_grandeur_current >= indebt_guest_interaction_lost_test_grandeur_cost_value + } + + can_send = { + scope:actor = { + custom_description = { + text = "character_interactions_hostile_actions_disabled_delay" + NOT = { has_character_flag = flag_hostile_actions_disabled_delay } + } + } + } + + on_send = { + scope:actor = { + add_character_flag = { + flag = flag_hostile_actions_disabled_delay + days = 10 + } + } + } + + on_accept = { + scope:actor = { + # On accept, you gain a hook & lose some opinion. + ## Which we only show as a tooltip for now, since it's applied in the event. + show_as_tooltip = { indebt_guest_interaction_accepted_effect = yes } + # Pop the event. + trigger_event = ep1_character_interaction.0001 + # Reminder that you'll have a chance to direct where they go. + custom_tooltip = indebt_guest_interaction.tt.direct_indebted_guest + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = miniscule_unity_loss + DESC = clan_unity_indebt_guest.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + # Send a toast. + scope:actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = indebt_guest_interaction.tt.failure + left_icon = scope:recipient + # On decline, scope:recipient leaves your court... + scope:recipient = { select_and_move_to_pool_effect = yes } + # ... and you lose a bit of extra grandeur for your audacity. + change_current_court_grandeur = indebt_guest_interaction_lost_test_grandeur_cost_value + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = miniscule_unity_loss + DESC = clan_unity_indebt_guest_failure.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + auto_accept = no + + ai_accept = { + base = 50 + + # Standard intrigue duel. + modifier = { + add = { + value = scope:actor.intrigue + multiply = 2 + } + desc = INDEBT_GUEST_INTRIGUE_ACTOR + } + modifier = { + add = { + value = scope:recipient.intrigue + multiply = -1 + } + desc = INDEBT_GUEST_INTRIGUE_RECIPIENT + } + # Weight it a bit more in your favour for every point of excess CGV you have. + modifier = { + add = scope:actor.current_cgv_above_expected_exact_value + desc = INDEBT_GUEST_CURRENT_CGV_ABOVE_EXPECTED + scope:actor.current_cgv_above_expected_exact_value >= 1 + } + # Some traits may also affect the chances for scope:actor... + modifier = { + add = 10 + scope:actor = { has_trait = schemer } + } + modifier = { + add = 10 + scope:actor = { has_trait = education_intrigue } + } + modifier = { + add = 5 + scope:actor = { has_trait = deceitful } + } + modifier = { + add = 5 + scope:actor = { has_trait = vengeful } + } + modifier = { + add = -10 + scope:actor = { has_trait = honest } + } + modifier = { + add = -5 + scope:actor = { has_trait = forgiving } + } + # ... or else for scope:recipient. + modifier = { + add = -10 + scope:recipient = { has_trait = schemer } + } + modifier = { + add = -5 + scope:recipient = { has_trait = education_intrigue } + } + modifier = { + add = -5 + scope:recipient = { has_trait = deceitful } + } + modifier = { + add = 10 + scope:recipient = { has_trait = honest } + } + } + + # AI + ai_targets = { + ai_recipients = guests + chance = 0.5 + } + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 0 + kingdom = 10 + empire = 10 + hegemony = 10 + } + + ai_will_do = { + base = -100 + + # This is a silly way for the AI to spend its CGV, so we keep 'em off it most of the time. + # Unless they've got a scheme on the go at their nemesis' court... + modifier = { + add = 100 + scope:actor = { + any_relation = { type = nemesis } + any_scheme = { + count >= 1 + scheme_target_character = { + any_relation = { + type = nemesis + count >= 1 + this = scope:actor + } + } + } + } + } + # ... *and* they're likely to win due to having higher intrigue, but without scope:recipient being too terrible. + modifier = { + add = 25 + indebt_guest_interaction_get_intrigue_difference_value >= indebt_guest_interaction_likely_success_control_value + scope:recipient = { intrigue >= high_skill_rating } + } + modifier = { + add = 25 + indebt_guest_interaction_get_intrigue_difference_value >= indebt_guest_interaction_likely_success_control_value + scope:recipient = { intrigue >= very_high_skill_rating } + } + modifier = { + add = 50 + indebt_guest_interaction_get_intrigue_difference_value >= indebt_guest_interaction_likely_success_control_value + scope:recipient = { intrigue >= extremely_high_skill_rating } + } + } +} diff --git a/common/character_interactions/03_fp2_interactions.txt b/common/character_interactions/03_fp2_interactions.txt new file mode 100644 index 00000000..625f5d38 --- /dev/null +++ b/common/character_interactions/03_fp2_interactions.txt @@ -0,0 +1,5491 @@ +# Character Interactions for FP2 + +################################################## +# Share secrets +# by Maxence Voleau +################################################## +share_known_secrets_interaction = { + icon = secret + category = interaction_category_friendly + common_interaction = yes + + send_name = SEND_PROPOSAL + + interface_priority = 120 + + ai_targets = { + ai_recipients = dynasty + } + + ai_frequency_by_tier = { + barony = 0 + county = 240 + duchy = 180 + kingdom = 180 + empire = 180 + hegemony = 180 + } + + is_shown = { + scope:actor = { + # Standard check + # Has access to the appropriate legacy perk. + dynasty = { has_dynasty_perk = fp2_coterie_legacy_4 } + + # they are from the same house + house = scope:recipient.house + } + } + + is_valid_showing_failures_only = { + custom_tooltip = { + text = share_known_secrets_interaction.tt.no_secrets_to_share + # We try to keep the criteria vague to obfuscate things. + scope:actor = { any_known_secret = { } } # Must have a secret to share + OR = { + scope:actor = { + # At least one secret is unknown from recipient + any_known_secret = { + NOT = { is_known_by = scope:recipient } + } + } + scope:recipient = { + # At least one secret is unknown from actor + any_known_secret = { + NOT = { is_known_by = scope:actor } + } + } + } + } + } + + desc = share_known_secrets_interaction_desc + + on_accept = { + scope:actor = { + if = { + limit = { + scope:recipient = { + any_known_secret = { + count >= 7 + NOT = { is_known_by = scope:actor } + } + } + } + add_prestige = major_prestige_loss + + custom_description = { + text = many_secrets_exchanged + } + } + else_if = { + limit = { + scope:recipient = { + any_known_secret = { + count >= 3 + NOT = { is_known_by = scope:actor } + } + } + } + add_prestige = medium_prestige_loss + custom_description = { + text = several_secrets_exchanged + } + } + else = { + add_prestige = minor_prestige_loss + custom_description = { + text = few_secrets_exchanged + } + } + + # Stress impact + stress_impact = { + honest = minor_stress_impact_gain + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + } + + scope:recipient = { + if = { + limit = { + scope:actor = { + any_known_secret = { + count >= 7 + NOT = { is_known_by = scope:recipient } + OR = { + NOR = { + secret_owner = scope:recipient + AND = { + exists = secret_target + secret_target = scope:recipient + } + } + scope:recipient = { + OR = { + has_trait = dull + has_trait = intellect_bad + has_trait = contrite + } + } + } + } + } + } + add_prestige = major_prestige_loss + + custom_description = { + text = many_secrets_exchanged + } + } + else_if = { + limit = { + scope:actor = { + any_known_secret = { + count >= 3 + NOT = { is_known_by = scope:recipient } + OR = { + NOR = { + secret_owner = scope:actor + AND = { + exists = secret_target + secret_target = scope:actor + } + } + scope:actor = { + OR = { + has_trait = dull + has_trait = intellect_bad + has_trait = contrite + } + } + } + } + } + } + add_prestige = medium_prestige_loss + + custom_description = { + text = several_secrets_exchanged + } + } + else = { + add_prestige = minor_prestige_loss + + custom_description = { + text = few_secrets_exchanged + } + } + + # Stress impact + stress_impact = { + honest = minor_stress_impact_gain + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + } + + hidden_effect = { + scope:recipient = { save_scope_as = END_TARGET } # This should make the loc work 2-ways, as notifs do not update themselves + scope:actor = { + if = { # Recipient has no secrets to share + limit = { + scope:recipient = { + any_known_secret = { + NOT = { is_known_by = scope:actor } + OR = { + NOR = { + secret_owner = scope:recipient + AND = { + exists = secret_target + secret_target = scope:recipient + } + } + scope:recipient = { + OR = { + has_trait = dull + has_trait = intellect_bad + has_trait = contrite + } + } + } + count = 0 + } + } + } + send_interface_message = { + type = event_intrigue_bad_with_text + title = share_known_secrets_interaction_outcome_notif_title + desc = share_known_secrets_interaction_recipient_had_no_secrets + left_icon = scope:recipient + } + } + else = { # They had secrets to share + send_interface_message = { + type = event_intrigue_good_with_text + title = share_known_secrets_interaction_outcome_notif_title + desc = share_known_secrets_interaction_desc_intro + left_icon = scope:recipient + + scope:recipient = { + every_known_secret = { + limit = { + NOT = { is_known_by = scope:actor } + OR = { + NOR = { + secret_owner = scope:recipient + AND = { + exists = secret_target + secret_target = scope:recipient + } + } + scope:recipient = { + OR = { + has_trait = dull + has_trait = intellect_bad + has_trait = contrite + } + } + } + } + reveal_to = scope:actor + } + } + } + } + } + + scope:actor = { save_scope_as = END_TARGET } + scope:recipient = { + if = { # actor has no secrets to share + limit = { + scope:actor = { + any_known_secret = { + NOT = { is_known_by = scope:recipient } + OR = { + NOR = { + secret_owner = scope:actor + AND = { + exists = secret_target + secret_target = scope:actor + } + } + scope:actor = { + OR = { + has_trait = dull + has_trait = intellect_bad + has_trait = contrite + } + } + } + count = 0 + } + } + } + send_interface_message = { + type = event_intrigue_bad_with_text + title = share_known_secrets_interaction_outcome_notif_title + desc = share_known_secrets_interaction_recipient_had_no_secrets + left_icon = scope:actor + } + } + else = { # They had secrets to share + send_interface_message = { + type = event_intrigue_good_with_text + title = share_known_secrets_interaction_outcome_notif_title + desc = share_known_secrets_interaction_desc_intro + left_icon = scope:actor + + scope:actor = { + every_known_secret = { + limit = { + NOT = { is_known_by = scope:recipient } + OR = { + NOR = { + secret_owner = scope:actor + AND = { + exists = secret_target + secret_target = scope:actor + } + } + scope:actor = { + OR = { + has_trait = dull + has_trait = intellect_bad + has_trait = contrite + } + } + } + } + reveal_to = scope:recipient + } + hidden_effect = { add_prestige = major_prestige_loss } + } + } + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_loss + DESC = clan_unity_secret_sharing.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + auto_accept = { + custom_description = { + text = "spending_hook" + subject = scope:actor + object = scope:recipient + AND = { + always = scope:hook + scope:actor = { has_strong_hook = scope:recipient } + } + } + } + + send_option = { + is_valid = { + scope:actor = { has_strong_hook = scope:recipient } + } + flag = hook + localization = SCHEME_HOOK + } + should_use_extra_icon = { + scope:actor = { has_strong_hook = scope:recipient } + } + extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" + + send_options_exclusive = no + + ai_potential = { + #Has access to the appropriate cultural parameter. + AND = { + exists = dynasty + dynasty = { has_dynasty_perk = fp2_coterie_legacy_4 } + } + prestige > major_prestige_value + } + + auto_accept = no + + ai_accept = { + # AI should accept by default + base = 10 + + modifier = { + trigger = { + always = scope:hook + } + add = 100 + desc = SCHEME_WEAK_HOOK_USED + } + + modifier = { + trigger = { + has_education_intrigue_trigger = yes + } + add = 20 + desc = INTERACTION_INTRIGUE_EDUCATION + } + + modifier = { + add = -100 + has_trait = honest + desc = INTERACTION_HONEST + } + + modifier = { + add = -50 + has_trait = just + desc = INTERACTION_JUST + } + + modifier = { + add = -50 + has_trait = paranoid + desc = INTERACTION_PARANOID + } + + modifier = { + add = 100 + has_trait = fickle + desc = INTERACTION_FICKLE + } + + modifier = { + add = 100 + has_trait = deceitful + desc = INTERACTION_DECEITFUL + } + + modifier = { + add = 25 + has_trait = ambitious + desc = INTERACTION_AMBITIOUS + } + + } + + ai_will_do = { + base = 100 + } +} + +################################################## +# Propose Best Friendship +# by Ewan Cowhig Croft +################################################## + +# Elevate a friendship to become a *best* friendship. +propose_best_friendship_interaction = { + interface_priority = 30 + icon = icon_personal + category = interaction_category_friendly + common_interaction = yes + desc = propose_best_friendship_interaction_desc + + greeting = positive + notification_text = PROPOSE_BEST_FRIENDSHIP_NOTIFICATION + popup_on_receive = yes + ai_maybe = yes + + cooldown = { years = 5 } + cooldown_against_recipient = { years = 10 } + + is_shown = { + # Scope:actor needs to have a suitable CulTrad. + scope:actor = { + culture = { has_cultural_parameter = may_propose_best_friendship } + } + # Scope:actor needs to have scope:recipient as a friend. + scope:actor = { has_relation_friend = scope:recipient } + } + + is_valid_showing_failures_only = { + # Both characters must be available adults. + scope:actor = { is_available_adult = yes } + scope:recipient = { is_available_adult = yes } + # We can't do most of the standard checks for can_set_relation_best_friend_trigger, but we do the relevant ones individually. + custom_tooltip = { + text = propose_best_friendship_interaction.tt.already_best_friends + scope:actor = { + NOT = { has_relation_best_friend = scope:recipient } + } + } + trigger_if = { + limit = { + NOT = { + scope:actor = { has_relation_best_friend = scope:recipient } + } + } + custom_tooltip = { + text = propose_best_friendship_interaction.tt.actor_has_best_friend + scope:actor = { num_of_relation_best_friend = 0 } + } + } + trigger_if = { + limit = { + NOT = { + scope:recipient = { has_relation_best_friend = scope:actor } + } + } + custom_tooltip = { + text = propose_best_friendship_interaction.tt.recipient_has_best_friend + scope:recipient = { num_of_relation_best_friend = 0 } + } + } + } + + on_accept = { + # Notifications with most effects. + scope:actor = { + send_interface_toast = { + type = event_toast_effect_good + title = propose_best_friendship_interaction.accept.actor.tt + left_icon = scope:recipient + # Become best friends. + show_as_tooltip = { set_relation_best_friend = scope:recipient } + # Gain some strong opinion bonuses as a result. + reverse_add_opinion = { + target = scope:recipient + modifier = friendliness_opinion + opinion = 50 + } + # The hookening. + ## Due to some weird order-of-operations stuff, we enclose this in an if statement. + if = { + limit = { + NOT = { + has_hook_of_type = { + target = scope:recipient + type = ritual_best_friend_hook + } + } + can_add_hook = { + target = scope:recipient + type = ritual_best_friend_hook + } + } + add_hook = { + type = ritual_best_friend_hook + target = scope:recipient + } + } + } + } + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = propose_best_friendship_interaction.accept.recipient.tt + left_icon = scope:actor + # Become best friends. + show_as_tooltip = { set_relation_best_friend = scope:actor } + # Gain some strong opinion bonuses as a result. + reverse_add_opinion = { + target = scope:actor + modifier = friendliness_opinion + opinion = 50 + } + # The hookening part #2. + ## Due to some weird order-of-operations stuff, we enclose this in an if statement. + if = { + limit = { + NOT = { + has_hook_of_type = { + target = scope:actor + type = ritual_best_friend_hook + } + } + can_add_hook = { + target = scope:actor + type = ritual_best_friend_hook + } + } + add_hook = { + type = ritual_best_friend_hook + target = scope:actor + } + } + } + } + # Then we apply the actual friendship. + hidden_effect = { + scope:actor = { + if = { + limit = { + NOT = { has_relation_best_friend = scope:recipient } + } + set_relation_best_friend = { reason = best_friend_sworn copy_reason = friend target = scope:recipient } + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_gain + DESC = clan_unity_oath_of_true_friendship.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + # Scope:actor gains some stress over the whole ordeal. + scope:actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = propose_best_friendship_interaction.decline.actor.tt + left_icon = scope:recipient + add_stress = medium_stress_gain + } + } + # Scope:actor loses opinion of scope:recipient. + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = propose_best_friendship_interaction.decline.recipient.tt + left_icon = scope:actor + scope:actor = { + add_opinion = { + target = scope:recipient + modifier = hurt_opinion + opinion = -50 + } + } + } + } + # And set up a little hidden drama for later... + hidden_effect = { + scope:recipient = { + if = { + limit = { + # We don't use the standard check for this, since they'll already be friends by definition, so the trigger would always return as false. + # Instead, we just check to make sure they're not *already* potential rivals; this can happen regardless, so really we're just setting them up for drama if the friendship ever falters. + NOT = { has_relation_potential_rival = scope:actor } + } + set_relation_potential_rival = scope:actor + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_loss + DESC = clan_unity_declined_true_friendship.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + # AI + ## Standard Acceptance stuff + ai_accept = { + # Try to make it 0 for most interactions + base = 0 + + fp2_ritual_best_friendship_interactions_ai_accept_modifier = yes + + # People without the appropriate CulTrad don't quite *get* it. + modifier = { + add = -75 + NOT = { + culture = { has_cultural_parameter = may_propose_best_friendship } + } + desc = PROPOSE_BEST_FRIEND_OPINION_LACKING_CULTURAL_PARAMETER + } + } + ## Performance-enhancement + ai_potential = { is_imprisoned = no } + ai_target_quick_trigger = { adult = yes } + ai_targets = { ai_recipients = scripted_relations } + ## Frequency + ai_frequency_by_tier = { + barony = 0 + county = 72 + duchy = 36 + kingdom = 36 + empire = 36 + hegemony = 36 + } + ai_will_do = { + base = -50 + + fp2_ritual_best_friendship_interactions_ai_chance_modifier = yes + } +} + +################################################## +# Re-Affirmed Best Friendship +# by Ewan Cowhig Croft +################################################## + +# You've already got a best friend, but you feel you should have hooks on each other. +reaffirm_best_friendship_interaction = { + interface_priority = 30 + icon = icon_personal + category = interaction_category_friendly + common_interaction = yes + desc = reaffirm_best_friendship_interaction_desc + + greeting = positive + notification_text = REAFFIRM_BEST_FRIENDSHIP_NOTIFICATION + popup_on_receive = yes + ai_maybe = yes + + cooldown = { years = 5 } + cooldown_against_recipient = { years = 10 } + + is_shown = { + # Scope:actor needs to have a suitable CulTrad. + scope:actor = { + culture = { has_cultural_parameter = may_propose_best_friendship } + } + # Scope:actor needs to have scope:recipient for their best friend. + scope:actor = { has_relation_best_friend = scope:recipient } + # Either friend lacks a strong hook on the other. + NOR = { + scope:actor = { has_strong_hook = scope:recipient } + scope:recipient = { has_strong_hook = scope:actor } + } + } + + is_valid_showing_failures_only = { + # Both characters must be available adults. + scope:actor = { is_available_adult = yes } + scope:recipient = { is_available_adult = yes } + } + + on_accept = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_good + title = reaffirm_best_friendship_interaction.accept.actor.tt + left_icon = scope:recipient + # Pretty happy about the reaffirmation. + reverse_add_opinion = { + target = scope:recipient + modifier = friendliness_opinion + opinion = 25 + } + # The hookening. + if = { + limit = { + NOT = { has_strong_hook = scope:recipient } + } + add_hook = { + type = ritual_best_friend_hook + target = scope:recipient + } + } + } + } + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = reaffirm_best_friendship_interaction.accept.recipient.tt + left_icon = scope:actor + # Pretty happy about the reaffirmation. + reverse_add_opinion = { + target = scope:actor + modifier = friendliness_opinion + opinion = 25 + } + # The hookening part #2. + if = { + limit = { + NOT = { has_strong_hook = scope:actor } + } + add_hook = { + type = ritual_best_friend_hook + target = scope:actor + } + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_gain + DESC = clan_unity_friendship_is_magic.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + # Scope:actor gains some stress over the whole ordeal. + scope:actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = reaffirm_best_friendship_interaction.decline.actor.tt + left_icon = scope:recipient + # Actual effects handled in scope:recipient's toast. + show_as_tooltip = { remove_relation_best_friend = scope:recipient } + } + } + # Scope:actor loses opinion of scope:recipient. + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = reaffirm_best_friendship_interaction.decline.recipient.tt + left_icon = scope:actor + remove_relation_best_friend = scope:actor + } + } + # And set up a little hidden drama for later... + hidden_effect = { + scope:recipient = { + if = { + limit = { + # We don't use the standard check for this, since they'll already be friends by definition, so the trigger would always return as false. + # Instead, we just check to make sure they're not *already* potential rivals; this can happen regardless, so really we're just setting them up for drama if the friendship ever falters. + NOT = { has_relation_potential_rival = scope:actor } + } + set_relation_potential_rival = scope:actor + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_loss + DESC = clan_unity_friendship_is_not_magic.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + # AI + ## Standard Acceptance stuff + ai_accept = { + # Try to make it 0 for most interactions + base = 0 + + fp2_ritual_best_friendship_interactions_ai_accept_modifier = yes + + # People with the appropriate CulTrad understand that this is essentially required of them. + modifier = { + add = 50 + culture = { has_cultural_parameter = may_propose_best_friendship } + desc = REAFFIRM_BEST_FRIEND_OPINION_HAS_CULTURAL_PARAMETER + } + } + ## Performance-enhancement + ai_potential = { is_imprisoned = no } + ai_target_quick_trigger = { adult = yes } + ai_targets = { ai_recipients = scripted_relations } + ## Frequency + ai_frequency_by_tier = { + barony = 0 + county = 72 + duchy = 36 + kingdom = 36 + empire = 36 + hegemony = 36 + } + ai_will_do = { + base = -50 + + fp2_ritual_best_friendship_interactions_ai_chance_modifier = yes + } +} + +################################################## +# Synergise Friendship +# by Ewan Cowhig Croft +################################################## + +# Work together with your best friend to gain bonuses! +synergise_friendship_interaction = { + interface_priority = 30 + icon = icon_personal + category = interaction_category_friendly + common_interaction = yes + desc = synergise_friendship_interaction_desc + + greeting = positive + notification_text = SYNERGISE_FRIENDSHIP_NOTIFICATION + popup_on_receive = yes + ai_maybe = yes + + cooldown = { years = 5 } + cooldown_against_recipient = { years = 10 } + + is_shown = { + # Scope:actor needs to have a suitable CulTrad. + scope:actor = { + culture = { has_cultural_parameter = may_select_friendship_synergy_bonus } + } + # Scope:actor needs to have scope:recipient for their best friend. + scope:actor = { has_relation_best_friend = scope:recipient } + } + + is_valid_showing_failures_only = { + # Both characters must be available adults. + scope:actor = { is_available_adult = yes } + scope:recipient = { is_available_adult = yes } + } + + on_accept = { + # First, we send out some notifications. + scope:actor = { + send_interface_toast = { + type = event_toast_effect_good + title = synergise_friendship_interaction.accept.actor.tt + left_icon = scope:recipient + # Pretty happy about the reaffirmation. + reverse_add_opinion = { + target = scope:recipient + modifier = friendliness_opinion + opinion = 10 + } + # Show the bonuses. + ## Hidden effect so that the modifiers don't show twice in the UI. + hidden_effect = { + show_as_tooltip = { synergise_friendship_interaction_actual_effect = yes } + } + } + } + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = synergise_friendship_interaction.accept.recipient.tt + left_icon = scope:actor + # Pretty happy about the reaffirmation. + reverse_add_opinion = { + target = scope:actor + modifier = friendliness_opinion + opinion = 10 + } + # Show the bonuses. + ## Hidden effect so that the modifiers don't show twice in the UI. + hidden_effect = { + show_as_tooltip = { synergise_friendship_interaction_actual_effect = yes } + } + } + } + # Then remove any existing synergy modifiers they've got. + scope:actor = { remove_every_best_friend_synergy_bonus_modifier_effect = yes } + scope:recipient = { remove_every_best_friend_synergy_bonus_modifier_effect = yes } + # Finally, calc the actual modifiers received. + synergise_friendship_interaction_actual_effect = yes + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_gain + DESC = clan_unity_synergized_friendship.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + # Scope:actor gains some stress over the whole ordeal. + scope:actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = synergise_friendship_interaction.decline.actor.tt + left_icon = scope:recipient + add_stress = minor_stress_gain + } + } + # Scope:actor loses opinion of scope:recipient. + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = synergise_friendship_interaction.decline.recipient.tt + left_icon = scope:actor + reverse_add_opinion = { + target = scope:actor + modifier = hurt_opinion + opinion = -20 + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_loss + DESC = clan_unity_synergized_friendship_declined.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + # Synergy Types + ## Scope:actor's education + send_option = { + flag = synergy_bonus_actor + localization = "SYNERGY_BONUS_ACTOR" + } + ## Scope:recipient's education + send_option = { + flag = synergy_bonus_recipient + is_valid = { + custom_description = { + text = synergise_friendship_interaction_cannot_share_education + NOT = { + characters_have_same_education_group_trigger = { + CHARACTER_1 = scope:actor + CHARACTER_2 = scope:recipient + } + } + } + } + localization = "SYNERGY_BONUS_RECIPIENT" + } + ## Scope:a mix of both educations + send_option = { + flag = synergy_bonus_mixed + localization = "SYNERGY_BONUS_MIXED" + } + + # AI + ## Standard Acceptance stuff + ai_accept = { + # Try to make it 0 for most interactions + base = 0 + + fp2_ritual_best_friendship_interactions_ai_accept_modifier = yes + } + ## Performance-enhancement + ai_potential = { is_imprisoned = no } + ai_target_quick_trigger = { adult = yes } + ai_targets = { ai_recipients = scripted_relations } + ## Frequency + ai_frequency_by_tier = { + barony = 0 + county = 72 + duchy = 36 + kingdom = 36 + empire = 36 + hegemony = 36 + } + ai_will_do = { + base = -50 + + fp2_ritual_best_friendship_interactions_ai_chance_modifier = yes + } +} + +################################################## +# Challenge to Chess +# by Ewan Cowhig Croft +################################################## + +# Play someone at a game of chess, perhaps with a small wager. +challenge_to_2p_chess_interaction = { + interface_priority = 30 + icon = icon_gaming + category = interaction_category_friendly + desc = challenge_to_2p_chess_interaction_desc + common_interaction = no + + greeting = positive + notification_text = CHALLENGE_TO_2P_CHESS_INTERACTION_NOTIFICATION + ai_maybe = yes + + cooldown = { years = 1 } + cooldown_against_recipient = { years = 10 } + + is_shown = { + scope:actor = { + # Actor needs to either have a CulTrad or be a fan of board games + OR = { + culture = { has_cultural_parameter = may_challenge_to_board_games } + has_perk = befriend_perk + has_character_modifier = fp3_chess_playing_monkey_modifier #addition from FP3 + } + # Plus be able to start & continue such a game generally. + bg_can_start_board_game_trigger = yes + # ... no, I'm sorry, you can't play yourself at board games. + this != scope:recipient + } + } + + is_valid_showing_failures_only = { + # Both characters must be available (adults or old-enough children) + scope:actor = { + is_available = yes + can_start_board_game_eligibility_checks_trigger = yes + } + scope:recipient = { + is_available = yes + can_start_board_game_eligibility_checks_trigger = yes + } + # Neither of you can be currently engaged in a board game. + scope:recipient = { + custom_description = { + text = fp2_bg_recipient_banned_from_board_games + bg_can_start_board_game_is_scope_banned_checks_trigger = no + } + } + #limit range for landless adventurers + trigger_if = { + limit = { + scope:actor = { + has_government = landless_adventurer_government + } + } + #Has to be used instead of diplo range checks in laamp to landed interactions + ep3_laamp_diplo_range_trigger = { + TARGET = scope:recipient + LAAMP = scope:actor + } + } + } + + on_send = { + # We want to set this up in advance to stop scope:actor from giving away a county for opinion that they've already wagered. + if = { + limit = { always = scope:chess_land } + challenge_to_2p_chess_interaction_lock_in_actor_stake_land_effect = yes + } + # Plus lock in the game type. + challenge_to_2p_chess_interaction_lock_in_game_type_effect = { GAME_TYPE_SETTER = scope:actor } + } + + on_accept = { + # Save gold & land stakes. + if = { + limit = { always = scope:chess_gold } + save_scope_value_as = { + name = bg_stake_gold + value = challenge_to_chess_gold_change_value + } + } + if = { + limit = { always = scope:chess_land } + # We check scope:actor's county in the on_send block to stop them sneakily giving the county away after they've staked it. + show_as_tooltip = { challenge_to_2p_chess_interaction_lock_in_actor_stake_land_effect = yes } + scope:recipient = { + save_temporary_scope_as = ordering_char_temp + ordered_held_title = { + limit = { + bg_stake_land_valid_neighbouring_county_to_trade_trigger = { NEIGHBOUR = scope:actor } + } + order_by = bg_stake_land_evaluate_appropriate_county_ordering_value + save_scope_as = bg_stake_land_recipient + set_variable = wagered_county + } + } + } + # Proceed with general set-up & preamble. + scope:actor = { + # Log scope:actor as having taken the interaction for the purposes of invalidation + add_character_flag = taken_challenge_to_chess_interaction + # Fire the actual first event for scope:actor. + ## Sort some placeholder scopes so the UI doesn't freak out. + show_as_tooltip = { + challenge_to_2p_chess_interaction_lock_in_game_type_effect = { GAME_TYPE_SETTER = scope:actor } + } + ## Pachisi + if = { + limit = { scope:bg_interaction_game_type = flag:pachisi } + configure_start_board_game_effect = { + BG_INITIATOR = scope:actor + BG_ATTACKER = scope:actor + BG_DEFENDER = scope:recipient + SYSTEM = pachisi + LOCALE = random_nice_day + OUTPUT_EVENT = perk_interaction.0121 + INVALIDATION_EVENT = board_games.0021 + } + } + ## Hnefatafl + if = { + limit = { scope:bg_interaction_game_type = flag:hnefatafl } + configure_start_board_game_effect = { + BG_INITIATOR = scope:actor + BG_ATTACKER = scope:actor + BG_DEFENDER = scope:recipient + SYSTEM = hnefatafl + LOCALE = random_nice_day + OUTPUT_EVENT = perk_interaction.0121 + INVALIDATION_EVENT = board_games.0021 + } + } + ## Tabula + if = { + limit = { scope:bg_interaction_game_type = flag:tabula } + configure_start_board_game_effect = { + BG_INITIATOR = scope:actor + BG_ATTACKER = scope:actor + BG_DEFENDER = scope:recipient + SYSTEM = tabula + LOCALE = random_nice_day + OUTPUT_EVENT = perk_interaction.0121 + INVALIDATION_EVENT = board_games.0021 + } + } + ## Go + if = { + limit = { scope:bg_interaction_game_type = flag:go } + configure_start_board_game_effect = { + BG_INITIATOR = scope:actor + BG_ATTACKER = scope:actor + BG_DEFENDER = scope:recipient + SYSTEM = go + LOCALE = sitting_room + OUTPUT_EVENT = perk_interaction.0121 + INVALIDATION_EVENT = board_games.0021 + } + } + ## Fidchell + if = { + limit = { scope:bg_interaction_game_type = flag:fidchell } + configure_start_board_game_effect = { + BG_INITIATOR = scope:actor + BG_ATTACKER = scope:actor + BG_DEFENDER = scope:recipient + SYSTEM = fidchell + LOCALE = random_nice_day + OUTPUT_EVENT = perk_interaction.0121 + INVALIDATION_EVENT = board_games.0021 + } + } + ## Chess + if = { + limit = { scope:bg_interaction_game_type = flag:chess } + configure_start_board_game_effect = { + BG_INITIATOR = scope:actor + BG_ATTACKER = scope:actor + BG_DEFENDER = scope:recipient + SYSTEM = chess + LOCALE = random_nice_day + OUTPUT_EVENT = perk_interaction.0121 + INVALIDATION_EVENT = board_games.0021 + } + } + } + # Notify that the game will start immediately. + custom_tooltip = challenge_to_2p_chess_interaction.accept.game_commences.tt + # Stakes. + ## Friendlies bet opinion & stress. + if = { + limit = { always = scope:chess_friendly } + show_as_tooltip = { + random_list = { + # You win. + 50 = { + show_chance = no + desc = fp2_bg_interaction.winner.actor + fp2_bg_stake_friendly_effect = { + VICTOR = scope:actor + LOSER = scope:recipient + } + } + # You lose. + 50 = { + show_chance = no + desc = fp2_bg_interaction.winner.recipient + fp2_bg_stake_friendly_effect = { + VICTOR = scope:recipient + LOSER = scope:actor + } + } + } + } + } + ## Prestige bets capital. + if = { + limit = { always = scope:chess_prestige } + show_as_tooltip = { + random_list = { + # You win. + 50 = { + show_chance = no + desc = fp2_bg_interaction.winner.actor + fp2_bg_stake_fame_effect = { + VICTOR = scope:actor + LOSER = scope:recipient + } + } + # You lose. + 50 = { + show_chance = no + desc = fp2_bg_interaction.winner.recipient + fp2_bg_stake_fame_effect = { + VICTOR = scope:recipient + LOSER = scope:actor + } + } + } + } + } + ## Gold bets capital. + if = { + limit = { always = scope:chess_gold } + show_as_tooltip = { + random_list = { + # You win. + 50 = { + show_chance = no + desc = fp2_bg_interaction.winner.actor + fp2_bg_stake_fortune_effect = { + VICTOR = scope:actor + LOSER = scope:recipient + } + } + # You lose. + 50 = { + show_chance = no + desc = fp2_bg_interaction.winner.recipient + fp2_bg_stake_fortune_effect = { + VICTOR = scope:recipient + LOSER = scope:actor + } + } + } + } + } + ## Land bets a neighbouring title. + if = { + limit = { always = scope:chess_land } + show_as_tooltip = { + random_list = { + # You win. + 50 = { + show_chance = no + desc = fp2_bg_interaction.winner.actor + fp2_bg_stake_titles_effect = { VICTOR = scope:actor } + } + # You lose. + 50 = { + show_chance = no + desc = fp2_bg_interaction.winner.recipient + fp2_bg_stake_titles_effect = { VICTOR = scope:recipient } + } + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = miniscule_unity_loss + DESC = clan_unity_shatranj.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + # Scope:actor is a little put out. + scope:actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = challenge_to_2p_chess_interaction.decline.actor.tt + left_icon = scope:recipient + add_stress = minor_stress_gain + } + } + # Scope:actor loses opinion of scope:recipient. + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = challenge_to_2p_chess_interaction.decline.recipient.tt + left_icon = scope:actor + reverse_add_opinion = { + target = scope:actor + modifier = unfriendly_opinion + opinion = -20 + } + } + } + + # Failsafe: Ensure that all set variables are removed + hidden_effect = { + if = { + limit = { exists = scope:bg_stake_land_recipient } + scope:bg_stake_land_recipient = { remove_variable = wagered_county } + } + if = { + limit = { exists = scope:bg_stake_land_actor } + scope:bg_stake_land_actor = { remove_variable = wagered_county } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:recipient + TARGET = scope:actor + VALUE = miniscule_unity_loss + DESC = clan_unity_shatranj_decline.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + # Wagers + ## A friendly match + send_option = { + flag = chess_friendly + localization = "CHESS_FRIENDLY" + } + ## Bet prestige + send_option = { + flag = chess_prestige + localization = "CHESS_PRESTIGE" + is_valid = { # Children should not be able to gamble with fame, but gold and land are fine + scope:actor = { is_available_adult = yes } + scope:recipient = { is_available_adult = yes } + } + } + ## Bet gold + send_option = { + is_valid = { + custom_tooltip = { + scope:actor = { gold > minor_gold_value } + text = bet_gold_actor_not_enough_gold + } + custom_tooltip = { + scope:recipient = { gold > minor_gold_value } + text = bet_gold_recipient_not_enough_gold + } + } + flag = chess_gold + localization = "CHESS_GOLD" + } + ## Bet land + send_option = { + # Only actual gaming nut cultures will bet something as serious as land. + is_shown = { + scope:actor = { + culture = { has_cultural_parameter = may_wager_land_on_board_games } + } + scope:recipient = { + culture = { has_cultural_parameter = may_wager_land_on_board_games } + } + } + # But you need to have bordering land for it to work. + is_valid = { + custom_tooltip = { + text = challenge_to_2p_chess_interaction.need_bordering_non_capital_domains.tt + scope:actor = { + any_held_title = { + bg_stake_land_valid_neighbouring_county_to_trade_trigger = { NEIGHBOUR = scope:recipient } + } + } + scope:recipient = { + any_held_title = { + bg_stake_land_valid_neighbouring_county_to_trade_trigger = { NEIGHBOUR = scope:actor } + } + } + } + } + flag = chess_land + localization = "CHESS_LAND" + } + + # AI + ## Standard Acceptance stuff + ai_accept = { + # Try to make it 0 for most interactions + base = 0 + + # Weight up for personality values. + ## Shy characters may not generally be sociable, but they're usually down for board games. + ai_value_modifier = { + who = scope:recipient + trigger = { has_trait = shy } + ai_boldness = { + if = { + limit = { + scope:recipient = { + NOT = { ai_boldness = 0 } + } + } + value = 1 + } + } + ai_sociability = { + if = { + limit = { + scope:recipient = { + NOT = { ai_honor = 0 } + } + } + value = -0.5 + } + } + } + ## Otherwise, calc as normal. + ai_value_modifier = { + who = scope:recipient + trigger = { + NOT = { has_trait = shy } + } + ai_boldness = { + if = { + limit = { + scope:recipient = { + NOT = { ai_boldness = 0 } + } + } + value = 1 + } + } + ai_sociability = { + if = { + limit = { + scope:recipient = { + NOT = { ai_honor = 0 } + } + } + value = 0.5 + } + } + } + # Weight up for opinion. + opinion_modifier = { + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.5 + desc = AI_OPINION_REASON + } + # Weight up for estimated skill. + modifier = { + add = { + add = scope:recipient.martial + add = scope:recipient.intrigue + add = scope:recipient.learning + # + } + desc = BG_OPINION_OWN_SKILL_ASSESSMENT + } + # Specific wager preferences. + ## Friendlies: for folks who want a calm game with nothing more at stake than peace of mind. + modifier = { + add = 20 + always = scope:chess_friendly + # Exempt characters with traits that dislike low stakes. + scope:recipient = { + NOR = { + has_trait = callous + has_trait = greedy + has_trait = arrogant + } + } + desc = BG_OPINION_STAKES_ARE_LOW + } + ### Gregarious loves. + modifier = { + add = 40 + scope:recipient = { has_trait = gregarious } + always = scope:chess_friendly + desc = BG_OPINION_FRIENDLY_TRAIT_GREGARIOUS + } + ### Humble loves. + modifier = { + add = 40 + scope:recipient = { has_trait = humble } + always = scope:chess_friendly + desc = BG_OPINION_FRIENDLY_TRAIT_HUMBLE + } + ### Shy likes. + modifier = { + add = 20 + scope:recipient = { has_trait = shy } + always = scope:chess_friendly + desc = BG_OPINION_FRIENDLY_TRAIT_SHY + } + ### Compassionate likes. + modifier = { + add = 20 + scope:recipient = { has_trait = compassionate } + always = scope:chess_friendly + desc = BG_OPINION_FRIENDLY_TRAIT_COMPASSIONATE + } + ### Callous dislikes. + modifier = { + add = -20 + scope:recipient = { has_trait = callous } + always = scope:chess_friendly + desc = BG_OPINION_FRIENDLY_TRAIT_CALLOUS + } + ### Greedy hates. + modifier = { + add = -40 + scope:recipient = { has_trait = greedy } + always = scope:chess_friendly + desc = BG_OPINION_FRIENDLY_TRAIT_GREEDY + } + ### Arrogant hates. + modifier = { + add = -40 + scope:recipient = { has_trait = arrogant } + always = scope:chess_friendly + desc = BG_OPINION_FRIENDLY_TRAIT_ARROGANT + } + ## Prestige: want a little more drama in your life without breaking the bank? Gamble your reputation! + ### Brave loves. + modifier = { + add = 40 + scope:recipient = { has_trait = brave } + always = scope:chess_prestige + desc = BG_OPINION_PRESTIGE_TRAIT_BRAVE + } + ### Arrogant loves. + modifier = { + add = 40 + scope:recipient = { has_trait = arrogant } + always = scope:chess_prestige + desc = BG_OPINION_PRESTIGE_TRAIT_ARROGANT + } + ### Gregarious likes. + modifier = { + add = 20 + scope:recipient = { has_trait = gregarious } + always = scope:chess_prestige + desc = BG_OPINION_PRESTIGE_TRAIT_GREGARIOUS + } + ### Ambitious likes. + modifier = { + add = 20 + scope:recipient = { has_trait = ambitious } + always = scope:chess_prestige + desc = BG_OPINION_PRESTIGE_TRAIT_AMBITIOUS + } + ### Content dislikes. + modifier = { + add = -20 + scope:recipient = { has_trait = content } + always = scope:chess_prestige + desc = BG_OPINION_PRESTIGE_TRAIT_CONTENT + } + ### Shy dislikes. + modifier = { + add = -20 + scope:recipient = { has_trait = shy } + always = scope:chess_prestige + desc = BG_OPINION_PRESTIGE_TRAIT_SHY + } + ### Humble hates. + modifier = { + add = -40 + scope:recipient = { has_trait = humble } + always = scope:chess_prestige + desc = BG_OPINION_PRESTIGE_TRAIT_HUMBLE + } + ### Craven hates. + modifier = { + add = -40 + scope:recipient = { has_trait = craven } + always = scope:chess_prestige + desc = BG_OPINION_PRESTIGE_TRAIT_CRAVEN + } + ## Gold: what is life without risk? Play it bold or don't play at all! + ### Profligate adores. + modifier = { + add = 60 + scope:recipient = { has_trait = profligate } + always = scope:chess_gold + desc = BG_OPINION_GOLD_TRAIT_PROFLIGATE + } + ### Greedy loves. + modifier = { + add = 40 + scope:recipient = { has_trait = greedy } + always = scope:chess_gold + desc = BG_OPINION_GOLD_TRAIT_GREEDY + } + ### Ambitious likes. + modifier = { + add = 20 + scope:recipient = { has_trait = ambitious } + always = scope:chess_gold + desc = BG_OPINION_GOLD_TRAIT_AMBITIOUS + } + ### Generous likes - I mean, from their perspective, what does the money matter? + modifier = { + add = 20 + scope:recipient = { has_trait = generous } + always = scope:chess_gold + desc = BG_OPINION_GOLD_TRAIT_GENEROUS + } + ### Lazy likes. + modifier = { + add = 20 + scope:recipient = { has_trait = lazy } + always = scope:chess_gold + desc = BG_OPINION_GOLD_TRAIT_LAZY + } + ### Diligent hates. + modifier = { + add = -40 + scope:recipient = { has_trait = diligent } + always = scope:chess_gold + desc = BG_OPINION_GOLD_TRAIT_DILIGENT + } + ## Land: you need to stop buying new board games, Jesse. You're way too into them. + ### Profligate adores. + modifier = { + add = 60 + scope:recipient = { has_trait = profligate } + always = scope:chess_land + desc = BG_OPINION_LAND_TRAIT_PROFLIGATE + } + ### Arbitrary loves. + modifier = { + add = 40 + scope:recipient = { has_trait = arbitrary } + always = scope:chess_land + desc = BG_OPINION_LAND_TRAIT_ARBITRARY + } + ### Ambitious likes. + modifier = { + add = 20 + scope:recipient = { has_trait = ambitious } + always = scope:chess_land + desc = BG_OPINION_LAND_TRAIT_AMBITIOUS + } + ### Brave likes. + modifier = { + add = 20 + scope:recipient = { has_trait = brave } + always = scope:chess_land + desc = BG_OPINION_LAND_TRAIT_BRAVE + } + ### Craven dislikes. + modifier = { + add = -20 + scope:recipient = { has_trait = craven } + always = scope:chess_land + desc = BG_OPINION_LAND_TRAIT_CRAVEN + } + ### Content dislikes. + modifier = { + add = -20 + scope:recipient = { has_trait = content } + always = scope:chess_land + desc = BG_OPINION_LAND_TRAIT_CONTENT + } + ### Just loathes - this is *categorically* not how the feudal system, or really any form of loyalty, is supposed to work. + modifier = { + add = -60 + scope:recipient = { has_trait = just } + always = scope:chess_land + desc = BG_OPINION_LAND_TRAIT_JUST + } + ### Greedy deliberately left off; they don't want to risk their own stuff but they *do* want to nab everyone else's. + # Relationships + ## Mildly positive relationships like to play against each other. + modifier = { + add = 20 + scope:recipient = { + has_any_mild_good_relationship_with_character_trigger = { CHARACTER = scope:actor } + } + desc = BG_OPINION_RELATIONSHIP_GOOD_MILD + } + ## Positive relationships like to play against each other. + modifier = { + add = 40 + scope:recipient = { + has_any_only_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:actor } + } + desc = BG_OPINION_RELATIONSHIP_GOOD_MODERATE + } + ## Really positive relationships love to play against each other. + modifier = { + add = 60 + scope:recipient = { + has_any_best_good_relationship_with_character_trigger = { CHARACTER = scope:actor } + } + desc = BG_OPINION_RELATIONSHIP_GOOD_MAJOR + } + ## Negative relationships dislike playing each other... + ### ... either mildly... + modifier = { + add = -20 + scope:recipient = { + has_any_mild_bad_relationship_with_character_trigger = { CHARACTER = scope:actor } + NOT = { + culture = { has_cultural_parameter = may_challenge_to_board_games } + } + } + desc = BG_OPINION_RELATIONSHIP_BAD_MILD + } + ### ... moderately... + modifier = { + add = -40 + scope:recipient = { + has_any_only_moderate_bad_relationship_with_character_trigger = { CHARACTER = scope:actor } + NOT = { + culture = { has_cultural_parameter = may_challenge_to_board_games } + } + } + desc = BG_OPINION_RELATIONSHIP_BAD_MODERATE + } + ### ... or majorly... + modifier = { + add = -60 + scope:recipient = { + has_any_worst_bad_relationship_with_character_trigger = { CHARACTER = scope:actor } + NOT = { + culture = { has_cultural_parameter = may_challenge_to_board_games } + } + } + desc = BG_OPINION_RELATIONSHIP_BAD_MAJOR + } + ## ... unless they take their board games far too seriously, in which case, they're always down... + ### ... either mildly... + modifier = { + add = 20 + scope:recipient = { + has_any_mild_bad_relationship_with_character_trigger = { CHARACTER = scope:actor } + culture = { has_cultural_parameter = may_challenge_to_board_games } + } + desc = BG_OPINION_RELATIONSHIP_BAD_SRSGMR_MILD + } + ### ... moderately... + modifier = { + add = 40 + scope:recipient = { + has_any_only_moderate_bad_relationship_with_character_trigger = { CHARACTER = scope:actor } + culture = { has_cultural_parameter = may_challenge_to_board_games } + } + desc = BG_OPINION_RELATIONSHIP_BAD_SRSGMR_MODERATE + } + ### ... or majorly. + modifier = { + add = 60 + scope:recipient = { + has_any_worst_bad_relationship_with_character_trigger = { CHARACTER = scope:actor } + culture = { has_cultural_parameter = may_challenge_to_board_games } + } + desc = BG_OPINION_RELATIONSHIP_BAD_SRSGMR_MAJOR + } + # Apply tier differences. + ## King -> Baron. + modifier = { + desc = AI_REFUSAL_RANK_DIFFERENCE + scope:actor = { + tier_difference = { + target = scope:recipient + value >= 4 + } + } + add = 15 + } + ## Duke -> Baron. + modifier = { + desc = AI_REFUSAL_RANK_DIFFERENCE + scope:actor = { + tier_difference = { + target = scope:recipient + value = 3 + } + } + add = 10 + } + ## Count -> Baron. + modifier = { + desc = AI_REFUSAL_RANK_DIFFERENCE + scope:actor = { + tier_difference = { + target = scope:recipient + value = 2 + } + } + add = 5 + } + ## King <- Baron. + modifier = { + desc = AI_REFUSAL_RANK_DIFFERENCE + scope:actor = { + tier_difference = { + target = scope:recipient + value = -2 + } + } + add = -10 + } + ## Duke <- Baron. + modifier = { + desc = AI_REFUSAL_RANK_DIFFERENCE + scope:actor = { + tier_difference = { + target = scope:recipient + value = -3 + } + } + add = -20 + } + ## Count <- Baron. + modifier = { + desc = AI_REFUSAL_RANK_DIFFERENCE + scope:actor = { + tier_difference = { + target = scope:recipient + value <= -4 + } + } + add = -30 + } + } + ## Performance-enhancement + ai_potential = { + OR = { + culture = { has_cultural_parameter = may_challenge_to_board_games } + has_perk = befriend_perk + } + is_imprisoned = no + } + ai_target_quick_trigger = { adult = yes } # AI will only challenge adults + ai_targets = { + ai_recipients = scripted_relations + max = 5 + } + ai_targets = { + ai_recipients = family + max = 10 + } + ai_targets = { + ai_recipients = neighboring_rulers + ai_recipients = peer_vassals + max = 10 + } + ## Frequency + ai_frequency_by_tier = { + barony = 0 + county = 360 + duchy = 240 + kingdom = 100 + empire = 100 + hegemony = 100 + } + ai_will_do = { + base = -50 + + # Everyone likes to play boardgames with people they like + opinion_modifier = { + opinion_target = scope:recipient + trigger = { + NOT = { culture = { has_cultural_parameter = may_challenge_to_board_games } } + } + } + + # Boardgame nerds like to challenge people they dislike... + opinion_modifier = { + opinion_target = scope:recipient + trigger = { + culture = { has_cultural_parameter = may_challenge_to_board_games } + opinion = { + target = scope:recipient + value < 0 + } + } + + multiplier = -1 + } + + # ...but they ALSO like to play with people they like + opinion_modifier = { + opinion_target = scope:recipient + trigger = { + culture = { has_cultural_parameter = may_challenge_to_board_games } + opinion = { + target = scope:recipient + value > 0 + } + } + } + + # If you are my rival and my culture likes to play board games, I'll see you as a good opponent. + modifier = { + add = 50 + scope:actor = { + has_relation_rival = scope:recipient + culture = { has_cultural_parameter = may_challenge_to_board_games } + } + } + + # Aaaaand boredom. + modifier = { + add = 10 + scope:actor.days_of_continuous_peace >= 365 + } + modifier = { + add = 10 + scope:actor.days_of_continuous_peace >= 730 + } + modifier = { + add = 10 + scope:actor.days_of_continuous_peace >= 1095 + } + modifier = { + add = 10 + scope:actor.days_of_continuous_peace >= 1460 + } + modifier = { + add = 10 + scope:actor.days_of_continuous_peace >= 1825 + } + # Plus if scope:actor isn't at all interesting to scope:recipient, then tell them to just sit quietly. + modifier = { + factor = 0 + scope:recipient = { + NOR = { + is_of_major_or_minor_interest_trigger = { CHARACTER = scope:actor } + highest_held_title_tier >= tier_duchy + sub_realm_size >= 4 + } + } + } + } +} + +################################################## +# Purchase Truce +# by Ewan Cowhig Croft +################################################## + +# Wars are expensive, so why not purchase a little peace preemptively? +purchase_truce_interaction = { + interface_priority = 30 + category = interaction_category_diplomacy + common_interaction = yes + desc = purchase_truce_interaction_desc + icon = icon_retreat + + greeting = positive + notification_text = PURCHASE_TRUCE_NOTIFICATION + popup_on_receive = yes + ai_maybe = yes + + cooldown = { years = 5 } + cooldown_against_recipient = { years = 10 } + + is_shown = { + scope:actor != scope:recipient + # Scope:actor needs to either be involved in certain struggle types or else have a specific perk. + scope:actor = { + is_landless_adventurer = no + + # If scope:recipient is a nomad and the actor is not, this is always available; otherwise, + # scope:actor needs to either be involved in certain struggle types or else have a specific perk. + OR = { + AND = { + scope:recipient = { government_has_flag = government_is_nomadic } + NOT = { government_has_flag = government_is_nomadic } + } + fp2_purchase_truce_interaction_soft_requirements_trigger = yes + } + + # if you are not independent you should not be able to purchase truce with other fellow vassals only + trigger_if = { + limit = { top_liege != this } + top_liege = scope:recipient.top_liege + } + } + # Scope:recipient must be landed, and neither over or under scope:actor. + scope:recipient = { + is_playable_character = yes + NOR = { + any_liege_or_above = { this = scope:actor } + any_vassal_or_below = { this = scope:actor } + } + } + } + + is_valid_showing_failures_only = { + # Scope:actor must be an available (adult or child). + scope:actor = { + gold >= pt_sum_small_value + is_available = yes + } + # Scope:recipient must be at least available. + scope:recipient = { is_available = yes } + # Make sure that scope:actor is going into this with a clean, no-recent/active/forbidden hostilities mindset. + scope:actor = { + NOR = { + # Involved characters can't be on opposite sides in an active war. + is_at_war_with = scope:recipient + # Allied characters aren't allowed to do this because it _should_ be redundant. Unless you're planning something. Which you shouldn't announce like that. + is_allied_to = scope:recipient + # And we should just disallow anyone who already has a truce with you, even though I guess you might technically want to replace it. + any_truce_holder = { this = scope:recipient } + } + } + #limit range for landless adventurers + trigger_if = { + limit = { + scope:actor = { + has_government = landless_adventurer_government + } + } + #Has to be used instead of diplo range checks in laamp to landed interactions + ep3_laamp_diplo_range_trigger = { + TARGET = scope:recipient + LAAMP = scope:actor + } + } + } + + on_accept = { + # Notifications with most effects. + scope:actor = { + send_interface_toast = { + type = event_toast_effect_good + title = purchase_truce_interaction.accept.actor.tt + left_icon = scope:recipient + show_as_tooltip = { + purchase_truce_interaction_work_out_truce_days_effect = { TARGET = scope:recipient } + } + } + show_as_tooltip = { purchase_truce_interaction_work_out_purchase_cost_effect = yes } + # Outside of the notification, since we'll send a separate one anyway, we want to point out the catalyst activation (if relevant). + show_as_tooltip = { purchase_truce_interaction_activate_catalyst_effect = yes } + } + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = purchase_truce_interaction.accept.recipient.tt + left_icon = scope:actor + show_as_tooltip = { + purchase_truce_interaction_work_out_truce_days_effect = { TARGET = scope:actor } + } + } + } + # Then we apply the actual truce. + hidden_effect = { + scope:actor = { + purchase_truce_interaction_work_out_truce_days_effect = { TARGET = scope:recipient } + purchase_truce_interaction_activate_catalyst_effect = yes + # Variable used for checking if we should apply the "Recently Waged War" ai behavior in ai_acceptance modifiers, specifically in the Offer Vassalization interaction + if = { + limit = { always = scope:pt_sum_small } + add_to_bought_truce_list = { + TARGET = scope:recipient + DAYS = purchase_truce_interaction_truce_days_small_value + } + } + else_if = { + limit = { always = scope:pt_sum_large } + add_to_bought_truce_list = { + TARGET = scope:recipient + DAYS = purchase_truce_interaction_truce_days_large_value + } + } + else = { + add_to_bought_truce_list = { + TARGET = scope:recipient + DAYS = purchase_truce_interaction_truce_days_medium_value + } + } + } + purchase_truce_interaction_work_out_purchase_cost_effect = yes + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_gain + DESC = clan_unity_purchased_truce.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + # Scope:actor gains some stress over the whole ordeal. + scope:actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = purchase_truce_interaction.decline.actor.tt + left_icon = scope:recipient + add_stress = minor_stress_gain + } + } + # Scope:actor loses opinion of scope:recipient. + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = purchase_truce_interaction.decline.recipient.tt + left_icon = scope:actor + reverse_add_opinion = { + target = scope:actor + modifier = warmonger_opinion + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:recipient + TARGET = scope:actor + VALUE = minor_unity_loss + DESC = clan_unity_purchased_truce_refusal.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + # Send Options + ## Small Sum + send_option = { + is_shown = { always = yes } + is_valid = { + scope:actor = { gold >= pt_sum_small_value } + } + flag = pt_sum_small + localization = "PT_SUM_SMALL" + } + ## Medium Sum + send_option = { + is_shown = { + # We use the most expensive of scope:actor or scope:recipient's income, so we check both. + scope:actor = { + can_make_expensive_purchase_trigger = { PRICE = scope:actor.purchase_truce_interaction_medium_sum } + can_make_expensive_purchase_trigger = { PRICE = scope:recipient.purchase_truce_interaction_medium_sum } + } + } + is_valid = { + scope:actor = { gold >= pt_sum_medium_value } + } + flag = pt_sum_medium + starts_enabled = { always = yes } + localization = "PT_SUM_MEDIUM" + } + ## Large Sum + send_option = { + is_shown = { + # We use the most expensive of scope:actor or scope:recipient's income, so we check both. + scope:actor = { + can_make_expensive_purchase_trigger = { PRICE = scope:actor.purchase_truce_interaction_major_sum } + can_make_expensive_purchase_trigger = { PRICE = scope:recipient.purchase_truce_interaction_major_sum } + } + } + is_valid = { + scope:actor = { gold >= pt_sum_large_value } + } + flag = pt_sum_large + localization = "PT_SUM_LARGE" + } + + # AI + ## Standard Acceptance stuff + ai_accept = { + # Try to make it 0 for most interactions. + base = 0 + + # Struggle + modifier = { + trigger_if = { + limit = { + scope:recipient = { + any_character_struggle = { + involvement = involved + } + } + scope:actor = { + any_character_struggle = { + involvement = involved + } + } + } + } + trigger_else = { + always = no + } + add = { + value = 0 + if = { + limit = { + scope:recipient = { + any_character_struggle = { + phase_has_catalyst = catalyst_sign_truce_outside_war + } + has_character_flag = agenda_towards_escalation + } + } + add = -50 + } + else_if = { + limit = { + scope:recipient = { + any_character_struggle = { + phase_has_catalyst = catalyst_sign_truce_outside_war + } + } + } + add = 100 + } + } + desc = AI_STRUGGLE_INTENT + } + + # Factor up or down based on the sum offered. + ## Small. + modifier = { + add = -10 + always = scope:pt_sum_small + desc = PT_AMOUNT_OF_GOLD_OFFERED + } + ## Medium. + modifier = { + add = 25 + always = scope:pt_sum_medium + desc = PT_AMOUNT_OF_GOLD_OFFERED + } + ## Large. + modifier = { + add = 75 + always = scope:pt_sum_large + desc = PT_AMOUNT_OF_GOLD_OFFERED + } + ## Plus a bit of base-line acceptance if the AI's coffers are currently pretty anaemic. + modifier = { + add = 30 + gold <= scope:recipient.yearly_character_income + desc = PT_COULD_USE_SOME_POCKET_MONEY + } + # AI take opinion into account, but reduced so they'll at least occasionally accept from folks they dislike. + opinion_modifier = { + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.5 + desc = AI_OPINION_REASON + } + # Greedy AI like gold. + modifier = { + add = { + value = ai_greed + multiply = 2 + } + ai_greed >= 1 + desc = AI_VALUE_MODIFIER_GREED + } + # Boldness always plays a factor. + modifier = { + add = { + value = ai_boldness + multiply = -0.5 + } + NOT = { ai_boldness = 0 } + desc = AI_VALUE_MODIFIER_BOLDNESS + } + # Ambitious AI like freedom. + modifier = { + add = -50 + has_trait = ambitious + desc = PT_AI_LIKES_FREEDOM_TO_WAR_REASON + } + # AI who are in debt will take whatever windfalls they can. + modifier = { + add = { + value = debt_level + # Our first rank is 0, so we add one to always get a positive number. + add = 1 + multiply = 10 + } + debt_level >= 0 + desc = PT_AI_IS_IN_DEBT + } + # Pacifist AI are happy to avoid war. + modifier = { + add = 25 + faith = { has_doctrine_parameter = pacifist_opinion_active } + desc = PT_AI_IS_PACIFIST_FAITH + } + modifier = { + add = 25 + culture = { has_cultural_parameter = reduced_cost_for_conversion_to_pacifist_faith } + desc = PT_AI_IS_PACIFIST_CULTURE + } + # War likeliness. + ## This is primarily intended to mitigate conquest, invasion, and religious CBs, so we don't account for them. + ## Scope:recipient has some claim to scope:actor's lands. + modifier = { + add = -20 + any_claim = { + count = 1 + exists = holder + holder = scope:actor + } + desc = PT_AI_PERSONALLY_CLAIMS_YOUR_LAND + } + ## Scope:recipient has decent claim to scope:actor's lands. + modifier = { + add = -40 + OR = { + any_claim = { + count >= 2 + exists = holder + holder = scope:actor + } + any_claim = { + count = 1 + exists = holder + holder = scope:actor + save_temporary_scope_as = claim_temp + scope:recipient = { has_strong_claim_on = scope:claim_temp } + } + } + desc = PT_AI_PERSONALLY_CLAIMS_YOUR_LAND + } + ## Scope:recipient has strong claim to scope:actor's lands. + modifier = { + add = -60 + any_claim = { + count >= 2 + exists = holder + holder = scope:actor + save_temporary_scope_as = claim_temp + scope:recipient = { has_strong_claim_on = scope:claim_temp } + } + desc = PT_AI_PERSONALLY_CLAIMS_YOUR_LAND + } + ## Scope:recipient can de jure grab your land. + ### Dukes don't take much. + modifier = { + add = -30 + highest_held_title_tier = tier_duchy + purchase_truce_interaction_recipient_can_de_jure_war_actor_trigger = yes + scope:actor = { + any_sub_realm_county = { + count >= 3 + any_this_title_or_de_jure_above = { holder = scope:actor } + } + } + desc = PT_AI_DE_JURE_CLAIMS_YOUR_LAND + } + ### Kings need a lot more. + modifier = { + add = -30 + highest_held_title_tier = tier_kingdom + purchase_truce_interaction_recipient_can_de_jure_war_actor_trigger = yes + scope:actor = { + any_sub_realm_county = { + count >= 10 + any_this_title_or_de_jure_above = { holder = scope:actor } + } + } + desc = PT_AI_DE_JURE_CLAIMS_YOUR_LAND + } + ### Emperors take quite a bit to get fussed. + modifier = { + add = -30 + highest_held_title_tier = tier_empire + purchase_truce_interaction_recipient_can_de_jure_war_actor_trigger = yes + scope:actor = { + any_sub_realm_county = { + count >= 20 + any_this_title_or_de_jure_above = { holder = scope:actor } + } + } + desc = PT_AI_DE_JURE_CLAIMS_YOUR_LAND + } + # Relative power. + ## Scope:actor has far fewer levies than scope:recipient. + modifier = { + add = -30 + scope:actor.max_military_strength <= scope:recipient.purchase_truce_interaction_recipient_far_weaker_value + desc = PT_AI_RECIPIENT_IS_MUCH_STRONGER + } + ## Scope:actor has fewer levies than scope:recipient. + modifier = { + add = -10 + scope:actor.max_military_strength > scope:recipient.purchase_truce_interaction_recipient_far_weaker_value + scope:actor.max_military_strength <= scope:recipient.purchase_truce_interaction_recipient_somewhat_weaker_value + desc = PT_AI_RECIPIENT_IS_SOMEWHAT_STRONGER + } + ## Scope:actor has roughly equal levies with scope:recipient. + modifier = { + add = 10 + scope:actor.max_military_strength > scope:recipient.purchase_truce_interaction_recipient_somewhat_weaker_value + scope:actor.max_military_strength <= scope:recipient.purchase_truce_interaction_recipient_somewhat_stronger_value + desc = PT_AI_RECIPIENT_IS_ROUGHLY_EQUAL + } + ## Scope:actor has more levies than scope:recipient. + modifier = { + add = 25 + scope:actor.max_military_strength > scope:recipient.purchase_truce_interaction_recipient_somewhat_stronger_value + scope:actor.max_military_strength <= scope:recipient.purchase_truce_interaction_recipient_far_stronger_value + desc = PT_AI_RECIPIENT_IS_SOMEWHAT_WEAKER + } + ## Scope:actor has far more levies than scope:recipient. + modifier = { + add = 50 + scope:actor.max_military_strength > scope:recipient.purchase_truce_interaction_recipient_far_stronger_value + desc = PT_AI_RECIPIENT_IS_MUCH_WEAKER + } + } + ## Performance-enhancement + ai_potential = { + is_playable_character = yes + is_at_war = no + is_imprisoned = no + # Matches the regular minimum triggers. + OR = { + any_character_struggle = { involvement = involved } + has_perk = defensive_measures_perk + } + # Might actually be wurf evaluating the costs. + can_make_expensive_purchase_trigger = { PRICE = purchase_truce_interaction_small_sum } + } + ai_target_quick_trigger = { adult = yes } + ai_targets = { + ai_recipients = neighboring_rulers + ai_recipients = peer_vassals + max = 10 + } + ## Frequency + ai_frequency_by_tier = { + barony = 0 + county = 60 + duchy = 60 + kingdom = 0 + empire = 0 + hegemony = 0 + } + ai_will_do = { + base = 0 + + # Some personalities & traits just don't want to fight. + ## Cravens (who aren't also ambitious). + modifier = { + add = 25 + has_trait = craven + NOT = { has_trait = ambitious } + } + ## Those with chronically low boldness (who aren't also ambitious). + modifier = { + add = 25 + ai_boldness <= very_high_negative_ai_value + NOT = { has_trait = ambitious } + } + ## Pacifists. + modifier = { + add = 25 + faith = { has_doctrine_parameter = pacifist_opinion_active } + } + modifier = { + add = 25 + culture = { has_cultural_parameter = reduced_cost_for_conversion_to_pacifist_faith } + } + ## Wrathful or ambitious characters don't like to bother. + modifier = { + add = -25 + has_trait = ambitious + } + modifier = { + add = -25 + has_trait = wrathful + } + ## Arbitrary characters don't get truces to begin with. + modifier = { + add = -50 + has_trait = arbitrary + } + ## We deliberately avoid warlike faiths *not* doing it; there's plenty of examples of such bought truces amongst these faiths, so we let them keep at it if they match other criteria. + # Various gradients of having money to burn. + ## You've got a goodly amount stashed away. + modifier = { + add = 50 + can_make_expensive_purchase_trigger = { PRICE = purchase_truce_interaction_medium_sum } + } + ## You're somewhat loaded. + modifier = { + add = 50 + can_make_expensive_purchase_trigger = { PRICE = purchase_truce_interaction_major_sum } + } + ## You're absolutely loaded. + modifier = { + add = 50 + can_make_expensive_purchase_trigger = { PRICE = purchase_truce_interaction_massive_sum } + } + # Force checks. + ## Try to buy truces from somewhat stronger realms... + modifier = { + add = 50 + scope:recipient.max_military_strength >= scope:actor.purchase_truce_interaction_recipient_somewhat_stronger_value + } + ## ... and much stronger realms. + modifier = { + add = 50 + scope:recipient.max_military_strength >= scope:actor.purchase_truce_interaction_recipient_far_stronger_value + } + + # Struggle + modifier = { + scope:recipient = { + any_character_struggle = { + involvement = involved + } + } + scope:actor = { + any_character_struggle = { + involvement = involved + } + } + add = { + value = 0 + if = { + limit = { + scope:actor = { + any_character_struggle = { + phase_has_catalyst = catalyst_sign_truce_outside_war + } + has_character_flag = agenda_towards_escalation + } + } + add = -50 + } + else_if = { + limit = { + scope:actor = { + any_character_struggle = { + phase_has_catalyst = catalyst_sign_truce_outside_war + } + } + } + add = 100 + } + } + } + # Finally, calculate factors. + ## Only buy truces from weaker/roughly-equal realms if you're craven have been at war forever. + modifier = { + factor = 0 + max_military_strength <= scope:actor.purchase_truce_interaction_recipient_somewhat_weaker_value + NOR = { + has_trait = craven + days_of_continuous_war <= 3650 + } + } + ## Never buy a truce from someone who actually can't declare war on you. + modifier = { + factor = 0 + scope:recipient = { + NOT = { has_any_cb_on = scope:actor } + } + } + ## Don't buy truces from people who are likely going to be dead soon, or if you yourself will die soon, since they'll be wasted. + modifier = { + factor = 0 + OR = { + health <= poor_health + scope:recipient = { health <= poor_health } + } + } + } +} + +################################################## +# Incite Revolts +# by Maxence Voleau +################################################## Updated for FP3 + +incite_revolts_interaction = { + interface_priority = 30 + category = interaction_category_hostile + common_interaction = yes + desc = incite_revolts_interaction_desc + icon = faction + + greeting = positive + + auto_accept = yes + + cost = { + gold = { + add = { + value = 0 + # Gold spent will provide 10x levies, e.g. 25 provides 250 - not automated yet + if = { + limit = { scope:small_investment_in_revolt = yes } + add = 25 + } + if = { + limit = { scope:medium_investment_in_revolt = yes } + add = 75 + } + if = { + limit = { scope:high_investment_in_revolt = yes } + add = 200 + } + } + } + } + + is_shown = { + scope:recipient != scope:actor + OR = { + scope:actor = { + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + OR = { + any_claim = { + holder = scope:recipient + } + has_relation_rival = scope:recipient + } + } + # Only available during Opportunity, Hostility and Tension phases + scope:actor = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = unlocks_incite_revolts_interaction + # Can only target involved + is_secondary_character_involvement_involved_trigger = { CHAR = scope:recipient } + } + } + AND = { + scope:actor = { + has_trait = fp3_struggle_detractor + any_character_struggle = { + involvement = involved + is_struggle_type = persian_struggle + } + } + scope:recipient = { + any_character_struggle = { + is_struggle_type = persian_struggle + involvement = involved + } + } + } + scope:actor.domicile ?= { + has_domicile_parameter = can_use_incite_revolts + } + } + } + + is_valid_showing_failures_only = { + custom_description = { + text = at_least_one_county_with_neutral_negative_opinion + scope:recipient = { + any_sub_realm_county = { + count > 0 + holder = scope:recipient + county_opinion < 0 + NOR = { + has_county_modifier = small_investment_in_revolt_modifier + has_county_modifier = medium_investment_in_revolt_modifier + has_county_modifier = high_investment_in_revolt_modifier + } + } + } + } + } + + can_send = { + custom_tooltip = { + text = must_select_an_investment + OR = { + scope:actor = { is_ai = yes } # Temporary until we get a code fix + scope:small_investment_in_revolt = yes + scope:medium_investment_in_revolt = yes + scope:high_investment_in_revolt = yes + } + } + } + + send_options_exclusive = yes + + # Small investment + send_option = { + flag = small_investment_in_revolt + localization = small_investment + } + + # Medium investment + send_option = { + flag = medium_investment_in_revolt + localization = medium_investment + starts_enabled = { always = yes } + } + + # High investment + send_option = { + flag = high_investment_in_revolt + localization = high_investment + } + + on_accept = { + # Select the random county + hidden_effect = { + scope:recipient = { + random_sub_realm_county = { + limit = { + NOR = { + has_county_modifier = small_investment_in_revolt_modifier + has_county_modifier = medium_investment_in_revolt_modifier + has_county_modifier = high_investment_in_revolt_modifier + } + county_opinion < 0 + holder = scope:recipient + } + weight = { + base = 1 + # More likely to finance county of your own Faith or Culture + modifier = { + add = 2 + OR = { + faith = scope:actor.faith + culture = scope:actor.culture + } + } + # More likely to finance county prone to trigger populist factions + modifier = { + add = 5 + NAND = { + faith = scope:recipient.faith + culture = scope:recipient.culture + } + } + # More likely to finance county bordering your Realm + modifier = { + add = 5 + any_neighboring_county = { + holder = scope:actor + } + } + } + save_scope_as = chosen_county + } + } + } + + scope:actor = { + stress_impact = { + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + trusting = medium_stress_impact_gain + greedy = minor_stress_impact_gain + } + if = { + limit = { + scope:actor = { + OR = { + has_relation_rival = scope:recipient + has_relation_nemesis = scope:recipient + } + } + } + stress_impact = { + vengeful = medium_stress_impact_loss + } + } + if = { + limit = { + scope:actor = { + is_vassal_of = scope:recipient + } + } + stress_impact = { + ambitious = medium_stress_impact_loss + } + } + } + + # FP3 Polish (Hugo) + scope:actor = { + duel = { + skill = intrigue + value = scope:recipient.intrigue + + 10 = { # Failure + desc = incite_revolts_interaction_notif_failure + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + } + show_as_tooltip = { + if = { + limit = { scope:small_investment_in_revolt = yes } + custom_tooltip = apply_small_investment_in_revolt_on_random_county + } + else_if = { + limit = { scope:medium_investment_in_revolt = yes } + custom_tooltip = apply_medium_investment_in_revolt_on_random_county + } + else_if = { + limit = { scope:high_investment_in_revolt = yes } + custom_tooltip = apply_high_investment_in_revolt_on_random_county + } + reverse_add_opinion = { + target = scope:recipient + modifier = angry_opinion + opinion = -50 + } + } + + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_bad + title = incite_revolts_interaction_result.tt + left_icon = scope:chosen_county + right_icon = scope:recipient + + scope:chosen_county = { + if = { + limit = { scope:small_investment_in_revolt = yes } + add_county_modifier = { + modifier = small_investment_in_revolt_modifier + years = 10 + } + } + else_if = { + limit = { scope:medium_investment_in_revolt = yes } + add_county_modifier = { + modifier = medium_investment_in_revolt_modifier + years = 10 + } + } + else_if = { + limit = { scope:high_investment_in_revolt = yes } + add_county_modifier = { + modifier = high_investment_in_revolt_modifier + years = 10 + } + } + } + reverse_add_opinion = { + target = scope:recipient + modifier = angry_opinion + opinion = -50 + } + hidden_effect = { + scope:recipient = { + progress_towards_rival_effect = { + CHARACTER = scope:actor + REASON = fp2_progress_towards_rival_funded_revolt_against_me + OPINION = 0 + } + } + } + } + } + } + 10 = { # Success + desc = incite_revolts_interaction_notif_success + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + } + + show_as_tooltip = { + if = { + limit = { scope:small_investment_in_revolt = yes } + custom_tooltip = apply_small_investment_in_revolt_on_random_county + } + else_if = { + limit = { scope:medium_investment_in_revolt = yes } + custom_tooltip = apply_medium_investment_in_revolt_on_random_county + } + else_if = { + limit = { scope:high_investment_in_revolt = yes } + custom_tooltip = apply_high_investment_in_revolt_on_random_county + } + } + + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_good + title = incite_revolts_interaction_result.tt + left_icon = scope:chosen_county + + scope:chosen_county = { + if = { + limit = { scope:small_investment_in_revolt = yes } + add_county_modifier = { + modifier = small_investment_in_revolt_modifier + years = 10 + } + } + else_if = { + limit = { scope:medium_investment_in_revolt = yes } + add_county_modifier = { + modifier = medium_investment_in_revolt_modifier + years = 10 + } + } + else_if = { + limit = { scope:high_investment_in_revolt = yes } + add_county_modifier = { + modifier = high_investment_in_revolt_modifier + years = 10 + } + } + } + } + } + } + } + } + + # for landless adventurers, add the county to a variable list to unlock a unique cb + scope:actor = { + if = { + limit = { + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + laamp_rewards_apply_criminal_xp_effect = { + TRACK = bandit + XP_MIN = gallowsbait_xp_minor_gain + XP_MAX = gallowsbait_xp_medium_gain + } + add_to_variable_list = { + name = war_supported_counties_list + target = scope:chosen_county + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_loss + DESC = clan_unity_forment_revolt.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + ai_frequency_by_tier = { + barony = 0 + county = 120 + duchy = 60 + kingdom = 60 + empire = 60 + hegemony = 60 + } + + ai_potential = { + short_term_gold >= medium_gold_value + OR = { + any_character_struggle = { + has_struggle_phase_parameter = unlocks_incite_revolts_interaction + involvement = involved + OR = { + is_struggle_phase = struggle_iberia_phase_opportunity + is_struggle_phase = struggle_iberia_phase_hostility + } + } + any_character_struggle = { + is_struggle_type = persian_struggle + involvement = involved + } + domicile ?= { + has_domicile_parameter = can_use_incite_revolts + } + } + } + + ai_targets = { + # For the AI, we limit it to neighboring_rulers + ai_recipients = neighboring_rulers + } + + ai_will_do = { + base = -50 # Let's limit it to specific character to avoid pure chaos + + ############### + ## BASE + ############### + + # ai values + modifier = { + ai_vengefulness > 0 + add = ai_vengefulness + } + modifier = { + add = { + value = ai_compassion + multiply = -1 + } + } + + modifier = { + add = { + value = ai_honor + multiply = -1 + } + } + + # intrigue skill points + modifier = { + add = { + value = intrigue + multiply = 3 + } + } + + # diff faith + modifier = { + add = 25 + faith != scope:recipient.faith + } + + # diff culture + modifier = { + add = 25 + + NOT = { + culture = { + OR = { + this = scope:recipient.culture + cultural_acceptance = { target = scope:recipient.culture value >= 90 } + } + } + } + } + + ############### + ## TRAITS + ############### + + # schemer + modifier = { + add = 25 + has_trait = schemer + } + + # intrigue education + modifier = { + add = 25 + OR = { + has_trait = education_intrigue_1 + has_trait = education_intrigue_2 + has_trait = education_intrigue_3 + has_trait = education_intrigue_4 + } + } + + ################ + ## RELATIONSHIP + ################ + + # more likely to do it against rival or nemesis + modifier = { + add = 50 + scope:recipient = { + OR = { + has_relation_rival = scope:actor + has_relation_nemesis = scope:actor + } + } + } + + # boost against liege for Ambitious + modifier = { + add = 50 + scope:actor = { + has_trait = ambitious + is_vassal_of = scope:recipient + } + } + + # never target your friends + modifier = { + add = -1000 + scope:recipient = { + OR = { + has_relation_friend = scope:actor + has_relation_lover = scope:actor + has_relation_soulmate = scope:actor + has_relation_best_friend = scope:actor + } + } + } + } +} + +################################################## +# Contract Assistance +# by Joe Parkin +################################################## + +contract_assistance_interaction = { + category = interaction_category_diplomacy + interface_priority = 15 + common_interaction = yes + interface = interfere_in_war + special_interaction = interfere_in_war_interaction + popup_on_receive = yes + pause_on_receive = yes + + ai_maybe = yes + desc = contract_assistance_interaction_desc + icon = icon_gold + + greeting = positive + notification_text = contract_assistance_interaction_notification + + cooldown_against_recipient = { years = 5 } + + is_shown = { + # Actor is Involved in Struggle + scope:actor = { + NOT = { government_has_flag = government_is_herder } + OR = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = unlocks_contract_assistance_interaction + } + culture = { has_cultural_parameter = unlocks_contract_assistance } + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + # Recipient is Involved in Struggle, at war, and not at war with Actor + scope:recipient = { + trigger_if = { + limit = { + scope:actor = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = unlocks_contract_assistance_interaction + } + } + } + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = unlocks_contract_assistance_interaction + } + } + is_at_war = yes + NOR = { + this = scope:actor + is_at_war_with = scope:actor + } + } + } + + has_valid_target = { + exists = scope:target + } + + has_valid_target_showing_failures_only = { + scope:target = { is_war_leader = scope:recipient } + } + + is_valid_showing_failures_only = { + scope:recipient = { + # Cannot demand gold from allies + NOT = { is_allied_to = scope:actor } + # Cannot rejoin a war you decided to leave + trigger_if = { + limit = { + any_character_war = { + has_variable_list = left_voluntarily + } + } + custom_tooltip = { + text = laamp_war_change_sides_interaction.left_voluntarily + is_target_in_variable_list = { + name = left_voluntarily + target = scope:actor + } + } + } + } + + # Recipient is not in (any) war against your liege(s) + trigger_if = { + limit = { exists = scope:actor.liege } + custom_description = { + text = join_war_interaction_recipient_warring_with_my_liege + subject = scope:recipient + scope:actor = { + NOT = { any_liege_or_above = { is_at_war_with = scope:recipient } } + } + } + } + + # Cannot join wars with raised armies + scope:actor = { + has_raised_armies = no + + trigger_if = { + limit = { + has_government = landless_adventurer_government + } + custom_tooltip = { + text = reinforce_soldiers_any_regiment_tt + maa_regiments_count >= 1 + } + } + } + + # Can only contract one war at a time + custom_tooltip = { + text = contract_assistance_war_already_contracted_tt + scope:actor = { NOT = { has_variable = owed_contract_assistance_war } } + } + + # Adventurers can't join wars in places they're exiled from. + custom_tooltip = { + text = the_wake_1 + NOT = { + is_laamp_exiled_from_province_trigger = { + PROVINCE = scope:recipient.capital_province + LAAMP = scope:actor + } + } + } + + # Sensible restrictions to keep CulTrads from making this OP. + scope:recipient = { + custom_tooltip = { + text = contract_assistance_tier_too_high_tt + OR = { + highest_held_title_tier = tier_county + highest_held_title_tier >= scope:actor.highest_held_title_tier + sub_realm_size >= scope:actor.sub_realm_size + } + } + } + scope:actor = { + NOT = { highest_held_title_tier >= tier_empire } + } + } + + can_be_picked = { + # Recipient is war leader in chosen war + scope:target = { + is_war_leader = scope:recipient + # Cannot contract against allies + trigger_if = { + limit = { + any_war_attacker = { this = scope:recipient } + } + NOT = { + any_war_defender = { is_allied_to = scope:actor } + } + } + trigger_else = { + NOT = { + any_war_attacker = { is_allied_to = scope:actor } + } + } + # not already in target war + custom_description = { + text = join_war_interaction_already_in_target_war + NOR = { + any_war_attacker = { this = scope:actor } + any_war_defender = { this = scope:actor } + } + } + } + # Liege checks + can_join_war_liege_vassal_check_trigger = { WARRIOR = scope:recipient JOINER = scope:actor } + } + + is_highlighted = { + scope:actor = { + has_realm_law = camp_purpose_mercenaries + } + } + on_accept = { + # Add Actor to Recipient's war + scope:target = { + hidden_effect = { set_called_to = scope:actor } + if = { + limit = { is_attacker = scope:recipient } + add_attacker = scope:actor + } + else = { add_defender = scope:actor } + } + # Actor effects + scope:actor = { + save_scope_as = contract_assistance_helper + set_variable = { + name = owed_contract_assistance_war + value = scope:target + } + set_variable = { + name = owed_contract_assistance_contribution + value = offer_assistance_interaction_war_contribution_value + } + set_variable = { + name = owed_contract_assistance_gold + value = scope:recipient.offer_assistance_interaction_gold_value + } + stress_impact = { + craven = medium_stress_impact_gain + shy = minor_stress_impact_gain + } + + # Struggle Catalyst + if = { + limit = { + # Verify if vassal used to be independent + any_character_struggle = { + involvement = involved + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_join_war_as_assisant + CHAR = scope:recipient + } + } + } + every_character_struggle = { + involvement = involved + limit = { + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_join_war_as_assisant + CHAR = scope:recipient + } + } + activate_struggle_catalyst = { + catalyst = catalyst_join_war_as_assisant + character = scope:actor + } + } + } + } + # Recipient effects + scope:recipient = { + stress_impact = { + greedy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + custom_tooltip = contract_assistance_interaction_condition_tt + show_as_tooltip = { + pay_short_term_gold = { + target = scope:actor + gold = offer_assistance_interaction_gold_value + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_loss + DESC = clan_unity_contract_assistance.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + # Refusal notification + scope:actor = { trigger_event = char_interaction.0236 } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:recipient + TARGET = scope:actor + VALUE = minor_unity_gain + DESC = clan_unity_contract_assistance_decline.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + ai_accept = { + base = 0 # Reluctant to spend money without good reason + # Recipient already winning war + modifier = { + add = -50 + trigger_if = { + limit = { exists = scope:target } + scope:target = { fp2_struggle_contract_assistance_war_winning_trigger = yes } + } + trigger_else = { + any_character_war = { + count = all # So predicted negative modifiers are treated seperately + fp2_struggle_contract_assistance_war_winning_trigger = yes + } + } + desc = OA_AI_WINNING_WAR_REASON + } + # Recipient losing war + modifier = { + add = 50 + trigger_if = { + limit = { exists = scope:target } + scope:target = { fp2_struggle_contract_assistance_war_losing_trigger = yes } + } + trigger_else = { + any_character_war = { fp2_struggle_contract_assistance_war_losing_trigger = yes } + } + desc = OA_AI_LOSING_WAR_REASON + } + # Recipient already significantly outnumbers enemy + modifier = { + add = -50 + trigger_if = { + limit = { exists = scope:target } + scope:target = { fp2_struggle_contract_assistance_war_outnumbering_trigger = yes } + } + trigger_else = { + any_character_war = { + count = all # So predicted negative modifiers are treated seperately + fp2_struggle_contract_assistance_war_outnumbering_trigger = yes + } + } + desc = OA_AI_OUTNUMBER_ENEMY_REASON + } + # Recipient is outnumbered + modifier = { + add = 50 + trigger_if = { + limit = { exists = scope:target } + scope:target = { + fp2_struggle_contract_assistance_war_outnumbered_minor_trigger = yes + NOT = { fp2_struggle_contract_assistance_war_outnumbered_trigger = yes } + } + } + trigger_else = { + any_character_war = { + fp2_struggle_contract_assistance_war_outnumbered_minor_trigger = yes + NOT = { fp2_struggle_contract_assistance_war_outnumbered_trigger = yes } + } + } + desc = OA_AI_OUTNUMBERED_MINOR_REASON + } + # Recipient is very outnumbered + modifier = { + add = 125 + trigger_if = { + limit = { exists = scope:target } + scope:target = { fp2_struggle_contract_assistance_war_outnumbered_trigger = yes } + } + trigger_else = { + any_character_war = { fp2_struggle_contract_assistance_war_outnumbered_trigger = yes } + } + desc = OA_AI_OUTNUMBERED_REASON + } + # Recipient has low cash + modifier = { + add = { + value = -50 + if = { + limit = { + gold < 0 + } + add = -100 + } + if = { + limit = { + debt_level >= 2 + } + add = -200 + } + if = { # Very generous or vengeful characters *will* make poor decisions + limit = { + OR = { + ai_greed <= -50 + ai_vengefulness >= 50 + } + } + multiply = 0.5 + } + } + gold < offer_assistance_interaction_gold_value + desc = OA_AI_CANNOT_AFFORD_REASON + } + # Recipient has a lot of cash + modifier = { + add = { + value = 25 + if = { + limit = { + gold >= { + value = offer_assistance_interaction_gold_value + multiply = 2 + } + } + add = 50 + } + if = { + limit = { + gold >= { + value = offer_assistance_interaction_gold_value + multiply = 3 + } + } + add = 50 + } + } + gold >= offer_assistance_interaction_gold_value + desc = OA_AI_EXTRA_GOLD_REASON + } + # Actor's troops would be little help + modifier = { + add = -50 + trigger_if = { + limit = { exists = scope:target } + scope:target = { fp2_struggle_contract_assistance_war_insufficient_trigger = yes } + } + trigger_else = { + any_character_war = { + count = all # So predicted negative modifiers are treated seperately + fp2_struggle_contract_assistance_war_insufficient_trigger = yes + } + } + desc = OA_AI_FEW_TROOPS_REASON + } + # Recipient is fighting a defensive war + modifier = { + add = 25 + trigger_if = { + limit = { exists = scope:target } + scope:target.casus_belli.primary_defender = scope:recipient + } + trigger_else = { + scope:recipient = { + any_character_war = { primary_defender = scope:recipient } + } + } + desc = OA_AI_DEFENSIVE_WAR_REASON + } + # Recipient is not interested in help for certain wars + modifier = { + add = -300 + exists = scope:target + scope:target = { + OR = { + using_cb = peasant_war + using_cb = fp2_border_raid + } + } + desc = OA_AI_UNINTERESTED_WAR_REASON + } + modifier = { + add = { + value = scope:actor.martial + multiply = 2 + } + scope:actor = { martial >= 12 } + desc = OA_AI_MARTIAL_REASON + } + modifier = { + add = -50 + scope:actor = { has_character_flag = fp2_contract_assistance_failure } + desc = OA_AI_FAILURE_REASON + } + # Opinion Factor + opinion_modifier = { + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.25 + desc = AI_OPINION_REASON + } + + modifier = { + add = { + value = ai_greed + multiply = -0.2 + } + ai_greed <= 0.5 + desc = AI_VALUE_MODIFIER_GREED + } + + modifier = { + add = { + value = ai_boldness + multiply = -0.2 + } + NOT = { ai_boldness = 0 } + desc = AI_VALUE_MODIFIER_BOLDNESS + } + + modifier = { + add = 50 + desc = camp_purpose_mercenaries_reason + scope:actor = { + has_realm_law = camp_purpose_mercenaries + } + } + # Allegiances + # fp2_contracting_ally_modifier = { + # WARMONGER = scope:recipient + # WARJOINER = scope:actor + # } + } + + ai_potential = { + is_imprisoned = no + is_at_war = no + ai_boldness >= -25 + current_military_strength >= 500 + } + ai_target_quick_trigger = { adult = yes } + ai_targets = { + ai_recipients = neighboring_rulers + } + + ai_set_target = { + scope:recipient = { + ordered_character_war = { #We offer our services for the war where the character is losing the most + limit = { + is_war_leader = prev + NOR = { + any_war_attacker = { this = scope:actor } + any_war_defender = { this = scope:actor } + } + save_temporary_scope_as = target + can_join_war_liege_vassal_check_trigger = { WARRIOR = scope:recipient JOINER = scope:actor } + } + order_by = { + value = 0 + add = { + if = { + limit = { any_war_attacker = { this = scope:recipient } } + subtract = attacker_war_score + } + else = { + subtract = defender_war_score + } + } + } + save_scope_as = target + } + } + } + + ai_targets = { + ai_recipients = peer_vassals + } + # We need a quite high frequency as wars do not last forever + ai_frequency_by_tier = { + barony = 0 + county = 24 + duchy = 24 + kingdom = 12 + empire = 12 + hegemony = 12 + } + + ai_will_do = { + base = 0 + + modifier = { # Increase chance if recipient is losing a war + trigger_if = { + limit = { exists = scope:target } + scope:target = { fp2_struggle_contract_assistance_war_losing_trigger = yes } + } + add = 25 + } + + modifier = { # Increase chance with amount of gold of recipient over interaction cost + factor = offer_assistance_interaction_gold_modifier_value + } + + modifier = { # Increase chance if likes recipient more than enemy + scope:actor = { + save_temporary_opinion_value_as = { + name = contract_assistance_actor_opinion + target = scope:recipient + } + } + trigger_if = { + limit = { exists = scope:target } + scope:target = { + any_war_participant = { + is_leader_in_war = scope:target + this != scope:recipient + reverse_opinion = { + target = scope:actor + value < scope:contract_assistance_actor_opinion + } + } + } + } + add = 25 + } + + modifier = { # Increase chance for family + scope:recipient = { + OR = { + dynasty = scope:actor.dynasty + is_consort_of = scope:actor + } + } + add = 25 + } + + modifier = { # Decrease chance if army is small + trigger_if = { + limit = { exists = scope:target } + scope:target = { fp2_struggle_contract_assistance_war_insufficient_trigger = yes } + } + add = -50 + } + + modifier = { # Increase chance for rivalry + trigger_if = { + limit = { exists = scope:target } + scope:target = { + any_war_participant = { + is_leader_in_war = scope:target + this != scope:recipient + has_relation_rival = scope:actor + } + } + } + add = 25 + } + + # Higher chance to target a human player + modifier = { + scope:recipient = { is_ai = no } + factor = 2 + } + } +} + +################################################## +# Request Contract Assistance +# by Maxence Voleau +################################################## + +request_contract_assistance_interaction = { + category = interaction_category_diplomacy + interface_priority = 15 + common_interaction = yes + interface = call_ally + special_interaction = call_ally_interaction + popup_on_receive = yes + pause_on_receive = yes + + ai_maybe = yes + desc = request_contract_assistance_interaction_desc + icon = icon_gold + + greeting = positive + notification_text = request_contract_assistance_interaction_notification + + cooldown_against_recipient = { years = 5 } + + is_shown = { + # Actor is Involved in Struggle + scope:actor = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = unlocks_contract_assistance_interaction + } + is_at_war = yes + NOR = { + this = scope:recipient + is_at_war_with = scope:recipient + } + } + # Recipient is Involved in Struggle, at war, and not at war with Actor + scope:recipient = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = unlocks_contract_assistance_interaction + } + } + } + + has_valid_target = { + exists = scope:target + } + + has_valid_target_showing_failures_only = { + scope:target = { + is_war_leader = scope:actor + + # Cannot contract against allies + trigger_if = { + limit = { + any_war_attacker = { this = scope:recipient } + } + NOT = { + any_war_defender = { is_allied_to = scope:actor } + } + } + trigger_else = { + NOT = { + any_war_attacker = { is_allied_to = scope:actor } + } + } + } + + # Adventurers can't join wars in places they're exiled from. + trigger_if = { + limit = { + scope:actor = { top_liege != this } + } + custom_tooltip = { + text = the_wake_1 + NOT = { + is_laamp_exiled_from_province_trigger = { + PROVINCE = scope:actor.capital_province + LAAMP = scope:recipient + } + } + } + } + } + + is_valid_showing_failures_only = { + scope:recipient = { + # Cannot demand gold from allies + NOT = { is_allied_to = scope:actor } + } + # Actor is not in (any) war against Recipient's liege(s) + trigger_if = { + limit = { exists = scope:recipient.liege } + custom_description = { + text = join_war_interaction_recipient_warring_with_my_liege + subject = scope:actor + scope:recipient = { + NOT = { + any_liege_or_above = { is_at_war_with = scope:actor } + } + } + } + } + + # Cannot join wars with raised armies + scope:recipient = { has_raised_armies = no } + + # Can only contract one war at a time + custom_tooltip = { + text = contract_assistance_war_already_contracted_tt + scope:recipient = { + NOT = { has_variable = owed_contract_assistance_war } + } + } + } + + can_be_picked = { + # Recipient is war leader in chosen war + scope:target = { + is_war_leader = scope:actor + # not already in target war + custom_description = { + text = join_war_interaction_already_in_target_war + NOR = { + any_war_attacker = { this = scope:recipient } + any_war_defender = { this = scope:recipient } + } + } + } + # Liege checks + can_join_war_liege_vassal_check_trigger = { WARRIOR = scope:actor JOINER = scope:recipient } + } + + on_accept = { + # Add Actor to Recipient's war + scope:target = { + hidden_effect = { set_called_to = scope:recipient } + if = { + limit = { is_attacker = scope:actor } + add_attacker = scope:recipient + } + else = { add_defender = scope:recipient } + } + # Actor effects + scope:recipient = { + save_scope_as = contract_assistance_helper + set_variable = { + name = owed_contract_assistance_war + value = scope:target + } + set_variable = { + name = owed_contract_assistance_contribution + value = offer_assistance_interaction_war_contribution_value + } + set_variable = { + name = owed_contract_assistance_gold + value = offer_assistance_interaction_gold_value + } + stress_impact = { + craven = medium_stress_impact_gain + shy = minor_stress_impact_gain + } + + + # Struggle Catalyst + if = { + limit = { + # Verify if vassal used to be independent + any_character_struggle = { + involvement = involved + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_join_war_as_assisant + CHAR = scope:recipient + } + } + } + every_character_struggle = { + involvement = involved + limit = { + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_join_war_as_assisant + CHAR = scope:recipient + } + } + activate_struggle_catalyst = { + catalyst = catalyst_join_war_as_assisant + character = scope:recipient + } + } + } + } + # Recipient effects + scope:actor = { + stress_impact = { + greedy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + custom_tooltip = request_contract_assistance_interaction_condition_tt + show_as_tooltip = { + pay_short_term_gold = { + target = scope:recipient + gold = offer_assistance_interaction_gold_value + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_loss + DESC = clan_unity_request_assistance.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + # Refusal notification + scope:actor = { trigger_event = char_interaction.0236 } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:recipient + TARGET = scope:actor + VALUE = minor_unity_gain + DESC = clan_unity_request_assistance_decline.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + ai_accept = { + base = 0 # Reluctant to spend money without good reason + + # Recipient has low cash + modifier = { + add = { + value = 25 + if = { + limit = { + gold < 0 + } + add = { + value = 25 + multiply = debt_level + } + } + if = { # Very generous or vengeful characters *will* make poor decisions + limit = { + OR = { + ai_greed <= -50 + ai_vengefulness >= 50 + } + } + multiply = 0.5 + } + } + desc = AI_VALUE_MODIFIER_GREED + } + # Recipient has a lot of cash + modifier = { + add = { + value = -25 + if = { + limit = { + gold >= { + value = offer_assistance_interaction_gold_value + multiply = 2 + } + } + add = -50 + } + if = { + limit = { + gold >= { + value = offer_assistance_interaction_gold_value + multiply = 3 + } + } + add = -50 + } + } + gold >= offer_assistance_interaction_gold_value + desc = OA_AI_EXTRA_GOLD_REASON + } + # Recipient is not interested in help for certain wars + modifier = { + add = -500 + exists = scope:target + scope:target = { + OR = { + using_cb = peasant_war + using_cb = fp2_border_raid + } + } + desc = OA_AI_UNINTERESTED_WAR_REASON + } + modifier = { + add = { + value = scope:actor.martial + multiply = 2 + } + scope:actor = { martial >= 12 } + desc = OA_AI_MARTIAL_REASON + } + modifier = { + add = -50 + scope:recipient = { has_character_flag = fp2_contract_assistance_failure } + desc = OA_AI_FAILURE_REASON + } + # Opinion Factor + opinion_modifier = { + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.25 + desc = AI_OPINION_REASON + } + + modifier = { + add = { + value = ai_greed + multiply = 0.2 + } + ai_greed <= 0.5 + desc = AI_VALUE_MODIFIER_GREED + } + + modifier = { + add = { + value = ai_boldness + multiply = 0.2 + } + NOT = { ai_boldness = 0 } + desc = AI_VALUE_MODIFIER_BOLDNESS + } + + # Allegiances + fp2_contracting_ally_modifier = { + WARMONGER = scope:actor + WARJOINER = scope:recipient + } + } + + ai_potential = { + # the AI cannot use it for now so let's block it + is_imprisoned = no + is_at_war = no + gold >= ai_war_chest_desired_gold_value + } + ai_target_quick_trigger = { adult = yes } + ai_targets = { + ai_recipients = neighboring_rulers + } + + ai_set_target = { + scope:actor = { + ordered_character_war = { #We offer our services for the war where the character is losing the most + limit = { + is_war_leader = prev + NOR = { + any_war_attacker = { this = scope:recipient } + any_war_defender = { this = scope:recipient } + } + save_temporary_scope_as = target + can_join_war_liege_vassal_check_trigger = { WARRIOR = scope:actor JOINER = scope:recipient } + } + order_by = { + value = 0 + add = { + if = { + limit = { any_war_attacker = { this = scope:actor } } + subtract = attacker_war_score + } + else = { + subtract = defender_war_score + } + } + } + save_scope_as = target + } + } + } + + ai_targets = { + ai_recipients = peer_vassals + } + ai_frequency_by_tier = { + barony = 0 + county = 48 + duchy = 36 + kingdom = 36 + empire = 36 + hegemony = 0 + } + + ai_will_do = { + base = 0 + + modifier = { # AI is losing the war + trigger_if = { + limit = { exists = scope:target } + scope:target = { + trigger_if = { + limit = { + scope:actor = { is_attacker_in_war = prev } + } + defender_war_score >= offer_assistance_interaction_already_losing_value + } + trigger_else = { attacker_war_score >= offer_assistance_interaction_already_losing_value } + } + } + add = 15 + } + + modifier = { # Increase chance for asking family + scope:recipient = { + OR = { + dynasty = scope:actor.dynasty + is_consort_of = scope:actor + } + } + factor = 2 + } + + modifier = { # Decrease chance if army is small + trigger_if = { + limit = { exists = scope:target } + scope:target = { + trigger_if = { + limit = { + scope:recipient = { is_attacker_in_war = prev } + } + scope:actor.max_military_strength < war_defender_total_strength_tenth_value + } + trigger_else = { scope:actor.max_military_strength < war_attacker_total_strength_tenth_value } + } + } + add = -50 + } + + modifier = { # Increase chance for rivalry + trigger_if = { + limit = { exists = scope:target } + scope:target = { + any_war_participant = { + is_leader_in_war = scope:target + this != scope:actor + has_relation_rival = scope:recipient + } + } + } + add = 25 + } + + modifier = { # AI is extremely rich + short_term_gold >= ai_war_chest_desired_gold_value + add = 50 + } + } +} + +################################################## +# Enforce Truce +# by Joe Parkin +################################################## + +enforce_truce_interaction = { + category = interaction_category_diplomacy + interface_priority = 30 + common_interaction = yes + interface = interfere_in_war + special_interaction = interfere_in_war_interaction + popup_on_receive = yes + desc = enforce_truce_interaction_desc + icon = icon_retreat + + greeting = positive + notification_text = enforce_truce_interaction_notification + + cooldown = { years = 5 } + + is_shown = { + OR = { + # During the Struggle + AND = { + scope:actor = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = unlocks_enforce_truces_interaction + + } + primary_title.tier >= tier_duchy + } + scope:recipient = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = unlocks_enforce_truces_interaction + + } + tier_difference = { + target = scope:actor + value <= 0 + } + } + } + # Comrpomise ending + AND = { + scope:actor = { + primary_title.tier >= tier_duchy + exists = house + house = { + has_house_modifier = fp2_struggle_compromise_house_reward_modifier + } + } + scope:recipient = { # Primary title in Iberia + exists = house + house = { + has_house_modifier = fp2_struggle_compromise_house_reward_modifier + } + tier_difference = { + target = scope:actor + value <= 0 + } + } + } + } + } + + is_valid_showing_failures_only = { + scope:recipient = { + is_at_war = yes + trigger_if = { + limit = { + scope:actor = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = unlocks_enforce_truces_interaction + is_secondary_character_involvement_involved_trigger = { CHAR = scope:recipient } + } + } + } + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = unlocks_enforce_truces_interaction + } + } + trigger_else = { + exists = house + house = { + has_house_modifier = fp2_struggle_compromise_house_reward_modifier + } + } + + custom_tooltip = { + text = fp2_enforce_truce_liege_or_independent_tt + OR = { + top_liege = this + top_liege = scope:actor.top_liege + any_character_war = { + primary_attacker = { + NOR = { + this = scope:recipient + this = scope:actor + } + OR = { + top_liege = this + top_liege = scope:actor.top_liege + } + } + } + any_character_war = { + primary_defender = { + NOR = { + this = scope:recipient + this = scope:actor + } + OR = { + top_liege = this + top_liege = scope:actor.top_liege + } + } + } + } + } + } + } + + can_be_picked = { + # Recipient is war leader in chosen war + exists = scope:target + scope:target = { + is_war_leader = scope:recipient + is_civil_war = no + NOT = { using_cb = fp2_border_raid } + trigger_if = { + limit = { + scope:recipient = { + any_character_struggle = { + involvement = involved + } + } + } + trigger_if = { + limit = { primary_attacker = scope:recipient } + primary_defender = { fp2_struggle_enforce_truce_war_leader_trigger = yes } + } + trigger_else = { + primary_attacker = { fp2_struggle_enforce_truce_war_leader_trigger = yes } + } + } + trigger_else = { + scope:recipient = { + capital_county.title_province = { geographical_region = world_europe_west_iberia } + } + } + + } + } + + on_accept = { + # End war and apply opinion/stress + if = { + limit = { exists = scope:target } + scope:target = { + primary_attacker = { save_scope_as = truce_1 } + primary_defender = { save_scope_as = truce_2 } + } + show_as_tooltip = { + scope:truce_1 = { add_prestige = minor_prestige_loss } + scope:truce_2 = { add_prestige = minor_prestige_loss } + } + scope:actor = { + fp2_enforce_truce_opinion_effect = yes + # Best format for interaction interface + show_as_tooltip = { + scope:truce_1 = { + add_truce_one_way = { + character = scope:truce_2 + years = fp2_enforce_truce_duration_value + name = TRUCE_ENFORCE_TRUCE + } + } + scope:truce_2 = { + add_truce_one_way = { + character = scope:truce_1 + years = fp2_enforce_truce_duration_value + name = TRUCE_ENFORCE_TRUCE + } + } + } + custom_tooltip = fp2_enforce_truce_peacemaker_tt + hidden_effect = { + add_truce_one_way = { + character = scope:target.primary_attacker + years = fp2_enforce_truce_duration_value + name = TRUCE_ENFORCE_TRUCE + } + add_truce_one_way = { + character = scope:target.primary_defender + years = fp2_enforce_truce_duration_value + name = TRUCE_ENFORCE_TRUCE + } + # Best format for toast + send_interface_message = { + type = event_truce_neutral + title = enforce_truce_interaction_actor_toast + left_icon = scope:truce_1 + right_icon = scope:truce_2 + show_as_tooltip = { fp2_enforce_truce_opinion_effect = yes } + custom_tooltip = fp2_enforce_truce_other_tt + custom_tooltip = fp2_enforce_truce_peacemaker_tt + } + } + } + hidden_effect = { + scope:truce_1 = { + send_interface_message = { + type = event_truce_neutral + title = enforce_truce_interaction_toast + left_icon = scope:actor + right_icon = scope:truce_2 + add_prestige = minor_prestige_loss + show_as_tooltip = { + scope:target = { end_war = white_peace } + add_truce_both_ways = { + character = scope:truce_2 + years = fp2_enforce_truce_duration_value + name = TRUCE_ENFORCE_TRUCE + } + scope:actor = { + add_truce_one_way = { + character = scope:truce_1 + years = fp2_enforce_truce_duration_value + name = TRUCE_ENFORCE_TRUCE + } + } + } + stress_impact = { + wrathful = minor_stress_impact_gain + brave = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + } + } + scope:truce_2 = { + send_interface_message = { + type = event_truce_neutral + title = enforce_truce_interaction_toast + left_icon = scope:actor + right_icon = scope:truce_1 + add_prestige = minor_prestige_loss + show_as_tooltip = { + scope:target = { end_war = white_peace } + add_truce_both_ways = { + character = scope:truce_1 + years = fp2_enforce_truce_duration_value + name = TRUCE_ENFORCE_TRUCE + } + scope:actor = { + add_truce_one_way = { + character = scope:truce_2 + years = fp2_enforce_truce_duration_value + name = TRUCE_ENFORCE_TRUCE + } + } + } + stress_impact = { + wrathful = minor_stress_impact_gain + brave = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + } + } + } + scope:target = { end_war = white_peace } + if = { + limit = { + scope:actor = { + any_character_struggle = { + involvement = involved + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_truce_was_enforced + CHAR = scope:target + } + } + } + } + every_character_struggle = { + involvement = involved + activate_struggle_catalyst = { + catalyst = catalyst_truce_was_enforced + character = scope:actor + } + } + + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_gain + DESC = clan_unity_enforce_truce.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + # Refusal notification + scope:actor = { trigger_event = char_interaction.0236 } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:recipient + TARGET = scope:actor + VALUE = medium_unity_loss + DESC = clan_unity_enforce_truce_decline.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + ai_accept = { + base = -50 # Reluctant to end war without reason + # Recipient only just begun + modifier = { + add = -25 + trigger_if = { + limit = { exists = scope:target } + scope:target.war_days < 180 + } + trigger_else = { always = no } + desc = ET_AI_WAR_NEW_REASON + } + # Recipient drags on + modifier = { + add = 25 + trigger_if = { + limit = { exists = scope:target } + scope:target.war_days > 1095 + } + trigger_else = { always = no } + desc = ET_AI_WAR_OLD_REASON + } + # Recipient is defender + modifier = { + add = 25 + trigger_if = { + limit = { exists = scope:target } + scope:recipient = scope:target.primary_defender + } + trigger_else = { always = no } + desc = OA_AI_DEFENSIVE_WAR_REASON + } + # Recipient drags on + modifier = { + add = 25 + scope:recipient = { is_allied_to = scope:actor } + desc = ET_AI_ALLY_REASON + } + # Recipient is vassal + modifier = { + add = 25 + scope:recipient = { target_is_liege_or_above = scope:actor } + desc = ET_AI_LIEGE_REASON + } + # Recipient is losing + modifier = { + add = 25 + trigger_if = { + limit = { exists = scope:target } + trigger_if = { + limit = { scope:recipient = scope:target.primary_defender } + scope:target = { attacker_war_score >= fp2_enforce_truce_war_score_value } + } + trigger_else = { + scope:target = { defender_war_score >= fp2_enforce_truce_war_score_value } + } + } + trigger_else = { always = no } + desc = OA_AI_LOSING_WAR_REASON + } + # Recipient is very outnumbered + modifier = { + add = 25 + trigger_if = { + limit = { exists = scope:target } + scope:target = { fp2_struggle_contract_assistance_war_outnumbered_trigger = yes } + } + trigger_else = { + any_character_war = { fp2_struggle_contract_assistance_war_outnumbered_trigger = yes } + } + desc = OA_AI_OUTNUMBERED_REASON + } + # Recipient is very outnumbered + modifier = { + add = -25 + trigger_if = { + limit = { exists = scope:target } + scope:target = { fp2_struggle_contract_assistance_war_outnumbering_trigger = yes } + } + trigger_else = { + any_character_war = { fp2_struggle_contract_assistance_war_outnumbering_trigger = yes } + } + desc = OA_AI_OUTNUMBER_ENEMY_REASON + } + # Actor cannot enforce truce + modifier = { + add = -50 + trigger_if = { + limit = { exists = scope:target } + OR = { + scope:target.war_attacker_total_strength_halved_value > scope:actor.max_military_strength + scope:target.war_defender_total_strength_halved_value > scope:actor.max_military_strength + } + } + trigger_else = { always = no } + desc = ET_AI_SMALL_ARMY_REASON + } + # Recipient holy war + modifier = { + add = -25 + trigger_if = { + limit = { exists = scope:target } + scope:recipient = { + NOT = { has_trait = cynical } + } + scope:target = { + OR = { + using_cb = minor_religious_war + using_cb = religious_war + using_cb = major_religious_war + } + } + } + trigger_else = { always = no } + desc = ET_AI_HOLY_WAR_REASON + } + # Actor is religious head + modifier = { + add = 25 + scope:recipient.faith.religious_head = scope:actor + desc = ET_AI_HOF_REASON + } + # Dynasty head + modifier = { + add = 50 + scope:recipient.dynasty.dynast = scope:actor + desc = ET_AI_DYNAST_REASON + } + # House head + modifier = { + add = 25 + scope:recipient.dynasty.dynast != scope:actor + scope:recipient.house.house_head = scope:actor + desc = ET_AI_HOUSE_HEAD_REASON + } + # Opinion Factor + opinion_modifier = { + who = scope:recipient + opinion_target = scope:actor + multiplier = 1 + desc = AI_OPINION_REASON + } + # Honor factor + ai_value_modifier = { + ai_boldness = -0.5 + max = 0 + } + } + + ai_potential = { + is_imprisoned = no + } + ai_target_quick_trigger = { adult = yes } + ai_targets = { + ai_recipients = neighboring_rulers + ai_recipients = peer_vassals + max = 15 + } + ai_frequency_by_tier = { + barony = 0 + county = 72 + duchy = 36 + kingdom = 24 + empire = 24 + hegemony = 24 + } +} + +################################################## +# Bargain Fealty +# by Joe Parkin +################################################## + +bargain_fealty_interaction = { + category = interaction_category_diplomacy + desc = bargain_fealty_interaction_desc + interface_priority = 60 + interface = call_ally + special_interaction = call_ally_interaction + popup_on_receive = yes + pause_on_receive = yes + + icon = icon_vassal + greeting = positive + notification_text = bargain_fealty_interaction_notification + + cooldown_against_recipient = { years = 5 } + + is_shown = { + # Actor is Involved in Struggle + scope:actor = { + any_character_struggle = { + involvement = involved + struggle_can_access_unlocks_bargain_fealty_interaction_trigger = yes + } + top_liege = this + is_at_war = yes + any_character_war = { + is_war_leader = prev + primary_defender = prev + } + trigger_if = { + limit = { + scope:recipient = { + is_landless_ruler = no + } + } + tier_difference = { + target = scope:recipient + value <= -1 + } + } + trigger_else = { + tier_difference = { + target = scope:recipient + value <= -2 + } + } + } + # Recipient is not at war with Actor + scope:recipient = { + any_neighboring_and_across_water_top_liege_realm_owner = { this = scope:actor } + primary_title = { is_mercenary_company = no } + NOR = { + this = scope:actor + is_at_war_with = scope:actor + } + } + } + + is_valid_showing_failures_only = { + scope:actor = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = unlocks_bargain_fealty_interaction + } + } + } + + can_be_picked = { + # Actor is war leader in chosen war + exists = scope:target + scope:target = { + is_war_leader = scope:actor + primary_defender = scope:actor + custom_tooltip = { + text = bargain_fealty_border_raid_tt + NOT = { using_cb = fp2_border_raid } + } + custom_tooltip = { + text = bargain_fealty_struggle_clash_tt + NOT = { using_cb = county_struggle_cb } + } + } + # Actor is not involved in a war involving Recipient + joiner_not_already_in_another_war_with_any_target_war_participants_trigger = { + WARRIOR = scope:actor + JOINER = scope:recipient + } + } + + on_accept = { + if = { + limit = { exists = scope:target } + # Add Recipient to Actor's war + scope:target = { + hidden_effect = { set_called_to = scope:recipient } + if = { + limit = { is_attacker = scope:actor } + add_attacker = scope:recipient + } + else = { add_defender = scope:recipient } + } + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + } + scope:actor = { + change_liege = { + liege = scope:recipient + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + # Actor effects + scope:actor = { + stress_impact = { + arrogant = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + } + # Recipient effects + scope:recipient = { + stress_impact = { + greedy = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + } + } + else = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_neutral + title = war_ended_before_response + left_icon = scope:recipient + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_gain + DESC = clan_unity_bargained_fealty.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + # Refusal notification + scope:actor = { trigger_event = char_interaction.0236 } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:recipient + TARGET = scope:actor + VALUE = minor_unity_loss + DESC = clan_unity_bargain_fealty_refusal.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + ai_accept = { + base = 25 + # Recipient would be very outnumbered + modifier = { + add = -75 + exists = scope:target + scope:target = { fp2_bargain_fealty_war_outnumbered_trigger = yes } + desc = BF_AI_OUTNUMBERED_REASON + } + # Actor is same culture as recipient + modifier = { + add = -10 + scope:actor.culture != scope:recipient.culture + desc = BF_AI_DIFFERENT_CULTURE_REASON + } + # Actor is same faith as recipient + modifier = { + add = -15 + scope:actor.faith != scope:recipient.faith + desc = BF_AI_DIFFERENT_FAITH_REASON + } + # Actor is de jure vassal of recipient + modifier = { + add = 25 + scope:actor = { + any_held_title = { target_is_de_jure_liege_or_above = scope:recipient.primary_title } + } + desc = BF_AI_DE_JURE_REASON + } + # Actor is de jure vassal of recipient + modifier = { + add = 25 + scope:actor.dynasty = scope:recipient.dynasty + desc = BF_AI_SAME_DYNASTY_REASON + } + # Too big to be vassal + modifier = { + add = -50 + scope:actor.realm_size >= fp2_bargain_fealty_half_realm_size_value + desc = BF_AI_TOO_LARGE_REASON + } + # Opinion Factor + opinion_modifier = { + who = scope:recipient + opinion_target = scope:actor + multiplier = 1 + desc = AI_OPINION_REASON + } + + ai_value_modifier = { + ai_boldness = 1 + max = 0 + } + + ai_value_modifier = { + ai_greed = 1 + max = 0 + } + + modifier = { + add = { + value = ai_greed + multiply = 2 + } + ai_greed >= 1 + desc = AI_VALUE_MODIFIER_GREED + } + + modifier = { + add = { + value = ai_boldness + multiply = 2 + } + NOT = { ai_boldness = 0 } + desc = AI_VALUE_MODIFIER_BOLDNESS + } + } + ai_will_do = { + base = 5 + modifier = { + add = 20 + any_character_war = { + is_war_leader = prev + primary_defender = prev + NOR = { + using_cb = fp2_border_raid + using_cb = county_struggle_cb + } + casus_belli = { + any_target_title = { holder = scope:actor } + } + } + } + modifier = { + factor = 2 + any_character_war = { + is_war_leader = prev + primary_defender = prev + NOR = { + using_cb = fp2_border_raid + using_cb = county_struggle_cb + } + war_defender_total_strength_value < war_attacker_total_strength_halved_value + } + } + } + ai_potential = { is_imprisoned = no } + ai_target_quick_trigger = { adult = yes } + ai_targets = { ai_recipients = neighboring_rulers } + ai_frequency_by_tier = { + barony = 0 + county = 36 + duchy = 36 + kingdom = 0 + empire = 0 + hegemony = 0 + } +} + +################################################## +# Invite Foreign Ruler to Feast / Hunt +# by Maxence Voleau +################################################## + +invite_foreign_ruler_to = { + interface_priority = 30 + category = interaction_category_diplomacy + common_interaction = yes + desc = invite_foreign_ruler_to_desc + icon = activity_feast + greeting = positive + notification_text = INVITE_FOREIGN_RULER_TO_NOTIFICATION + popup_on_receive = yes + ai_maybe = yes + + cooldown = { years = 1 } + cooldown_against_recipient = { years = 5 } + + is_shown = { + # Interaction deprecated by new activity planning system + always = no + + scope:actor != scope:recipient + # Scope:actor needs to either be involved in certain struggle types or else have a specific perk. + scope:actor = { + any_character_struggle = { + involvement = involved + is_struggle_type = iberian_struggle +} + } + # Scope:recipient must be landed, and neither over or under scope:actor. + scope:recipient = { + any_character_struggle = { + involvement = involved + is_struggle_type = iberian_struggle + } + is_playable_character = yes + NOR = { + any_liege_or_above = { this = scope:actor } + any_vassal_or_below = { this = scope:actor } + } + } + } + + is_valid_showing_failures_only = { + # Scope:actor must be an available adult. + scope:actor = { is_available_adult = yes } + # Scope:recipient must be at least available. + scope:recipient = { is_available_adult = yes } + # Make sure that scope:actor is going into this with a clean, no-recent/active/forbidden hostilities mindset. + scope:actor = { + NOT = { + is_at_war_with = scope:recipient + # Involved characters can't be on opposite sides in an active war. + } + } + + # Verify that you can start one of the decision + # interaction deprecated by new activity planning system + # custom_description = { + # text = no_activity_available + # scope:actor = { + # OR = { + # can_execute_decision = start_hunt_decision + # can_execute_decision = host_feast_decision + # } + # } + # } + } + + on_accept = { + # Notifications with most effects. + if = { + limit = { scope:invite_to_hunt = yes } + scope:actor = { + set_variable = { + name = special_guest + value = scope:recipient + } + show_as_tooltip = { + remove_short_term_gold = hunt_activity_base_cost + } + send_interface_toast = { + type = event_toast_effect_good + title = invited_to_hunt.accept.actor.tt + left_icon = scope:recipient + progress_towards_friend_effect = { + REASON = friend_invited_to_hunt + CHARACTER = scope:recipient + OPINION = 0 + } + custom_tooltip = invite_foreign_ruler_to.hunt.tooltip + # interaction deprecated by new activity planning system + #execute_decision = start_hunt_decision + } + } + scope:recipient = { + send_interface_toast = { + title = invited_to_hunt.accept.recipient.tt + left_icon = scope:actor + } + } + } + else_if = { + limit = { scope:invite_to_feast = yes } + scope:actor = { + set_variable = { + name = special_guest + value = scope:recipient + } + show_as_tooltip = { + remove_short_term_gold = feast_activity_cost + } + send_interface_toast = { + type = event_toast_effect_good + title = invited_to_feast.accept.actor.tt + left_icon = scope:recipient + progress_towards_friend_effect = { + REASON = friend_invited_to_feast + CHARACTER = scope:recipient + OPINION = 0 + } + custom_tooltip = invite_foreign_ruler_to.feast.tooltip + # interaction deprecated by new activity planning system + #execute_decision = host_feast_decision + } + } + scope:recipient = { + send_interface_toast = { + title = invited_to_feast.accept.recipient.tt + left_icon = scope:actor + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_gain + DESC = clan_unity_feast_invite.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + on_decline = { + # Scope:actor gains some stress over the whole ordeal. + scope:actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = invite_foreign_ruler_to.decline.actor.tt + left_icon = scope:recipient + add_prestige = medium_prestige_loss + } + } + # Scope:actor loses opinion of scope:recipient. + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = invite_foreign_ruler_to.decline.recipient.tt + left_icon = scope:actor + reverse_add_opinion = { + target = scope:actor + modifier = refusal_opinion + opinion = -50 + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:recipient + TARGET = scope:actor + VALUE = minor_unity_loss + DESC = clan_unity_feast_invite_decline.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + # Send Options + ## Invite to Hunt + send_option = { + is_valid = { + scope:actor = { + # interaction deprecated by new activity planning system? + #can_execute_decision = start_hunt_decision + } + # as an AI, don't invite human players to Hunt as we are lacking interesting content + trigger_if = { + limit = { scope:actor = { is_ai = yes } } + scope:recipient = { is_ai = yes } + } + } + flag = invite_to_hunt + starts_enabled = { always = yes } + localization = "INVITE_TO_HUNT" + } + ## Invite to Feast + send_option = { + is_valid = { + scope:actor = { + # interaction deprecated by new activity planning system + #can_execute_decision = host_feast_decision + } + } + flag = invite_to_feast + starts_enabled = { always = yes } + localization = "INVITE_TO_FEAST" + } + # AI + ## Standard Acceptance stuff + ai_accept = { + # Try to make it 0 for most interactions. + base = 0 + + # more likely if lower rank than actor + modifier = { + add = 20 + scope:actor.primary_title.tier > primary_title.tier + desc = RANK_DIFFERENCE_REASON + } + + # less likely if that's the opposite + modifier = { + add = -20 + scope:actor.primary_title.tier < primary_title.tier + desc = RANK_DIFFERENCE_REASON + } + + # AI take opinion into account + opinion_modifier = { + who = scope:recipient + opinion_target = scope:actor + multiplier = 1 + desc = AI_OPINION_REASON + } + + # sociability plays a lot as well + ai_value_modifier = { + ai_sociability = 1 + } + + # is rival or nemesis + modifier = { + add = -50 + has_relation_rival = scope:actor + desc = WE_ARE_RIVALS + } + + modifier = { + add = -100 + has_relation_nemesis = scope:actor + desc = WE_ARE_NEMESES + } + + + # is friend + modifier = { + add = 25 + has_relation_friend = scope:actor + desc = WE_ARE_FRIENDS + } + + + # is best friend + modifier = { + add = 50 + has_relation_best_friend = scope:actor + desc = WE_ARE_BEST_FRIENDS + } + + modifier = { + add = 100 + OR = { + has_relation_lover = scope:actor + has_relation_soulmate = scope:actor + } + desc = WE_ARE_LOVERS + } + + # hunters love to hunt + modifier = { + add = 25 + scope:invite_to_hunt = yes + has_trait = lifestyle_hunter + desc = AI_RELEVANT_TRAITS + } + + # reveler loves feasts + modifier = { + add = 25 + scope:invite_to_feast = yes + has_trait = lifestyle_reveler + desc = AI_RELEVANT_TRAITS + } + + # Struggle agenda + modifier = { + desc = AI_STRUGGLE_INTENT + scope:invite_to_feast = yes + scope:recipient = { + any_character_struggle = { + involvement = involved + phase_has_catalyst = catalyst_invite_diff_faith_culture_to_feast + } + } + scope:actor = { + any_character_struggle = { + involvement = involved + phase_has_catalyst = catalyst_invite_diff_faith_culture_to_feast + } + } + NAND = { + scope:actor.faith = scope:recipient.faith + scope:actor.culture = scope:recipient.culture + } + add = { + value = 0 + if = { + limit = { + scope:actor = { + has_character_flag = agenda_towards_deescalation + } + } + add = 100 + } + else_if = { + limit = { + scope:actor = { + has_character_flag = agenda_towards_escalation + } + } + add = -100 + } + } + } + } + ### Performance-enhancement + #ai_potential = { + # is_playable_character = yes + # is_available_at_peace_ai_adult = yes + # is_imprisoned = no + # # Matches the regular minimum triggers. + # any_character_struggle = { involvement = involved } + # short_term_gold > standard_activity_cost + #} + # + #ai_target_quick_trigger = { adult = yes } + #ai_targets = { + # ai_recipients = neighboring_rulers + # ai_recipients = peer_vassals + # max = 10 + #} + ### Frequency + #ai_frequency = 60 + #ai_will_do = { + # base = 0 + # + # # sociability plays a lot as well + # ai_value_modifier = { + # ai_sociability = 1 + # } + # + # # hunters love to hunt + # modifier = { + # add = 25 + # scope:invite_to_hunt = yes + # has_trait = lifestyle_hunter + # } + # + # # small boost if no firends + # modifier = { + # add = 25 + # num_of_relation_friend = 0 + # } + # # reveler loves feasts + # modifier = { + # add = 25 + # scope:invite_to_feast = yes + # has_trait = lifestyle_reveler + # } + # + # # From Hunt decision + # ai_value_modifier = { + # ai_energy = 1 + # ai_greed = -0.5 + # ai_compassion = -0.5 + # } + # + # modifier = { + # add = 10 + # scope:invite_to_hunt = yes + # has_trait_rank = { + # trait = education_martial + # rank > 0 + # } + # } + # modifier = { + # add = 10 + # scope:invite_to_hunt = yes + # has_trait_rank = { + # trait = education_martial + # rank > 2 + # } + # } + # + # modifier = { + # scope:invite_to_hunt = yes + # add = 35 + # stress > low_stress + # } + # + # # Struggle agenda + # modifier = { + # scope:recipient = { + # any_character_struggle = { + # involvement = involved + # } + # } + # scope:actor = { + # any_character_struggle = { + # involvement = involved + # } + # } + # NAND = { + # scope:actor.faith = scope:recipient.faith + # scope:actor.culture = scope:recipient.culture + # } + # add = { + # value = 0 + # if = { + # limit = { + # scope:actor = { + # any_character_struggle = { + # phase_has_catalyst = catalyst_invite_diff_faith_culture_to_feast + # + # } + # has_character_flag = agenda_towards_escalation + # } + # } + # add = -100 + # } + # else_if = { + # limit = { + # scope:actor = { + # any_character_struggle = { + # phase_has_catalyst = catalyst_invite_diff_faith_culture_to_feast + # } + # } + # } + # add = 100 + # } + # } + # } + #} +} diff --git a/common/character_interactions/06_ep3_laamp_interactions.txt b/common/character_interactions/06_ep3_laamp_interactions.txt new file mode 100644 index 00000000..5446f642 --- /dev/null +++ b/common/character_interactions/06_ep3_laamp_interactions.txt @@ -0,0 +1,7965 @@ +################## +# Purchase Land +# by Joe Parkin +################## + +purchase_land_interaction = { + category = interaction_category_laamp + interface_priority = 30 + icon = purchase_land_interaction + + desc = purchase_land_interaction_desc + target_type = title + target_filter = recipient_de_jure_titles + + cooldown_against_recipient = { years = 10 } + + notification_text = { + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { top_liege != this } + scope:target = { + trigger_if = { + limit = { tier = tier_duchy } + scope:recipient.highest_held_title_tier = tier_duchy + } + trigger_else = { scope:recipient.highest_held_title_tier = tier_county } + } + } + desc = PURCHASE_LAND_PROPOSAL_FELLOW_VASSAL + } + triggered_desc = { + trigger = { + scope:target = { + trigger_if = { + limit = { tier = tier_duchy } + scope:recipient.highest_held_title_tier >= tier_kingdom + } + trigger_else = { scope:recipient.highest_held_title_tier >= tier_duchy } + } + } + desc = PURCHASE_LAND_PROPOSAL_LIEGE + } + desc = PURCHASE_LAND_PROPOSAL + } + } + + popup_on_receive = yes + pause_on_receive = yes + + interface_priority = 60 + ai_min_reply_days = 4 + ai_max_reply_days = 9 + + send_options_exclusive = no + + is_shown = { + has_ep3_dlc_trigger = yes + scope:actor = { + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + scope:recipient = { + is_landed = yes + # Need to own the land/cannot directly buy a governorship (procure estate first) + NOR = { + government_has_flag = government_is_administrative + government_has_flag = government_is_japan_administrative + government_has_flag = government_is_japan_feudal + government_has_flag = government_is_celestial + government_has_flag = government_is_meritocratic + } + } + scope:recipient != scope:actor + } + + has_valid_target = { + custom_tooltip = { #prevent unwanted trigger tooltip + text = blank_line + scope:target ?= { + is_title_created = yes + holder = { + is_ai = yes + this = scope:recipient + } + OR = { #flatten the selection + tier = tier_duchy + tier = tier_county + } + NOR = { + this = scope:recipient.capital_county + this = scope:recipient.capital_county.duchy + } + } + } + } + + send_option = { + flag = offer_gold + localization = purchase_land_interaction_offer_gold + current_description = purchase_land_interaction_offer_gold_desc + } + + send_option = { + flag = hook + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + localization = GENERIC_SPEND_A_HOOK + } + + send_option = { + flag = offer_hook + is_valid = { + NOT = { + scope:recipient = { + has_usable_hook = scope:actor + } + } + } + localization = purchase_land_interaction_offer_hook + current_description = purchase_land_interaction_offer_hook_desc + } + + send_option = { + flag = vassal_obligation + is_shown = { + scope:recipient = { + government_has_flag = government_is_feudal + } + } + localization = purchase_land_interaction_offer_obligations + current_description = purchase_land_interaction_offer_obligations_desc + } + + can_be_picked_title = { + custom_tooltip = { + text = purchase_land_tier_tt + scope:target = { + tier >= tier_county + tier <= tier_duchy + } + } + custom_tooltip = { + text = purchase_land_capital_tt + scope:target != scope:recipient.capital_county + } + custom_tooltip = { + text = purchase_land_primary_tt + scope:target != scope:recipient.primary_title + } + custom_tooltip = { + text = purchase_land_duchy_tt + scope:target = { + trigger_if = { + limit = { tier = tier_duchy } + scope:actor = { + prestige_level >= 3 + } + } + } + } + trigger_if = { + limit = { exists = scope:target.holder } + scope:target.holder = scope:recipient + } + } + + is_valid_showing_failures_only = { + scope:actor = { top_liege = this } + scope:actor = { + prestige_level >= 2 + } + scope:actor = { + NOT = { + has_trait = gallowsbait + } + } + scope:actor = { + NOT = { + has_trait = gallivanter + } + } + scope:recipient = { is_at_war = no } + trigger_if = { # Can't purchase Baronies + limit = { + scope:target ?= { tier = tier_barony } + } + custom_description = { + text = purchase_land_barony_tt + always = no + } + } + trigger_if = { # Can't purchase Kingdoms or Empires + limit = { + scope:target ?= { tier >= tier_kingdom } + } + custom_description = { + text = purchase_land_kingdom_tt + always = no + } + } + trigger_if = { # Can't purchase HoF titles + limit = { + scope:target ?= { is_head_of_faith = yes } + } + custom_description = { + text = purchase_land_religious_tt + always = no + } + } + trigger_if = { # Can't purchase nf titles + limit = { + scope:target ?= { is_noble_family_title = yes } + } + custom_description = { + text = purchase_land_noble_family_tt + always = no + } + } + trigger_if = { # Can't purchase laamp titles + limit = { + scope:target ?= { has_variable = adventurer_creation_reason } + } + custom_description = { + text = purchase_land_landless_adventurer_tt + always = no + } + } + trigger_if = { + limit = { + scope:recipient = { + any_held_county = { count < 2 } + } + } + custom_description = { + text = purchase_land_minimum_county_tt + object = scope:recipient + always = no + } + } + scope:recipient = { + NOT = { has_strong_hook = scope:actor } + } + #Has to be used instead of diplo range checks in laamp to landed interactions + ep3_laamp_diplo_range_trigger = { + TARGET = scope:recipient + LAAMP = scope:actor + } + # Adventurers can't join wars in places they're exiled from. + custom_tooltip = { + text = the_wake_1 + NOT = { + is_laamp_exiled_from_province_trigger = { + PROVINCE = scope:recipient.capital_province + LAAMP = scope:actor + } + } + } + } + + cost = { + gold = { + if = { + limit = { scope:target.tier = tier_county } + add = purchase_land_county_cost_value + } + else = { + add = purchase_land_duchy_cost_value + scope:target = { + every_de_jure_county = { + limit = { ep3_purchase_land_valid_county_trigger = yes } + add = purchase_land_county_cost_value + } + } + } + if = { + limit = { scope:offer_gold = yes } + multiply = 2 + } + } + } + + on_accept = { + scope:actor = { save_scope_as = adventurer } + scope:target = { + add_to_list = purchased_titles + if = { + limit = { tier = tier_duchy } + every_de_jure_county = { + limit = { ep3_purchase_land_valid_county_trigger = yes } + add_to_list = purchased_titles + } + } + } + ordered_in_list = { + list = purchased_titles + order_by = tier + save_scope_as = new_primary_title + } + save_scope_value_as = { + name = purchase_land_cost + value = { + every_in_list = { + list = purchased_titles + if = { + limit = { tier = tier_county } + add = purchase_land_county_cost_value + } + else_if = { + limit = { tier = tier_duchy } + add = purchase_land_duchy_cost_value + } + } + if = { + limit = { + scope:actor = { has_variable = ep3_grace_to_the_family_var } + } + multiply = 0.5 + } + if = { + limit = { + scope:offer_gold = yes + } + multiply = 2 + } + } + } + save_scope_value_as = { + name = purchase_land_legitimacy_cost + value = { + value = 0 + if = { + limit = { + scope:target.holder != scope:recipient + } + every_in_list = { + list = purchased_titles + if = { + limit = { tier = tier_county } + add = minor_legitimacy_loss + } + else = { add = medium_legitimacy_loss } + } + } + } + } + show_as_tooltip = { purchase_land_interaction_shortened_effect = yes } + if = { + limit = { always = scope:hook } + scope:actor = { use_hook = scope:recipient } + } + scope:actor = { trigger_event = ep3_laamps.0100 } + } + + on_decline = { + scope:actor = { + save_scope_as = adventurer + trigger_event = ep3_laamps.0102 + } + } + + ai_targets = { + ai_recipients = domicile_location_top_ruler + ai_recipients = contacts + } + + ai_targets = { + ai_recipients = domicile_location_neighboring_top_realm_vassals + ai_recipients = domicile_location_top_realm_vassals + ai_recipients = domicile_location_neighboring_top_rulers + max = 20 + } + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 60 + kingdom = 0 + empire = 0 + hegemony = 0 + } + + ai_accept = { + base = 0 # Try to make it 0 for most interactions + + opinion_modifier = { # Opinion Factor + who = scope:recipient + opinion_target = scope:actor + multiplier = 1 + desc = AI_OPINION_REASON + } + modifier = { # Num of counties/duchy + add = { + value = 0 + scope:target = { + if = { + limit = { tier = tier_county } + add = -30 + } + else = { + add = -60 + every_de_jure_county = { + limit = { ep3_purchase_land_valid_county_trigger = yes } + add = -30 + } + } + } + } + desc = PURCHASE_LAND_NUM_TITLES_REASON + } + modifier = { # Too close to capital + add = -50 + desc = PURCHASE_LAND_DE_JURE_DUCHY_REASON + scope:target.duchy = scope:recipient.capital_county.duchy + } + modifier = { # Province value + add = { + value = 0 + if = { + limit = { scope:target.tier = tier_county } + add = scope:target.development_level + scope:target = { + every_county_province = { add = num_buildings } + } + } + else = { + scope:target = { + every_de_jure_county = { + limit = { ep3_purchase_land_valid_county_trigger = yes } + add = development_level + every_county_province = { add = num_buildings } + } + } + } + multiply = -2 + } + #add = 1 + desc = PURCHASE_LAND_VALUE_REASON + } + modifier = { # Land is foreign + add = 10 + desc = PURCHASE_LAND_FOREIGN_COUNTY_CULTURE_REASON + add = { + value = 0 + if = { + limit = { scope:target.tier = tier_county } + add = 10 + } + else = { + scope:target = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + culture != scope:recipient.culture + } + add = 10 + } + } + } + max = 30 + } + desc = PURCHASE_LAND_FOREIGN_CULTURE_REASON + trigger_if = { + limit = { scope:target.tier = tier_county } + scope:target.culture != scope:recipient.culture + } + trigger_else = { + scope:target = { + any_de_jure_county = { + ep3_purchase_land_valid_county_trigger = yes + culture != scope:recipient.culture + } + } + } + } + modifier = { # Different faith + add = { + value = 0 + if = { + limit = { scope:target.tier = tier_county } + add = 10 + } + else = { + scope:target = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + faith != scope:recipient.faith + } + add = 10 + } + } + } + max = 30 + } + desc = PURCHASE_LAND_DIFFERENT_FAITH_REASON + trigger_if = { + limit = { scope:target.tier = tier_county } + scope:target.faith != scope:recipient.faith + } + trigger_else = { + scope:target = { + any_de_jure_county = { + ep3_purchase_land_valid_county_trigger = yes + faith != scope:recipient.faith + } + } + } + } + modifier = { # My culture's lands + add = { + value = 0 + if = { + limit = { scope:target.tier = tier_county } + add = -40 + } + else = { + scope:target = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + culture != scope:recipient.culture + } + add = -40 + } + } + } + if = { + limit = { scope:acceptance != 0 } + divide = scope:acceptance + } + multiply = 2 + min = -200 + } + desc = PURCHASE_LAND_MY_CULTURE_REASON + scope:actor.culture != scope:recipient.culture + trigger_if = { + limit = { + scope:target.tier = tier_county + } + scope:target.culture = scope:recipient.culture + } + trigger_else = { + scope:target = { + any_de_jure_county = { + ep3_purchase_land_valid_county_trigger = yes + culture = scope:recipient.culture + } + } + } + scope:recipient.culture = { + save_temporary_scope_value_as = { + name = acceptance + value = { + value = "cultural_acceptance(scope:actor.culture)" + divide = 25 + ceiling = yes + } + } + } + } + modifier = { # My faith's lands + add = { + value = 0 + if = { + limit = { scope:target.tier = tier_county } + add = -40 + } + else = { + scope:target = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + faith != scope:recipient.faith + } + add = -40 + } + } + } + if = { + limit = { scope:hostility != 0 } + multiply = scope:hostility + } + multiply = 2 + min = -200 + } + desc = PURCHASE_LAND_MY_FAITH_REASON + scope:actor.faith != scope:recipient.faith + trigger_if = { + limit = { scope:target.tier = tier_county } + scope:target.faith = scope:recipient.faith + } + trigger_else = { + scope:target = { + any_de_jure_county = { + ep3_purchase_land_valid_county_trigger = yes + faith = scope:recipient.faith + } + } + } + scope:recipient.faith = { + save_temporary_scope_value_as = { + name = hostility + value = "faith_hostility_level(scope:actor.faith)" + } + } + } + modifier = { # Too close + add = { + value = 0 + add = scope:distance + divide = scope:recipient.highest_held_title_tier + if = { + limit = { scope:distance <= squared_distance_medium } + multiply = -0.01 + } + else = { multiply = 0.0005 } + min = -25 + max = 50 + } + desc = PURCHASE_LAND_DISTANCE_REASON + trigger_if = { + limit = { scope:target.tier = tier_county } + scope:target = { save_temporary_scope_as = distance_target } + } + trigger_else = { + scope:target.title_capital_county = { save_temporary_scope_as = distance_target } + } + scope:recipient.capital_county = { + save_temporary_scope_value_as = { + name = distance + value = "squared_distance(scope:distance_target)" + } + } + } + opinion_modifier = { # Opinion Factor of title holder + trigger = { + NOT = { + scope:target.holder ?= scope:recipient + } + } + who = scope:recipient + opinion_target = scope:target.holder + multiplier = -1 + desc = AI_OPINION_REASON + } + modifier = { + add = { + value = scope:actor.prestige_level + multiply = 20 + } + scope:actor.prestige_level >= 4 + desc = PURCHASE_LAND_PRESTIGE_LEVEL_REASON + } + modifier = { + add = 40 + trigger = { + scope:actor.culture != scope:recipient.culture + OR = { + AND = { + scope:target.tier = tier_county + scope:target.culture = scope:recipient.culture + } + scope:target = { + any_de_jure_county = { + ep3_purchase_land_valid_county_trigger = yes + culture = scope:recipient.culture + } + } + } + } + scope:actor.primary_spouse ?= { + culture = scope:recipient.culture + dynasty ?= { + dynasty_prestige_level >= 2 + } + } + desc = PURCHASE_LAND_MARRIED_TO_CULTURE_NOBLE_REASON + } + modifier = { + add = 40 + trigger = { + scope:actor.faith != scope:recipient.faith + } + scope:actor.primary_spouse ?= { + faith = scope:recipient.faith + dynasty ?= { + dynasty_prestige_level >= 2 + } + } + desc = PURCHASE_LAND_MARRIED_TO_FAITH_NOBLE_REASON + } + modifier = { + add = 80 + scope:actor.primary_spouse ?= { + house ?= scope:recipient.house + } + desc = PURCHASE_LAND_MARRIED_TO_HOUSE_REASON + } + modifier = { + add = 20 + trigger = { + OR = { + AND = { + scope:target.tier = tier_county + scope:target.culture = scope:recipient.culture + } + scope:target = { + any_de_jure_county = { + ep3_purchase_land_valid_county_trigger = yes + culture = scope:recipient.culture + } + } + } + } + scope:actor = { + knows_language_of_culture = scope:recipient.culture + culture != scope:recipient.culture + } + desc = PURCHASE_LAND_SPEAKS_LANGUAGE_REASON + } + modifier = { + add = -40 + scope:actor = { + NOT = { + knows_language_of_culture = scope:recipient.culture + culture = scope:recipient.culture + } + } + desc = PURCHASE_LAND_DOES_NOT_SPEAK_LANGUAGE_REASON + } + modifier = { + add = { + value = 40 + multiply = scope:recipient.debt_level + } + trigger = { + scope:recipient = { + OR = { + debt_level > 0 + treasury_debt_level > 0 + } + } + } + desc = PURCHASE_LAND_IS_IN_DEBT_REASON + } + modifier = { + add = 60 + scope:actor = { + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:recipient } + } + desc = PURCHASE_LAND_RELATIONSHIP_REASON + } + modifier = { + add = 80 + scope:offer_gold = yes + desc = PURCHASE_LAND_DOUBLE_GOLD_REASON + } + modifier = { + add = 160 + scope:hook = yes + desc = YOU_HAVE_HOOK_REASON + } + modifier = { + add = 60 + scope:offer_hook = yes + desc = PURCHASE_LAND_OFFER_HOOK_REASON + } + modifier = { + add = 80 + scope:vassal_obligation = yes + desc = PURCHASE_LAND_OBLIGATIONS_REASON + } + } + + ai_will_do = { + base = -25 + ai_value_modifier = { + ai_boldness = -0.5 + ai_energy = -0.5 + ai_greed = 0.5 + } + modifier = { + gold < 1000 + factor = 0 + } + modifier = { + gold > 2000 + add = 50 + } + } +} + +################## +# Request Invasion Sponsorship +# by Joe Parkin +################## + +request_laamp_invasion_sponsorship_interaction = { + common_interaction = no + category = interaction_category_laamp + interface_priority = 20 + cooldown_against_recipient = { years = 5 } + + greeting = positive + notification_text = REQUEST_LAAMP_INVASION_SPONSORSHIP_PROPOSAL + + answer_accept_key = REQUEST_LAAMP_INVASION_SPONSORSHIP_ACCEPT + answer_reject_key = REQUEST_LAAMP_INVASION_SPONSORSHIP_REJECT + + icon = request_invasion_sponsorship_interaction + desc = request_laamp_invasion_sponsorship_interaction_desc + + is_shown = { + has_ep3_dlc_trigger = yes + scope:actor = { OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } } + scope:recipient = { is_landed = yes } + scope:recipient != scope:actor + NOT = { scope:actor = { has_realm_law = camp_purpose_legitimists } } + } + + is_valid_showing_failures_only = { + scope:actor = { + top_liege = this + custom_tooltip = { + text = request_laamp_invasion_sponsorship_existing_supporter_tt + NOT = { exists = var:adventurer_invasion_supporter } + } + } + scope:recipient = { + top_liege = this + highest_held_title_tier >= tier_kingdom + custom_tooltip = { + text = request_laamp_invasion_sponsorship_existing_supportee_tt + NOT = { exists = var:adventurer_invasion_supportee } + } + } + #Has to be used instead of diplo range checks in laamp to landed interactions + ep3_laamp_diplo_range_trigger = { + TARGET = scope:recipient + LAAMP = scope:actor + } + #You need to be at least Illustrious + scope:actor = { + prestige_level >= 3 + } + } + + populate_recipient_list = { + every_independent_ruler = { + limit = { + highest_held_title_tier >= tier_kingdom + is_landed = yes + in_diplomatic_range = scope:actor + in_diplomatic_range = scope:recipient + NOR = { + is_at_war_with = scope:actor + is_at_war_with = scope:recipient + is_allied_to = scope:actor + is_allied_to = scope:recipient + has_truce = scope:actor + has_truce = scope:recipient + this = scope:actor + this = scope:recipient + } + } + add_to_list = characters + } + } + + send_options_exclusive = no + + send_option = { + flag = request_soldiers + localization = request_laamp_invasion_sponsorship_option_request_soldiers + current_description = request_laamp_invasion_sponsorship_option_request_soldiers_desc + starts_enabled = { always = yes } + } + + send_option = { + flag = join_war + localization = request_laamp_invasion_sponsorship_option_join_war + current_description = request_laamp_invasion_sponsorship_option_join_war_desc + is_valid = { + scope:secondary_recipient ?= { + NOR = { + is_at_war_with = scope:recipient + is_allied_to = scope:recipient + has_truce = scope:recipient + } + } + } + } + + send_option = { + flag = offer_gold + localization = request_laamp_invasion_sponsorship_option_offer_gold + current_description = request_laamp_invasion_sponsorship_option_offer_gold_desc + is_shown = { exists = scope:recipient } + is_valid = { scope:actor.gold >= scope:recipient.request_laamp_invasion_sponsorship_gold_cost } + } + + send_option = { + flag = hook + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + localization = GENERIC_SPEND_A_HOOK + } + + cost = { + prestige = { + value = massive_prestige_value + if = { + limit = { scope:join_war = yes } + add = major_prestige_value + } + } + gold = { + if = { + limit = { scope:offer_gold = yes } + value = scope:recipient.request_laamp_invasion_sponsorship_gold_cost + } + } + } + + can_send = { + custom_tooltip = { + text = request_laamp_invasion_sponsorship_minimum_request_tt + OR = { + scope:join_war = yes + scope:request_soldiers = yes + } + } + } + + on_accept = { + scope:actor = { save_scope_as = adventurer } + scope:recipient ?= { + if = { + limit = { + scope:request_soldiers = yes + scope:join_war = yes + } + custom_tooltip = adventurer_invasion_supporter_tt + } + else_if = { + limit = { scope:request_soldiers = yes } + custom_tooltip = adventurer_invasion_supporter_soldiers_tt + } + else_if = { + limit = { scope:join_war = yes } + custom_tooltip = adventurer_invasion_supporter_join_tt + } + else = { custom_tooltip = request_laamp_invasion_sponsorship_minimum_request_tt } + hidden_effect = { + set_variable = { + name = adventurer_invasion_supportee + value = scope:actor + years = 5 + } + set_variable = { + name = adventurer_invasion_target + value = scope:secondary_recipient + years = 5 + } + if = { + limit = { scope:join_war = yes } + set_variable = { + name = adventurer_invasion_join_war + value = scope:actor + years = 5 + } + } + if = { + limit = { scope:request_soldiers = yes } + set_variable = { + name = adventurer_invasion_request_soldiers + value = scope:actor + years = 5 + } + } + } + } + scope:actor = { + if = { + limit = { scope:offer_gold = yes } + show_as_tooltip = { + pay_short_term_gold = { + gold = scope:recipient.request_laamp_invasion_sponsorship_gold_cost + target = scope:recipient + } + } + } + if = { + limit = { scope:hook = yes } + use_hook = scope:recipient + } + + custom_tooltip = { + text = adventurer_invasion_supporter_victory_tt + set_variable = { + name = adventurer_invasion_supporter + value = scope:recipient + years = 5 + } + set_variable = { + name = adventurer_invasion_target + value = scope:secondary_recipient + years = 5 + } + } + trigger_event = ep3_laamps.0200 + } + } + + on_decline = { + scope:actor = { trigger_event = ep3_laamps.0201 } + } + + use_diplomatic_range = yes + + ai_accept = { + base = -25 + + # Relationships: actor -> recipient / We avoid more relationship checks for balance reasons (and because important decisions tend to care little for relationships) + modifier = { # Rivalry modifier. + desc = offer_vassalization_interaction_aibehavior_rival_tt + scope:recipient = { + has_relation_rival = scope:actor + NOT = { has_relation_nemesis = scope:actor } + } + add = -10 + } + modifier = { # Nemesis modifier. + desc = offer_vassalization_interaction_aibehavior_nemesis_tt + scope:recipient = { has_relation_nemesis = scope:actor } + add = -100 + } + modifier = { # Same Dynasty modifier. + desc = offer_vassalization_interaction_aibehavior_dynasty_tt + scope:recipient.dynasty = scope:actor.dynasty + add = 10 + } + + # Compare Opinion modifier + opinion_modifier = { + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.5 + } + opinion_modifier = { + who = scope:recipient + opinion_target = scope:secondary_recipient + multiplier = -0.5 + } + + # Relative power (taken from PT interaction) + modifier = { # A lot less levies than scope:secondary_recipient + add = -50 + scope:recipient.max_military_strength <= scope:secondary_recipient.purchase_truce_interaction_recipient_far_weaker_value + scope:join_war = yes + desc = REQUEST_LAAMP_INVASION_SPONSORSHIP_MUCH_WEAKER_REASON + } + modifier = { # Few less levies than scope:secondary_recipient + add = -25 + scope:recipient.max_military_strength > scope:secondary_recipient.purchase_truce_interaction_recipient_far_weaker_value + scope:recipient.max_military_strength <= scope:secondary_recipient.purchase_truce_interaction_recipient_somewhat_weaker_value + scope:join_war = yes + desc = REQUEST_LAAMP_INVASION_SPONSORSHIP_SOMEWHAT_WEAKER_REASON + } + modifier = { # Roughly equal levies with scope:secondary_recipient + add = -10 + scope:recipient.max_military_strength > scope:secondary_recipient.purchase_truce_interaction_recipient_somewhat_weaker_value + scope:recipient.max_military_strength <= scope:secondary_recipient.purchase_truce_interaction_recipient_somewhat_stronger_value + scope:join_war = yes + desc = REQUEST_LAAMP_INVASION_SPONSORSHIP_ROUGHLY_EQUAL_REASON + } + + # AI who are in debt will take whatever windfalls they can. + modifier = { + add = { + value = scope:recipient.debt_level + add = 1 # Our first level is 0, so we add one to always get a positive number. + multiply = 10 + } + scope:offer_gold = yes + scope:recipient.debt_level > 0 + desc = PT_AI_IS_IN_DEBT + } + + # Pacifist AI don't like raiding + modifier = { + add = -25 + scope:recipient.faith = { has_doctrine_parameter = pacifist_opinion_active } + desc = PT_AI_IS_PACIFIST_FAITH + } + modifier = { + add = -25 + scope:recipient.culture = { has_cultural_parameter = reduced_cost_for_conversion_to_pacifist_faith } + desc = PT_AI_IS_PACIFIST_CULTURE + } + + # Small realm + modifier = { + add = -50 + scope:recipient.realm_size < minor_realm_size + desc = REQUEST_LAAMP_INVASION_SPONSORSHIP_SMALL_REALM_REASON + } + # Own war + modifier = { + add = -50 + scope:recipient = { is_at_war = yes } + scope:join_war = yes + desc = REQUEST_LAAMP_INVASION_SPONSORSHIP_OWN_WAR_REASON + } + + modifier = { # Distance + add = { + value = 0 + add = scope:distance + if = { + limit = { scope:distance >= squared_distance_medium } + add = scope:distance + multiply = -0.00001 + } + min = -100 + } + desc = REQUEST_LAAMP_INVASION_SPONSORSHIP_DISTANCE_REASON + scope:recipient = { + NOT = { + any_neighboring_top_liege_realm_owner = { this = scope:secondary_recipient } + } + } + scope:recipient.capital_county = { + save_temporary_scope_value_as = { + name = distance + value = "squared_distance(scope:secondary_recipient.capital_county)" + } + } + } + + modifier = { + add = -30 + scope:recipient.faith = scope:secondary_recipient.faith + desc = I_AM_ATTACKING_A_CORELIGIONIST + } + modifier = { + add = -10 + scope:actor.faith != scope:recipient.faith + desc = DIFFERENT_FAITH + } + modifier = { + add = -200 + scope:recipient.primary_heir ?= scope:secondary_recipient + desc = WONT_FIGHT_HEIR_REASON + } + modifier = { + add = -200 + scope:recipient = { is_consort_of = scope:secondary_recipient } + desc = WONT_FIGHT_SPOUSE_REASON + } + modifier = { + add = -100 + scope:recipient = { + has_relation_friend = scope:secondary_recipient + NOT = { has_relation_best_friend = scope:secondary_recipient } + } + desc = WONT_FIGHT_FRIEND_REASON + } + modifier = { + add = -200 + scope:recipient = { has_relation_best_friend = scope:secondary_recipient } + desc = WONT_FIGHT_BEST_FRIEND_REASON + } + modifier = { + add = -100 + scope:recipient = { + has_relation_lover = scope:secondary_recipient + NOT = { has_relation_soulmate = scope:secondary_recipient } + } + desc = WONT_FIGHT_LOVER_REASON + } + modifier = { + add = -200 + scope:recipient = { has_relation_soulmate = scope:secondary_recipient } + desc = WONT_FIGHT_SOULMATE_REASON + } + modifier = { + add = -200 + scope:recipient = { is_allied_to = scope:secondary_recipient } + desc = WAR_WITH_ALLY_REASON + } + + modifier = { + add = 50 + scope:hook = yes + desc = YOU_HAVE_HOOK_REASON + } + + # Offered proportional gold + modifier = { + add = -25 + scope:request_soldiers = yes + desc = REQUEST_LAAMP_INVASION_SPONSORSHIP_REQUEST_SOLDIERS_REASON + } + modifier = { + add = -50 + scope:join_war = yes + desc = REQUEST_LAAMP_INVASION_SPONSORSHIP_JOIN_WAR_REASON + } + modifier = { + add = 35 + scope:offer_gold = yes + desc = GOLD_REASON + } + + # AI value mod + ai_value_modifier = { + ai_greed = 0.5 + ai_boldness = 0.25 + min = 0 + max = 25 + } + } + can_send_despite_rejection = no +} + +################## +# Negotiate Settlement +# by Joe Parkin +################## + +negotiate_settlement_interaction = { + common_interaction = yes + category = interaction_category_diplomacy + icon = negotiate_settlement_interaction + + desc = negotiate_settlement_interaction_desc + target_type = title + target_filter = actor_domain_titles + + cooldown_against_recipient = { years = 5 } + + notification_text = { + first_valid = { + triggered_desc = { + trigger = { + scope:actor = { top_liege != this } + scope:target = { + trigger_if = { + limit = { tier = tier_duchy } + scope:actor.highest_held_title_tier = tier_duchy + } + trigger_else = { scope:actor.highest_held_title_tier = tier_county } + } + } + desc = NEGOTIATE_SETTLEMENT_PROPOSAL_FELLOW_VASSAL + } + triggered_desc = { + trigger = { + scope:target = { + trigger_if = { + limit = { tier = tier_duchy } + scope:actor.highest_held_title_tier >= tier_kingdom + } + trigger_else = { scope:actor.highest_held_title_tier >= tier_duchy } + } + } + desc = NEGOTIATE_SETTLEMENT_PROPOSAL_LIEGE + } + desc = NEGOTIATE_SETTLEMENT_PROPOSAL + } + } + + popup_on_receive = yes + pause_on_receive = yes + + interface_priority = 60 + ai_min_reply_days = 4 + ai_max_reply_days = 9 + + is_shown = { + has_ep3_dlc_trigger = yes + scope:actor = { is_landed = yes } + scope:recipient = { + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + scope:recipient != scope:actor + } + + can_be_picked_title = { + custom_tooltip = { + text = purchase_land_tier_tt + scope:target = { + tier >= tier_county + tier <= tier_duchy + } + } + custom_tooltip = { + text = purchase_land_capital_tt + NOR = { + scope:target = scope:actor.capital_county + scope:target = scope:actor.capital_county.duchy + } + } + custom_tooltip = { + text = purchase_land_primary_tt + scope:target != scope:actor.primary_title + } + custom_tooltip = { + text = negotiate_settlement_title_cant_receive_reason_higher_tier_without_county + scope:target = { + tier = tier_duchy + any_de_jure_county = { + ep3_negotiate_settlement_valid_county_trigger = yes + } + } + } + trigger_if = { + limit = { + scope:actor = { is_ai = yes } + scope:recipient = { is_ai = yes } + scope:target.tier < tier_duchy + } + scope:recipient = { + OR = { + current_military_strength < 1000 # You can do better + global_variable_list_size = { + name = laamps_tally + value >= too_many_laamps_value + } + } + OR = { + AND = { + has_character_modifier = ep3_lust_for_land_modifier + ai_greed >= 25 + ai_boldness >= 25 + ai_rationality <= -25 + } + AND = { + has_trait = greedy + ai_rationality <= -50 + } + global_variable_list_size = { + name = laamps_tally + value >= too_many_laamps_value + } + } + } + } + } + + has_valid_target_showing_failures_only = { + trigger_if = { # Can't purchase HoF titles + limit = { + scope:target ?= { is_head_of_faith = yes } + } + custom_description = { + text = negotiate_settlement_religious_tt + always = no + } + } + trigger_if = { # Can't purchase nf titles + limit = { + scope:target ?= { is_noble_family_title = yes } + } + custom_description = { + text = negotiate_settlement_noble_family_tt + always = no + } + } + trigger_if = { # Can't purchase laamp titles + limit = { + scope:target ?= { has_variable = adventurer_creation_reason } + } + custom_description = { + text = negotiate_settlement_landless_adventurer_tt + always = no + } + } + trigger_if = { + limit = { + scope:actor = { government_has_flag = government_is_administrative } + } + scope:target.tier = tier_duchy + } + trigger_else = { + scope:target = { + tier >= tier_county + tier <= tier_duchy + } + } + } + + is_valid_showing_failures_only = { + scope:recipient = { + custom_tooltip = { + text = negotiate_settlement_target_tt + OR = { + any_character_war = { + is_attacker = scope:recipient + primary_defender = scope:actor + save_temporary_scope_as = war_temp + } + AND = { + exists = scope:recipient.capital_province + scope:recipient.capital_province.county.holder.top_liege = scope:actor.top_liege + } + } + } + } + # Can only settle if not at risk of losing land, outside of war of adventurer + custom_tooltip = { + text = negotiate_settlement_defensive_wars_tt + scope:actor = { + NOT = { + any_character_war = { + any_war_defender = { this = scope:actor } + NOT = { + any_war_attacker = { this = scope:recipient } + } + } + } + } + } + NOT = { + scope:actor = { has_relation_nemesis = scope:recipient } + } + trigger_if = { # Can't purchase Baronies + limit = { + scope:target ?= { tier = tier_barony } + } + custom_description = { + text = negotiate_settlement_barony_tt + always = no + } + } + trigger_if = { # Can't purchase Kingdoms or Empires + limit = { + scope:target ?= { tier >= tier_kingdom } + } + custom_description = { + text = negotiate_settlement_kingdom_tt + always = no + } + } + trigger_if = { + limit = { + scope:actor = { + any_held_county = { count < 2 } + } + } + custom_description = { + text = negotiate_settlement_minimum_county_tt + always = no + } + } + scope:recipient = { + NOT = { has_strong_hook = scope:actor } + } + # Adventurers can't be negotiated back into places they're exiled from. + trigger_if = { + limit = { + scope:actor = { top_liege != this } + } + custom_tooltip = { + text = the_wake_1 + NOT = { + is_laamp_exiled_from_province_trigger = { + PROVINCE = scope:actor.capital_province + LAAMP = scope:recipient + } + } + } + } + # Story blockers. + ## Hereward cannot be exiled by active participants in the Harrying of the North. + disable_interaction_for_hereward_trigger = yes + ## Hasan cannot be exiled by anyone during his story. + disable_interaction_for_hasan_trigger = yes + } + + on_send = { + debug_log = "NEGOTIATE_SETTLEMENT" + debug_log_scopes = yes + } + + on_accept = { + scope:actor = { save_scope_as = adventurer } + scope:target = { + add_to_list = offered_titles + if = { + limit = { tier = tier_duchy } + every_de_jure_county = { + limit = { ep3_negotiate_settlement_valid_county_trigger = yes } + add_to_list = offered_titles + } + } + } + ordered_in_list = { + list = offered_titles + save_scope_as = new_primary_title + } + save_scope_value_as = { + name = negotiate_settlement_legitimacy_cost + value = { + value = 0 + every_in_list = { + list = offered_titles + if = { + limit = { tier = tier_county } + add = -25 + } + else = { add = -50 } + } + multiply = scope:actor.highest_held_title_tier + } + } + show_as_tooltip = { negotiate_settlement_interaction_effect = yes } + scope:actor = { trigger_event = ep3_laamps.0300 } + } + + on_decline = { + scope:actor = { + trigger_event = ep3_laamps.0302 + } + } + + ai_targets = { + ai_recipients = scripted_relations + ai_recipients = spouses + max = 5 + } + ai_targets = { + ai_recipients = top_realm_domicile_owners + ai_recipients = nearby_domicile_owners + max = 5 + } + ai_targets = { + ai_recipients = war_enemies + max = 10 + } + + # Must be fairly common as it can happen during war + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 3 + kingdom = 3 + empire = 3 + hegemony = 3 + } + + ai_potential = { + OR = { + top_liege = this + highest_held_title_tier >= tier_kingdom + } + OR = { + is_at_war = yes + has_trait = craven + has_trait = generous + } + NOT = { + government_has_flag = government_is_nomadic + } + } + + ai_accept = { + base = 0 # Try to make it 0 for most interactions + + opinion_modifier = { # Opinion Factor + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.5 + desc = AI_OPINION_REASON + } + ai_value_modifier = { + ai_boldness = -0.25 + ai_energy = -0.25 + ai_greed = 0.25 + } + modifier = { # Claims + add = { + value = 0 + if = { + limit = { + scope:recipient = { has_claim_on = scope:target } + } + add = 25 + } + if = { + limit = { scope:target.tier = tier_duchy } + scope:target = { + every_de_jure_county = { + limit = { + ep3_negotiate_settlement_valid_county_trigger = yes + save_temporary_scope_as = claim_temp + scope:recipient = { has_claim_on = scope:claim_temp } + } + add = 25 + } + } + } + } + desc = NEGOTIATE_SETTLEMENT_CLAIM_REASON + OR = { + scope:recipient = { has_claim_on = scope:target } + trigger_if = { + limit = { scope:target.tier = tier_duchy } + scope:target = { + any_de_jure_county = { + ep3_negotiate_settlement_valid_county_trigger = yes + save_temporary_scope_as = county_temp + scope:recipient = { has_claim_on = scope:county_temp } + } + } + } + trigger_else = { always = no } + } + } + modifier = { + add = -300 + scope:recipient = { has_realm_law = camp_purpose_legitimists } + desc = NEGOTIATE_SETTLEMENT_LEGITIMIST_REASON + } + modifier = { # Tier lower than war claim + add = { + value = 0 + scope:recipient = { + every_character_war = { + limit = { + primary_attacker = scope:recipient + primary_defender = scope:actor + casus_belli = { + any_target_title = { tier > scope:target.tier } + } + } + casus_belli = { + every_target_title = { + limit = { tier > scope:target.tier } + add = -25 + } + } + } + } + } + desc = NEGOTIATE_SETTLEMENT_LOWER_THAN_WAR_TARGET_REASON + scope:recipient = { + any_character_war = { + primary_attacker = scope:recipient + primary_defender = scope:actor + casus_belli = { + any_target_title = { tier > scope:target.tier } + } + } + } + } + modifier = { # War Targets + add = { + value = 0 + scope:recipient = { + every_character_war = { + limit = { + primary_attacker = scope:recipient + casus_belli = { + any_target_title = { + OR = { + this = scope:target + de_jure_liege = scope:target + } + } + } + } + casus_belli = { + every_target_title = { + limit = { + OR = { + this = scope:target + de_jure_liege = scope:target + } + } + add = 25 + } + } + } + } + } + desc = NEGOTIATE_SETTLEMENT_WAR_TARGET_REASON + scope:recipient = { + any_character_war = { + primary_attacker = scope:recipient + casus_belli = { + any_target_title = { + OR = { + this = scope:target + de_jure_liege = scope:target + } + } + } + } + } + } + modifier = { # Num of counties/duchy + add = { + value = 0 + scope:target = { + if = { + limit = { tier = tier_county } + add = 25 + } + else = { + add = 50 + every_de_jure_county = { + limit = { ep3_negotiate_settlement_valid_county_trigger = yes } + add = 25 + } + } + } + } + desc = NEGOTIATE_SETTLEMENT_NUM_TITLES_REASON + } + modifier = { # Province value + add = { + value = 0 + if = { + limit = { scope:target.tier = tier_county } + add = scope:target.development_level + scope:target = { + every_county_province = { add = num_buildings } + } + } + else = { + scope:target = { + every_de_jure_county = { + limit = { ep3_negotiate_settlement_valid_county_trigger = yes } + add = development_level + every_county_province = { add = num_buildings } + } + } + } + } + #add = 1 + desc = NEGOTIATE_SETTLEMENT_VALUE_REASON + } + modifier = { # Land is foreign + add = -10 + desc = NEGOTIATE_SETTLEMENT_FOREIGN_COUNTY_CULTURE_REASON + add = { + value = 0 + if = { + limit = { scope:target.tier = tier_county } + add = -10 + } + else = { + scope:target = { + every_de_jure_county = { + limit = { + ep3_negotiate_settlement_valid_county_trigger = yes + culture != scope:recipient.culture + } + add = -10 + } + } + } + min = -30 + } + desc = NEGOTIATE_SETTLEMENT_FOREIGN_CULTURE_REASON + trigger_if = { + limit = { scope:target.tier = tier_county } + scope:target.culture != scope:recipient.culture + } + trigger_else = { + scope:target = { + any_de_jure_county = { + ep3_negotiate_settlement_valid_county_trigger = yes + culture != scope:recipient.culture + } + } + } + } + modifier = { # Different faith + add = { + value = 0 + if = { + limit = { scope:target.tier = tier_county } + add = -10 + } + else = { + scope:target = { + every_de_jure_county = { + limit = { + ep3_negotiate_settlement_valid_county_trigger = yes + faith != scope:recipient.faith + } + add = -10 + } + } + } + min = -30 + } + desc = NEGOTIATE_SETTLEMENT_DIFFERENT_FAITH_REASON + trigger_if = { + limit = { scope:target.tier = tier_county } + scope:target.faith != scope:recipient.faith + } + trigger_else = { + scope:target = { + any_de_jure_county = { + ep3_negotiate_settlement_valid_county_trigger = yes + faith != scope:recipient.faith + } + } + } + } + modifier = { # Losing/winning as attacker + add = { + value = 0 + scope:recipient = { + ordered_character_war = { + limit = { + OR = { + primary_attacker = scope:actor + primary_defender = scope:actor + } + OR = { + primary_attacker = scope:recipient + primary_defender = scope:recipient + } + } + order_by = war_days + if = { + limit = { + primary_attacker = scope:actor + primary_defender = scope:recipient + } + add = defender_war_score + } + else = { add = attacker_war_score } + } + } + divide = 4 + } + desc = NEGOTIATE_SETTLEMENT_LOSING_WAR_REASON + scope:recipient = { + any_character_war = { + OR = { + primary_attacker = scope:actor + primary_defender = scope:actor + } + OR = { + primary_attacker = scope:recipient + primary_defender = scope:recipient + } + trigger_if = { + limit = { + primary_attacker = scope:actor + primary_defender = scope:recipient + } + defender_war_score >= 25 + } + trigger_else = { attacker_war_score >= 25 } + } + } + } + modifier = { # Losing/winning as defender + add = { + value = 0 + scope:recipient = { + ordered_character_war = { + limit = { + OR = { + primary_attacker = scope:actor + primary_defender = scope:actor + } + OR = { + primary_attacker = scope:recipient + primary_defender = scope:recipient + } + } + order_by = war_days + if = { + limit = { + primary_attacker = scope:actor + primary_defender = scope:recipient + } + add = attacker_war_score + } + else = { add = defender_war_score } + } + } + divide = 4 + } + desc = NEGOTIATE_SETTLEMENT_LOSING_WAR_REASON + scope:recipient = { + any_character_war = { + OR = { + primary_attacker = scope:actor + primary_defender = scope:actor + } + OR = { + primary_attacker = scope:recipient + primary_defender = scope:recipient + } + trigger_if = { + limit = { + primary_attacker = scope:actor + primary_defender = scope:recipient + } + attacker_war_score >= 25 + } + trigger_else = { defender_war_score >= 25 } + } + } + } + modifier = { # Number of troops at peace, + add = { + add = current_military_strength + multiply = -0.02 + } + desc = laamp_has_soldiers_negotiate_settlement_tt + } + modifier = { + add = -50000 + scope:actor = { is_ai = yes } + NOT = { + scope:target.tier >= tier_duchy + } + scope:recipient = { + NOR = { + current_military_strength < 1000 # You can do better + global_variable_list_size = { + name = laamps_tally + value >= too_many_laamps_value + } + } + NOR = { + AND = { + has_character_modifier = ep3_lust_for_land_modifier + ai_greed >= 25 + ai_boldness >= 25 + ai_rationality <= -25 + } + AND = { + has_trait = greedy + ai_rationality <= -50 + } + global_variable_list_size = { + name = laamps_tally + value >= too_many_laamps_value + } + } + } + } + } + + ai_will_do = { + base = -25 + modifier = { + add = 25 + scope:actor.domain_size > scope:actor.domain_limit + } + opinion_modifier = { + who = scope:actor + opinion_target = scope:recipient + multiplier = 0.25 + } + ai_value_modifier = { + ai_boldness = -0.25 + ai_energy = -0.25 + ai_greed = -0.25 + } + modifier = { # Tier lower than war claim + add = { + value = 0 + scope:recipient = { + every_character_war = { + limit = { + primary_attacker = scope:recipient + primary_defender = scope:actor + casus_belli = { + any_target_title = { tier > scope:target.tier } + } + attacker_war_score >= 50 + } + add = 150 + } + } + } + desc = NEGOTIATE_SETTLEMENT_SAVE_TITLE_REASON + scope:recipient = { + any_character_war = { + primary_attacker = scope:recipient + primary_defender = scope:actor + casus_belli = { + any_target_title = { tier > scope:target.tier } + } + attacker_war_score >= 50 + } + } + } + modifier = { + scope:recipient = { + has_government = landless_adventurer_government + has_realm_law = camp_purpose_legitimists + any_claim = { + OR = { + holder ?= { + OR = { + this = scope:actor + target_is_liege_or_above = scope:actor + } + } + target_is_de_jure_liege_or_above = scope:actor.primary_title + } + } + } + desc = NEGOTIATE_SETTLEMENT_DE_JURE_LEGITIMIST_REASON + add = -150 + } + modifier = { # Defending against a LAAMP + any_character_war = { + primary_defender = scope:actor + any_war_attacker = { + scope:recipient ?= this + has_government = landless_adventurer_government + NOT = { has_realm_law = camp_purpose_legitimists } + # Attacking laamp's troops at least 10% of defender's total troops + current_military_strength > war_defender_total_strength_tenth_value + } + OR = { + attacker_war_score >= 25 + # Attackers outnumber defenders at least 2:1 + war_attacker_total_current_strength_halved_value >= war_defender_total_current_strength_value + } + } + desc = NEGOTIATE_SETTLEMENT_DEFENDING_REASON + add = { + value = 0 + every_character_war = { + limit = { + primary_defender = scope:actor + any_war_attacker = { + scope:recipient ?= this + has_government = landless_adventurer_government + NOT = { has_realm_law = camp_purpose_legitimists } + # Attacking laamp's troops at least 10% of defender's total troops + current_military_strength > war_defender_total_strength_tenth_value + } + } + add = { + value = 25 + add = { + value = attacker_war_score + subtract = 25 + min = 0 + } + if = { + limit = { + exists = primary_attacker + scope:recipient ?= primary_attacker + } + multiply = 2 + } + # Difference in strength of attackers and defenders + multiply = war_attacker_total_current_strength_divided_by_defender_value + } + } + } + } + modifier = { # Attacking a LAAMP + any_character_war = { + primary_attacker = scope:actor + any_war_defender = { + scope:recipient ?= this + has_government = landless_adventurer_government + # Defending laamp's troops at least 10% of attacker's total troops + current_military_strength > war_attacker_total_strength_tenth_value + } + OR = { + defender_war_score >= 25 + # Defenders outnumber attackers at least 2:1 + war_defender_total_current_strength_halved_value >= war_attacker_total_current_strength_value + } + } + desc = NEGOTIATE_SETTLEMENT_ATTACKING_REASON + add = { + value = 0 + every_character_war = { + limit = { + primary_attacker = scope:actor + any_war_defender = { + scope:recipient ?= this + has_government = landless_adventurer_government + # Defending laamp's troops at least 10% of attacker's total troops + current_military_strength > war_attacker_total_strength_tenth_value + } + } + add = { + value = 25 + add = { + value = defender_war_score + subtract = 25 + min = 0 + } + # Difference in strength of defenders and attackers + multiply = war_defender_total_current_strength_divided_by_attacker_value + } + } + } + } + modifier = { # Potential war target of a LAAMP + scope:recipient ?= { + ep3_adventurer_might_attack_target_trigger = { TARGET = scope:actor } + trigger_if = { + limit = { + NOT = { is_at_war_with = scope:actor } + } + ep3_laamp_diplo_range_trigger = { + TARGET = scope:actor + LAAMP = scope:recipient + } + } + } + desc = NEGOTIATE_SETTLEMENT_POTENTIAL_WAR_TARGET_REASON + add = { + value = 25 + multiply = recipient_strength_divided_by_actors_value + # Scale of threat + scope:recipient = { + if = { + limit = { + can_declare_war = { + casus_belli = ep3_laamp_adventurer_duchy_invasion + defender = scope:actor + } + } + multiply = 1.25 + } + if = { + limit = { + can_declare_war = { + casus_belli = ep3_laamp_adventurer_kingdom_invasion + defender = scope:actor + } + } + multiply = 1.5 + } + if = { + limit = { + can_declare_war = { + casus_belli = ep3_laamp_adventurer_empire_invasion + defender = scope:actor + } + } + multiply = 2 + } + } + scope:actor = { + # Worried about ongoing wars + if = { + limit = { + any_character_war = { + primary_defender = scope:actor + # Only care if attackers are really a threat + war_attacker_total_current_strength_value > war_defender_total_current_strength_halved_value + } + } + multiply = 2 + } + # Already at war + if = { + limit = { is_at_war_with = scope:recipient } + multiply = 0.5 + } + } + } + } + modifier = { # Potential faction claimant + exists = scope:recipient + scope:actor = { + any_targeting_faction = { + special_character ?= scope:recipient + faction_power >= faction_power_threshold + } + } + desc = NEGOTIATE_SETTLEMENT_CLAIMANT_REASON + add = { + value = 0 + every_targeting_faction = { + limit = { + special_character ?= scope:recipient + faction_power >= faction_power_threshold + } + add = 25 + } + } + } + modifier = { # Give claims to laamps + scope:target ?= { + any_claimant = { scope:recipient ?= this } + } + desc = NEGOTIATE_SETTLEMENT_CLAIM_REASON + add = { + value = 25 + if = { + limit = { + scope:target.tier = tier_county + } + subtract = scope:target.development_level + } + if = { + limit = { + scope:target.tier > tier_county + } + subtract = scope:target.title_capital_county.development_level + } + } + } + # Essentially the inverse of Purchase Land + modifier = { # Land is foreign + add = 10 + desc = NEGOTIATE_SETTLEMENT_FOREIGN_COUNTY_CULTURE_REASON + add = { + value = 0 + if = { + limit = { scope:target.tier = tier_county } + add = 10 + } + else = { + scope:target = { + every_de_jure_county = { + limit = { + ep3_negotiate_settlement_valid_county_trigger = yes + culture != scope:recipient.culture + } + add = 10 + } + } + } + max = 30 + } + desc = NEGOTIATE_SETTLEMENT_FOREIGN_CULTURE_REASON + trigger_if = { + limit = { scope:target.tier = tier_county } + scope:target.culture != scope:actor.culture + } + trigger_else = { + scope:target = { + any_de_jure_county = { + ep3_negotiate_settlement_valid_county_trigger = yes + culture != scope:actor.culture + } + } + } + } + modifier = { # Different faith + add = { + value = 0 + if = { + limit = { scope:target.tier = tier_county } + add = 10 + } + else = { + scope:target = { + every_de_jure_county = { + limit = { + ep3_negotiate_settlement_valid_county_trigger = yes + faith != scope:actor.faith + } + add = 10 + } + } + } + max = 30 + } + desc = NEGOTIATE_SETTLEMENT_DIFFERENT_FAITH_REASON + trigger_if = { + limit = { scope:target.tier = tier_county } + scope:target.faith != scope:actor.faith + } + trigger_else = { + scope:target = { + any_de_jure_county = { + ep3_negotiate_settlement_valid_county_trigger = yes + faith != scope:actor.faith + } + } + } + } + modifier = { # My culture's lands + add = { + value = 0 + if = { + limit = { scope:target.tier = tier_county } + add = -15 + } + else = { + add = -15 + scope:target = { + every_de_jure_county = { + limit = { + ep3_negotiate_settlement_valid_county_trigger = yes + faith != scope:actor.faith + } + add = -15 + } + } + } + if = { + limit = { scope:acceptance != 0 } + divide = scope:acceptance + } + min = -50 + } + desc = NEGOTIATE_SETTLEMENT_MY_CULTURE_REASON + scope:actor.culture != scope:recipient.culture + trigger_if = { + limit = { scope:target.tier = tier_county } + scope:target.culture = scope:actor.culture + } + trigger_else = { + scope:target = { + any_de_jure_county = { + ep3_negotiate_settlement_valid_county_trigger = yes + culture = scope:actor.culture + } + } + } + scope:actor.culture = { + save_temporary_scope_value_as = { + name = acceptance + value = { + value = "cultural_acceptance(scope:recipient.culture)" + divide = 25 + ceiling = yes + } + } + } + } + modifier = { # My faith's lands + add = { + value = 0 + if = { + limit = { scope:target.tier = tier_county } + add = -15 + } + else = { + add = -15 + scope:target = { + every_de_jure_county = { + limit = { + ep3_negotiate_settlement_valid_county_trigger = yes + faith != scope:actor.faith + } + add = -15 + } + } + } + if = { + limit = { scope:hostility != 0 } + multiply = scope:hostility + } + min = -50 + } + desc = NEGOTIATE_SETTLEMENT_MY_FAITH_REASON + scope:actor.faith != scope:recipient.faith + trigger_if = { + limit = { scope:target.tier = tier_county } + scope:target.faith = scope:actor.faith + } + trigger_else = { + scope:target = { + any_de_jure_county = { + ep3_negotiate_settlement_valid_county_trigger = yes + faith = scope:actor.faith + } + } + } + scope:actor.faith = { + save_temporary_scope_value_as = { + name = hostility + value = "faith_hostility_level(scope:recipient.faith)" + } + } + } + modifier = { # Too close + add = { + value = 0 + add = scope:distance + divide = scope:actor.highest_held_title_tier + if = { + limit = { scope:distance <= squared_distance_medium } + multiply = -0.01 + } + else = { multiply = 0.0005 } + min = -25 + max = 50 + } + desc = NEGOTIATE_LAND_DISTANCE_REASON + trigger_if = { + limit = { scope:target.tier = tier_county } + scope:target = { save_temporary_scope_as = distance_target } + } + trigger_else = { + scope:target.title_capital_county = { save_temporary_scope_as = distance_target } + } + scope:actor.capital_county = { + save_temporary_scope_value_as = { + name = distance + value = "squared_distance(scope:distance_target)" + } + } + } + } +} + +################## +# Trade Oath +# by Joe Parkin +################## + +trade_oath_interaction = { + icon = hook_icon + category = interaction_category_laamp + interface_priority = 10 + + desc = trade_oath_interaction_desc + + is_shown = { + scope:actor = { + domicile ?= { has_domicile_parameter = camp_unlock_trade_oath_interaction } + NOT = { has_strong_hook = scope:recipient } + } + scope:recipient = { + is_courtier_of = scope:actor + NOR = { + has_hook = scope:actor + is_close_family_of = scope:actor + is_spouse_of = scope:actor + } + } + } + + is_valid_showing_failures_only = { + scope:actor = { + is_at_war = no + is_imprisoned = no + } + scope:recipient.location = scope:actor.location + } + + cost = { prestige = 250 } + + on_accept = { + show_as_tooltip = { + scope:actor = { + add_hook = { + type = loyalty_hook + target = scope:recipient + } + } + scope:recipient = { + add_hook = { + type = follower_oath_hook + target = scope:actor + } + } + } + scope:actor = { trigger_event = ep3_laamps.1011 } + } + + ai_accept = { + base = -75 + + opinion_modifier = { opinion_target = scope:actor } + + # Traits. + ## Loyal + modifier = { + add = 30 + has_trait = loyal + } + ## Disloyal + modifier = { + add = -30 + has_trait = disloyal + } + ## Arbitrary + modifier = { + add = -20 + has_trait = arbitrary + } + ## Just + modifier = { + add = 20 + has_trait = just + } + ## Fickle + modifier = { + add = -10 + has_trait = fickle + } + ## Stubborn + modifier = { + add = 20 + has_trait = stubborn + } + ## Deceitful + modifier = { + add = -5 + has_trait = deceitful + } + ## Honest + modifier = { + add = 5 + has_trait = honest + } + } + ai_potential = { + has_realm_law = camp_purpose_legitimists + } + # Always do it if you get the chance. + ai_will_do = { base = 1000 } + + ai_targets = { ai_recipients = courtiers } + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 12 + kingdom = 0 + empire = 0 + hegemony = 0 + } + auto_accept = yes +} + +################## +# Pawn Gear +# by Joe Parkin +################## + +pawn_gear_interaction = { + icon = artisan_inspiration + category = interaction_category_laamp + interface_priority = 10 + common_interaction = yes + desc = pawn_gear_interaction_desc + + target_type = artifact + target_filter = actor_artifacts + + is_shown = { + scope:actor = { + domicile ?= { has_domicile_parameter = camp_unlocks_pawn_gear_interaction } + this = scope:recipient + } + } + + is_valid_showing_failures_only = { + scope:actor = { + is_at_war = no + is_imprisoned = no + has_any_artifact = yes + trigger_if = { + limit = { is_ai = no } + custom_description = { + text = "any_unequipped_artifact_tt" + any_character_artifact = { is_equipped = no } + } + } + } + } + + can_be_picked_artifact = { + trigger_if = { + limit = { + scope:actor = { is_ai = no } + } + scope:target = { is_equipped = no } + } + scope:actor = { + any_character_artifact = { this = scope:target } + } + } + + on_accept = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_good + title = pawn_gear_interaction_notification + left_icon = scope:actor + add_short_term_gold = artifact_wealth_quality_average_value + destroy_artifact = scope:target + } + } + } + + auto_accept = yes +} + +################## +# Complete the Contract +# by Arkadiusz Majewski +# Needed for the action_can_complete_task_contract and to be able to end contracts if you cancelled the initial travel planner +################## + +complete_task_contract_interaction = { + category = interaction_category_laamp + interface_priority = 120 + common_interaction = yes + icon = icon_contract_escort + use_diplomatic_range = no + + popup_on_receive = yes + pause_on_receive = yes + + is_shown = { + has_ep3_dlc_trigger = yes + scope:actor = { + any_character_active_contract = { + OR = { + ep3_transport_contract_trigger = yes + has_task_contract_type = laamp_help_increase_control_contract + } + OR = { + task_contract_employer ?= scope:recipient + task_contract_destination.province_owner ?= scope:recipient + task_contract_target ?= scope:recipient + var:task_contract_object ?= scope:recipient + } + } + } + } + + is_valid_showing_failures_only = { + } + + is_highlighted = { + always = yes + } + + send_option = { + flag = without_domicile + } + + send_option = { + flag = with_domicile + } + + on_accept = { + scope:actor = { + random_character_active_contract = { + limit = { + OR = { + ep3_transport_contract_trigger = yes + has_task_contract_type = laamp_help_increase_control_contract + } + #check for any contract that has the recipient as any relevant character to it (employer, target, target destination owner, escortee) + OR = { + task_contract_employer ?= scope:recipient + task_contract_destination.province_owner ?= scope:recipient + task_contract_target ?= scope:recipient + var:task_contract_object ?= scope:recipient + } + } + save_scope_as = task_contract + } + #set all the scopes + if = { + limit = { + exists = scope:task_contract.var:task_contract_employer + } + scope:task_contract.var:task_contract_employer ?= { + save_scope_as = task_contract_employer + } + } + if = { + limit = { + scope:task_contract = { + has_task_contract_type = laamp_help_increase_control_contract + } + } + scope:task_contract.var:task_contract_councillor_liege ?= { + save_scope_as = task_contract_councillor_liege + } + } + if = { + limit = { + exists = scope:task_contract.var:task_contract_destination + } + scope:task_contract.var:task_contract_destination = { + save_scope_as = task_contract_destination + } + } + if = { + limit = { + exists = scope:task_contract.var:task_contract_target + } + scope:task_contract.var:task_contract_target ?= { + save_scope_as = task_contract_target + } + } + if = { + limit = { + exists = scope:task_contract.var:task_contract_object + } + scope:task_contract.var:task_contract_object = { + save_scope_as = task_contract_object + } + } + if = { + limit = { + exists = scope:task_contract.var:escorted_artifact + } + scope:task_contract.var:escorted_artifact = { + save_scope_as = escorted_artifact + } + } + if = { + limit = { + exists = scope:task_contract.var:escorted_gold + } + scope:task_contract.var:escorted_gold = { + save_scope_as = escorted_gold + } + } + if = { + limit = { + exists = scope:task_contract.var:escorted_story + } + scope:task_contract.var:escorted_story = { + save_scope_as = escorted_story + } + } + #show a nice tooltip with which contract, who you are taking and where are you going info + scope:task_contract = { + switch = { + trigger = has_task_contract_type + laamp_transport_vip = { + scope:actor = { custom_tooltip = ep3_contract_event.0001.tt_vip } + } + laamp_transport_ward = { + scope:actor = { custom_tooltip = ep3_contract_event.0001.tt_ward } + } + laamp_transport_explorer = { + scope:actor = { custom_tooltip = ep3_contract_event.0001.tt_explorer } + } + laamp_transport_artifact = { + scope:actor = { custom_tooltip = ep3_contract_event.0001.tt_artifact } + } + laamp_transport_gold = { + scope:actor = { custom_tooltip = ep3_contract_event.0001.tt_gold } + } + laamp_transport_animal = { + scope:actor = { custom_tooltip = ep3_contract_event.0001.tt_animal } + } + laamp_construction_contract = { + scope:actor = { custom_tooltip = ep3_contract_event.0001.tt_construction } + } + laamp_help_increase_control_contract = { + scope:actor = { custom_tooltip = ep3_contract_event.0001.tt_increase_control } + } + } + } + #trigger the travel planner + switch = { + trigger = yes + scope:with_domicile = { + start_travel_plan = { + destination = scope:task_contract_destination + travel_with_domicile = yes + return_trip = no + on_arrival_destinations = all + } + custom_tooltip = ep3_contract_event.0001.with_domicile.tt + } + scope:without_domicile = { + start_travel_plan = { + destination = scope:task_contract_destination + on_arrival_destinations = all + } + } + } + } + } + + auto_accept = yes +} + +################## +# Make a Request +# by Arkadiusz Majewski +# As a LAAMP you can ask characters on your contact list for something +################## + +contact_list_request_interaction = { # make a request, make_a_request + category = interaction_category_laamp + interface_priority = 110 + icon = icon_scheme_befriend + desc = contact_list_request_interaction_desc + common_interaction = yes + + popup_on_receive = yes + pause_on_receive = yes + + ai_min_reply_days = 0 + ai_max_reply_days = 0 + + cooldown_against_recipient = { months = 8 } + + is_shown = { + has_ep3_dlc_trigger = yes + scope:actor = { OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } } + scope:actor != scope:recipient + } + is_valid_showing_failures_only = { + scope:recipient = { + is_adult = yes + is_imprisoned = no + NOR = { + is_at_war_with = scope:actor + has_relation_rival = scope:actor + has_relation_nemesis = scope:actor + has_opinion_modifier = { + target = scope:actor + modifier = released_from_prison + } + has_opinion_modifier = { + target = scope:actor + modifier = eviction_ignored_opinion + } + house_has_feud_relation_with_trigger = { TARGET = scope:actor } + } + } + scope:actor = { + NOT = { has_truce = scope:recipient } + } + scope:recipient = { + trigger_if = { + limit = { + NOR = { + is_contact_of = scope:actor + is_close_or_extended_family_of = scope:actor + is_consort_of = scope:actor + AND = { + OR = { + capital_province ?= scope:actor.domicile.domicile_location + any_held_title = { + title_tier = county + any_county_province = { + this = scope:actor.domicile.domicile_location + } + } + } + scope:actor = { has_perk = embassies_perk } + } + } + } + is_contact_of = scope:actor + } + } + scope:recipient = { + custom_tooltip = { + text = RULER_DESIGNER_ACHIEVEMENTS_NOT_AVAILABLE + OR = { + is_landed = yes + gold > 20 + AND = { + is_landed_or_landless_administrative = yes + scope:actor.maa_regiments_count < scope:actor.maa_regiments_max_count + } + AND = { + #Recipient can marry the actor + can_marry_character_trigger = { CHARACTER = scope:actor } + #To account for a person marrying their concubines + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + can_marry_character_trigger = { CHARACTER = scope:actor } + } + } + } + } + } + } + is_highlighted = { + scope:actor = { + is_character_interaction_potentially_accepted = { + recipient = scope:recipient + interaction = contact_list_request_interaction + } + } + } + can_send = { + #Has to be used instead of diplo range checks in laamp to landed interactions + ep3_laamp_diplo_range_trigger = { + TARGET = scope:recipient + LAAMP = scope:actor + } + } + #request provisions + send_option = { + flag = request_provisions + is_valid = { + scope:recipient = { + is_landed = yes + } + } + } + #request gold + send_option = { + flag = request_gold + is_valid = { + custom_tooltip = { + scope:recipient.gold > 20 + text = contact_list_request_interaction.request_gold_recipient_not_enough_gold + } + } + } + #request men-at-arms regiment + send_option = { + flag = request_maa + is_valid = { + scope:recipient = { + is_landed_or_landless_administrative = yes + } + custom_tooltip = { + scope:actor.maa_regiments_count < scope:actor.maa_regiments_max_count + text = contact_list_request_interaction.request_maa_actor_too_many_regiments + } + } + } + #request a knight + send_option = { + flag = request_knights + is_shown = { + scope:recipient = { is_ai = yes } + } + is_valid = { + custom_tooltip = { + scope:recipient = { + any_knight = { + is_landed = no + count > 1 + } + } + text = contact_list_request_interaction.request_knights_recipient_not_enough_knights + } + } + } + #request to arrange a marriage + send_option = { + flag = request_marriage + is_valid = { + #There is an available marriage, copied from 00_marriage_interactions is_valid_showing_failures_only + custom_description = { + text = "basic_can_marry_check_recipient" + subject = scope:actor + object = scope:recipient + scope:recipient = { + OR = { + AND = { + #Recipient can marry the actor + can_marry_character_trigger = { CHARACTER = scope:actor } + #To account for a person marrying their concubines + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + can_marry_character_trigger = { CHARACTER = scope:actor } + } + } + AND = { + is_ruler = yes #(Following are only for rulers) + OR = { + any_child = { + matchmaker = scope:actor + OR = { + #Any of recipient's children can marry + AND = { + can_marry_trigger = yes + #To account for a person marrying their concubines + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + } + } + #Any of recipient's children are ready to marry their betrothed + AND = { + ready_to_marry_betrothed_trigger = yes + betrothed.matchmaker = scope:actor + } + } + } + any_courtier = { + OR = { + #Any of recipient's courtiers can marry + AND = { + can_marry_trigger = yes + #To account for a person marrying their concubines + trigger_if = { + limit = { + is_concubine = yes + } + is_concubine_of = scope:actor + } + } + #Any of recipient's courtiers are ready to marry their betrothed + AND = { + ready_to_marry_betrothed_trigger = yes + betrothed.matchmaker = scope:actor + } + } + } + } + } + } + } + } + } + } + #request new contract + send_option = { + flag = request_contract + is_shown = { + scope:recipient = { is_ai = yes } + } + is_valid = { + custom_tooltip = { + text = contact_list_request_interaction.create_contracts.already_has_contract + scope:actor = { + any_character_task_contract = { + count = all + task_contract_employer != scope:recipient + } + is_ai = no + } + } + custom_description = { + text = contact_list_request_interaction_create_contracts + object = scope:recipient + scope:actor = { + OR = { + can_create_task_contract = { + type_name = laamp_raid_contract + employer = scope:recipient + } + can_create_task_contract = { + type_name = laamp_join_war_contract + employer = scope:recipient + } + can_create_task_contract = { + type_name = laamp_steal_artifact_contract + employer = scope:recipient + } + can_create_task_contract = { + type_name = laamp_construction_contract + employer = scope:recipient + } + can_create_task_contract = { + type_name = laamp_treasure_hunting_contract + employer = scope:recipient + } + can_create_task_contract = { + type_name = laamp_transport_vip + employer = scope:recipient + } + can_create_task_contract = { + type_name = laamp_transport_artifact + employer = scope:recipient + } + can_create_task_contract = { + type_name = laamp_transport_gold + employer = scope:recipient + } + can_create_task_contract = { + type_name = laamp_transport_ward + employer = scope:recipient + } + can_create_task_contract = { + type_name = laamp_transport_explorer + employer = scope:recipient + } + can_create_task_contract = { + type_name = laamp_transport_animal + employer = scope:recipient + } + can_create_task_contract = { + type_name = laamp_join_faction_contract + employer = scope:recipient + } + } + } + } + } + } + #request feast + send_option = { + flag = request_feast + is_shown = { + scope:actor = { + has_perk = inspiring_rule_perk + } + scope:recipient = { + is_landed_or_landless_administrative = yes + capital_province ?= { + squared_distance = { + target = scope:actor.capital_province + value < define:NTaskContract|ADVENTURER_DISTANCE_RESTRICTION + } + } + } + scope:recipient = { is_ai = yes } + } + is_valid = { + scope:recipient = { + highest_held_title_tier > tier_barony + is_at_war = no + is_available_adult = yes + } + scope:actor = { + custom_tooltip = { + text = ACTIVITY_SUMMARY_COOLDOWN_HEADER + NOT = { has_character_flag = laamp_recently_requested_feast } + } + } + } + } + #request tournament + send_option = { + flag = request_tournament + is_shown = { + has_ep2_dlc_trigger = yes + scope:actor = { + has_perk = stalwart_leader_perk + } + scope:recipient = { + is_landed = yes + NOT = { has_variable = conqueror } + capital_province ?= { + squared_distance = { + target = scope:actor.capital_province + value < define:NTaskContract|ADVENTURER_DISTANCE_RESTRICTION + } + } + } + scope:recipient = { is_ai = yes } + } + is_valid = { + scope:recipient = { + highest_held_title_tier > tier_barony + is_at_war = no + is_available_adult = yes + } + scope:actor = { + custom_tooltip = { + text = contact_list_request_interaction.request_tournament_cooldown + NOT = { has_character_flag = laamp_recently_requested_tourney } + } + } + } + } + should_use_extra_icon = { + scope:actor = { has_usable_hook = scope:recipient } + } + extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" + + cost = { + prestige = { + add = 100 + # Upgrade for tier. + multiply = { + value = scope:recipient.highest_held_title_tier + # Discount barons. + add = -1 + } + # Upgrade for the more egregious requests. + ## Marriage. + if = { + limit = { scope:request_marriage = yes } + multiply = 1.5 + } + ## Activities. + ### Tournament. + if = { + limit = { scope:request_tournament = yes } + multiply = 2 + } + ### Feast. + if = { + limit = { scope:request_feast = yes } + multiply = 1.25 + } + min = 100 + } + } + + on_accept = { + scope:actor = { + switch = { + trigger = yes + scope:request_tournament ?= { + scope:recipient = { + add_opinion = { + modifier = laamp_used_contact_opinion_special + target = scope:actor + opinion = -50 + } + custom_tooltip = contact_list_request_interaction.request_tournament + } + hidden_effect = { + scope:recipient = { + add_character_flag = { + flag = tournament_ai_override + } + ai_attempt_to_host_activity = activity_tournament + } + scope:actor = { + add_character_flag = { + flag = laamp_recently_requested_tourney + days = 3650 + } + } + } + } + scope:request_feast ?= { + scope:actor = { custom_tooltip = contact_list_request_interaction.request_feast_honor } + scope:recipient = { + add_opinion = { + modifier = laamp_used_contact_opinion + target = scope:actor + opinion = -30 + } + custom_tooltip = contact_list_request_interaction.request_feast + } + hidden_effect = { + scope:recipient = { + add_character_flag = { + flag = feast_ai_override + } + ai_attempt_to_host_activity = activity_feast + } + scope:actor = { + add_character_flag = { + flag = laamp_recently_requested_feast + days = 1875 + } + } + } + } + scope:request_provisions ?= { + save_scope_value_as = { + name = provisions_to_add_value + value = { + if = { + limit = { scope:recipient.highest_held_title_tier >= tier_empire } + add = monumental_provisions_gain + } + else_if = { + limit = { scope:recipient.highest_held_title_tier >= tier_kingdom } + add = massive_provisions_gain + } + else_if = { + limit = { scope:recipient.highest_held_title_tier >= tier_duchy } + add = major_provisions_gain + } + else_if = { + limit = { scope:recipient.highest_held_title_tier >= tier_county } + add = medium_provisions_gain + } + else = { add = minor_provisions_gain } + } + } + if = { + limit = { + scope:actor.domicile.max_provisions < { + value = { + value = scope:provisions_to_add_value + add = scope:actor.domicile.provisions + } + } + } + save_scope_value_as = { + name = gained_provisions_value + value = { + value = scope:actor.domicile.max_provisions + subtract = scope:actor.domicile.provisions + } + } + save_scope_value_as = { + name = provisions_overflow_value + value = { + value = scope:provisions_to_add_value + subtract = scope:gained_provisions_value + } + } + save_scope_value_as = { + name = provisions_transformed_to_gold_value + value = { + value = scope:provisions_overflow_value + multiply = 0.05 + } + } + } + else = { + save_scope_value_as = { + name = gained_provisions_value + value = scope:provisions_to_add_value + } + } + send_interface_toast = { + type = event_toast_effect_good + title = contact_list_request_interaction.request_provisions_tt + left_icon = scope:actor + right_icon = scope:recipient + scope:recipient = { + add_opinion = { + modifier = laamp_used_contact_opinion_special + target = scope:actor + opinion = -20 + } + if = { + limit = { + exists = capital_county + } + hidden_effect = { + capital_county = { + add_county_modifier = { + modifier = ep3_gave_out_provisions + years = 3 + } + #save it for loc in custom tooltip + save_scope_as = capital_county + } + } + custom_tooltip = contact_list_request_interaction.capital_county_modifier + } + } + scope:actor = { + custom_tooltip = contact_list_request_interaction.gained_provisions_value + hidden_effect = { + domicile = { + change_provisions = scope:gained_provisions_value + } + } + if = { + limit = { + exists = scope:provisions_transformed_to_gold_value + } + custom_tooltip = { + text = overflowing_provisions_to_gold.tt + add_gold = scope:provisions_transformed_to_gold_value + } + } + } + } + } + scope:request_gold ?= { + save_scope_value_as = { + name = requested_gold_value + value = { + value = scope:recipient.gold + divide = 4 + multiply = { + value = scope:recipient.ai_greed + divide = -300 + add = 1 + } + if = { + limit = { + scope:recipient = { + has_any_best_good_relationship_with_character_trigger = { CHARACTER = scope:actor } + } + } + multiply = 1.5 + } + else_if = { + limit = { + scope:recipient = { + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:actor } + } + } + multiply = 1.25 + } + max = { + scope:recipient.culture = { + if = { + limit = { + has_cultural_era_or_later = culture_era_late_medieval + } + value = 250 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_high_medieval + } + value = 200 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_early_medieval + } + value = 150 + } + else_if = { + limit = { + has_cultural_era_or_later = culture_era_tribal + } + value = 100 + } + else = { + value = 50 + } + } + } + floor = yes + min = 5 + } + } + send_interface_toast = { + type = event_toast_effect_good + title = contact_list_request_interaction.request_gold_tt + left_icon = scope:actor + right_icon = scope:recipient + scope:actor = { + show_as_tooltip = { + add_gold = scope:requested_gold_value + } + } + scope:recipient = { + pay_short_term_gold = { + target = scope:actor + gold = scope:requested_gold_value + } + add_opinion = { + modifier = laamp_used_contact_opinion + target = scope:actor + opinion = -40 + } + } + } + } + scope:request_maa ?= { + custom_tooltip = contact_list_request_interaction.request_maa + hidden_effect = { + ep3_pick_random_maa_regiment_effect = { + OWNER = scope:recipient + INCLUDE_BASIC_MAA = no + INCLUDE_SIEGE_MAA = no + } + send_interface_toast = { + type = event_toast_effect_good + title = contact_list_request_interaction.request_maa_tt + left_icon = scope:actor + right_icon = scope:recipient + ep3_create_random_maa_regiment_effect = { + OWNER = scope:actor + SIZE = 1 + } + } + } + scope:recipient = { + add_opinion = { + modifier = laamp_used_contact_opinion + target = scope:actor + opinion = -40 + } + } + } + scope:request_knights ?= { + scope:actor = { + custom_tooltip = contact_list_request_interaction.request_knights + trigger_event = ep3_interactions_events.0101 + } + scope:recipient = { + add_opinion = { + modifier = laamp_used_contact_opinion + target = scope:actor + opinion = -30 + } + } + } + scope:request_marriage ?= { + scope:actor = { + custom_tooltip = contact_list_request_interaction.request_marriage + custom_tooltip = contact_list_request_interaction.request_marriage.marriagable_women + custom_tooltip = contact_list_request_interaction.request_marriage.marriagable_men + custom_tooltip = contact_list_request_interaction.request_marriage.warning + if = { + limit = { is_ai = no } + open_interaction_window = { + interaction = arrange_marriage_interaction + actor = scope:actor + recipient = scope:recipient + } + } + add_to_variable_list = { + name = contact_list_marriage + target = scope:recipient + } + } + scope:recipient = { + add_opinion = { + modifier = laamp_used_contact_opinion + target = scope:actor + opinion = -50 + } + } + } + scope:request_contract ?= { + scope:actor = { + custom_tooltip = contact_list_request_interaction.request_contract + hidden_effect = { + random_list = { + #laamp_raid_contract + 1 = { + trigger = { + can_create_task_contract = { + type_name = laamp_raid_contract + employer = scope:recipient + } + } + modifier = { + add = 10 + has_realm_law = camp_purpose_mercenaries + } + create_task_contract = { + task_contract_type = laamp_raid_contract + location = scope:recipient.capital_province + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + save_scope_as = new_contract + } + save_scope_value_as = { + name = create_laamp_raid_contract + value = yes + } + } + #laamp_join_war_contract + 1 = { + trigger = { + can_create_task_contract = { + type_name = laamp_join_war_contract + employer = scope:recipient + } + } + modifier = { + add = 10 + has_realm_law = camp_purpose_mercenaries + } + create_task_contract = { + task_contract_type = laamp_join_war_contract + location = scope:recipient.capital_province + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + save_scope_as = new_contract + } + save_scope_value_as = { + name = create_laamp_join_war_contract + value = yes + } + } + #laamp_steal_artifact_contract + 1 = { + trigger = { + can_create_task_contract = { + type_name = laamp_steal_artifact_contract + employer = scope:recipient + } + } + modifier = { + add = 10 + has_realm_law = camp_purpose_brigands + } + create_task_contract = { + task_contract_type = laamp_steal_artifact_contract + location = scope:recipient.capital_province + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + save_scope_as = new_contract + } + save_scope_value_as = { + name = create_laamp_steal_artifact_contract + value = yes + } + } + #laamp_construction_contract + 1 = { + trigger = { + can_create_task_contract = { + type_name = laamp_construction_contract + employer = scope:recipient + } + } + modifier = { + add = 10 + has_realm_law = camp_purpose_scholars + } + create_task_contract = { + task_contract_type = laamp_construction_contract + location = scope:recipient.capital_province + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + save_scope_as = new_contract + } + save_scope_value_as = { + name = create_laamp_construction_contract + value = yes + } + } + #laamp_treasure_hunting_contract + 1 = { + trigger = { + can_create_task_contract = { + type_name = laamp_treasure_hunting_contract + employer = scope:recipient + } + } + modifier = { + add = 10 + OR = { + has_realm_law = camp_purpose_brigands + has_realm_law = camp_purpose_explorers + } + } + create_task_contract = { + task_contract_type = laamp_treasure_hunting_contract + location = scope:recipient.capital_province + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + save_scope_as = new_contract + } + save_scope_value_as = { + name = create_laamp_treasure_hunting_contract + value = yes + } + } + #laamp_transport_vip + 1 = { + trigger = { + can_create_task_contract = { + type_name = laamp_transport_vip + employer = scope:recipient + } + } + modifier = { + add = 10 + has_realm_law = camp_purpose_explorers + } + create_task_contract = { + task_contract_type = laamp_transport_vip + location = scope:recipient.capital_province + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + save_scope_as = new_contract + } + save_scope_value_as = { + name = create_laamp_transport_vip + value = yes + } + } + #laamp_transport_artifact + 1 = { + trigger = { + can_create_task_contract = { + type_name = laamp_transport_artifact + employer = scope:recipient + } + } + modifier = { + add = 10 + OR = { + has_realm_law = camp_purpose_brigands + has_realm_law = camp_purpose_explorers + } + } + create_task_contract = { + task_contract_type = laamp_transport_artifact + location = scope:recipient.capital_province + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + save_scope_as = new_contract + } + save_scope_value_as = { + name = create_laamp_transport_artifact + value = yes + } + } + #laamp_transport_gold + 1 = { + trigger = { + can_create_task_contract = { + type_name = laamp_transport_gold + employer = scope:recipient + } + } + modifier = { + add = 10 + OR = { + has_realm_law = camp_purpose_brigands + has_realm_law = camp_purpose_explorers + } + } + create_task_contract = { + task_contract_type = laamp_transport_gold + location = scope:recipient.capital_province + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + save_scope_as = new_contract + } + save_scope_value_as = { + name = create_laamp_transport_gold + value = yes + } + } + #laamp_transport_ward + 1 = { + trigger = { + can_create_task_contract = { + type_name = laamp_transport_ward + employer = scope:recipient + } + } + modifier = { + add = 10 + has_realm_law = camp_purpose_explorers + } + create_task_contract = { + task_contract_type = laamp_transport_ward + location = scope:recipient.capital_province + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + save_scope_as = new_contract + } + save_scope_value_as = { + name = create_laamp_transport_ward + value = yes + } + } + #laamp_transport_explorer + 1 = { + trigger = { + can_create_task_contract = { + type_name = laamp_transport_explorer + employer = scope:recipient + } + } + modifier = { + add = 10 + has_realm_law = camp_purpose_explorers + } + create_task_contract = { + task_contract_type = laamp_transport_explorer + location = scope:recipient.capital_province + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + save_scope_as = new_contract + } + save_scope_value_as = { + name = create_laamp_transport_explorer + value = yes + } + } + #laamp_transport_animal + 1 = { + trigger = { + can_create_task_contract = { + type_name = laamp_transport_animal + employer = scope:recipient + } + } + modifier = { + add = 10 + has_realm_law = camp_purpose_explorers + } + create_task_contract = { + task_contract_type = laamp_transport_animal + location = scope:recipient.capital_province + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + save_scope_as = new_contract + } + save_scope_value_as = { + name = create_laamp_transport_animal + value = yes + } + } + #laamp_join_faction_contract + 1 = { + trigger = { + can_create_task_contract = { + type_name = laamp_join_faction_contract + employer = scope:recipient + } + } + modifier = { + add = 10 + has_realm_law = camp_purpose_mercenaries + } + create_task_contract = { + task_contract_type = laamp_join_faction_contract + location = scope:recipient.capital_province + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + save_scope_as = new_contract + } + save_scope_value_as = { + name = create_laamp_join_faction_contract + value = yes + } + } + } + scope:new_contract = { + open_view_data = { + view = task_contract + player = scope:actor + } + } + } + } + scope:recipient = { + add_opinion = { + modifier = laamp_used_contact_opinion + target = scope:actor + opinion = -5 + } + show_as_tooltip = { + custom_description_no_bullet = { text = contact_list_request_interaction_possible_outcomes } + if = { + limit = { + scope:create_laamp_raid_contract ?= yes + } + create_task_contract = { + task_contract_type = laamp_raid_contract + location = scope:recipient.location + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + } + } + if = { + limit = { + scope:create_laamp_join_war_contract ?= yes + } + create_task_contract = { + task_contract_type = laamp_join_war_contract + location = scope:recipient.location + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + } + } + if = { + limit = { + scope:create_laamp_construction_contract ?= yes + } + create_task_contract = { + task_contract_type = laamp_construction_contract + location = scope:recipient.location + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + } + } + if = { + limit = { + scope:create_laamp_steal_artifact_contract ?= yes + } + create_task_contract = { + task_contract_type = laamp_steal_artifact_contract + location = scope:recipient.location + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + } + } + if = { + limit = { + scope:create_laamp_treasure_hunting_contract ?= yes + } + create_task_contract = { + task_contract_type = laamp_treasure_hunting_contract + location = scope:recipient.location + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + } + } + if = { + limit = { + scope:create_laamp_transport_vip ?= yes + } + create_task_contract = { + task_contract_type = laamp_transport_vip + location = scope:recipient.location + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + } + } + if = { + limit = { + scope:create_laamp_transport_artifact ?= yes + } + create_task_contract = { + task_contract_type = laamp_transport_artifact + location = scope:recipient.location + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + } + } + if = { + limit = { + scope:create_laamp_transport_gold ?= yes + } + create_task_contract = { + task_contract_type = laamp_transport_gold + location = scope:recipient.location + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + } + } + if = { + limit = { + scope:create_laamp_transport_ward ?= yes + } + create_task_contract = { + task_contract_type = laamp_transport_ward + location = scope:recipient.location + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + } + } + if = { + limit = { + scope:create_laamp_transport_explorer ?= yes + } + create_task_contract = { + task_contract_type = laamp_transport_explorer + location = scope:recipient.location + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + } + } + if = { + limit = { + scope:create_laamp_transport_animal ?= yes + } + create_task_contract = { + task_contract_type = laamp_transport_animal + location = scope:recipient.location + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + } + } + if = { + limit = { + scope:create_laamp_join_faction_contract ?= yes + } + create_task_contract = { + task_contract_type = laamp_join_faction_contract + location = scope:recipient.location + task_contract_employer = scope:recipient + task_contract_tier = scope:recipient.task_contract_tier_value + } + } + } + } + } + } + if = { + limit = { + has_usable_hook = scope:recipient + scope:recipient = { is_ai = yes } + } + use_hook = scope:recipient + custom_tooltip = contact_list_request_interaction.tt.hook_auto_used + } + } + scope:recipient = { + add_prestige = { + value = scope:actor.prestige_level + multiply = 100 + } + } + } + + can_send_despite_rejection = no + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 3 + kingdom = 0 + empire = 0 + hegemony = 0 + } + ai_targets = { ai_recipients = contacts } + ai_targets = { ai_recipients = hooked_characters } + auto_accept = { + scope:actor = { has_usable_hook = scope:recipient } + scope:recipient = { is_ai = yes } + } + ai_potential = { OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } } + ai_accept = { + base = 0 + + modifier = { + add = -50 + scope:recipient = { + NOR = { + is_contact_of = scope:actor + is_close_or_extended_family_of = scope:actor + is_consort_of = scope:actor + } + } + desc = contact_list_request_interaction.no_contact + } + + opinion_modifier = { # Opinion Factor + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.5 + desc = AI_OPINION_REASON + } + + modifier = { + add = -50 + scope:recipient = { + has_opinion_modifier = { + modifier = laamp_used_contact_opinion + target = scope:actor + } + } + desc = contact_list_request_interaction.repeated_request + } + + ai_value_modifier = { + ai_compassion = -0.5 + ai_greed = -0.5 + min = -50 + max = 50 + } + + modifier = { + add = 30 + desc = contact_list_request_interaction.request_gold.contract + scope:request_contract ?= yes + } + + modifier = { + add = -30 + desc = contact_list_request_interaction.request_gold.poor_recipient + scope:request_gold ?= yes + scope:recipient = { + gold < major_gold_value + } + } + + modifier = { + add = 25 + desc = contact_list_request_interaction.request_gold.stewardship + OR = { + scope:request_provisions ?= yes + scope:request_gold ?= yes + } + scope:recipient = { + has_trait = education_stewardship + } + } + + modifier = { + add = 25 + desc = contact_list_request_interaction.request_gold.martial + OR = { + scope:request_maa ?= yes + scope:request_knights ?= yes + } + scope:recipient = { + has_trait = education_martial + } + } + + modifier = { + add = 25 + desc = contact_list_request_interaction.request.defensive_negotiations_perk + OR = { + scope:request_maa ?= yes + scope:request_knights ?= yes + } + scope:actor = { + has_perk = defensive_negotiations_perk + } + } + + modifier = { + add = 25 + desc = contact_list_request_interaction.relevant_focus + scope:request_marriage ?= yes + scope:recipient = { + OR = { + has_focus = diplomacy_family_focus + has_focus = intrigue_temptation_focus + has_focus = martial_chivalry_focus + } + } + } + + modifier = { + add = 25 + desc = contact_list_request_interaction.relevant_focus + OR = { + scope:request_maa ?= yes + scope:request_knights ?= yes + } + scope:recipient = { + OR = { + has_focus = martial_strategy_focus + has_focus = martial_chivalry_focus + has_focus = martial_authority_focus + } + } + } + + modifier = { + add = 25 + desc = contact_list_request_interaction.request_knights.plenty + scope:request_knights ?= yes + scope:recipient = { + number_of_knights > 6 + } + } + + modifier = { + add = -25 + desc = contact_list_request_interaction.request_knights.little + scope:request_knights ?= yes + scope:recipient = { + number_of_knights <= 6 + } + } + + modifier = { + add = -25 + desc = contact_list_request_interaction.powerful + scope:request_maa ?= yes + scope:actor = { + max_military_strength >= 400 + max_military_strength < 800 + } + } + + modifier = { + add = -50 + desc = contact_list_request_interaction.very_powerful + scope:request_maa ?= yes + scope:actor.max_military_strength >= 800 + } + + modifier = { + add = -30 + desc = contact_list_request_interaction.stronger_than_me + scope:request_maa ?= yes + scope:actor.max_military_strength > scope:recipient.max_military_strength + } + + modifier = { + add = -25 + desc = contact_list_request_interaction.traveler + scope:request_provisions ?= yes + scope:recipient = { + has_trait = lifestyle_traveler + } + } + + modifier = { + add = 25 + desc = contact_list_request_interaction.adventurer + scope:recipient = { + has_trait = adventurer + } + } + + modifier = { + add = 25 + desc = contact_list_request_interaction.adventurer_follower + scope:recipient = { + has_trait = adventurer_follower + } + } + + modifier = { + add = 20 + desc = contact_list_request_interaction.flexible_truces_perk + scope:actor = { + has_perk = flexible_truces_perk + } + } + + # Your level of prestige. + ## Impotent + modifier = { + add = -10 + desc = AI_OPINION_PRESTIGE_LEVEL_DISGRACED + scope:actor.prestige_level = 0 + } + ## Influential + ### Would be zero, so it wouldn't appear. + ## Persuasive + modifier = { + add = 5 + desc = AI_OPINION_PRESTIGE_LEVEL_DISTINGUISHED + scope:actor.prestige_level = 2 + scope:actor = { + NOT = { + has_perk = true_ruler_perk + } + } + } + ## Controlling + modifier = { + add = 10 + desc = AI_OPINION_PRESTIGE_LEVEL_ILLUSTRIOUS + scope:actor.prestige_level = 3 + scope:actor = { + NOT = { + has_perk = true_ruler_perk + } + } + } + ## Authoritative + modifier = { + add = 20 + desc = AI_OPINION_PRESTIGE_LEVEL_EXALTED + scope:actor.prestige_level = 4 + scope:actor = { + NOT = { + has_perk = true_ruler_perk + } + } + } + ## Imperious + modifier = { + add = 30 + desc = AI_OPINION_PRESTIGE_LEVEL_LEGENDARY + scope:actor.prestige_level = 5 + scope:actor = { + NOT = { + has_perk = true_ruler_perk + } + } + } + + ## Persuasive + modifier = { + add = 6 + desc = AI_OPINION_PRESTIGE_LEVEL_DISTINGUISHED + scope:actor.prestige_level = 2 + scope:actor = { has_perk = true_ruler_perk } + } + ## Controlling + modifier = { + add = 12 + desc = AI_OPINION_PRESTIGE_LEVEL_ILLUSTRIOUS + scope:actor.prestige_level = 3 + scope:actor = { has_perk = true_ruler_perk } + } + ## Authoritative + modifier = { + add = 24 + desc = AI_OPINION_PRESTIGE_LEVEL_EXALTED + scope:actor.prestige_level = 4 + scope:actor = { has_perk = true_ruler_perk } + } + ## Imperious + modifier = { + add = 36 + desc = AI_OPINION_PRESTIGE_LEVEL_LEGENDARY + scope:actor.prestige_level = 5 + scope:actor = { has_perk = true_ruler_perk } + } + } + + ai_will_do = { + base = 50 + + # Set up the AI so that they actually know how to use the send_options. + ## Troops, if they don't have gold. + modifier = { + add = 50 + scope:recipient.gold < 50 + scope:request_maa = yes + } + ## Gold is always good. + modifier = { + add = 50 + scope:recipient.gold >= 30 + scope:request_gold = yes + } + ## Feasts are especially attractive for some adventurers. + modifier = { + add = 50 + scope:request_feast = yes + OR = { + prestige <= 500 + has_trait = arrogant + has_trait = gluttonous + has_trait = gregarious + has_trait = drunkard + } + } + ## Provisions are fine, but nothing special for the AI. + modifier = { + add = 5 + scope:request_provisions = yes + scope:actor.domicile.provisions < scope:actor.domicile.max_provisions + } + ## Don't go crazy with tournaments + modifier = { + factor = 0 + scope:request_tournament = yes + } + modifier = { + factor = 0 + NOR = { + scope:request_provisions = yes + scope:request_gold = yes + scope:request_maa = yes + scope:request_knights = yes + scope:request_marriage = yes + scope:request_contract = yes + scope:request_feast = yes + scope:request_tournament = yes + } + } + } +} + +################## +# Seize Realm Scheme +# by Joe Parkin +################## + +seize_realm_interaction = { + icon = icon_scheme_seizure + category = interaction_category_laamp + interface_priority = 10 + + ignores_pending_interaction_block = yes + + scheme = seize_realm + + send_name = START_SCHEME + + is_shown = { + scope:recipient != scope:actor + scope:actor = { OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } } + scope:recipient = { + is_landed = yes + highest_held_title_tier >= tier_county + } + } + + is_valid_showing_failures_only = { + scope:actor = { + can_start_scheme = { + type = seize_realm + target_character = scope:recipient + } + } + NOT = { + scope:recipient = { has_strong_hook = scope:actor } + } + #Has to be used instead of diplo range checks in laamp to landed interactions + ep3_laamp_diplo_range_trigger = { + TARGET = scope:recipient + LAAMP = scope:actor + } + } + + desc = { + triggered_desc = { + trigger = { + scope:actor = { + can_start_scheme = { + type = seize_realm + target_character = scope:recipient + } + } + } + desc = scheme_interaction_tt_seize_realm_approved + } + } + + # Scheme Starter Packages + options_heading = schemes.t.agent_packages + send_options_exclusive = yes + ## Balanced agents. + send_option = { + flag = agent_focus_balance + current_description = seize_realm_interaction.tt.agent_focus_balance + } + ## Focused on Success Chance. + send_option = { + flag = agent_focus_success + current_description = seize_realm_interaction.tt.agent_focus_success + } + ## Focused on Speed. + send_option = { + flag = agent_focus_speed + current_description = seize_realm_interaction.tt.agent_focus_speed + } + ## Focused on Secrecy. + send_option = { + flag = agent_focus_secrecy + current_description = seize_realm_interaction.tt.agent_focus_secrecy + } + + on_accept = { + scope:actor = { + stress_impact = { + compassionate = major_stress_impact_gain + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + } + } + scope:actor = { + send_interface_toast = { + title = start_seize_realm_interaction_notification + + left_icon = scope:actor + right_icon = scope:recipient + + # Success. + if = { + limit = { scope:agent_focus_success ?= yes } + begin_scheme_with_agents_effect = { + SCHEME_TYPE = seize_realm + TARGET_TYPE = target_character + TARGET_SCOPE = scope:recipient + # Success. + AGENT_1 = agent_muscle + AGENT_2 = agent_muscle + AGENT_3 = agent_diplomat + # Speed. + AGENT_4 = agent_infiltrator + # Secrecy. + AGENT_5 = agent_lookout + } + } + # Speed. + else_if = { + limit = { scope:agent_focus_speed ?= yes } + begin_scheme_with_agents_effect = { + SCHEME_TYPE = seize_realm + TARGET_TYPE = target_character + TARGET_SCOPE = scope:recipient + # Speed. + AGENT_1 = agent_infiltrator + AGENT_2 = agent_footpad + AGENT_3 = agent_planner + # Success. + AGENT_4 = agent_muscle + # Secrecy. + AGENT_5 = agent_lookout + } + } + # Secrecy. + else_if = { + limit = { scope:agent_focus_secrecy ?= yes } + begin_scheme_with_agents_effect = { + SCHEME_TYPE = seize_realm + TARGET_TYPE = target_character + TARGET_SCOPE = scope:recipient + # Secrecy. + AGENT_1 = agent_lookout + AGENT_2 = agent_decoy + AGENT_3 = agent_decoy + # Success. + AGENT_4 = agent_muscle + # Speed. + AGENT_5 = agent_infiltrator + } + } + # Balanced. + else = { + begin_scheme_with_agents_effect = { + SCHEME_TYPE = seize_realm + TARGET_TYPE = target_character + TARGET_SCOPE = scope:recipient + # Success. + AGENT_1 = agent_muscle + AGENT_2 = agent_muscle + # Speed. + AGENT_3 = agent_infiltrator + AGENT_4 = agent_planner + # Secrecy. + AGENT_5 = agent_lookout + } + } + + show_as_tooltip = { + stress_impact = { + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + } + } + } + } + custom_tooltip = seize_realm_warning + } + + auto_accept = yes +} + +################## +# Reinforce Soldiers +# by Joe Parkin +################## + +reinforce_soldiers_interaction = { + icon = owner_in_debt + category = interaction_category_laamp + interface_priority = 10 + common_interaction = yes + desc = reinforce_soldiers_interaction_desc + cooldown = { months = 6 } + + is_shown = { + has_ep3_dlc_trigger = yes + scope:actor = { + government_allows = conditional_maa_refill + NOT = { government_has_flag = government_is_nomadic } + } + scope:recipient = scope:actor + } + + is_valid_showing_failures_only = { + custom_tooltip = { + text = reinforce_soldiers_any_regiment_tt + scope:actor.maa_regiments_count >= 1 + } + custom_tooltip = { + text = reinforce_soldiers_unfull_regiment_tt + scope:actor = { + any_maa_regiment = { maa_regiments_valid_for_cheap_reinforcement_trigger = yes } + } + } + custom_tooltip = { + text = SUPPLY_LOSS_AT_SEA + scope:actor = { any_laamp_portion_at_sea_trigger = no } + } + } + + send_options_exclusive = yes + + send_option = { + flag = skill + localization = reinforce_soldiers_option_skill + current_description = reinforce_soldiers_option_skill_desc + } + + send_option = { + flag = prestige + localization = reinforce_soldiers_option_prestige + current_description = reinforce_soldiers_option_prestige_desc + } + + send_option = { + flag = piety + localization = reinforce_soldiers_option_piety + current_description = reinforce_soldiers_option_piety_desc + is_valid = { + custom_tooltip = { + text = reinforce_soldiers_option_piety_tt + scope:actor.domicile.domicile_location.county ?= { + OR = { + holder ?= { government_has_flag = government_is_theocracy } + any_county_province = { + barony = { + is_under_holy_order_lease = yes + lessee.faith = scope:actor.faith + } + } + } + } + } + } + } + + send_option = { + flag = dread + localization = reinforce_soldiers_option_dread + current_description = reinforce_soldiers_option_dread_desc + is_valid = { + custom_tooltip = { + text = reinforce_soldiers_option_dread_tt + OR = { + scope:actor.dread >= reinforce_soldiers_dread_cost_value + scope:actor = { + has_character_modifier = ep3_friend_to_old_soldiers_modifier + } + } + } + } + } + + on_accept = { + scope:actor = { + switch = { + trigger = yes + scope:prestige = { + if = { + limit = { + is_ai = no + } + add_prestige = { + value = { + value = -75 + if = { + limit = { + scope:actor.domicile.domicile_location.county.holder ?= { government_has_flag = government_is_tribal } + } + add = 25 + } + multiply = reinforce_soldiers_reinforcable_regiments_value + } + } + } + reinforce_soldiers_regiment_effect = yes + } + scope:piety = { + add_piety = { + value = { + value = minor_piety_loss + multiply = reinforce_soldiers_reinforcable_regiments_value + } + } + reinforce_soldiers_regiment_effect = yes + } + scope:skill = { + duel = { + skills = { diplomacy prowess } + value = high_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 2 + } + desc = reinforce_soldiers_skill_success + send_interface_toast = { + type = event_toast_effect_good + title = reinforce_soldiers_skill_success + reinforce_soldiers_regiment_effect = yes + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 2 + } + desc = reinforce_soldiers_skill_failure + send_interface_toast = { + type = event_toast_effect_bad + title = reinforce_soldiers_skill_failure + if = { + limit = { + is_ai = no + } + add_prestige = -100 + } + } + } + } + } + scope:dread = { + random_list = { + 1 = { + modifier = { + add = { + value = scope:actor.dread + multiply = 2 + } + } + desc = reinforce_soldiers_skill_success + send_interface_toast = { + type = event_toast_effect_good + title = reinforce_soldiers_skill_success + reinforce_soldiers_regiment_effect = yes + } + } + 100 = { + min = 25 + modifier = { + add = { + value = 0 + subtract = scope:actor.dread + } + } + desc = reinforce_soldiers_skill_failure + send_interface_toast = { + type = event_toast_effect_bad + title = reinforce_soldiers_skill_failure + if = { + limit = { + is_ai = no + } + add_prestige = minor_prestige_loss + } + } + } + } + add_dread = { + value = reinforce_soldiers_dread_cost_value + multiply = -1 + } + } + } + } + } + + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 6 + kingdom = 0 + empire = 0 + hegemony = 0 + } + ai_targets = { + ai_recipients = self + } + ai_potential = { + government_allows = conditional_maa_refill + any_maa_regiment = { maa_current_troops_count < maa_max_troops_count } + } + + ai_will_do = { + base = 100 + + modifier = { + scope:dread = yes + add = 5 + } + + modifier = { + scope:prestige = yes + add = 3 + } + + modifier = { + scope:piety = yes + add = 2 + } + + modifier = { + scope:skill = yes + add = 1 + } + } +} + +################## +# Hire LAAMP as mercenaries +# by Arkadiusz Majewski +# As a landed ruler hire a LAAMP to join your war +################## + +hire_laamp_mercenaries_interaction = { + category = interaction_category_diplomacy + icon = alliance + desc = hire_laamp_mercenaries_interaction_desc + + greeting = positive + notification_text = hire_laamp_mercenaries_interaction_notification + popup_on_receive = yes + pause_on_receive = yes + + interface_priority = 60 + ai_min_reply_days = 0 + ai_max_reply_days = 0 + + cooldown_against_recipient = { years = 3 } + can_send_despite_rejection = yes + ai_accept_negotiation = yes + send_options_exclusive = no + is_shown = { + has_ep3_dlc_trigger = yes + scope:recipient = { + has_government = landless_adventurer_government + } + scope:actor != scope:recipient + scope:actor = { + trigger_if = { # Avoid calling Adventurers without armies + limit = { + is_ai = yes + } + scope:recipient.current_military_strength >= 100 + } + } + } + is_valid_showing_failures_only = { + scope:recipient = { + is_travelling = no + is_at_war = no + is_imprisoned = no + } + scope:actor = { + custom_tooltip = { + text = MERCENARY_COMPANY_COST_BANKRUPTCY + debt_level <= 1 + } + is_at_war = yes + custom_tooltip = { + text = I_MUST_BE_THE_WAR_LEADER + any_character_war = { + is_war_leader = scope:actor + } + } + NOT = { + is_at_war_with = scope:recipient + } + } + scope:actor = { + NOT = { + any_war_ally = { + count >= 3 + has_government = landless_adventurer_government + } + } + } + scope:actor = { + OR = { + is_ai = no + any_character_war = { + count = all + OR = { + AND = { + primary_attacker = scope:actor + defender_war_score <= 95 + } + AND = { + primary_defender = scope:actor + attacker_war_score <= 95 + } + } + } + } + } + # Adventurers can't join wars in places they're exiled from. + trigger_if = { + limit = { + scope:actor = { top_liege != this } + } + custom_tooltip = { + text = the_wake_1 + NOT = { + is_laamp_exiled_from_province_trigger = { + PROVINCE = scope:actor.capital_province + LAAMP = scope:recipient + } + } + } + } + } + + auto_accept = { + custom_description = { + text = "spending_hook" + subject = scope:actor + object = scope:recipient + scope:hook = yes + scope:actor = { has_strong_hook = scope:recipient } + } + } + + on_accept = { + scope:actor = { + every_character_war = { + add_to_list = actor_wars + } + } + every_in_list = { + list = actor_wars + limit = { + primary_defender = scope:actor + } + add_to_list = join_as_defender + remove_from_list = actor_wars + } + every_in_list = { + list = actor_wars + limit = { + primary_attacker = scope:actor + } + add_to_list = join_as_attacker + remove_from_list = actor_wars + } + + every_in_list = { + list = join_as_attacker + add_attacker = scope:recipient + } + every_in_list = { + list = join_as_defender + add_defender = scope:recipient + } + #list all wars that scope:recipient can't join + every_in_list = { + list = actor_wars + custom = hire_laamp_mercenaries_interaction.not_primary_side + # I swear it was the only way to make the tooltip look nice + every_in_list = { + list = actor_wars + save_temporary_scope_as = war + custom_tooltip = hire_laamp_mercenaries_interaction.war + } + } + scope:actor = { + pay_short_term_gold = { + target = scope:recipient + gold = ep3_hire_laamp_mercs_cost_value + } + add_to_variable_list = { + name = hired_mercenaries + target = scope:recipient + } + custom_tooltip = hire_laamp_mercenaries_interaction.contribution_pay + if = { + limit = { + has_title = title:h_china + situation:dynastic_cycle ?= { + situation_top_has_catalyst = catalyst_hegemon_hired_mercenary + } + } + trigger_situation_catalyst = { + catalyst = catalyst_hegemon_hired_mercenary + character = scope:actor + } + } + } + scope:recipient = { + add_character_flag = joined_as_mercenary + } + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_gain + DESC = clan_unity_alliance.desc + REVERSE_NON_HOUSE_TARGET = no + } + debug_log = "Landed ruler hired a LAAMP to join wars" + debug_log_scopes = yes + #for debug purposes: + #if = { + # limit = { NOT = { exists = global_var:hire_laamp_as_mercs_accepted } } + # set_global_variable = { + # name = hire_laamp_as_mercs_accepted + # value = 0 + # } + #} + #else = { + # change_global_variable = { + # name = hire_laamp_as_mercs_accepted + # add = 1 + # } + #} + } + + on_decline = { + scope:recipient = { + trigger_event = ep3_interactions_events.0111 + custom_tooltip = hire_laamp_mercenaries_interaction.negotiation_offer + } + #for debug purposes: + #if = { + # limit = { NOT = { exists = global_var:hire_laamp_as_mercs_rejected } } + # set_global_variable = { + # name = hire_laamp_as_mercs_rejected + # value = 0 + # } + #} + #else = { + # change_global_variable = { + # name = hire_laamp_as_mercs_rejected + # add = 1 + # } + #} + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_loss + DESC = clan_unity_alliance_refusal.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + # Use hook + 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" + + ai_frequency_by_tier = { + barony = 0 + county = 12 + duchy = 12 + kingdom = 6 + empire = 6 + hegemony = 6 + } + ai_targets = { + ai_recipients = nearby_domicile_owners + } + ai_potential = { + any_character_war = { + is_war_leader = prev + } + war_chest_gold >= quarter_ai_war_chest_gold_maximum + } + ai_accept = { + base = -20 + + modifier = { # merc laamp wants to join + add = 50 + scope:recipient = { + has_realm_law = camp_purpose_mercenaries + } + desc = camp_purpose_mercenaries_reason + } + + modifier = { # don't join many losing wars + save_temporary_scope_value_as = { + name = attacker_war + value = 2 + } + scope:actor = { + any_character_war = { + primary_attacker = scope:actor + attacker_war_score < 0 + save_temporary_scope_value_as = { + name = attacker_war + value = { + value = scope:attacker_war + multiply = attacker_war_score + } + } + } + } + add = scope:attacker_war + desc = attacker_losisng_too_much_reason + } + modifier = { # don't join many losing wars + add = scope:defender_war + save_temporary_scope_value_as = { + name = defender_war + value = 2 + } + scope:actor = { + any_character_war = { + primary_defender = scope:actor + defender_war_score < 0 + save_temporary_scope_value_as = { + name = defender_war + value = { + value = scope:defender_war + multiply = defender_war_score + } + } + } + } + desc = defender_losisng_too_much_reason + } + + modifier = { # Refuse call against Heir + add = -1000 + exists = scope:recipient.player_heir + scope:actor = { + any_character_war = { + OR = { + primary_defender = scope:recipient.player_heir + primary_attacker = scope:recipient.player_heir + } + } + } + desc = WONT_FIGHT_HEIR_REASON + } + + modifier = { # Refuse call against Spouse + add = -1000 + scope:actor = { + any_character_war = { + OR = { + primary_defender = { + is_spouse_of = scope:recipient + } + primary_attacker = { + is_spouse_of = scope:recipient + } + } + } + } + desc = WONT_FIGHT_SPOUSE_REASON + } + + opinion_modifier = { # Opinion Factor + who = scope:recipient + opinion_target = scope:actor + desc = AI_OPINION_REASON + } + + modifier = { # Tends to join if low on cash + add = 50 + scope:recipient = { + short_term_gold <= minor_gold_value + } + desc = NEEDS_CASH + } + + modifier = { # Tends to join defensive wars + add = 50 + scope:actor = { + any_character_war = { + primary_defender = scope:actor + } + } + desc = DEFENSIVE_WAR_REASON + } + + modifier = { # Same language + add = 5 + desc = speaks_same_language_interaction_reason + scope:actor = { + knows_language_of_culture = scope:recipient.culture + } + } + + compare_modifier = { # Likes fighting infidels + trigger = { + scope:recipient.faith = scope:actor.faith + scope:actor = { + any_character_war = { + trigger_if = { + limit = { + primary_defender = scope:actor + } + primary_attacker = { + faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= religious_cb_enabled_hostility_level + } + } + } + } + trigger_else_if = { + limit = { + primary_attacker = scope:actor + } + primary_defender = { + faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= religious_cb_enabled_hostility_level + } + } + } + } + trigger_else = { + always = no + } + } + } + } + target = scope:recipient + value = ai_zeal + desc = "ZEAL_AGAINST_INFIDELS" + min = 0 + multiplier = 0.5 + } + + modifier = { # Reluctant to attack another ally + add = -50 + scope:actor = { + any_character_war = { + primary_defender != scope:actor + primary_defender = { + is_allied_to = scope:recipient + } + } + } + desc = ATTACK_ON_ALLY_REASON + } + + modifier = { # Reluctant to defend against another ally + add = -25 + scope:actor = { + any_character_war = { + primary_attacker != scope:actor + primary_attacker = { + is_allied_to = scope:recipient + } + } + } + desc = WAR_WITH_ALLY_REASON + } + + modifier = { # Reluctant to join wars against religious brethren. + add = -50 + scope:recipient.faith != scope:actor.faith + scope:actor = { + any_character_war = { + OR = { + using_cb = minor_religious_war + using_cb = religious_war + using_cb = major_religious_war + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + OR = { + AND = { + primary_attacker != scope:actor + primary_attacker.faith = scope:recipient.faith + } + AND = { + primary_defender != scope:actor + primary_defender.faith = scope:recipient.faith + } + } + } + } + } + desc = WONT_ATTACK_RELIGIOUS_BRETHREN_REASON + } + + modifier = { # Reluctant to join against Friends + add = -50 + scope:actor = { + any_character_war = { + OR = { + AND = { + primary_attacker != scope:actor + primary_attacker = { + has_relation_friend = scope:recipient + } + } + AND = { + primary_defender != scope:actor + primary_defender = { + has_relation_friend = scope:recipient + } + } + } + } + } + } + + modifier = { # Reluctant to join against Best Friends + add = -100 + scope:actor = { + any_character_war = { + OR = { + AND = { + primary_attacker != scope:actor + primary_attacker = { + has_relation_best_friend = scope:recipient + } + } + AND = { + primary_defender != scope:actor + primary_defender = { + has_relation_best_friend = scope:recipient + } + } + } + } + } + } + modifier = { # Reluctant to join against Lovers + add = -100 + scope:actor = { + any_character_war = { + OR = { + AND = { + primary_attacker != scope:actor + primary_attacker = { + has_relation_lover = scope:recipient + } + } + AND = { + primary_defender != scope:actor + primary_defender = { + has_relation_lover = scope:recipient + } + } + } + } + } + } + modifier = { # Reluctant to join against Soul mate + add = -200 + scope:actor = { + any_character_war = { + OR = { + AND = { + primary_attacker != scope:actor + primary_attacker = { + has_relation_soulmate = scope:recipient + } + } + AND = { + primary_defender != scope:actor + primary_defender = { + has_relation_soulmate = scope:recipient + } + } + } + } + } + } + modifier = { # Refuse call for hostages' safety + any_home_court_hostage = { + warden = { + OR = { + is_at_war_with = scope:actor + any_ally = { is_at_war_with = scope:actor } + } + } + } + add = { + value = 0 + every_home_court_hostage = { + limit = { + warden = { + OR = { + is_at_war_with = scope:actor + any_ally = { is_at_war_with = scope:actor } + } + } + } + subtract = call_to_arms_hostage_value + } + multiply = 0.25 + } + desc = HOSTAGE_ENEMY_CALL_TO_ARMS_REASON + } + + fp3_struggle_resist_allied_wars_modifier = yes + } + + ai_will_do = { + base = 50 + + #don't do it if hired army wouldn't have an impact + modifier = { + scope:actor = { + any_character_war = { + count = all + OR = { + AND = { + primary_attacker = scope:actor + primary_defender.current_military_strength > { + value = scope:recipient.current_military_strength + add = scope:actor.current_military_strength + multiply = 1.5 + } + } + AND = { + primary_defender = scope:actor + primary_attacker.current_military_strength > { + value = scope:recipient.current_military_strength + add = scope:actor.current_military_strength + multiply = 1.5 + } + } + } + } + } + add = -100 + } + + #don't do it if you are stronger than the enemy + modifier = { + scope:actor = { + any_character_war = { + count = all + OR = { + AND = { + primary_attacker = scope:actor + primary_defender.current_military_strength < scope:actor.current_military_strength + } + AND = { + primary_defender = scope:actor + primary_attacker.current_military_strength < scope:actor.current_military_strength + } + } + } + } + add = -200 + } + + #more likely to ask if on contact list + modifier = { + scope:actor = { + is_contact_of = scope:recipient + } + add = 100 + } + + #merc laamp wants to join, so why not asking them more? + modifier = { + scope:recipient = { + has_realm_law = camp_purpose_mercenaries + } + add = 50 + } + + #more likely to ask if losing + modifier = { + scope:actor = { + any_character_war = { + OR = { + AND = { + primary_attacker = scope:actor + defender_war_score > 25 + } + AND = { + primary_defender = scope:actor + attacker_war_score > 25 + } + } + } + } + add = 20 + } + + #don't do it if they betrayed you already in any of your ongoing wars + modifier = { + scope:actor = { + any_character_war = { + OR = { + is_target_in_variable_list = { + name = already_switched_side + target = scope:recipient + } + is_target_in_variable_list = { + name = left_voluntarily + target = scope:recipient + } + } + } + } + add = -1000 + } + + #don't do it if you cannot afford it + modifier = { + scope:actor = { + war_chest_gold < ep3_hire_laamp_mercs_cost_value + } + add = -50 + } + modifier = { + scope:actor = { + gold < ep3_hire_laamp_mercs_cost_value + } + add = -1000 + } + } +} + +################## +# Refill MaA +################## + +refill_maa_interaction = { + icon = icon_soldier_survivor + category = interaction_category_laamp + interface_priority = 20 + common_interaction = yes + desc = refill_maa_interaction_desc + cooldown = { months = 6 } + + is_shown = { + has_ep3_dlc_trigger = yes + scope:actor = { + government_allows = conditional_maa_refill + NOT = { government_has_flag = government_is_nomadic } + } + scope:recipient = scope:actor + } + + is_valid_showing_failures_only = { + custom_tooltip = { + text = reinforce_soldiers_any_regiment_tt + scope:actor.maa_regiments_count >= 1 + } + custom_tooltip = { + text = reinforce_soldiers_unfull_regiment_tt + scope:actor = { + any_maa_regiment = { maa_regiments_valid_to_refill_trigger = yes } + } + } + custom_tooltip = { + text = SUPPLY_LOSS_AT_SEA + scope:actor = { any_laamp_portion_at_sea_trigger = no } + } + custom_tooltip = { + text = PROCURE_ESTATE_AT_WAR_TT + scope:actor = { + NOT = { + any_army = { + location.county.holder = { + OR = { + is_at_war_with = scope:actor + any_liege_or_above = { is_at_war_with = scope:actor } + } + } + } + } + } + } + } + + send_options_exclusive = yes + + send_option = { + flag = provisions + localization = reinforce_soldiers_option_provisions + current_description = reinforce_soldiers_option_provisions_desc + is_valid = { + scope:actor.domicile.provisions >= 5 + } + } + + send_option = { + flag = gold + localization = reinforce_soldiers_option_gold + current_description = reinforce_soldiers_option_gold_desc + is_valid = { + scope:actor.gold >= 5 + custom_tooltip = { + text = reinforce_soldiers_option_gold_tt + NOT = { + scope:actor.domicile.domicile_location.county.holder ?= { government_has_flag = government_is_tribal } + } + } + } + } + + on_accept = { + scope:actor = { + switch = { + trigger = yes + scope:gold = { + if = { + limit = { gold > replenishable_troops_payed_gold_tt_value } + custom_tooltip = refill_maa_gold_full_tt + } + else = { custom_tooltip = refill_maa_gold_tt } + custom_tooltip = refill_maa_gold_cost_tt + refill_maa_with_gold_effect = yes + } + scope:provisions = { + if = { + limit = { domicile.provisions > replenishable_troops_payed_provisions_tt_value } + custom_tooltip = refill_maa_provisions_full_tt + } + else = { custom_tooltip = refill_maa_provisions_tt } + custom_tooltip = refill_maa_provision_cost_tt + refill_maa_with_provisions_effect = yes + } + } + if = { + limit = { + is_ai = yes + NOR = { + scope:gold = yes + scope:provisions = yes + } + } + refill_maa_with_provisions_effect = yes + } + } + } + + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 1 + kingdom = 0 + empire = 0 + hegemony = 0 + } + ai_targets = { + ai_recipients = self + } + ai_potential = { + government_allows = conditional_maa_refill + any_maa_regiment = { maa_current_troops_count < maa_max_troops_count } + } + + ai_will_do = { + base = 100 + modifier = { + factor = 0 + scope:gold = yes + gold <= 500 + } + } +} + +################## +# Evict Adventurer +# by Joe Parkin +################## + +evict_adventurer_interaction = { + common_interaction = yes + category = interaction_category_diplomacy + cooldown_against_recipient = { years = 5 } + greeting = positive + icon = icon_evict_adventurer + desc = evict_adventurer_interaction_desc + + popup_on_receive = yes + pause_on_receive = yes + + interface_priority = 60 + ai_min_reply_days = 4 + ai_max_reply_days = 9 + + is_shown = { + has_ep3_dlc_trigger = yes + scope:actor = { is_landed = yes } + scope:recipient != scope:actor + scope:recipient = { + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + is_landed = no + } + } + + is_valid_showing_failures_only = { + scope:actor = { + is_at_war = no + NOR = { + is_spouse_of = scope:recipient + has_relation_friend = scope:recipient + has_relation_lover = scope:recipient + } + } + scope:recipient = { + # Adventurer must be in the subrealm + domicile.domicile_location.county.holder ?= { + OR = { + this = scope:actor + any_liege_or_above = { this ?= scope:actor } + } + } + } + # AI should not against hired adventurers + trigger_if = { + limit = { + scope:actor = { is_ai = yes } + } + scope:actor = { + opinion = { + target = scope:recipient + value < 25 + } + } + NOT = { + scope:recipient = { + any_character_active_contract = { task_contract_employer = scope:actor } + } + } + } + scope:recipient = { + NOT = { has_strong_hook = scope:actor } + } + # Story blockers. + ## Hereward cannot be exiled by active participants in the Harrying of the North. + disable_interaction_for_hereward_trigger = yes + ## Hasan cannot be exiled by anyone during his story. + disable_interaction_for_hasan_trigger = yes + } + + on_send = { + scope:recipient = { + send_interface_toast = { + type = diplo_contract_scheme_invalidated_message + title = evict_adventurer_interaction.tt.contracts_invalidated.t + right_icon = scope:actor + custom_tooltip = { + text = evict_adventurer_interaction.tt.contracts_invalidated + every_character_task_contract = { + limit = { + task_contract_location.county.holder = { + OR = { + this = scope:actor + any_liege_or_above = { this = scope:actor } + } + } + } + invalidate_contract = yes + } + # We also need to invalidate your active contract, if you've got one, since you need to be travelling. + every_character_active_contract = { invalidate_contract = yes } + } + } + } + } + + on_accept = { + scope:actor = { save_scope_as = expeller } + scope:recipient = { + save_scope_as = adventurer + add_opinion = { + target = scope:actor + modifier = demanded_eviction_opinion + } + custom_tooltip = evict_adventurer_contracts_tt + } + scope:actor = { + custom_description_no_bullet = { + text = evict_adventurer_consequences_tt + object = scope:recipient + subject = scope:actor + } + custom_tooltip = evict_adventurer_casus_belli_tt + show_as_tooltip = { + add_opinion = { + target = scope:recipient + modifier = eviction_ignored_opinion + } + } + } + scope:recipient = { + set_variable = { + name = adventurer_expeller + value = scope:actor + months = 4 + } + trigger_event = { + id = ep3_interactions_events.0500 + days = 1 + } + trigger_event = { + id = ep3_interactions_events.0501 + months = 3 + } + } + } + + on_decline = { + scope:recipient = { + start_war = { + cb = ep3_laamp_apprehend_adventurer_cb + target = scope:actor + } + } + } + + auto_accept = yes + + ai_frequency_by_tier = { + barony = 0 + county = 12 + duchy = 6 + kingdom = 6 + empire = 6 + hegemony = 6 + } + ai_targets = { + ai_recipients = sub_realm_domicile_owners + max = 10 + } + ai_potential = { + is_at_war = no + is_imprisoned = no + NOT = { has_trait = incapable } + } + ai_will_do = { + base = -25 + opinion_modifier = { + who = scope:actor + opinion_target = scope:recipient + multiplier = -0.5 + } + # Independent rulers or kings and over will happily exile claimants. + modifier = { + add = 250 + OR = { + top_liege = this + highest_held_title_tier >= tier_kingdom + } + scope:recipient = { + any_claim = { + tier >= scope:actor.highest_held_title_tier + holder ?= scope:actor + } + } + } + modifier = { + add = 10 + has_opinion_modifier = { + modifier = failed_task_contract_opinion + target = scope:recipient + } + } + modifier = { + add = 30 + has_opinion_modifier = { + modifier = left_war_early + target = scope:recipient + } + } + modifier = { + add = 100 + has_opinion_modifier = { + modifier = switched_sides_in_war + target = scope:recipient + } + } + modifier = { + add = { + if = { + limit = { + OR = { + has_opinion_modifier = { + modifier = gallowsbait_scum_opinion + target = scope:recipient + value >= 100 + } + has_opinion_modifier = { + modifier = succeeded_criminal_contract_against_me_opinion + target = scope:recipient + value >= 100 + } + } + } + add = 200 + } + else_if = { + limit = { + OR = { + has_opinion_modifier = { + modifier = gallowsbait_scum_opinion + target = scope:recipient + value >= 80 + } + has_opinion_modifier = { + modifier = succeeded_criminal_contract_against_me_opinion + target = scope:recipient + value >= 80 + } + } + } + add = 150 + } + else_if = { + limit = { + OR = { + has_opinion_modifier = { + modifier = gallowsbait_scum_opinion + target = scope:recipient + value >= 60 + } + has_opinion_modifier = { + modifier = succeeded_criminal_contract_against_me_opinion + target = scope:recipient + value >= 60 + } + } + } + add = 100 + } + else_if = { + limit = { + OR = { + has_opinion_modifier = { + modifier = gallowsbait_scum_opinion + target = scope:recipient + value >= 40 + } + has_opinion_modifier = { + modifier = succeeded_criminal_contract_against_me_opinion + target = scope:recipient + value >= 40 + } + } + } + add = 75 + } + else_if = { + limit = { + OR = { + has_opinion_modifier = { + modifier = gallowsbait_scum_opinion + target = scope:recipient + value >= 20 + } + has_opinion_modifier = { + modifier = succeeded_criminal_contract_against_me_opinion + target = scope:recipient + value >= 20 + } + } + } + add = 50 + } + else_if = { + limit = { + OR = { + has_opinion_modifier = { + modifier = gallowsbait_scum_opinion + target = scope:recipient + value >= 0 + } + has_opinion_modifier = { + modifier = succeeded_criminal_contract_against_me_opinion + target = scope:recipient + value >= 0 + } + } + } + add = 25 + } + } + OR = { + has_opinion_modifier = { + modifier = gallowsbait_scum_opinion + target = scope:recipient + } + has_opinion_modifier = { + modifier = succeeded_criminal_contract_against_me_opinion + target = scope:recipient + } + } + } + # Factors must got at the bottom. + ## Don't evict people we can't beat up. + modifier = { + factor = 0 + scope:actor.current_military_strength < scope:recipient.military_strength_75_percent_value + } + ## Don't evict anyone currently doing a job for us. + modifier = { + factor = 0 + scope:recipient = { + any_character_task_contract = { task_contract_employer = scope:actor } + } + } + ## We _only_ evict if we actually dislike someone. + first_valid = { + # People close to us are more willing to put up with our bullshit. + modifier = { + factor = 0 + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:recipient } + opinion = { + target = scope:recipient + value > -30 + } + } + modifier = { + factor = 0 + opinion = { + target = scope:recipient + value > 0 + } + } + } + } +} + +#Become landless admin from laamp +procure_estate_interaction = { + category = interaction_category_laamp + icon = powerful_family_shield + + desc = procure_estate_interaction_desc + + cooldown_against_recipient = { years = 10 } + + notification_text = { + first_valid = { + triggered_desc = { + trigger = { + scope:hook = yes + } + desc = PROCURE_ESTATE_HOOK + } + triggered_desc = { + trigger = { + scope:gold_option = yes + } + desc = PROCURE_ESTATE_GOLD + } + triggered_desc = { + trigger = { + scope:piety_option = yes + } + desc = PROCURE_ESTATE_PIETY + } + desc = PROCURE_ESTATE_PRESTIGE + } + desc = PROCURE_ESTATE_PROPOSAL_OUTRO + } + + popup_on_receive = yes + pause_on_receive = yes + + interface_priority = 100 + ai_min_reply_days = 4 + ai_max_reply_days = 9 + + is_shown = { + has_ep3_dlc_trigger = yes + scope:actor = { OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } } + scope:recipient = { + is_landed = yes + government_allows = noble_families + } + scope:recipient != scope:actor + } + + is_valid_showing_failures_only = { + scope:actor = { + top_liege = this + prestige_level >= 2 + # Only house heads can have Noble Family titles + custom_tooltip = { + text = NOT_IS_HOUSE_HEAD + house.house_head ?= { + OR = { + this = scope:actor + is_ruler = no + } + } + } + } + trigger_if = { # Only a Duke or higher can treat you right + limit = { + scope:recipient = { + highest_held_title_tier < tier_duchy + } + } + custom_description = { + text = procure_estate_low_rank_tt + always = no + } + } + trigger_if = { # Not going to give you a title if you're at war + limit = { + scope:actor = { + is_at_war_with = scope:recipient + } + } + custom_description = { + text = procure_estate_at_war_tt + always = no + } + } + scope:recipient = { + NOT = { has_strong_hook = scope:actor } + } + #Has to be used instead of diplo range checks in laamp to landed interactions + ep3_laamp_diplo_range_trigger = { + TARGET = scope:recipient + LAAMP = scope:actor + } + scope:recipient = { is_contact_of = scope:actor } + + # Adventurers can't join wars in places they're exiled from. + custom_tooltip = { + text = the_wake_1 + NOT = { + is_laamp_exiled_from_province_trigger = { + PROVINCE = scope:recipient.capital_province + LAAMP = scope:actor + } + } + } + } + + auto_accept = { + custom_description = { + text = "spending_hook" + subject = scope:actor + object = scope:recipient + scope:hook = yes + } + } + should_use_extra_icon = { + scope:actor = { has_usable_hook = scope:recipient } + } + extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" + + send_option = { + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + flag = hook + localization = SCHEME_HOOK + } + send_option = { + flag = prestige_option + localization = laamp_to_ladmin_prestige_option_desc + } + send_option = { + flag = gold_option + localization = laamp_to_ladmin_gold_option_desc + } + send_option = { + flag = piety_option + localization = laamp_to_ladmin_piety_option_desc + } + + cost = { + gold = { + add = { + value = procure_estate_interaction_cost_base_gold + desc = BASE + } + if = { + limit = { scope:gold_option = yes } + add = { + value = procure_estate_interaction_cost_base_gold + desc = laamp_to_ladmin_gold_option_desc + } + } + } + prestige = { + if = { + limit = { + NOR = { + scope:gold_option = yes + scope:piety_option = yes + scope:hook = yes + } + } + # Base cost + add = { + value = procure_estate_interaction_cost_base_prestige + desc = BASE + } + # Gender modifiers + if = { + limit = { + scope:recipient ?= { + top_liege = { has_realm_law = male_preference_law } + } + scope:actor = { + is_female = yes + } + } + add = { # Increase the base cost + value = { + value = procure_estate_interaction_cost_base_prestige + multiply = 0.25 + } + desc = male_preference_law + } + } + if = { + limit = { + scope:recipient ?= { + top_liege = { has_realm_law = female_preference_law } + } + scope:actor = { + is_male = yes + } + } + add = { # Increase the base cost + value = { + value = procure_estate_interaction_cost_base_prestige + multiply = 0.25 + } + desc = female_preference_law + } + } + #Brigands need to pay more to be legitimized + if = { + limit = { + scope:actor = { + has_realm_law = camp_purpose_brigands + } + } + add = { # Increase the base cost + value = { + value = major_prestige_value + } + desc = camp_purpose_brigands + } + } + } + } + piety = { + if = { + limit = { + scope:piety_option = yes + } + + # Base cost + add = { + value = procure_estate_interaction_cost_base_piety + desc = BASE + } + + # Gender modifiers + if = { + limit = { + scope:recipient ?= { + top_liege = { has_realm_law = male_preference_law } + } + scope:actor = { + is_female = yes + } + } + add = { # Increase the base cost + value = { + value = procure_estate_interaction_cost_base_piety + multiply = 0.25 + } + desc = male_preference_law + } + } + if = { + limit = { + scope:recipient ?= { + top_liege = { has_realm_law = female_preference_law } + } + scope:actor = { + is_male = yes + } + } + add = { # Increase the base cost + value = { + value = procure_estate_interaction_cost_base_piety + multiply = 0.25 + } + desc = female_preference_law + } + } + #Brigands need to pay more to be legitimized + if = { + limit = { + scope:actor = { + has_realm_law = camp_purpose_brigands + } + } + add = { # Increase the base cost + value = { + value = procure_estate_interaction_cost_base_piety + } + desc = camp_purpose_brigands + } + } + } + } + } + + is_highlighted = { + always = yes + } + + on_accept = { + scope:actor = { + save_scope_as = adventurer + procure_estate_interaction_effect = yes + create_character_memory = { + type = procured_estate_memory + participants = { benefactor = scope:recipient } + } + if = { + limit = { + is_ai = no + } + add_achievement_global_variable_effect = { + VARIABLE = started_from_the_bottom_now_were_ere_procure + VALUE = yes + } + } + } + scope:actor = { trigger_event = ep3_interactions_events.0610 } + } + + on_decline = { + scope:actor = { + save_scope_as = adventurer + trigger_event = ep3_interactions_events.0611 + } + } + + ai_targets = { + ai_recipients = contacts + } + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 60 + kingdom = 0 + empire = 0 + hegemony = 0 + } + + ai_accept = { + base = 0 # Try to make it 0 for most interactions + + opinion_modifier = { # Opinion Factor + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.5 + desc = AI_OPINION_REASON + } + #DIFFERENT FAITH FROM STATE FAITH (if recipient is state faith) + modifier = { + add = -20 + desc = PROCURE_ESTATE_STATE_FAITH_REASON + exists = scope:recipient.top_liege.primary_title.state_faith + scope:actor.faith = { + this != scope:recipient.top_liege.primary_title.state_faith + } + scope:recipient.faith = { + this = scope:recipient.top_liege.primary_title.state_faith + } + NOT = { + scope:piety_option = yes + } + } + #Hey you're actually a local in my capital + modifier = { + add = 10 + desc = PROCURE_ESTATE_SAME_CULTURE_AS_CAPITAL_REASON + scope:recipient.capital_county.culture = { + this = scope:actor.culture + } + } + #Your dynasty is worthless + modifier = { + add = -10 + scope:actor.dynasty = { + dynasty_prestige_level < 2 + } + desc = PROCURE_ESTATE_DYNASTY_PRESTIGE_LEVEL_REASON + } + #Your dynasty is pretty great actually + modifier = { + add = 10 + scope:actor.dynasty = { + dynasty_prestige_level >= 4 + dynasty_prestige_level < 7 + } + desc = PROCURE_ESTATE_DYNASTY_PRESTIGE_LEVEL_REASON + } + #Your dynasty is pretty great actually + modifier = { + add = 20 + scope:actor.dynasty = { + dynasty_prestige_level >= 7 + dynasty_prestige_level < 10 + } + desc = PROCURE_ESTATE_DYNASTY_PRESTIGE_LEVEL_REASON + } + #Your dynasty is pretty great actually + modifier = { + add = 30 + scope:actor.dynasty = { dynasty_prestige_level >= 10 } + desc = PROCURE_ESTATE_DYNASTY_PRESTIGE_LEVEL_REASON + } + #We are not related + modifier = { + add = -15 + desc = PROCURE_ESTATE_SHARED_RELATIVES_REASON + NOR = { + scope:actor.house ?= { + any_house_member = { + is_close_or_extended_family_of = scope:recipient + } + } + scope:actor = { + any_close_or_extended_family_member = { + is_close_or_extended_family_of = scope:recipient + } + } + scope:recipient.house ?= { + any_house_member = { + is_close_or_extended_family_of = scope:actor + } + } + scope:recipient = { + any_spouse = { + is_close_or_extended_family_of = scope:actor + } + } + scope:actor = { + any_spouse = { + is_close_or_extended_family_of = scope:recipient + } + } + scope:actor.dynasty = { + this = scope:recipient.dynasty + } + } + } + #You are criminal scum + modifier = { + add = -50 + desc = PROCURE_ESTATE_BRIGANDS_REASON + scope:actor = { + has_realm_law = camp_purpose_brigands + } + } + #You are an upright legitimist + modifier = { + add = 25 + desc = PROCURE_ESTATE_LEGITIMISTS_REASON + scope:actor = { + has_realm_law = camp_purpose_legitimists + } + } + #You have a criminal background + modifier = { + add = -10 + desc = PROCURE_ESTATE_GALLOWSBAIT_REASON + scope:actor = { + has_trait = gallowsbait + } + } + #You have a criminal background + modifier = { + add = -5 + desc = PROCURE_ESTATE_GALLOWSBAIT_REASON + scope:actor = { + has_trait = gallowsbait + NOR = { + has_trait_xp = { + trait = gallowsbait + track = bandit + value < 40 + } + has_trait_xp = { + trait = gallowsbait + track = trickster + value < 40 + } + has_trait_xp = { + trait = gallowsbait + track = thief + value < 40 + } + has_trait_xp = { + trait = gallowsbait + track = poacher + value < 40 + } + has_trait_xp = { + trait = gallowsbait + track = marauder + value < 40 + } + } + } + } + modifier = { + add = -20 + desc = PROCURE_ESTATE_GALLOWSBAIT_REASON + scope:actor = { + has_trait = gallowsbait + OR = { + has_trait_xp = { + trait = gallowsbait + track = bandit + value >= 40 + } + has_trait_xp = { + trait = gallowsbait + track = trickster + value >= 40 + } + has_trait_xp = { + trait = gallowsbait + track = thief + value >= 40 + } + has_trait_xp = { + trait = gallowsbait + track = poacher + value >= 40 + } + has_trait_xp = { + trait = gallowsbait + track = marauder + value >= 40 + } + } + NOR = { + has_trait_xp = { + trait = gallowsbait + track = bandit + value < 80 + } + has_trait_xp = { + trait = gallowsbait + track = trickster + value < 80 + } + has_trait_xp = { + trait = gallowsbait + track = thief + value < 80 + } + has_trait_xp = { + trait = gallowsbait + track = poacher + value < 80 + } + has_trait_xp = { + trait = gallowsbait + track = marauder + value < 80 + } + } + } + } + modifier = { + add = -50 + desc = PROCURE_ESTATE_GALLOWSBAIT_REASON + scope:actor = { + has_trait = gallowsbait + OR = { + has_trait_xp = { + trait = gallowsbait + track = bandit + value >= 80 + } + has_trait_xp = { + trait = gallowsbait + track = trickster + value >= 80 + } + has_trait_xp = { + trait = gallowsbait + track = thief + value >= 80 + } + has_trait_xp = { + trait = gallowsbait + track = poacher + value >= 80 + } + has_trait_xp = { + trait = gallowsbait + track = marauder + value >= 80 + } + } + } + } + #You have an interesting claim within my realm + modifier = { + add = 5 + desc = PROCURE_ESTATE_CLAIMS_REASON + scope:actor = { + any_claim = { + save_temporary_scope_as = laamp_claim_temp + scope:recipient.top_liege.primary_title = { + is_de_jure_liege_or_above_target = scope:laamp_claim_temp + } + NOT = { + holder ?= scope:recipient + } + } + } + } + #You are a challenger for the empire and I want you indebted to me + modifier = { + add = 20 + desc = PROCURE_ESTATE_IMPERIAL_CLAIMS_REASON + scope:actor = { + any_claim = { + save_temporary_scope_as = laamp_claim_temp + this = scope:recipient.top_liege.primary_title + NOT = { + holder ?= scope:recipient + } + scope:recipient = { + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:recipient.top_liege } + opinion = { + target = scope:recipient.top_liege + value >= -20 + } + is_allied_to = scope:recipient.top_liege + } + } + } + } + } + #You have a scary claim on one of my titles! + modifier = { + add = -50 + desc = PROCURE_ESTATE_RIVAL_CLAIMANT_REASON + scope:actor = { + any_claim = { + holder ?= scope:recipient + } + } + } + #Needs gold + modifier = { + add = 10 + scope:recipient = { + gold <= minor_gold_value + } + NOT = { + scope:gold_option = yes + } + desc = PROCURE_ESTATE_NEEDS_GOLD_REASON + } + #Needs gold and offering gold + modifier = { + add = 20 + scope:recipient = { + gold <= minor_gold_value + } + scope:gold_option = yes + desc = PROCURE_ESTATE_NEEDS_GOLD_REASON + } + #Needs piety + modifier = { + add = 20 + scope:recipient = { + piety_level <= 0 + } + scope:piety_option = yes + desc = PROCURE_ESTATE_NEEDS_PIETY_REASON + } + + #Needs prestige + modifier = { + add = 20 + scope:recipient = { + prestige_level <= 0 + } + scope:prestige_option = yes + desc = PROCURE_ESTATE_NEEDS_PRESTIGE_REASON + } + } + + ai_will_do = { + base = -25 + ai_value_modifier = { + ai_boldness = -0.5 + ai_energy = -0.5 + ai_greed = 0.5 + ai_rationality = 0.5 + } + modifier = { + gold < 100 + factor = 0 + } + modifier = { + gold > 100 + OR = { + prestige >= massive_prestige_value + piety >= massive_piety_value + gold >= massive_gold_value + } + add = 50 + } + modifier = { + has_hook = scope:recipient + add = 200 + } + } +} + +request_laamp_legitimist_support = { + interface_priority = 50 + common_interaction = yes + category = interaction_category_laamp + cooldown_against_recipient = { years = 5 } + + greeting = positive + + icon = request_invasion_sponsorship_interaction + desc = request_laamp_legitimist_support_interaction_desc + + is_shown = { + has_ep3_dlc_trigger = yes + scope:actor = { + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + has_realm_law = camp_purpose_legitimists + } + scope:recipient = { + is_landed = yes + is_ai = yes + primary_title.tier >= tier_kingdom + } + scope:recipient != scope:actor + } + + is_valid_showing_failures_only = { + NOR = { #so legitimist AI can get lucky. It looks ugly but formats the tooltip correctly + NOT = { + ep3_laamp_diplo_range_trigger = { + TARGET = scope:recipient + LAAMP = scope:actor + } + } + scope:actor = { + is_available_ai_adult = yes + } + } + + + custom_tooltip = { + text = request_laamp_legitimist_have_claim_on_target + scope:actor = { + NOT = { + any_claim = { + OR = { + holder = { + this = scope:recipient + } + holder.top_liege = { + this = scope:recipient + } + } + } + } + } + } + + custom_tooltip = { + text = request_laamp_legitimist_support_already_supporting + scope:recipient = { + NOT = { + has_character_flag = legitimist_supporter + } + } + } + scope:recipient = { + is_at_war = no + is_available_ai_adult = yes + } + + # Adventurers can't join wars in places they're exiled from. + custom_tooltip = { + text = the_wake_1 + NOT = { + is_laamp_exiled_from_province_trigger = { + PROVINCE = scope:recipient.capital_province + LAAMP = scope:actor + } + } + } + } + + send_options_exclusive = no + + cost = { + prestige = { + value = massive_prestige_value + if = { + limit = { + scope:actor.dynasty = scope:recipient.dynasty + } + divide = 2 + } + if = { + limit = { #so legitimist AI can get lucky + scope:actor = { is_ai = yes } + } + divide = 6 + } + } + } + + on_accept = { + scope:actor = { + create_task_contract = { + task_contract_type = laamp_legitimist_support_contract + task_contract_tier = 3 + location = scope:recipient.capital_province + task_contract_employer = scope:recipient + save_temporary_scope_as = legitimist_contract + } + custom_tooltip = laamp_legitimist_support_contract_success + if = { + limit = { + is_ai = yes + } + accept_task_contract = scope:legitimist_contract + } + } + } + + on_decline = { + + } + + use_diplomatic_range = yes + + ai_accept = { + base = -60 + opinion_modifier = { # Opinion Factor + who = scope:recipient + opinion_target = scope:actor + multiplier = 1 + desc = AI_OPINION_REASON + } + modifier = { + add = 40 + scope:actor = { + any_claim = { + tier >= tier_kingdom + holder = { + save_temporary_scope_as = claim_holder + } + } + prestige_level > scope:claim_holder.prestige_level + } + desc = AI_REASON_LEGITIMIST_HIGHER_PRESTIGE + } + modifier = { + add = 60 + scope:actor = { + has_hook = scope:recipient + } + desc = YOU_HAVE_HOOK_REASON + } + modifier = { + add = 10 + scope:actor.dynasty = scope:recipient.dynasty + desc = BF_AI_SAME_DYNASTY_REASON + } + modifier = { + add = 20 + scope:actor.house = scope:recipient.house + desc = IS_SAME_HOUSE_REASON + } + modifier = { + add = 20 + scope:recipient = { has_trait = ambitious } + desc = RECIPIENT_IS_AMBITIOUS + } + modifier = { + add = 10 + scope:recipient = { has_trait = just } + desc = RECIPIENT_IS_JUST + } + modifier = { + add = 10 + scope:recipient = { has_trait = greedy } + desc = RECIPIENT_IS_GREEDY + } + modifier = { + add = 40 #so legitimist AI can get lucky + scope:actor = { is_ai = yes } + } + } + + can_send_despite_rejection = no + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 60 + kingdom = 0 + empire = 0 + hegemony = 0 + } + ai_targets = { + ai_recipients = domicile_location_neighboring_top_rulers + ai_recipients = contacts + } + ai_potential = { + is_at_war = no + ai_greed <= 25 + } + ai_will_do = { + base = 100 #no downside to ai trying this + } +} + +#travel around the map to look for new contracts +relocate_camp_to_interaction = { + category = interaction_category_laamp + interface_priority = 100 + common_interaction = yes + use_diplomatic_range = no + ignores_pending_interaction_block = yes + icon = icon_contract_escort + desc = relocate_camp_to_interaction_desc + is_shown = { + scope:recipient != scope:actor + scope:actor = { + has_government = landless_adventurer_government + } + scope:recipient = { exists = capital_province } #just to make sure proper scopes will be set up + } + + is_valid_showing_failures_only = { + custom_tooltip = { + text = relocate_camp_to_interaction.here + scope:actor.domicile.domicile_location != scope:recipient.capital_province + } + scope:actor = { + is_travelling = no + is_in_army = no + is_imprisoned = no + } + # Adventurers can't join wars in places they're exiled from. + custom_tooltip = { + text = the_wake_1 + NOT = { + is_laamp_exiled_from_province_trigger = { + PROVINCE = scope:recipient.capital_province + LAAMP = scope:actor + } + } + } + } + + on_accept = { + scope:recipient.capital_province = { + save_scope_as = relocation_destination + } + scope:actor = { + show_as_tooltip = { + domicile = { + move_domicile = scope:relocation_destination + } + } + start_travel_plan = { + destination = scope:relocation_destination + on_start_on_action = on_travel_relocation_start + on_arrival_on_action = on_travel_relocation_end + on_arrival_destinations = last + return_trip = no # One way + travel_with_domicile = yes + } + } + } + + auto_accept = yes +} + +# +task_contract_train_knight_interaction = { + category = interaction_category_laamp + interface_priority = 120 + common_interaction = yes + icon = icon_combat + + popup_on_receive = yes + pause_on_receive = yes + + is_shown = { + has_ep3_dlc_trigger = yes + scope:actor = { + any_character_active_contract = { + task_contract_type = laamp_help_train_commanders_contract + OR = { + task_contract_employer ?= scope:recipient + task_contract_target ?= scope:recipient + any_in_list = { + variable = knights_to_train + is_alive = yes + is_knight = yes + this = scope:recipient + } + } + } + } + } + + is_valid_showing_failures_only = { + } + + redirect = { + scope:actor = { + random_character_active_contract = { + task_contract_type = laamp_help_train_commanders_contract + limit = { + OR = { + task_contract_employer ?= scope:recipient + task_contract_target ?= scope:recipient + any_in_list = { + variable = knights_to_train + is_alive = yes + is_knight = yes + this = scope:recipient + } + } + } + save_scope_as = task_contract + } + } + if = { + limit = { + scope:task_contract ?= { + any_in_list = { + variable = knights_to_train + is_alive = yes + is_knight = yes + this = scope:recipient + } + } + } + scope:recipient = { + save_scope_as = secondary_recipient + } + scope:secondary_recipient.liege = { + save_scope_as = recipient + } + } + if = { + limit = { + scope:task_contract.task_contract_employer ?= scope:recipient + scope:task_contract.task_contract_employer.liege ?= scope:task_contract.task_contract_target + } + + } + } + + populate_recipient_list = { + scope:actor = { + random_character_active_contract = { + task_contract_type = laamp_help_train_commanders_contract + limit = { + OR = { + task_contract_employer ?= scope:recipient + task_contract_target ?= scope:recipient + any_in_list = { + variable = knights_to_train + is_alive = yes + is_knight = yes + this = scope:recipient + } + } + } + every_in_list = { + variable = knights_to_train + limit = { + is_alive = yes + is_knight = yes + } + add_to_list = characters + } + } + } + } + + is_highlighted = { + always = yes + } + + on_accept = { + scope:actor = { + random_character_active_contract = { + task_contract_type = laamp_help_train_commanders_contract + limit = { + OR = { + task_contract_employer ?= scope:recipient + task_contract_target ?= scope:recipient + any_in_list = { + variable = knights_to_train + is_alive = yes + is_knight = yes + this = scope:recipient + } + } + } + save_scope_as = task_contract + } + } + scope:secondary_recipient = { + save_scope_as = knight + custom_tooltip = task_contract_train_knight_interaction.tt + } + scope:actor = { + trigger_event = ep3_contract_event.0091 + } + } + + auto_accept = yes + + ai_accept = { + base = 100 + } + + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 12 + kingdom = 0 + empire = 0 + hegemony = 0 + } + ai_targets = { + ai_recipients = neighboring_rulers + ai_recipients = liege + ai_recipients = contacts + } + ai_potential = { + is_at_war = no + } + ai_will_do = { + base = 100 #no downside to ai trying this + } +} + +#landless adventurer are allowed to change allegiances mid-war +laamp_war_change_sides_interaction = { + category = interaction_category_laamp + icon = alliance + desc = laamp_war_change_sides_interaction_desc + common_interaction = yes + popup_on_receive = yes + pause_on_receive = yes + + interface_priority = 120 + ai_min_reply_days = 0 + ai_max_reply_days = 0 + + cooldown_against_recipient = { years = 3 } + send_options_exclusive = yes + + is_shown = { + scope:actor = { + is_at_war = yes + has_government = landless_adventurer_government + } + scope:recipient = { + this != scope:actor + any_war_ally = { this = scope:actor } + any_character_war = { + #can't switch/leave wars you lead + NOT = { is_war_leader = scope:actor } + #can't switch/leave Great Holy Wars + NOR = { + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } + any_war_participant = { + this = scope:recipient + } + } + } + } + + is_valid_showing_failures_only = { + scope:recipient = { + trigger_if = { + limit = { + any_character_war = { + has_variable_list = already_switched_side + } + } + custom_tooltip = { + text = laamp_war_change_sides_interaction.already_switched_side + is_target_in_variable_list = { + name = already_switched_side + target = scope:actor + } + } + } + } + } + + populate_recipient_list = { + scope:recipient = { + every_character_war = { + limit = { + OR = { + primary_attacker = scope:recipient + primary_defender = scope:recipient + } + #can't switch/leave wars you lead + NOT = { is_war_leader = scope:actor } + #can't switch/leave Great Holy Wars + NOR = { + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } + any_war_participant = { + this = scope:recipient + } + } + if = { + limit = { primary_attacker = scope:recipient } + primary_defender = { add_to_list = characters } + } + else = { + primary_attacker = { add_to_list = characters } + } + } + } + } + + on_accept = { + scope:recipient = { + save_scope_as = betrayed_leader + } + scope:secondary_recipient = { + save_scope_as = new_leader + } + scope:actor = { + #ROOT is a 4th crusader and should not be one anymore + frankokratia_remove__war_leader_var_effect = yes + #ROOT is not a 4th crusader and should be one + if = { + limit = { + any_character_war = { + using_cb = crusading_claim_cb + any_war_participant = { + this = scope:recipient + } + any_war_participant = { + any_owned_story = { + type = frankokratia_story + NOT = { + any_in_list = { + variable = frankokratia_leaders + this = scope:actor + } + } + } + } + any_war_defender = { + this = scope:actor + } + } + } + random_character_war = { + limit = { + any_war_participant = { + any_owned_story = { + type = frankokratia_story + NOT = { + any_in_list = { + variable = frankokratia_leaders + this = scope:actor + } + } + } + } + any_war_defender = { + this = scope:actor + } + } + random_war_participant = { + limit = { + any_owned_story = { + type = frankokratia_story + NOT = { + any_in_list = { + variable = frankokratia_leaders + this = scope:actor + } + } + } + } + random_owned_story = { + type = frankokratia_story + limit = { + NOT = { + any_in_list = { + variable = frankokratia_leaders + this = scope:actor + } + } + } + add_to_variable_list = { + name = frankokratia_leaders + target = scope:actor + } + } + } + } + } + random_character_war = { + limit = { + OR = { + primary_attacker = scope:recipient + primary_defender = scope:recipient + } + OR = { + primary_attacker = scope:secondary_recipient + primary_defender = scope:secondary_recipient + } + } + save_scope_as = war + } + if = { + limit = { + scope:war = { + using_non_ghw_holy_war_cb_trigger = yes + } + scope:recipient.faith = scope:actor.faith + } + add_piety_level = -1 + } + every_character_active_contract = { + limit = { + var:task_contract_war = scope:war + } + complete_task_contract = failure_standard + } + # Clear Offer Assistance. + if = { + limit = { + has_variable = owed_contract_assistance_war + scope:recipient = { is_participant_in_war = scope:actor.var:owed_contract_assistance_war } + } + remove_variable = owed_contract_assistance_war + remove_variable = owed_contract_assistance_contribution + remove_variable = owed_contract_assistance_gold + } + } + scope:war = { + hidden_effect = { + remove_participant = scope:actor + } + if = { + limit = { + is_defender = scope:secondary_recipient + } + add_defender = scope:actor + } + else = { + add_attacker = scope:actor + } + } + scope:actor = { + every_character_war = { + limit = { + OR = { + primary_attacker = scope:recipient + primary_defender = scope:recipient + } + this != scope:war + } + remove_participant = scope:actor + } + } + scope:actor = { + # We deliberately charge you here to let you go into prestige debt; you shouldn't be blocked from switching sides due to a lack of prestige if you're willing to tank the loss. + add_prestige = { + value = -250 + multiply = { + value = scope:recipient.highest_held_title_tier + add = -1 + } + } + if = { + limit = { scope:recipient.highest_held_title_tier >= tier_kingdom } + add_prestige_level = -1 + } + if = { + limit = { + NOT = { has_contact = scope:secondary_recipient } + } + add_contact = scope:secondary_recipient + } + # Break the alliance + if = { + limit = { is_allied_to = scope:recipient } + break_alliance = scope:recipient + } + # And don't forget stress! + stress_impact = { + base = major_stress_impact_gain + disloyal = medium_stress_impact_loss + ambitious = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + callous = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + humble = medium_stress_impact_gain + content = medium_stress_impact_gain + loyal = major_stress_impact_gain + } + } + scope:recipient = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:actor } + } + set_relation_potential_rival = scope:actor + } + add_opinion = { + modifier = switched_sides_in_war + target = scope:actor + } + } + scope:secondary_recipient = { + add_opinion = { + modifier = switched_to_my_side + target = scope:actor + } + if = { + limit = { is_ai = yes } + pay_short_term_gold = { + target = scope:actor + gold = major_gold_value + } + } + } + scope:recipient = { + every_character_war = { + limit = { + OR = { + primary_attacker = scope:recipient + primary_defender = scope:recipient + } + #can't switch/leave wars you lead + NOT = { is_war_leader = scope:actor } + #can't switch/leave Great Holy Wars + NOR = { + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } + any_war_participant = { + this = scope:recipient + } + NOR = { + primary_attacker = scope:secondary_recipient + primary_defender = scope:secondary_recipient + } + } + if = { + limit = { primary_attacker = scope:recipient } + primary_defender = { + add_opinion = { + modifier = left_war_early + opinion = 40 + target = scope:actor + } + } + } + else = { + primary_attacker = { + add_opinion = { + modifier = left_war_early + opinion = 20 + target = scope:actor + } + } + } + } + } + scope:war = { + add_to_variable_list = { + name = already_switched_side + target = scope:actor + } + } + } + + auto_accept = yes + + ai_potential = { + is_at_war = yes + } + + ai_targets = { + ai_recipients = war_allies + } + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 24 + kingdom = 0 + empire = 0 + hegemony = 0 + } + + ai_will_do = { + base = -25 + #you have to be dishonorable and greedy to do this + ai_value_modifier = { + ai_honor = -0.1 + ai_greed = 0.1 + } + ##check if the recipient is the war leader and do it + #if they are infamous + modifier = { + any_character_war = { + is_war_leader = scope:recipient + } + scope:recipient = { + prestige_level < 0 + } + add = 5 + } + #if they are impious + modifier = { + any_character_war = { + is_war_leader = scope:recipient + } + scope:recipient = { + piety_level < 0 + } + add = 5 + } + #if they are a criminal + modifier = { + any_character_war = { + is_war_leader = scope:recipient + } + has_any_criminal_trait_in_faith_trigger = { + CHARACTER = scope:recipient + FAITH = scope:actor.faith + } + add = 5 + } + #if they wronged you or your family + modifier = { + any_character_war = { + is_war_leader = scope:recipient + } + scope:actor = { + has_any_major_revenge_opinion_against_character_trigger = { + CHARACTER = scope:recipient + } + } + add = 5 + } + #if they have good relation with the other side + modifier = { + any_character_war = { + OR = { + AND = { + primary_defender = scope:recipient + primary_attacker = { + has_any_good_relationship_with_character_trigger = { + CHARACTER = scope:actor + } + } + } + AND = { + primary_attacker = scope:recipient + primary_defender = { + has_any_good_relationship_with_character_trigger = { + CHARACTER = scope:actor + } + } + } + } + } + add = 5 + } + #don't do it + # if the other side has bad relation with you + modifier = { + any_character_war = { + OR = { + AND = { + primary_defender = scope:recipient + primary_attacker = { + has_any_bad_relationship_with_character_trigger = { + CHARACTER = scope:actor + } + } + } + AND = { + primary_attacker = scope:recipient + primary_defender = { + has_any_bad_relationship_with_character_trigger = { + CHARACTER = scope:actor + } + } + } + } + } + add = -1000 + } + # you are winning + modifier = { + any_character_war = { + OR = { + AND = { + primary_defender = scope:recipient + defender_war_score >= 0 + } + AND = { + primary_attacker = scope:recipient + attacker_war_score >= 0 + } + } + } + add = -1000 + } + opinion_modifier = { # Opinion Factor + who = scope:recipient + opinion_target = scope:actor + multiplier = -0.1 + desc = AI_OPINION_REASON + } + } +} + +#landless adventurer are allowed to leave the war outright +laamp_leave_war_interaction = { + category = interaction_category_laamp + icon = alliance + desc = laamp_leave_war_interaction_desc + common_interaction = yes + popup_on_receive = yes + pause_on_receive = yes + + interface_priority = 120 + ai_min_reply_days = 0 + ai_max_reply_days = 0 + + cooldown_against_recipient = { years = 3 } + send_options_exclusive = yes + + is_shown = { + scope:actor = { + is_at_war = yes + has_government = landless_adventurer_government + } + scope:recipient = { + this != scope:actor + any_war_ally = { this = scope:actor } + any_character_war = { + is_participant = scope:recipient + #can't leave wars you lead + NOT = { is_war_leader = scope:actor } + } + } + } + + is_valid_showing_failures_only = { + scope:actor = { + any_character_war = { + is_participant = scope:recipient + #can't leave wars you lead + NOT = { is_war_leader = scope:actor } + #can't leave Great Holy Wars + NOR = { + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } + } + } + scope:recipient = { + trigger_if = { + limit = { + any_character_war = { + has_variable_list = already_switched_side + } + } + custom_tooltip = { + text = laamp_war_change_sides_interaction.already_switched_side + is_target_in_variable_list = { + name = already_switched_side + target = scope:actor + } + } + } + } + } + + on_accept = { + scope:recipient = { + save_scope_as = betrayed_leader + } + scope:secondary_recipient = { + save_scope_as = new_leader + } + scope:actor = { + #ROOT is a 4th crusader and should not be one anymore + frankokratia_remove__war_leader_var_effect = yes + every_character_war = { + limit = { + OR = { + primary_attacker = scope:recipient + primary_defender = scope:recipient + } + #can't switch/leave wars you lead + NOT = { is_war_leader = scope:actor } + #can't switch/leave Great Holy Wars + NOR = { + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } + any_war_participant = { + this = scope:recipient + } + } + remove_participant = scope:actor + if = { + limit = { primary_defender = scope:recipient } + primary_attacker = { + add_opinion = { + modifier = left_war_early + opinion = 30 + target = scope:actor + } + } + } + else = { + primary_defender = { + add_opinion = { + modifier = left_war_early + opinion = 30 + target = scope:actor + } + } + } + add_to_variable_list = { + name = left_voluntarily + target = scope:actor + } + } + if = { + limit = { + scope:war = { + using_non_ghw_holy_war_cb_trigger = yes + } + } + add_piety_level = -1 + } + save_scope_value_as = { + name = task_contract_reward + value = flag:failure_standard + } + save_scope_value_as = { + name = task_contract_tier + value = scope:task_contract.task_contract_tier + } + every_character_active_contract = { + limit = { var:task_contract_war = scope:war } + task_contract_employer = { save_scope_as = task_contract_employer } + invalidate_contract = yes + } + if = { + limit = { + NOT = { + exists = scope:task_contract_employer + } + } + scope:recipient = { + save_scope_as = task_contract_employer + } + } + trigger_event = ep3_contract_event.0013 + # We deliberately charge you here to let you go into prestige debt; you shouldn't be blocked from switching sides due to a lack of prestige if you're willing to tank the loss. + add_prestige = { + value = -200 + multiply = { + value = scope:recipient.highest_held_title_tier + add = -1 + } + } + if = { + limit = { scope:recipient.highest_held_title_tier >= tier_kingdom } + add_prestige_level = -1 + } + # Break the alliance + if = { + limit = { is_allied_to = scope:recipient } + break_alliance = scope:recipient + } + # And don't forget stress! + stress_impact = { + base = major_stress_impact_gain + disloyal = medium_stress_impact_loss + ambitious = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + callous = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + humble = medium_stress_impact_gain + content = medium_stress_impact_gain + loyal = major_stress_impact_gain + } + # Clear Offer Assistance. + if = { + limit = { + has_variable = owed_contract_assistance_war + scope:recipient = { is_participant_in_war = scope:actor.var:owed_contract_assistance_war } + } + remove_variable = owed_contract_assistance_war + remove_variable = owed_contract_assistance_contribution + remove_variable = owed_contract_assistance_gold + } + } + scope:recipient = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:actor } + } + set_relation_potential_rival = scope:actor + } + add_opinion = { + modifier = left_war_early + target = scope:actor + } + } + } + + auto_accept = yes + + ai_potential = { + is_at_war = yes + } + + ai_targets = { + ai_recipients = war_allies + } + + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 24 + kingdom = 0 + empire = 0 + hegemony = 0 + } + + ai_will_do = { + base = -25 + #you have to be dishonorable and lazy to do this + ai_value_modifier = { + ai_honor = -0.1 + ai_energy = -0.1 + } + ##check if the recipient is the war leader and do it + #if they are infamous + modifier = { + any_character_war = { + is_war_leader = scope:recipient + } + scope:recipient = { + prestige_level < 0 + } + add = 5 + } + #if they are impious + modifier = { + any_character_war = { + is_war_leader = scope:recipient + } + scope:recipient = { + piety_level < 0 + } + add = 5 + } + #if they are a criminal + modifier = { + any_character_war = { + is_war_leader = scope:recipient + } + has_any_criminal_trait_in_faith_trigger = { + CHARACTER = scope:recipient + FAITH = scope:actor.faith + } + add = 5 + } + #if they wronged you or your family + modifier = { + any_character_war = { + is_war_leader = scope:recipient + } + scope:actor = { + has_any_major_revenge_opinion_against_character_trigger = { + CHARACTER = scope:recipient + } + } + add = 5 + } + #if they have good relation with the other side + modifier = { + any_character_war = { + OR = { + AND = { + primary_defender = scope:recipient + primary_attacker = { + has_any_good_relationship_with_character_trigger = { + CHARACTER = scope:actor + } + } + } + AND = { + primary_attacker = scope:recipient + primary_defender = { + has_any_good_relationship_with_character_trigger = { + CHARACTER = scope:actor + } + } + } + } + } + add = 5 + } + #don't do it + # if the other side has bad relation with you + modifier = { + any_character_war = { + OR = { + AND = { + primary_defender = scope:recipient + primary_attacker = { + has_any_bad_relationship_with_character_trigger = { + CHARACTER = scope:actor + } + } + } + AND = { + primary_attacker = scope:recipient + primary_defender = { + has_any_bad_relationship_with_character_trigger = { + CHARACTER = scope:actor + } + } + } + } + } + add = -1000 + } + # you are winning + modifier = { + any_character_war = { + OR = { + AND = { + primary_defender = scope:recipient + defender_war_score >= 0 + } + AND = { + primary_attacker = scope:recipient + attacker_war_score >= 0 + } + } + } + add = -1000 + } + opinion_modifier = { # Opinion Factor + who = scope:recipient + opinion_target = scope:actor + multiplier = -0.1 + desc = AI_OPINION_REASON + } + } +} diff --git a/common/character_interactions/09_mpo_interactions.txt b/common/character_interactions/09_mpo_interactions.txt new file mode 100644 index 00000000..b47bf025 --- /dev/null +++ b/common/character_interactions/09_mpo_interactions.txt @@ -0,0 +1,11274 @@ +offer_confederation_interaction = { + category = interaction_category_diplomacy + icon = offer_confederation_interaction + + desc = offer_confederation_interaction_desc + + ai_targets = { + ai_recipients = neighboring_rulers_including_tributary_borders + } + ai_frequency_by_tier = { + barony = 0 + county = 8 + duchy = 8 + kingdom = 0 + empire = 0 + hegemony = 0 + } + popup_on_receive = yes + pause_on_receive = yes + + common_interaction = yes + + cooldown_against_recipient = { years = 3 } + + is_shown = { + scope:actor = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + is_playable_character = yes + OR = { + is_independent_ruler = yes + confederation ?= { is_house_based = no } + } + } + scope:recipient = { + is_playable_character = yes + is_independent_ruler = yes + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + NOT = { this = scope:actor } + } + } + + is_valid_showing_failures_only = { + trigger_if = { + limit = { + scope:actor = { is_confederation_member = no } + } + custom_tooltip = { + text = forming_confederation_tt + scope:actor = { + has_character_flag = forming_confederation + } + } + } + scope:actor = { + is_imprisoned = no + } + scope:recipient = { + valid_confederation_member_trigger = { CHARACTER = scope:actor } + is_imprisoned = no + is_at_war = no + } + } + + cost = { + prestige = { + value = 0 + if = { + limit = { scope:prestige_send_option = yes } + add = scope:actor.minor_prestige_value + desc = PRESTIGE_INTERACTION_ACCEPTANCE_SEND_OPTION + } + } + } + + greeting = positive + notification_text = OFFER_CONFEDERATION_INTERACTION_NOTIFICATION + + ai_accept = { + base = -50 + # MAIN + # Heretic/Infidel modifier. + # Tier difference modifier. + # Dejure modifier. + # Distant/Remote Realm modifier. + # Military power difference modifier. + + # MINOR + # Rivalry modifier. + # Same Dynasty modifier. + # Cultural/Cultural Group modifiers. + # Ageism modifier vs kids. + # Ruler Legitimacy modifier. + # Claimant modifier. + # FP3 Piety Level modifier. + + # OPINION SCALES + # Dread + # Compare Opinion modifier. + + #WHEN UPDATING ANYTHING HERE, PLEASE DO THE SAME (BUT INVERTED) IN LEAVE CONFEDERATION DECISION + + # PERKS + modifier = { # Perk boost + desc = offer_vassalization_true_ruler_perk_tt + trigger = { + scope:actor = { has_perk = true_ruler_perk } + } + add = true_ruler_value + } + modifier = { # Education 5 boost + desc = offer_vassalization_education_diplomacy_5_tt + trigger = { + scope:actor = { has_trait_with_flag = offer_vassalisation_25 } + } + add = 25 + } + + # EVENTS - temporary bonuses gained by events + modifier = { + desc = event_bonus_to_vassal_accept_tt + trigger = { + scope:actor = { has_character_modifier = event_bonus_to_vassal_accept } + } + add = 20 + } + + + # STRUGGLES - bonus gained by successful Sway scheme during the Persian Struggle + modifier = { + desc = fp3_persian_struggle_previously_swayed_tt + trigger = { + scope:recipient = { + has_opinion_modifier = { + modifier = scheme_sway_and_compelled_to_submit_opinion + target = scope:actor + } + } + } + add = 20 + } + + modifier = { + desc = fp3_rekindler_of_iran_modifier_reason + trigger = { + AND = { + scope:actor = { dynasty ?={ has_dynasty_modifier = fp3_rekindler_of_iran_modifier } } + scope:recipient = { culture = { has_cultural_pillar = heritage_iranian } } + } + } + add = 20 + } + + + modifier = { # Cultural Acceptance + add = offer_vassalage_acceptance_value + desc = cultural_acceptance_interaction_reason + trigger = { + scope:actor = { + NOT = { has_same_culture_as = scope:recipient } + culture = { + cultural_acceptance = { target = scope:recipient.culture value <= 90 } + } + } + } + } + + # MAIN + modifier = { #Different faith, no pluralism. + desc = offer_vassalization_interaction_aibehavior_differentfaith_tt + trigger = { + scope:recipient = { + NOR = { #Of two different faiths AND the potential vassal's faith is not pluralistic. + faith = scope:actor.faith + faith = { has_doctrine = doctrine_pluralism_pluralistic } + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + } + add = { + value = -30 + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_hostile_level + } + } + } + add = -30 + } + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_evil_level + } + } + } + add = -30 + } + } + } + + modifier = { #Different faith, pluralism. + desc = offer_vassalization_interaction_aibehavior_differentfaith_tt + trigger = { + scope:recipient = { + NOR = { + faith = scope:actor.faith + scope:actor.faith = { has_doctrine = doctrine_pluralism_pluralistic } + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + add = { + value = -15 + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_hostile_level + } + } + } + add = -15 + } + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_evil_level + } + } + } + add = -15 + } + } + } + + modifier = { #Different faith, both have pluralism. + desc = offer_vassalization_interaction_aibehavior_differentfaith_tt + trigger = { + scope:recipient = { + NOR = { + faith = scope:actor.faith + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + scope:actor.faith = { has_doctrine = doctrine_pluralism_pluralistic } + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + add = { + value = -10 + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_hostile_level + } + } + } + add = -10 + } + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_evil_level + } + } + } + add = -10 + } + } + } + modifier = { #We just fought against each other. + desc = offer_vassalization_interaction_aibehavior_recent_war_tt + trigger = { + scope:recipient = { + any_truce_holder = { + this = scope:actor + } + } + # Ensure the truce wasn't purchased and is indeed from a war + scope:actor = { + NOT = { + has_purchased_truce_with_char = { TARGET = scope:recipient } + } + } + } + add = -40 + } + modifier = { #I fought an independence war against you. + desc = offer_confederation_independence_war_tt + trigger = { + scope:recipient = { + exists = var:independence_war_former_liege + var:independence_war_former_liege = scope:actor.top_liege + } + } + add = -100 + } + modifier = { # Isolationist tradition + desc = isolationist_reason + trigger = { + NOT = { + scope:actor.culture = scope:recipient.culture + } + scope:recipient.culture = { + has_cultural_tradition = tradition_isolationist + } + } + add = -50 + } + modifier = { #Bankrupt + desc = bankrupt_reason + trigger = { + scope:actor.gold <= -1 + } + add = -30 + } + modifier = { #Wide difference in rank + desc = offer_vassalization_interaction_aibehavior_widetitletier_tt + trigger = { + scope:actor = { + tier_difference = { + target = scope:recipient + value > 1 + } + } + } + add = 10 + } + modifier = { # Allied + desc = offer_vassalization_interaction_aibehavior_allied_tt + trigger = { + scope:recipient = { + is_allied_to = scope:actor + } + } + add = 50 + } + modifier = { # Is the Rightful Liege of recipient + desc = offer_vassalization_interaction_aibehavior_rightfulliegetitleholder_tt + trigger = { + scope:actor = { is_rightful_liege_of = scope:recipient } + } + add = 20 + } + modifier = { # Encircled + desc = offer_vassalization_interaction_aibehavior_encircled_tt + trigger = { + scope:recipient = { + NOT = { + any_land_neighboring_realm_with_tributaries_owner = { + NOT = { + this = scope:actor + } + } + } + NOT = { + any_realm_county = { + is_coastal_county = yes + } + } + } + } + add = 40 + } + modifier = { #No adjacency + desc = offer_vassalization_interaction_aibehavior_unconnectedrealm_tt + trigger = { + scope:recipient = { + NOT = { + any_land_neighboring_realm_with_tributaries_owner = { + OR = { + this = scope:actor + AND = { + exists = scope:actor.confederation + is_member_of_confederation = scope:actor.confederation + } + AND = { + exists = scope:actor.confederation + suzerain ?= { + is_member_of_confederation = scope:actor.confederation + } + } + suzerain ?= { + this = scope:actor + } + } + } + } + } + scope:recipient.capital_province = { squared_distance = { target = scope:actor.capital_province value < 100000 } } + } + add = -25 + } + modifier = { #Distant Realm + desc = offer_vassalization_interaction_aibehavior_distantrealm_tt + trigger = { + scope:recipient = { + NOT = { + any_land_neighboring_realm_with_tributaries_owner = { + OR = { + this = scope:actor + AND = { + exists = scope:actor.confederation + is_member_of_confederation = scope:actor.confederation + } + AND = { + exists = scope:actor.confederation + suzerain ?= { + is_member_of_confederation = scope:actor.confederation + } + } + suzerain ?= { + this = scope:actor + } + } + } + } + } + scope:recipient.capital_province = { squared_distance = { target = scope:actor.capital_province value >= 100000 } } + } + add = -100 + } + modifier = { #Remote Realm. + desc = offer_vassalization_interaction_aibehavior_remoterealm_tt + trigger = { + scope:recipient = { + NOT = { + any_land_neighboring_realm_with_tributaries_owner = { + OR = { + this = scope:actor + AND = { + exists = scope:actor.confederation + is_member_of_confederation = scope:actor.confederation + } + AND = { + exists = scope:actor.confederation + suzerain ?= { + is_member_of_confederation = scope:actor.confederation + } + } + suzerain ?= { + this = scope:actor + } + } + } + } + } + scope:recipient.capital_province = { squared_distance = { target = scope:actor.capital_province value >= 200000 } } + } + add = -175 + } + #Relative power + modifier = { + desc = offer_vassalization_interaction_aibehavior_power_tt + add = { + value = 1 + subtract = { + value = scope:recipient.max_military_strength # Intended for recipient to use max, to avoid having vassalizations become too easy for weakened realms + divide = { value = scope:actor.top_liege.current_military_strength min = 1 } + } + multiply = 5 + ceiling = yes + min = -100 + } + } + #Powerful vassal opinion of you + modifier = { + desc = offer_confederation_offerer_vassal_opinion_tt + trigger = { + scope:actor.top_liege = { + number_of_powerful_vassals >= 1 + } + } + + add = { + value = 0 + scope:actor.top_liege = { + every_powerful_vassal = { + if = { + limit = { + save_temporary_opinion_value_as = { + name = vassal_opinion + target = scope:actor.top_liege + } + } + add = scope:vassal_opinion + } + } + + if = { + limit = { + number_of_powerful_vassals > 0 + } + divide = number_of_powerful_vassals + } + else = { + divide = 5 + } + } + divide = 10 + } + } + + # Legitimacy + modifier = { + desc = "LOW_LEGITIMACY_REASON" + scope:actor = { + has_legitimacy_flag = very_reduced_tributarization_acceptance + } + add = -20 + } + modifier = { + desc = "LOW_LEGITIMACY_REASON" + scope:actor = { + has_legitimacy_flag = reduced_tributarization_acceptance + } + add = -10 + } + modifier = { + desc = "HIGH_LEGITIMACY_REASON" + scope:actor = { + has_legitimacy_flag = increased_tributarization_acceptance + } + add = 10 + } + modifier = { + desc = "HIGH_LEGITIMACY_REASON" + scope:actor = { + has_legitimacy_flag = very_increased_tributarization_acceptance + } + add = 20 + } + + # MINOR + modifier = { #Friend modifier. + desc = offer_vassalization_interaction_aibehavior_friend_tt + trigger = { + scope:recipient = { + has_relation_friend = scope:actor + NOT = { has_relation_best_friend = scope:actor } + } + } + add = 25 + } + modifier = { #Best Friend modifier. + desc = offer_vassalization_interaction_aibehavior_best_friend_tt + trigger = { + scope:recipient = { + has_relation_best_friend = scope:actor + } + } + add = 50 + } + modifier = { #Lover modifier. + desc = interaction_lover + trigger = { + scope:recipient = { + has_relation_lover = scope:actor + NOT = { has_relation_soulmate = scope:actor } + } + } + add = 25 + } + modifier = { #Soulmate modifier. + desc = interaction_soulmate + trigger = { + scope:recipient = { + has_relation_soulmate = scope:actor + } + } + add = 50 + } + modifier = { #Rivalry modifier. + desc = offer_vassalization_interaction_aibehavior_rival_tt + trigger = { + scope:recipient = { + has_relation_rival = scope:actor + NOT = { has_relation_nemesis = scope:actor } + } + } + add = -200 + } + modifier = { #Nemesis modifier. + desc = offer_vassalization_interaction_aibehavior_nemesis_tt + trigger = { + scope:recipient = { + has_relation_nemesis = scope:actor + } + } + add = -1000 + } + + modifier = { #Rivalry modifier. + desc = offer_vassalization_interaction_aibehavior_rival_confederation_tt + trigger = { + scope:actor.confederation ?= { + any_confederation_member = { + NOT = { this = scope:actor } + has_relation_rival = scope:recipient + NOT = { has_relation_nemesis = scope:recipient } + } + } + } + add = -100 + } + modifier = { #Nemesis modifier. + desc = offer_vassalization_interaction_aibehavior_nemesis_confederation_tt + trigger = { + scope:actor.confederation ?= { + any_confederation_member = { + NOT = { this = scope:actor } + has_relation_nemesis = scope:recipient + } + } + } + add = -500 + } + modifier = { #Same Dynasty modifier. + desc = offer_vassalization_interaction_aibehavior_dynasty_tt + trigger = { + exists = scope:actor.dynasty + exists = scope:recipient.dynasty + scope:recipient = { + dynasty = scope:actor.dynasty + } + } + add = 25 + } + modifier = { #Same House modifier. + desc = offer_vassalization_interaction_aibehavior_house_tt + trigger = { + exists = scope:actor.house + exists = scope:recipient.house + scope:recipient = { + house = scope:actor.house + } + } + add = 50 + } + + modifier = { # Same language + add = 20 + desc = speaks_same_language_interaction_reason + trigger = { + scope:actor = { + knows_language_of_culture = scope:recipient.culture + } + } + } + + modifier = { # Iberian Struggle, less likely for outsiders to vassalize inside + add = -35 + desc = iberian_struggle_reason_reason + trigger = { + scope:actor = { + NOT = { + any_character_struggle = { is_struggle_type = iberian_struggle } + } + } + scope:recipient = { + any_character_struggle = { is_struggle_type = iberian_struggle } + } + } + } + + modifier = { #Ageism modifier vs kids. + desc = offer_vassalization_interaction_aibehavior_child_tt + trigger = { + scope:actor = { + age < 12 + } + scope:recipient = { + age > 16 + } + } + add = -5 + } + modifier = { #Illegitimacy modifier. + desc = confederation_offerer_illegitimate_tt + trigger = { + scope:actor.top_liege = { + OR = { + AND = { + has_trait = bastard + scope:recipient = { + faith = { NOT = { has_doctrine = doctrine_bastardry_none } } + } + } + has_trait = denounced + has_trait = disinherited + } + } + } + add = -20 + } + + modifier = { #Claimant modifier. + desc = confederation_interaction_aibehavior_claimant_tt + trigger = { + scope:actor.top_liege.primary_title = { + scope:recipient = { + has_claim_on = prev + } + } + } + add = -20 + } + + modifier = { # Ambitious + desc = TAKE_THE_VOWS_AMBITIOUS + trigger = { + scope:recipient = { + has_trait = ambitious + } + } + add = -25 + } + + modifier = { # Paranoid + desc = INTERACTION_PARANOID + trigger = { + scope:recipient = { + has_trait = paranoid + } + } + add = -25 + } + + modifier = { # Arrogant + desc = INTERACTION_ARROGANT + trigger = { + scope:recipient = { + has_trait = arrogant + } + } + add = -25 + } + + modifier = { # Fickle + desc = INTERACTION_FICKLE + trigger = { + scope:recipient = { + has_trait = fickle + } + } + add = -15 + } + + modifier = { # Stubborn + desc = INTERACTION_STUBBORN + trigger = { + scope:recipient = { + has_trait = stubborn + } + } + add = -15 + } + + modifier = { # Greedy + desc = INTERACTION_GREEDY + trigger = { + scope:recipient = { + has_trait = greedy + } + } + add = -15 + } + + modifier = { # Trusting + desc = TAKE_THE_VOWS_TRUSTING + trigger = { + scope:recipient = { + has_trait = trusting + } + } + add = 15 + } + + modifier = { # Content + desc = INTERACTION_CONTENT + trigger = { + scope:recipient = { + has_trait = content + } + } + add = 15 + } + + modifier = { # Craven + desc = INTERACTION_CRAVEN + trigger = { + scope:recipient = { + has_trait = craven + } + } + add = 25 + } + + modifier = { # FP3 modifier. + desc = GENERIC_YOUR_PIETY_LEVEL_MODIFIER + trigger = { scope:actor = { any_character_struggle = { has_struggle_phase_parameter = piety_level_affects_vassalage_acceptance } } } + add = { + value = { + value = scope:actor.piety_level + subtract = low_piety_level + } + multiply = 10 + } + } + + # OPINION INFLUENCE + modifier = { + add = intimidated_external_reason_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 1 + } + } + desc = INTIMIDATED_REASON + } + modifier = { + add = cowed_external_reason_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 2 + } + } + desc = COWED_REASON + } + opinion_modifier = { #Compare Opinion modifier. + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.35 + } + + # DIPLOMATIC COURT GRANDEUR BONUS + modifier = { + trigger = { + scope:actor.top_liege = { + has_royal_court = yes + has_dlc_feature = royal_court + has_court_type = court_diplomatic + court_grandeur_current_level >= 1 + } + } + add = { + value = scope:actor.top_liege.court_grandeur_current + if = { + limit = { # Reduce the bonus if you are below your expected level + scope:actor.top_liege = { + court_grandeur_current_level < court_grandeur_minimum_expected_level + } + } + multiply = 0.15 + } + else = { + multiply = 0.3 + } + } + desc = DIPLOMATIC_COURT_ACCEPTANCE_INCREASE_REASON + } + + # LOW LEGITIMACY + modifier = { + desc = "LOW_LEGITIMACY_REASON" + add = -10 + scope:actor = { + has_legitimacy_flag = reduced_confederation_acceptance + } + } + modifier = { + desc = "LOW_LEGITIMACY_REASON" + add = -25 + scope:actor = { + has_legitimacy_flag = very_reduced_confederation_acceptance + } + } + + # HIGH LEGITIMACY + modifier = { + desc = "HIGH_LEGITIMACY_REASON" + add = 15 + scope:actor = { + has_legitimacy_flag = increased_confederation_acceptance + } + } + modifier = { + desc = "HIGH_LEGITIMACY_REASON" + add = 40 + scope:actor = { + has_legitimacy_flag = very_increased_confederation_acceptance + } + } + + # HERD + modifier = { + add = 40 + scope:herd_send_option = yes + desc = HERD_INTERACTION_ACCEPTANCE_SEND_OPTION + } + + # PRESTIGE + modifier = { + add = 40 + scope:prestige_send_option = yes + desc = PRESTIGE_INTERACTION_ACCEPTANCE_SEND_OPTION + } + + #CULTURE + modifier = { + add = 50 + scope:actor = { + culture = scope:recipient.culture + } + desc = "SAME_CULTURE_REASON" + } + modifier = { + add = -20 + NOT = { + scope:actor = { + culture = scope:recipient.culture + } + } + scope:actor = { + NOR = { + culture = { + any_parent_culture_or_above = { + this = scope:recipient.culture + } + } + scope:recipient.culture = { + any_parent_culture_or_above = { + this = scope:actor.culture + } + } + culture = { + has_same_culture_heritage = scope:recipient.culture + } + } + } + desc = "DIFFERENT_CULTURE_REASON" + } + + #Conquerors have no interest in this + modifier = { + scope:recipient = { + has_trait = conqueror + } + add = -1000 + } + modifier = { + scope:recipient = { + has_trait = greatest_of_khans + } + add = -1000 + } + + # Are you using a hook? + modifier = { + trigger = { + scope:hook ?= yes + } + add = 100 + desc = LEGEND_HOOK_USED + } + + #No neighbor scaring them + modifier = { + add = -30 + desc = NO_FRIGHTENING_NEIGHBOR_REASON + scope:actor.culture = { + NOT = { + has_cultural_parameter = forming_confederations_is_easier + } + } + scope:recipient.culture = { + NOT = { + has_cultural_parameter = forming_confederations_is_easier + } + } + NOT = { + scope:recipient = { + confederation_neighboring_foe_trigger = { CHARACTER = scope:recipient } + } + } + } + + #Neighbor is TERRIFYING them + modifier = { + add = 30 + desc = TERRIFYING_NEIGHBOR_REASON + scope:recipient = { + save_temporary_scope_as = confederate + any_land_neighboring_realm_with_tributaries_owner = { + top_suzerain ?= { + is_confederation_member = no + NOR = { + this = scope:actor + this = scope:actor.top_liege + } + confederation_worthy_foe_strength_ratio_value <= 0.25 + NOT = { is_allied_to = scope:recipient } + OR = { + highest_held_title_tier >= tier_kingdom + faith = { + faith_hostility_level = { + target = scope:recipient.faith + value >= faith_evil_level + } + } + has_trait = conqueror + has_trait = greatest_of_khans + any_owned_story = { + OR = { + story_type = story_greatest_of_khans + story_type = story_mongol_invasion + } + } + } + } + } + } + } + + #You have too many confederates + #For duchy + modifier = { + add = duchy_confederation_vassals_value + desc = TOO_MANY_CONFEDERATION_VASSALS_REASON + scope:actor.confederation ?= { + any_confederation_member = { + count >= 6 + highest_held_title_tier >= tier_county + } + } + } + + #Another confederation of recipient's culture exists + modifier = { + add = -100 + desc = ANOTHER_CULTURE_CONFEDERATION_REASON + NOT = { + scope:actor.culture = { + this = scope:recipient.culture + } + } + any_confederation = { + NOT = { + this = scope:actor.confederation + } + has_variable = confederation_culture + var:confederation_culture = scope:actor.culture + } + } + + #Forcing them to join war + modifier = { + add = -100 + desc = FORCED_TO_JOIN_WAR_REASON + scope:actor = { + is_at_war_as_defender = yes + any_character_war = { + primary_defender = { + OR = { + this = scope:actor + AND = { + exists = scope:actor.confederation + is_member_of_confederation = scope:actor.confederation + } + } + } + is_defender = scope:actor + NOR = { + any_war_attacker = { + is_allied_to = scope:recipient + } + any_war_attacker = { + this = scope:recipient + } + any_war_defender = { + this = scope:recipient + } + any_war_attacker = { + scope:recipient = { + has_truce = prev + } + } + } + } + } + } + + #You will be taking over their war + modifier = { + add = 100 + desc = TAKING_OVER_DEFENSIVE_WAR_REASON + scope:recipient = { + is_at_war_as_defender = yes + any_character_war = { + is_war_leader = scope:recipient + is_defender = scope:recipient + NOR = { + any_war_attacker = { + is_allied_to = scope:actor + } + any_war_attacker = { + this = scope:actor + } + any_war_defender = { + this = scope:actor + } + } + defender_war_score < 80 + defender_war_score >= 0 + } + } + } + modifier = { + add = 200 + desc = TAKING_OVER_DEFENSIVE_WAR_REASON + scope:recipient = { + is_at_war_as_defender = yes + any_character_war = { + is_war_leader = scope:recipient + is_defender = scope:recipient + NOR = { + any_war_attacker = { + is_allied_to = scope:actor + } + any_war_attacker = { + this = scope:actor + } + any_war_defender = { + this = scope:actor + } + } + defender_war_score < 0 + } + } + } + + #Culture is into/not into confederation + modifier = { + add = 10 + desc = CONFEDERATION_ETHOS_REASON + scope:recipient.culture = { + OR = { + has_cultural_pillar = ethos_stoic + has_cultural_pillar = ethos_communal + } + } + } + modifier = { + add = 20 + desc = CONFEDERATION_ETHOS_REASON + scope:recipient.culture = { + OR = { + has_cultural_pillar = ethos_egalitarian + } + } + } + modifier = { + add = -10 + desc = CONFEDERATION_ETHOS_REASON + scope:recipient.culture = { + OR = { + has_cultural_pillar = ethos_bellicose + has_cultural_pillar = ethos_courtly + has_cultural_pillar = ethos_bureaucratic + } + } + } + + modifier = { # Herder + add = 50 + desc = CONFEDERATION_HERDER_REASON + trigger = { + scope:recipient = { + government_has_flag = government_is_herder + } + } + } + modifier = { + add = -20 + desc = NOMADIC_AUTHORITY_REASON + trigger = { + scope:recipient = { + has_realm_law = nomadic_authority_3 + } + } + } + modifier = { + add = -50 + desc = NOMADIC_AUTHORITY_REASON + trigger = { + scope:recipient = { + has_realm_law = nomadic_authority_4 + } + } + } + modifier = { + add = -100 + desc = NOMADIC_AUTHORITY_REASON + trigger = { + scope:recipient = { + has_realm_law = nomadic_authority_5 + } + } + } + modifier = { + add = -20 + desc = TRIBAL_AUTHORITY_REASON + trigger = { + scope:recipient = { + has_realm_law = tribal_authority_2 + } + } + } + modifier = { + add = -50 + desc = TRIBAL_AUTHORITY_REASON + trigger = { + scope:recipient = { + has_realm_law = tribal_authority_3 + } + } + } + modifier = { + desc = "BARANGAY_TRADITION_REASON" + trigger = { + scope:recipient.culture = { + has_cultural_parameter = invite_to_confederation_extra_reasons + } + } + add = 20 + } + modifier = { #left your confederation + add = -50 + desc = LEFT_YOUR_CONFEDERATION_REASON + exists = scope:actor.confederation + scope:recipient = { + has_variable = left_confederation + var:left_confederation ?= { + this = scope:actor.confederation + } + } + } + } + + send_option = { + flag = hook + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + localization = GENERIC_SPEND_A_HOOK + } + + send_option = { # Herd + is_shown = { + scope:actor = { + government_has_flag = government_is_nomadic + exists = domicile + } + } + is_valid = { + scope:recipient = { + government_has_flag = government_is_nomadic + exists = domicile + } + scope:actor.domicile = { herd >= minor_herd_value } + } + flag = herd_send_option + localization = TRADE_HERD_FOR_BETTER_AI_ACCEPTANCE_CONFEDERATION + } + + send_option = { # Prestige + is_shown = { + always = yes + } + is_valid = { + scope:actor = { prestige >= minor_prestige_value } + } + flag = prestige_send_option + localization = TRADE_PRESTIGE_FOR_BETTER_AI_ACCEPTANCE + } + + send_options_exclusive = no + + on_accept = { + if = { + #checking that the delay hasn't made the character invalid + limit = { + scope:recipient = { + is_playable_character = yes + } + } + scope:actor = { + if = { + limit = { has_character_flag = forming_confederation } + remove_character_flag = forming_confederation + # MPO ACHIEVEMENT Con-Fed-Up + if = { + limit = { is_ai = no } + add_achievement_global_variable_effect = { + VARIABLE = mpo_confedup_achievement_unlocked + VALUE = yes + } + } + } + } + if = { + limit = { + scope:recipient = { + is_at_war_as_defender = yes + any_character_war = { + is_war_leader = scope:recipient + is_defender = scope:recipient + } + } + } + scope:recipient = { + every_character_war = { + limit = { + is_war_leader = scope:recipient + is_defender = scope:recipient + } + add_to_list = recipient_wars + } + } + every_in_list = { + list = recipient_wars + save_scope_as = recipient_war + primary_attacker = { + save_scope_as = attacker + } + add_defender = scope:actor + hidden_effect = { + scope:actor.confederation ?= { + every_confederation_member = { + limit = { + NOR = { + is_attacker_in_war = scope:recipient_war + is_defender_in_war = scope:recipient_war + is_at_war_with = scope:recipient + is_allied_to = scope:attacker + is_imprisoned_by = scope:recipient + is_at_war_with = scope:recipient + } + } + scope:recipient_war = { add_defender = prev } + } + } + } + } + if = { + limit = { + scope:actor.confederation ?= { + any_confederation_member = { + NOR = { + is_attacker_in_war = scope:recipient_war + is_defender_in_war = scope:recipient_war + this = scope:actor + is_at_war_with = scope:recipient + is_allied_to = scope:attacker + is_imprisoned_by = scope:recipient + is_at_war_with = scope:recipient + } + } + } + } + scope:actor = { + custom_tooltip = confederates_joining_recipient_war_tt + } + } + } + scope:actor = { + save_scope_as = confederation_offerer + } + scope:recipient = { + save_scope_as = confederation_accepter + } + #Confederation doesn't exist yet + if = { + limit = { + scope:actor = { + is_confederation_member = no + } + } + scope:actor = { + custom_tooltip = create_confederation_tt + custom_tooltip = confederation_defensive_wars_tt + custom_tooltip = unlock_leave_confederation_interaction_tt + if = { + limit = { + government_has_flag = government_is_nomadic + } + add_character_modifier = { + modifier = mpo_confederation_member_modifier + years = 5 + } + capital_county ?= { + change_county_fertility = major_county_fertility_level_gain + } + } + } + scope:recipient = { + offer_confederation_accepter_effect = yes + } + } + #Confederation already exists + else = { + scope:actor.confederation = { + save_scope_as = confederation + } + show_as_tooltip = { + #If actor is top liege and offering vassaldom + scope:recipient = { + offer_confederation_accepter_effect = yes + } + } + } + if = { + limit = { + scope:recipient = { + government_has_flag = government_is_nomadic + } + } + scope:recipient = { + add_character_modifier = { + modifier = mpo_confederation_member_modifier + years = 5 + } + capital_county ?= { + change_county_fertility = major_county_fertility_level_gain + } + } + } + if = { + limit = { + scope:recipient = { + is_ai = no + } + } + scope:recipient = { + custom_tooltip = confederation_raiding_attacking_tt + if = { + limit = { + government_has_flag = government_is_nomadic + } + custom_tooltip = confederation_restrictions_warning_tt + } + else = { + custom_tooltip = confederation_restrictions_tribe_warning_tt + } + } + } + scope:recipient = { + if = { + limit = { + government_has_flag = government_is_nomadic + } + custom_tooltip = confederation_migrating_leaving_warning_tt + } + } + scope:actor = { + #Event distributor event + trigger_event = mpo_interactions_events.0001 + } + if = { + limit = { + scope:actor = { + is_at_war_as_defender = yes + any_character_war = { + primary_defender = { + OR = { + this = scope:actor + AND = { + exists = scope:actor.confederation + is_member_of_confederation = scope:actor.confederation + } + } + } + is_defender = scope:actor + NOR = { + any_war_attacker = { + is_allied_to = scope:recipient + } + any_war_attacker = { + this = scope:recipient + } + any_war_defender = { + this = scope:recipient + } + any_war_attacker = { + scope:recipient = { + has_truce = prev + } + } + } + } + } + } + scope:actor = { + every_character_war = { + limit = { + primary_defender = { + OR = { + this = scope:actor + AND = { + exists = scope:actor.confederation + is_member_of_confederation = scope:actor.confederation + } + } + } + is_defender = scope:actor + NOR = { + any_war_attacker = { + is_allied_to = scope:recipient + } + any_war_attacker = { + this = scope:recipient + } + any_war_defender = { + this = scope:recipient + } + any_war_attacker = { + scope:recipient = { + has_truce = prev + } + } + } + } + add_defender = scope:recipient + } + #Lose legitimacy unless you're taking on a war too + if = { + limit = { + NOT = { + scope:recipient = { + is_at_war_as_defender = yes + any_character_war = { + is_war_leader = scope:recipient + is_defender = scope:recipient + NOR = { + any_war_attacker = { + is_allied_to = scope:actor + } + any_war_attacker = { + this = scope:actor + } + any_war_attacker = { + scope:actor = { + has_truce = prev + } + } + } + } + } + } + } + add_legitimacy = medium_legitimacy_loss + custom_tooltip = confederation_legitimacy_loss_war_tt + } + } + } + if = { + limit = { + scope:prestige_send_option = yes + } + scope:recipient = { + add_prestige = scope:actor.minor_prestige_value + } + } + if = { + limit = { + scope:herd_send_option = yes + } + scope:actor = { + pay_herd = { + target = scope:recipient + value = domicile.minor_herd_value + } + } + } + } + } + + on_decline = { + #Stop spamming players with this + if = { + limit = { + exists = scope:actor.confederation + scope:recipient = { + is_ai = no + } + } + scope:recipient = { + set_variable = { + name = refused_confederation + value = scope:actor.confederation + years = 3 + } + } + } + scope:actor = { + #letter response + trigger_event = mpo_interactions_events.0004 + } + } + + ai_potential = { + age >= 6 + OR = { + AND = { + is_independent_ruler = yes + highest_held_title_tier < tier_kingdom + has_character_flag = forming_confederation + } + is_confederation_member = yes + } + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + + ai_will_do = { + base = 50 + + modifier = { + add = 25 + scope:actor = { + confederation_neighboring_foe_trigger = { CHARACTER = scope:actor } + } + } + modifier = { + add = 25 + scope:recipient = { + confederation_neighboring_foe_trigger = { CHARACTER = scope:recipient } + } + } + modifier = { + add = -25 + scope:recipient = { + is_at_war = yes + } + } + modifier = { + factor = 0 + OR = { + #Will only throw the confederation into a war + scope:recipient = { + is_at_war = yes + NOR = { + any_character_war = { primary_defender = scope:recipient } + culture = scope:actor.culture + scope:actor.confederation ?= { + any_confederation_member = { + count >= 4 + highest_held_title_tier >= tier_county + } + } + reverse_opinion = { + target = scope:actor + value >= 30 + } + } + } + AND = { + exists = scope:actor.confederation + scope:recipient = { + has_variable = left_confederation + var:left_confederation ?= { + this = scope:actor.confederation + } + } + } + #Recipient hasn't been asked to join this confederation already + scope:recipient = { + has_variable = refused_confederation + exists = scope:actor.confederation + var:refused_confederation = { + this = scope:actor.confederation + } + } + } + } + } +} + +promote_divergent_or_hybrid_culture_interaction = { + category = interaction_category_diplomacy + icon = icon_culture + + desc = promote_divergent_or_hybrid_culture_interaction_desc + + ai_targets = { + ai_recipients = tributaries + ai_recipients = vassals + max = 10 + } + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 12 + kingdom = 12 + empire = 12 + hegemony = 12 + } + popup_on_receive = yes + pause_on_receive = yes + + common_interaction = yes + + is_shown = { + scope:actor.domicile ?= { + domicile_uses_culture_and_faith = yes + domicile_culture = scope:actor.culture + } + scope:actor.culture ?= { + OR = { + is_hybrid_culture = yes + is_divergent_culture = yes + } + } + scope:recipient = { + trigger_if = { + limit = { + domicile ?= { domicile_uses_culture_and_faith = yes } + } + domicile.domicile_culture != scope:actor.culture + } + trigger_else = { + culture != scope:actor.culture + } + OR = { + is_tributary_of_suzerain_or_above = scope:actor + is_vassal_or_below_of = scope:actor + } + } + } + + is_valid_showing_failures_only = { + scope:recipient = { + NOR = { + is_imprisoned_by = scope:actor + has_strong_hook = scope:actor + is_at_war_with = scope:actor + } + } + custom_tooltip = { + text = not_a_nomad_or_herder_tt + scope:recipient = { + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + } + trigger_if = { + limit = { + exists = scope:recipient.domicile + } + custom_tooltip = { + text = not_a_parent_culture_of_domicile_tt + scope:actor.culture = { + any_parent_culture_or_above = { + this = scope:recipient.domicile.domicile_culture + } + } + } + } + trigger_else = { + custom_tooltip = { + text = not_a_parent_culture_tt + scope:actor.culture = { + any_parent_culture_or_above = { + this = scope:recipient.culture + } + } + } + } + } + + greeting = positive + notification_text = PROMOTE_DIVERGENT_CULTURE_INTERACTION_NOTIFICATION + + ai_accept = { + base = -50 + + modifier = { + add = 1000 + scope:recipient = { + is_obedient_to = scope:actor + } + desc = MIGRATION_INTERACTION_OBEDIENT_ACCEPTANCE + } + + opinion_modifier = { + opinion_target = scope:actor + who = scope:recipient + multiplier = 1 + desc = AI_OPINION_REASON + } + + modifier = { + add = 20 + desc = NOMADIC_AUTHORITY_POSITIVE_REASON + trigger = { + scope:actor = { + has_realm_law = nomadic_authority_3 + } + } + } + + modifier = { + add = 50 + desc = NOMADIC_AUTHORITY_POSITIVE_REASON + trigger = { + scope:actor = { + has_realm_law = nomadic_authority_4 + } + } + } + + modifier = { + add = 100 + desc = NOMADIC_AUTHORITY_POSITIVE_REASON + trigger = { + scope:actor = { + has_realm_law = nomadic_authority_5 + } + } + } + + # HERD + modifier = { + add = 60 + scope:herd_send_option = yes + desc = HERD_INTERACTION_ACCEPTANCE_SEND_OPTION + } + + # PRESTIGE + modifier = { + add = 60 + scope:prestige_send_option = yes + desc = PRESTIGE_INTERACTION_ACCEPTANCE_SEND_OPTION + } + + # Are you using a hook? + modifier = { + trigger = { + scope:hook ?= yes + } + add = 1000 + desc = LEGEND_HOOK_USED + } + + modifier = { # Herder + add = 100 + desc = CONFEDERATION_HERDER_REASON + trigger = { + scope:recipient = { + government_has_flag = government_is_herder + } + } + } + } + + send_option = { + flag = hook + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + localization = GENERIC_SPEND_A_HOOK + } + + send_option = { # Herd + is_shown = { + scope:actor = { + government_has_flag = government_is_nomadic + exists = domicile + } + } + is_valid = { + scope:recipient = { + government_has_flag = government_is_nomadic + exists = domicile + } + scope:actor.domicile = { herd >= minor_herd_value } + } + flag = herd_send_option + localization = TRADE_HERD_FOR_BETTER_AI_ACCEPTANCE_CONFEDERATION + } + + send_option = { # Prestige + is_shown = { + always = yes + } + is_valid = { + scope:actor = { prestige >= minor_prestige_value } + } + flag = prestige_send_option + localization = TRADE_PRESTIGE_FOR_BETTER_AI_ACCEPTANCE + } + + send_options_exclusive = no + + on_accept = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_good + title = promote_culture_accepted_tt + left_icon = scope:recipient + scope:recipient = { + if = { + limit = { + domicile ?= { domicile_uses_culture_and_faith = yes } + } + custom_tooltip = { + text = family_and_lands_convert_domicile_tt + every_held_title = { + limit = { + tier = tier_county + is_landless_type_title = no + culture = scope:recipient.domicile.domicile_culture + } + add_to_list = counties_to_convert + } + # Family at court also convert + every_close_or_extended_family_member = { + limit = { + is_courtier_of = scope:recipient + culture = scope:recipient.domicile.domicile_culture + } + add_to_list = spouses_and_family_to_convert + } + domicile = { + set_domicile_culture = scope:actor.culture + } + } + } + else = { + custom_tooltip = { + text = family_and_lands_convert_tt + every_held_title = { + limit = { + tier = tier_county + is_landless_type_title = no + culture = scope:recipient.culture + } + add_to_list = counties_to_convert + } + # Family at court also convert + every_close_or_extended_family_member = { + limit = { + is_courtier_of = scope:recipient + culture = scope:recipient.culture + } + add_to_list = spouses_and_family_to_convert + } + } + } + if = { + limit = { + culture != scope:actor.culture + } + set_culture = scope:actor.culture + } + hidden_effect = { + every_in_list = { + list = counties_to_convert + set_county_culture = scope:actor.culture + } + every_in_list = { + list = spouses_and_family_to_convert + set_culture = scope:actor.culture + } + } + add_opinion = { + modifier = respect_opinion + opinion = 10 + target = scope:actor + } + } + } + if = { + limit = { + scope:prestige_send_option = yes + } + scope:actor = { + add_prestige = scope:actor.minor_prestige_loss + } + scope:recipient = { + add_prestige = scope:actor.minor_prestige_value + } + } + if = { + limit = { + scope:herd_send_option = yes + } + scope:actor = { + pay_herd = { + target = scope:recipient + value = domicile.minor_herd_value + } + } + } + if = { + limit = { + scope:hook = yes + } + use_hook = scope:recipient + } + } + } + + on_decline = { + scope:actor = { + } + } + + ai_potential = { + government_has_flag = government_is_nomadic + highest_held_title_tier >= tier_duchy + } + + ai_will_do = { + base = 100 + + modifier = { + add = -1 + scope:hook ?= yes + } + + modifier = { + factor = 0 + OR = { + scope:herd_send_option ?= yes + scope:prestige_send_option ?= yes + } + } + } +} + +inspire_conversion_interaction = { + category = interaction_category_religion + icon = government_type_nomad + + desc = inspire_conversion_interaction_desc + + ai_targets = { + ai_recipients = tributaries + ai_recipients = vassals + max = 10 + } + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 12 + kingdom = 6 + empire = 6 + hegemony = 6 + } + cooldown_against_recipient = { years = 5 } + popup_on_receive = yes + pause_on_receive = yes + + common_interaction = yes + + is_shown = { + scope:actor.domicile ?= { + domicile_uses_culture_and_faith = yes + } + scope:recipient = { + OR = { + trigger_if = { + limit = { + domicile ?= { domicile_uses_culture_and_faith = yes } + } + domicile.domicile_faith != scope:actor.domicile.domicile_faith + } + faith != scope:actor.domicile.domicile_faith + faith != scope:actor.faith # Tooltip reasons + } + OR = { + is_tributary_of_suzerain_or_above = scope:actor + is_vassal_or_below_of = scope:actor + } + } + } + + is_valid_showing_failures_only = { + scope:recipient = { + NOR = { + is_imprisoned_by = scope:actor + has_strong_hook = scope:actor + is_at_war_with = scope:actor + } + } + custom_description = { + text = "is_head_of_religion" + subject = scope:recipient + NOT = { scope:recipient.faith.religious_head = scope:recipient } + } + custom_description = { + text = "is_protected_via_contract" + subject = scope:recipient + NAND = { # Vassal Contract forbids meddling by liege + exists = scope:recipient.liege + scope:recipient.liege = scope:actor + scope:recipient = { + is_ruler = yes + vassal_contract_has_flag = religiously_protected + } + } + } + custom_tooltip = { + text = you_are_not_of_your_domicile_faith_tt + scope:recipient = { + OR = { + trigger_if = { + limit = { + domicile ?= { domicile_uses_culture_and_faith = yes } + } + domicile.domicile_faith != scope:actor.domicile.domicile_faith + } + faith != scope:actor.domicile.domicile_faith + } + } + } + custom_tooltip = { + text = not_a_nomad_or_herder_tt + scope:recipient = { + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + } + } + + greeting = positive + notification_text = INSPIRE_CONVERSION_INTERACTION_NOTIFICATION + + ai_accept = { + base = -50 + + modifier = { + add = 1000 + scope:recipient = { + is_obedient_to = scope:actor + } + desc = MIGRATION_INTERACTION_OBEDIENT_ACCEPTANCE + } + + modifier = { + desc = ASK_FOR_CONVERSION_RECIPIENT_IS_ZEALOUS + add = -100 + scope:recipient = { + has_trait = zealous + } + } + + modifier = { + desc = INSPIRE_UNREFORMED_FAITH + add = -50 + scope:actor.faith = { has_doctrine_parameter = unreformed } + } + + modifier = { + add = 50 + desc = ZEALOUS_PROSELYTIZER_REASON + trigger = { + scope:actor = { + has_perk = zealous_proselytizer_perk + } + } + } + + modifier = { + add = 20 + desc = NOMADIC_AUTHORITY_POSITIVE_REASON + trigger = { + scope:actor = { + has_realm_law = nomadic_authority_3 + } + } + } + + modifier = { + add = 50 + desc = NOMADIC_AUTHORITY_POSITIVE_REASON + trigger = { + scope:actor = { + has_realm_law = nomadic_authority_4 + } + } + } + + modifier = { + add = 100 + desc = NOMADIC_AUTHORITY_POSITIVE_REASON + trigger = { + scope:actor = { + has_realm_law = nomadic_authority_5 + } + } + } + + opinion_modifier = { + opinion_target = scope:actor + who = scope:recipient + multiplier = 1 + desc = AI_OPINION_REASON + } + + # HERD + modifier = { + add = 60 + scope:herd_send_option = yes + desc = HERD_INTERACTION_ACCEPTANCE_SEND_OPTION + } + + # PIETY + modifier = { + add = 60 + scope:piety_send_option = yes + desc = PIETY_INTERACTION_ACCEPTANCE_SEND_OPTION + } + + # Are you using a hook? + modifier = { + trigger = { + scope:hook ?= yes + } + add = 1000 + desc = LEGEND_HOOK_USED + } + + modifier = { # Herder + add = 100 + desc = CONFEDERATION_HERDER_REASON + trigger = { + scope:recipient = { + government_has_flag = government_is_herder + } + } + } + } + + send_option = { + flag = hook + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + localization = GENERIC_SPEND_A_HOOK + } + + send_option = { # Herd + is_shown = { + scope:actor = { + government_has_flag = government_is_nomadic + exists = domicile + } + } + is_valid = { + scope:recipient = { + government_has_flag = government_is_nomadic + exists = domicile + } + scope:actor.domicile = { herd >= minor_herd_value } + } + flag = herd_send_option + localization = TRADE_HERD_FOR_BETTER_AI_ACCEPTANCE_CONFEDERATION + } + + send_option = { # Piety + is_shown = { + always = yes + } + is_valid = { + scope:actor = { piety >= medium_piety_value } + } + flag = piety_send_option + localization = TRADE_PRESTIGE_FOR_BETTER_AI_ACCEPTANCE_ICON + } + + send_options_exclusive = no + + on_accept = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_good + title = inspire_conversion_accepted_tt + left_icon = scope:recipient + scope:recipient = { + if = { + limit = { + domicile ?= { domicile_uses_culture_and_faith = yes } + } + custom_tooltip = { + text = family_and_lands_inspire_domicile_tt + every_held_title = { + limit = { + tier = tier_county + is_landless_type_title = no + culture = scope:recipient.domicile.domicile_culture + faith != scope:actor.domicile.domicile_faith + } + add_to_list = counties_to_convert + } + # Family at court also convert + every_close_or_extended_family_member = { + limit = { + is_courtier_of = scope:recipient + faith != scope:actor.domicile.domicile_faith + } + add_to_list = spouses_and_family_to_convert + } + domicile = { + if = { + limit = { + domicile_faith != scope:actor.domicile.domicile_faith + } + set_domicile_faith = scope:actor.domicile.domicile_faith + } + } + } + } + else = { + custom_tooltip = { + text = family_and_lands_inspire_tt + every_held_title = { + limit = { + tier = tier_county + is_landless_type_title = no + culture = scope:recipient.culture + faith != scope:actor.domicile.domicile_faith + } + add_to_list = counties_to_convert + } + # Family at court also convert + every_close_or_extended_family_member = { + limit = { + is_courtier_of = scope:recipient + faith != scope:actor.domicile.domicile_faith + } + add_to_list = spouses_and_family_to_convert + } + } + } + if = { + limit = { + faith != scope:actor.domicile.domicile_faith + } + set_character_faith = scope:actor.domicile.domicile_faith + } + hidden_effect = { + every_in_list = { + list = counties_to_convert + set_county_faith = scope:actor.domicile.domicile_faith + } + every_in_list = { + list = spouses_and_family_to_convert + set_character_faith = scope:actor.domicile.domicile_faith + } + } + if = { # If you have the Religious Icon perk they become obedient + limit = { + scope:actor = { + government_has_flag = government_is_nomadic + has_perk = religious_icon_perk + } + scope:recipient = { + obedience_target = scope:actor + is_obedient = no + } + } + scope:recipient = { + add_opinion = { + modifier = obedience_opinion + target = scope:actor + } + } + } + else = { + add_opinion = { + modifier = respect_opinion + opinion = 10 + target = scope:actor + } + } + } + } + if = { + limit = { + scope:piety_send_option = yes + } + scope:actor = { + add_piety = scope:actor.medium_piety_loss + } + scope:recipient = { + add_piety = scope:actor.medium_piety_value + } + } + if = { + limit = { + scope:herd_send_option = yes + } + scope:actor = { + pay_herd = { + target = scope:recipient + value = domicile.minor_herd_value + } + } + } + } + } + + on_decline = { + scope:actor = { + } + } + + ai_potential = { + government_has_flag = government_is_nomadic + highest_held_title_tier >= tier_duchy + NOR = { + any_owned_story = { + OR = { + story_type = story_mongol_invasion + story_type = story_greatest_of_khans + + } + } + mpo_has_gok_mongol_empire_trigger = yes + } + } + + ai_will_do = { + base = 100 + + modifier = { + add = -1 + scope:hook ?= yes + } + + modifier = { + add = -1 + scope:piety_send_option ?= yes + } + + modifier = { + factor = 0 + scope:herd_send_option ?= yes + } + } +} + +# Used by AI code +migration_interaction = { + interface_priority = 120 + common_interaction = yes + use_diplomatic_range = no + category = interaction_debug_main + icon = herd_interaction + hidden = yes + + # Keep AI reply at minimum - don't change default values + # ai_min_reply_days = 0 + # ai_max_reply_days = 0 + + can_send_despite_rejection = yes + + interface = migration + special_interaction = migration + + cost = { + # Free + } + + desc = migration_interaction_desc + + is_shown = { + scope:actor = { + government_has_flag = government_is_nomadic + trigger_if = { + limit = { + is_ai = yes + } + is_at_war = no + } + highest_held_title_tier >= tier_county + } + } + + is_valid_showing_failures_only = { + scope:actor = { + is_imprisoned = no + is_independent_ruler = yes + is_travelling = no + custom_tooltip = { + text = no_primary_wars_tt + NOT = { + any_character_war = { + OR = { + primary_attacker = { this = scope:actor } + primary_defender = { this = scope:actor } + } + } + } + } + custom_tooltip = { + text = must_have_migration_situation_tt + any_character_situation = { + any_participant_group = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = scope:actor + } + } + } + NOR = { + exists = involved_activity + has_truce = scope:recipient + } + } + scope:recipient = { + is_ruler = yes + NOT = { is_allied_to = scope:actor } + } + } + + # can_be_picked_title is unused for migration_interaction and controlled by code + # can_be_picked_title = {} + + on_accept = { + scope:actor = { + if = { + limit = { + is_ai = yes + } + set_variable = { + name = migration_cooldown + years = migration_cooldown_value + } + } + # We add a variable in case you're migrating into a Tributary, for special event Options + if = { + limit = { + scope:recipient = { + is_tributary = yes + NOT = { is_tributary_of_suzerain_or_above = scope:actor } # They're not your Tributary + } + trigger_if = { + limit = { exists = scope:actor.overlord } + scope:recipient.overlord != scope:actor.overlord # You're not subjects of the same ruler already + } + } + set_variable = { + name = migrating_into_tributary_var + value = scope:recipient.overlord + } + } + if = { + limit = { + is_confederation_member = yes + } + confederation = { + save_scope_as = confederation_left + } + confederation_migration_notification_effect = yes + confederation = { + remove_confederation_member = scope:actor + } + } + # Pay what you need to pay first + if = { + limit = { scope:hook = yes } + use_hook = scope:recipient + } + if = { + limit = { scope:gold_cost = yes } + pay_short_term_gold = { + target = scope:recipient + gold = medium_gold_value + } + } + if = { + limit = { scope:herd_cost = yes } + pay_herd = { + target = scope:recipient + value = domicile.medium_herd_value + } + } + if = { + limit = { + exists = scope:target_title + } + set_variable = { + name = migration_title + value = scope:target_title + } + } + + # Save your old lands + save_scope_as = old_holder + capital_county = { save_scope_as = old_capital_county } + every_held_title = { + limit = { + tier = tier_county + exists = duchy + culture = scope:actor.domicile.domicile_culture + } + add_to_list = old_held_titles + } + + # Make a new culture appear in the lands you left behind, as you're bringing _your_ people with you + # Delay the creation so that Herders have spawned + trigger_event = { + id = mpo_misc.0001 + delayed = yes + } + + # Let's migrate! + # If there's a Drought, your people get a morale boost + if = { + limit = { + any_character_situation = { + any_situation_sub_region = { + has_sub_region_phase_parameter = the_great_steppe_migration_morale_boost + any_situation_sub_region_participant_group = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = scope:actor + } + } + } + } + custom_tooltip = { + text = mpo_the_great_steppe_migration_morale_boost_effect_tt + every_courtier_or_guest = { + add_opinion = { + target = prev + modifier = drought_migration_opinion + } + } + } + } + + if = { + limit = { + exists = scope:target_title + } + custom_tooltip = mpo_steppe_migration_migrate_to_tt + custom_tooltip = mpo_steppe_migration_lose_land_tt + every_vassal = { + limit = { + OR = { + is_ai = no + NOT = { is_obedient_to = scope:actor } + } + } + hidden_effect = { + break_subject_contract_and_establish_tributary_effect = { + SUZERAIN = scope:actor + TRIBUTARY = this + } + } + custom_tooltip = mpo_steppe_migration_lose_vassal_tt + } + } + # Obedient vassals follow their liege + every_vassal = { + limit = { + exists = scope:target_title + is_obedient_to = scope:actor + is_ai = yes + } + save_scope_as = current_vassal + custom_tooltip = mpo_steppe_migration_keep_vassal_tt + hidden_effect = { + start_travel_plan = { + destination = scope:target_title.title_capital_county.title_province + return_trip = no + travel_with_domicile = yes + } + migration_set_obedient_vassal_effect = yes + } + } + # Player and non obedient vassals get turned into Tributaries instead + every_vassal = { + limit = { + exists = scope:target_title + OR = { + NOT = { is_obedient_to = scope:actor } + is_ai = no + } + } + break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:actor TRIBUTARY = prev } + } + # Migration travel is handled by code + } + } + + on_decline = { + # We add a variable in case you're migrating into a Tributary, for special event Options + if = { + limit = { + scope:recipient = { + is_tributary = yes + suzerain != scope:actor # They're not your tributary + } + trigger_if = { + limit = { exists = scope:actor.overlord } + scope:recipient.overlord != scope:actor.overlord # You're not subjects of the same ruler already + } + } + scope:actor = { + set_variable = { + name = migrating_into_tributary_war_var + value = scope:recipient.overlord + } + } + } + # Migration wars are handled by code + scope:actor = { + if = { + limit = { + is_confederation_member = yes + } + confederation_migration_notification_effect = yes + confederation = { + remove_confederation_member = scope:actor + } + } + every_vassal = { + limit = { + exists = scope:target_title + is_obedient_to = scope:actor + is_ai = yes + } + save_scope_as = current_vassal + hidden_effect = { + migration_set_obedient_vassal_effect = yes + } + } + } + } + + # Use gold + send_option = { + flag = gold_cost + is_valid = { + scope:actor.gold >= scope:actor.medium_gold_value + } + localization = TRADE_GOLD_FOR_BETTER_MIGRATION_AI_ACCEPTANCE + } + + # Use Herd + send_option = { + is_shown = { + scope:recipient = { + government_has_flag = government_is_nomadic + } + } + is_valid = { + scope:actor = { + domicile ?= { herd >= medium_herd_value } + } + } + flag = herd_cost + localization = TRADE_HERD_FOR_BETTER_AI_ACCEPTANCE + } + + # Use hook + send_option = { + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + flag = hook + localization = GENERIC_SPEND_A_HOOK + } + should_use_extra_icon = { + scope:actor = { has_usable_hook = scope:recipient } + } + extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" + + send_options_exclusive = no + + ai_accept = { + base = 0 + modifier = { + add = { + value = -95 + if = { #Non-Nomads should try to keep their lands + limit = { + scope:recipient = { + NOR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + } + add = -405 + } + } + desc = MIGRATION_INTERACTION_BASE_ACCEPTANCE + } + modifier = { # Easier for AI to migrate peacefully since they can't send Herd/Gold + add = 50 + trigger = { + scope:recipient = { is_ai = yes } + scope:actor = { is_ai = yes } + } + desc = MIGRATION_INTERACTION_ACCEPTANCE_AI + } + modifier = { # Herders move away immediately + trigger = { + scope:recipient = { government_has_flag = government_is_herder } + } + add = 150 + desc = MIGRATION_INTERACTION_HERDER + } + modifier = { # Dukes don't really want to move + trigger = { + scope:recipient = { + has_realm_law = nomadic_authority_3 + } + } + add = -20 + desc = MIGRATION_INTERACTION_HIGH_DOMINANCE + } + modifier = { # Kingdoms/Empires don't want to move + trigger = { + scope:recipient = { + OR = { + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + } + add = -100 + desc = MIGRATION_INTERACTION_HIGH_DOMINANCE + } + # Are you using a hook? + modifier = { + trigger = { + scope:hook ?= yes + } + add = 100 + desc = MIGRATION_HOOK_USED + } + # Are you using Gold? + modifier = { + trigger = { + scope:gold_cost ?= yes + } + add = 25 + desc = TRADE_GOLD_FOR_BETTER_AI_ACCEPTANCE_TT + } + # Are you using Herd? + modifier = { + trigger = { + scope:herd_cost ?= yes + } + add = 25 + desc = TRADE_HERD_FOR_BETTER_AI_ACCEPTANCE_TT + } + # Is there a Drought? + modifier = { + add = 15 + any_character_situation = { + any_situation_sub_region = { + has_sub_region_phase_parameter = the_great_steppe_migration_acceptance_boost + any_situation_sub_region_participant_group = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = scope:actor + } + } + } + desc = MIGRATION_INTERACTION_DROUGHT_ACCEPTANCE + } + # Recipient traits + modifier = { + add = 15 + scope:recipient = { + has_trait = craven + } + desc = MIGRATION_INTERACTION_CRAVEN_ACCEPTANCE + } + modifier = { + add = 15 + scope:recipient = { + has_trait = content + } + desc = MIGRATION_INTERACTION_CONTENT_ACCEPTANCE + } + # Recipient's opinion + opinion_modifier = { + trigger = { + scope:actor = { + OR = { + has_realm_law = nomadic_authority_1 + has_realm_law = nomadic_authority_2 + } + } + } + opinion_target = scope:actor + who = scope:recipient + multiplier = 1 + desc = MIGRATION_INTERACTION_OPINION_ACCEPTANCE + } + opinion_modifier = { + trigger = { + scope:actor = { + OR = { + has_realm_law = nomadic_authority_3 + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + } + opinion_target = scope:actor + who = scope:recipient + multiplier = 0.5 + desc = MIGRATION_INTERACTION_OPINION_ACCEPTANCE + } + # Recipient's relation to you + modifier = { + scope:recipient = { + has_relation_friend = scope:actor + } + add = { + value = 25 + if = { + limit = { + scope:actor = { + OR = { + has_realm_law = nomadic_authority_1 + has_realm_law = nomadic_authority_2 + } + } + } + add = 50 + } + } + desc = MIGRATION_INTERACTION_FRIEND_ACCEPTANCE + } + modifier = { + scope:recipient = { + has_relation_blood_brother = scope:actor + } + add = { + value = 50 + if = { + limit = { + scope:actor = { + OR = { + has_realm_law = nomadic_authority_1 + has_realm_law = nomadic_authority_2 + } + } + } + add = 50 + } + } + desc = MIGRATION_INTERACTION_BLOOD_BROTHERS_ACCEPTANCE + } + # Obedience + modifier = { + scope:recipient = { + is_obedient_to = scope:actor + } + add = { + value = 50 + if = { + limit = { + scope:actor = { + OR = { + has_realm_law = nomadic_authority_1 + has_realm_law = nomadic_authority_2 + } + } + } + add = 50 + } + } + desc = MIGRATION_INTERACTION_OBEDIENT_ACCEPTANCE + } + # Relative Prestige + modifier = { + add = 10 + prestige_level >= scope:recipient.prestige_level + desc = MIGRATION_INTERACTION_PRESTIGE_ACCEPTANCE + } + # Relative Prowess + modifier = { + add = 10 + prowess >= scope:recipient.prowess + desc = MIGRATION_INTERACTION_PROWESS_ACCEPTANCE + } + # Relative Herd + modifier = { + trigger_if = { + exists = scope:recipient.domicile # Herders won't have a domicile + } + add = 25 + domicile.herd >= scope:recipient.domicile.herd + desc = MIGRATION_INTERACTION_HERD_ACCEPTANCE + } + # Gurkhan + modifier = { + add = -1000 + exists = situation:the_great_steppe + scope:recipient = { + this = situation:the_great_steppe.situation_top_herd + } + desc = MIGRATION_INTERACTION_GURKHAN_ACCEPTANCE + } + modifier = { + add = 50 + trigger_if = { + exists = situation:the_great_steppe + } + scope:actor = { + this = situation:the_great_steppe.situation_top_herd + } + desc = MIGRATION_INTERACTION_GURKHAN_ACTOR_ACCEPTANCE + } + # Dread + modifier = { + add = intimidated_reason_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 1 + } + } + desc = INTIMIDATED_REASON + } + modifier = { + add = cowed_reason_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 2 + } + } + desc = COWED_REASON + } + + # Events + modifier = { + add = 5 + scope:actor = { has_character_modifier = mpo_elder_flock_migrate_modifier } + desc = MIGRATION_INTERACTION_ELDER_FLOCK_ACCEPTANCE + } + + #Confederations refuse to be intimidated and don't want to leave + modifier = { + add = -300 + desc = CONFEDERATION_MEMBER_REASON + scope:recipient = { + is_confederation_member = yes + } + } + # High-tier Ruler + modifier = { + add = -500 + exists = scope:recipient.primary_title + scope:recipient.primary_title.tier >= tier_kingdom + desc = MIGRATION_INTERACTION_KING_ACCEPTANCE + } + + # Recently settled nomads don't want to accept + modifier = { + add = -1000 + desc = JUST_SETTLED_REASON + scope:recipient = { + is_tributary = yes + NOT = { government_has_flag = government_is_herder } + capital_county = { + title_held_years < 3 + } + } + } + } + + ai_instant_response = yes + + # Available scopes and values + # + # scope:actor - migrating ruler + # scope:recipient - ruler who decides if migration is peaceful or hostile + # scope:target - main migration target - can be of any tier + # + # Additional scopes provided from code + # + # scope:domain - County or duchy that migrating ruler aims to get as their new domain. + # Can be the same as scope:target, if county of duchy-level migration + # + # scope:domain_fertility - Total current fertility of scope:domain - what actor is going to receive + # scope:target_fertility - Total current fertility of main migration target + # + # scope:defenders - Script list of all rulers who will be part of migration war if declined. + # It includes all rulers who are going to lose land - holder of main migration target and all rulers + # who has land in scope:domain + # + # scope:defender_power - combined max military power of all members in scope:defenders. + # It's power - i.e. scaled by regiments attack and toughness + # + ai_will_do = { + base = 0 + + # More likely to migrate to people you don't like + opinion_modifier = { + opinion_target = scope:recipient + multiplier = -0.25 + } + + # Bold, energetic characters are more likely to migrate + ai_value_modifier = { + ai_boldness = 0.25 + ai_energy = 0.25 + } + + # We substract your Fertility + modifier = { + add = { + value = scope:actor.current_domain_fertility + multiply = -1 + } + } + + # And we add the target realm's Fertility + modifier = { + add = scope:domain_fertility + } + + # Less likely to migrate into players + modifier = { + add = -25 + scope:recipient = { is_ai = no } + } + + # Can you win this war? + modifier = { + scope:actor.current_military_strength >= scope:defender_power + add = 25 + } + modifier = { + scope:actor.current_military_strength <= scope:defender_power + add = -75 + } + + # You're moving from a bad season to a good one + modifier = { + has_bad_season_nomadic_capital_character_trigger = { CHARACTER = scope:actor } + has_good_season_nomadic_capital_character_trigger = { CHARACTER = scope:recipient } + add = 10 + } + + # There's a very bad season in your area + modifier = { + scope:actor = { + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_havsarsan_zud_season + situation_sub_region_has_county = scope:actor.capital_county + } + } + } + add = 100 + } + + # You are landless and your herd is starving + modifier = { + scope:actor = { + is_landed = no + } + add = 50 + } + + # The recipient is a Herder + modifier = { + scope:recipient = { government_has_flag = government_is_herder } + add = 10 + } + + # The recipient is a Steppe Admin + modifier = { + scope:recipient = { government_has_flag = government_is_steppe_admin } + add = -25 + } + + # You have a hook on the recipient + modifier = { + scope:actor = { + has_usable_hook = scope:recipient + } + add = 25 + } + + # More likely to migrate with Low Dominance + modifier = { + scope:actor = { + OR = { + has_realm_law = nomadic_authority_1 + has_realm_law = nomadic_authority_2 + } + } + add = 10 + } + modifier = { + exists = scope:target + scope:actor = { + scope:target.tier >= tier_kingdom + primary_title.tier < tier_kingdom + OR = { + has_realm_law = nomadic_authority_3 + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + add = 100 + } + modifier = { + exists = scope:target + scope:actor = { + scope:target.tier >= tier_empire + primary_title.tier < tier_empire + OR = { + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + add = 100 + } + modifier = { + scope:actor = { + primary_title.tier >= tier_kingdom + has_realm_law = nomadic_authority_3 + } + add = -90 + } + modifier = { + scope:actor = { + primary_title.tier >= tier_empire + OR = { + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + add = -90 + } + + #You're in a confederation... you don't want to go anywhere + modifier = { + scope:actor = { + is_confederation_member = yes + has_character_flag = new_confederate + } + add = -100 + } + modifier = { + scope:actor = { + is_confederation_member = yes + NOT = { has_character_flag = new_confederate } + } + add = -30 + } + #The recipient is bordering your confederation (so you can rejoin) + modifier = { + scope:actor = { + is_confederation_member = yes + } + scope:recipient = { + highest_held_title_tier <= tier_duchy + any_land_neighboring_realm_with_tributaries_owner = { + OR = { + is_member_of_confederation = scope:actor.confederation + suzerain ?= { + is_member_of_confederation = scope:actor.confederation + } + } + } + } + add = 30 + } + + # Don't migrate somewhere where there's a disease or Havsaran Zud + modifier = { + factor = 0 + scope:domain = { + OR = { + AND = { + tier = tier_county + any_county_situation_sub_region = { + sub_region_current_phase = situation_steppe_havsarsan_zud_season + } + } + AND = { + tier = tier_county + any_county_province = { + any_province_epidemic = { + } + } + } + } + } + } + # Don't migrate into a domain that contains a vassal player + modifier = { + scope:domain = { + any_in_de_facto_hierarchy = { + holder ?= { + is_ai = no + is_independent_ruler = no + } + } + } + factor = 0 + } + # Avoid bad wars + modifier = { + factor = 0.01 + scope:defender_power >= scope:actor.current_military_strength + } + # Don't be suicidal + modifier = { + factor = 0 + scope:defender_power >= scope:actor.twice_current_military_strength + } + modifier = { + factor = 0 + scope:recipient.current_military_strength > scope:actor.current_military_strength + } + modifier = { + factor = 0 + scope:defender_power >= 10 + scope:actor.current_military_strength <= 500 + } + # Do not downgrade your title + modifier = { + factor = 0 + exists = scope:target + scope:target.tier < scope:actor.primary_title.tier + } + # Tributaries want to stick close to their suzerain + modifier = { + factor = 0 + scope:actor = { + is_tributary = yes + } + scope:domain = { + NOR = { + holder ?= { + is_tributary_of_suzerain_or_above = scope:actor.suzerain + } + AND = { + tier = tier_county + any_neighboring_county = { + holder ?= { + is_tributary_of_suzerain_or_above = scope:actor.suzerain + } + } + } + any_in_de_jure_hierarchy = { + tier = tier_county + OR = { + holder ?= { + is_tributary_of_suzerain_or_above = scope:actor.suzerain + } + any_neighboring_county = { + holder ?= { + is_tributary_of_suzerain_or_above = scope:actor.suzerain + } + } + } + } + } + } + } + # Small AI nomads should only migrate to same-culture areas or right next to them, as everything else looks really bad. + modifier = { + factor = 0 + scope:actor = { + any_character_situation = { + this = situation:the_great_steppe + } + has_realm_law = nomadic_authority_1 + # If the character's culture does not exist outside of their realm, allow lenient migrations (otherwise small cultures get stuck) + culture = { + any_culture_county = { + holder.top_liege != scope:actor + } + } + } + scope:domain = { + NOR = { + AND = { + tier = tier_county + save_temporary_scope_as = county_culture_check + OR = { + culture = scope:actor.culture + culture = { + any_parent_culture_or_above = { + this = scope:actor.culture + } + } + scope:actor.culture = { + any_parent_culture_or_above = { + this = scope:county_culture_check.culture + } + } + any_neighboring_county = { + OR = { + culture = scope:actor.culture + culture = { + any_parent_culture_or_above = { + this = scope:actor.culture + } + } + scope:actor.culture = { + any_parent_culture_or_above = { + this = scope:county_culture_check.culture + } + } + } + } + } + } + any_in_de_jure_hierarchy = { + tier = tier_county + save_temporary_scope_as = county_culture_check + OR = { + culture = scope:actor.culture + culture = { + any_parent_culture_or_above = { + this = scope:actor.culture + } + } + scope:actor.culture = { + any_parent_culture_or_above = { + this = scope:county_culture_check.culture + } + } + any_neighboring_county = { + OR = { + culture = scope:actor.culture + culture = { + any_parent_culture_or_above = { + this = scope:actor.culture + } + } + scope:actor.culture = { + any_parent_culture_or_above = { + this = scope:county_culture_check.culture + } + } + } + } + } + } + } + } + } + # Slightly bigger nomads are also allowed to migrate into non-nomadic lands + modifier = { + factor = 0 + scope:actor = { + any_character_situation = { + this = situation:the_great_steppe + } + has_realm_law = nomadic_authority_2 + # If the character's culture does not exist outside of their realm, allow lenient migrations (otherwise small cultures get stuck) + culture = { + any_culture_county = { + holder.top_liege != scope:actor + } + } + } + scope:domain = { + NOR = { + AND = { + tier = tier_county + save_temporary_scope_as = county_culture_check + OR = { + culture = scope:actor.culture + culture = { + any_parent_culture_or_above = { + this = scope:actor.culture + } + } + scope:actor.culture = { + any_parent_culture_or_above = { + this = scope:county_culture_check.culture + } + } + any_neighboring_county = { + OR = { + culture = scope:actor.culture + culture = { + any_parent_culture_or_above = { + this = scope:actor.culture + } + } + scope:actor.culture = { + any_parent_culture_or_above = { + this = scope:county_culture_check.culture + } + } + } + } + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + any_in_de_jure_hierarchy = { + tier = tier_county + save_temporary_scope_as = county_culture_check + OR = { + culture = scope:actor.culture + culture = { + any_parent_culture_or_above = { + this = scope:actor.culture + } + } + scope:actor.culture = { + any_parent_culture_or_above = { + this = scope:county_culture_check.culture + } + } + any_neighboring_county = { + OR = { + culture = scope:actor.culture + culture = { + any_parent_culture_or_above = { + this = scope:actor.culture + } + } + scope:actor.culture = { + any_parent_culture_or_above = { + this = scope:county_culture_check.culture + } + } + } + } + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + } + } + # Big nomads move more freely, and the small ones will follow because they'll spread their culture there! + modifier = { + factor = 0 + scope:actor = { + any_character_situation = { + this = situation:the_great_steppe + } + NOR = { + has_realm_law = nomadic_authority_1 + has_realm_law = nomadic_authority_2 + } + # If the character's culture does not exist outside of their realm, allow lenient migrations (otherwise small cultures get stuck) + culture = { + any_culture_county = { + holder.top_liege != scope:actor + } + } + capital_county = { + any_county_situation_sub_region = { + NOR = { + sub_region_current_phase = situation_steppe_havsarsan_zud_season + sub_region_current_phase = situation_steppe_severe_drought_season + sub_region_current_phase = situation_steppe_cold_zud_season + sub_region_current_phase = situation_steppe_white_zud_season + } + } + } + } + scope:domain = { + NOR = { + AND = { + tier = tier_county + save_temporary_scope_as = county_culture_check + OR = { + culture = scope:actor.culture + culture = { + any_parent_culture_or_above = { + this = scope:actor.culture + } + } + culture = { + has_same_culture_heritage = scope:actor.culture + } + culture = { + any_parent_culture_or_above = { + has_same_culture_heritage = scope:actor.culture + } + } + scope:actor.culture = { + any_parent_culture_or_above = { + this = scope:county_culture_check.culture + } + } + scope:actor.culture = { + any_parent_culture_or_above = { + has_same_culture_heritage = scope:county_culture_check.culture + } + } + any_neighboring_county = { + OR = { + culture = scope:actor.culture + culture = { + any_parent_culture_or_above = { + this = scope:actor.culture + } + } + culture = { + has_same_culture_heritage = scope:actor.culture + } + culture = { + any_parent_culture_or_above = { + has_same_culture_heritage = scope:actor.culture + } + } + scope:actor.culture = { + any_parent_culture_or_above = { + this = scope:county_culture_check.culture + } + } + scope:actor.culture = { + any_parent_culture_or_above = { + has_same_culture_heritage = scope:county_culture_check.culture + } + } + } + } + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + any_in_de_jure_hierarchy = { + tier = tier_county + save_temporary_scope_as = county_culture_check + OR = { + culture = scope:actor.culture + culture = { + any_parent_culture_or_above = { + this = scope:actor.culture + } + } + culture = { + has_same_culture_heritage = scope:actor.culture + } + culture = { + any_parent_culture_or_above = { + has_same_culture_heritage = scope:actor.culture + } + } + scope:actor.culture = { + any_parent_culture_or_above = { + this = scope:county_culture_check.culture + } + } + scope:actor.culture = { + any_parent_culture_or_above = { + has_same_culture_heritage = scope:county_culture_check.culture + } + } + any_neighboring_county = { + OR = { + culture = scope:actor.culture + culture = { + any_parent_culture_or_above = { + this = scope:actor.culture + } + } + culture = { + has_same_culture_heritage = scope:actor.culture + } + culture = { + any_parent_culture_or_above = { + has_same_culture_heritage = scope:actor.culture + } + } + scope:actor.culture = { + any_parent_culture_or_above = { + this = scope:county_culture_check.culture + } + } + scope:actor.culture = { + any_parent_culture_or_above = { + has_same_culture_heritage = scope:county_culture_check.culture + } + } + } + } + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + } + } + } +} + +# PAIZA +mpo_interaction_grant_paiza = { + category = interaction_category_diplomacy + icon = paiza_interaction + common_interaction = no + + desc = mpo_interaction_grant_paiza_desc + + ai_frequency_by_tier = { + barony = 0 + county = 24 + duchy = 24 + kingdom = 8 + empire = 8 + hegemony = 8 + } + popup_on_receive = yes + pause_on_receive = yes + + is_shown = { + scope:actor = { + has_character_flag = established_paiza_system + exists = situation:the_great_steppe + any_character_situation = { + this = situation:the_great_steppe + } + government_has_flag = government_is_nomadic + } + scope:recipient = { + government_has_flag = government_is_nomadic + OR = { + is_vassal_of = scope:actor + is_tributary_of = scope:actor + is_courtier_of = scope:actor + } + } + } + + cooldown_against_recipient = { years = 10 } + + is_valid_showing_failures_only = { + scope:actor = { + NOT = { + is_at_war_with = scope:recipient + } + is_independent_ruler = yes + custom_tooltip = { + text = mpo_character_interaction_gurkhan + is_gurkhan = yes + } + custom_tooltip = { + text = mpo_character_interaction_established_paiza_system + has_character_flag = established_paiza_system + } + } + scope:recipient = { + custom_tooltip = { + text = mpo_character_interaction_obedient + NOT = { is_obedient_to = scope:actor } + } + NOT = { + any_character_artifact = { + scope:recipient = { can_benefit_from_artifact = prev } + scope:artifact.var:paiza_patron ?= { is_gurkhan = yes } + scope:artifact.var:paiza_patron ?= scope:actor + } + } + } + } + + cost = { + prestige = major_prestige_value + gold = 25 + } + + on_accept = { + make_obedient_recipient_to_actor_effect = yes + scope:recipient = { + mpo_create_paiza_artifact_effect = { + PATRON = scope:actor + GRANTEE = scope:recipient + } + custom_tooltip = mpo_establish_paiza_system_decision.paiza_abuse_authority_unlocked + custom_tooltip = mpo_establish_paiza_system_decision.leverage_khan_authority_unlocked + } + scope:actor = { + switch = { + trigger = scope:recipient.primary_title.tier + tier_empire = { + add_legitimacy_effect = { LEGITIMACY = massive_legitimacy_gain } + } + tier_kingdom = { + add_legitimacy_effect = { LEGITIMACY = major_legitimacy_gain } + } + tier_duchy = { + add_legitimacy_effect = { LEGITIMACY = medium_legitimacy_gain } + } + tier_county = { + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_gain } + } + } + } + } + + ai_targets = { + ai_recipients = vassals + ai_recipients = tributaries + } + + + ai_accept = { + base = -20 + opinion_modifier = { + opinion_target = scope:actor + who = scope:recipient + multiplier = 1 + } + modifier = { + add = intimidated_external_reason_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 1 + } + } + desc = INTIMIDATED_REASON + } + modifier = { + add = cowed_external_reason_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 2 + } + } + desc = COWED_REASON + } + modifier = { + add = 40 + scope:recipient = { + ai_honor < 0 + ai_greed > 0 + } + desc = will_abuse_paiza_reason + } + } + + ai_will_do = { + base = 10 + + modifier = { + factor = 10 + scope:recipient = { + is_ai = no + OR = { + is_vassal_of = scope:actor + is_tributary_of = scope:actor + } + } + } + + modifier = { + factor = 10 + scope:recipient = { + NOT = { + is_obedient_to = root + } + OR = { + is_powerful_vassal = yes + is_kurultai_trigger = yes + } + } + } + } +} + +mpo_interaction_ask_for_paiza = { + category = interaction_category_diplomacy + icon = paiza_interaction + common_interaction = no + + desc = mpo_interaction_ask_for_paiza_desc + + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 12 + kingdom = 12 + empire = 0 + hegemony = 0 + } + popup_on_receive = yes + pause_on_receive = yes + + is_shown = { + scope:recipient = { + government_has_flag = government_is_nomadic + has_character_flag = established_paiza_system + } + scope:actor = { + OR = { + government_has_flag = government_is_nomadic + top_liege = scope:recipient + } + NOT = { + is_at_war_with = scope:recipient + } + } + } + + cooldown_against_recipient = { years = 10 } + + is_valid_showing_failures_only = { + scope:recipient = { + is_independent_ruler = yes + is_gurkhan = yes + } + scope:actor = { + custom_tooltip = { + text = already_received_a_paiza + NOT = { + any_character_artifact = { + scope:actor = { can_benefit_from_artifact = prev } + var:paiza_patron ?= scope:recipient + } + } + } + } + } + + send_options_exclusive = no + send_option = { + flag = hook + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + localization = GENERIC_SPEND_A_HOOK + } + + send_option = { # Herd + is_shown = { + scope:actor = { + government_has_flag = government_is_nomadic + exists = domicile + } + } + is_valid = { + scope:actor = { + government_has_flag = government_is_nomadic + exists = domicile + } + scope:actor.domicile = { herd >= scope:recipient.domicile.massive_herd_value } + } + flag = herd_send_option + localization = TRADE_HERD_FOR_BETTER_AI_ACCEPTANCE_CONFEDERATION + } + + on_accept = { + scope:actor = { + make_obedient_recipient_to_actor_effect = yes + send_interface_toast = { + type = event_toast_effect_good + title = mpo_decisions_events.paiza_granted + mpo_create_paiza_artifact_effect = { + PATRON = scope:recipient + GRANTEE = scope:actor + } + left_icon = scope:recipient + right_icon = scope:created_paiza + } + custom_tooltip = mpo_establish_paiza_system_decision.paiza_abuse_authority_unlocked + custom_tooltip = mpo_establish_paiza_system_decision.leverage_khan_authority_unlocked + if = { + limit = { + scope:herd_send_option = yes + } + pay_herd = { + target = scope:recipient + value = scope:recipient.domicile.massive_herd_value + } + } + if = { + limit = { + scope:hook = yes + } + use_hook = scope:recipient + } + } + scope:recipient = { + switch = { + trigger = scope:actor.primary_title.tier + tier_empire = { + add_legitimacy_effect = { LEGITIMACY = massive_legitimacy_gain } + } + tier_kingdom = { + add_legitimacy_effect = { LEGITIMACY = major_legitimacy_gain } + } + tier_duchy = { + add_legitimacy_effect = { LEGITIMACY = medium_legitimacy_gain } + } + tier_county = { + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_gain } + } + } + add_character_flag = { + flag = paiza_recently_granted + years = 2 + } + } + } + + on_decline = { + scope:recipient = { + add_character_flag = { + flag = paiza_recently_granted + years = 4 + } + } + } + + ai_accept = { + base = -60 + modifier = { + add = intimidated_external_reason_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 1 + } + } + desc = INTIMIDATED_REASON + } + modifier = { + add = cowed_external_reason_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 2 + } + } + desc = COWED_REASON + } + modifier = { + add = 40 + scope:actor = { + NOT = { + is_obedient_to = root + } + OR = { + is_powerful_vassal = yes + is_kurultai_trigger = yes + } + } + desc = AI_NOT_OBEDIENT_REVERSE_REASON + } + modifier = { + add = -20 + scope:actor = { + is_obedient_to = scope:recipient + } + desc = AI_OBEDIENT_REVERSE_REASON + } + modifier = { + scope:recipient = { + has_relation_blood_brother = scope:actor + } + add = 100 + desc = MIGRATION_INTERACTION_BLOOD_BROTHERS_ACCEPTANCE + } + + modifier = { + trigger = { + scope:hook ?= yes + } + add = 60 + desc = LEGEND_HOOK_USED + } + + modifier = { + add = 20 + trigger = { + scope:herd_send_option ?= yes + } + desc = HERD_INTERACTION_ACCEPTANCE_SEND_OPTION + } + + opinion_modifier = { + opinion_target = scope:actor + who = scope:recipient + multiplier = 0.4 + } + } + + ai_potential = { + is_adult = yes + } + + ai_will_do = { + base = 0 + + modifier = { + add = 100 + scope:recipient = { + has_relation_blood_brother = scope:actor + } + } + + modifier = { + add = { + value = scope:actor.ai_greed + multiply = 0.1 + } + scope:actor = { + ai_greed > 0 + } + } + + modifier = { + add = { + value = scope:actor.primary_title.tier + subtract = scope:recipient.primary_title.tier + multiply = 10 + max = 0 + } + } + + modifier = { + add = { + value = scope:actor.ai_honor + multiply = 0.1 + } + scope:actor = { + ai_honor > 0 + } + } + + ai_value_modifier = { + ai_boldness = -0.4 + ai_honor = 0.1 + ai_greed = 0.1 + ai_energy = -0.2 + } + + modifier = { + factor = 0 + scope:recipient = { + has_character_flag = paiza_recently_granted + } + } + } + + ai_targets = { + ai_recipients = liege + ai_recipients = suzerain + } +} + +mpo_interaction_leverage_khan_authority = { + category = interaction_category_hostile + icon = paiza_interaction + common_interaction = no + + desc = mpo_interaction_leverage_khan_authority_desc + + ai_frequency_by_tier = { + barony = 0 + county = 24 + duchy = 8 + kingdom = 8 + empire = 8 + hegemony = 8 + } + popup_on_receive = yes + pause_on_receive = yes + + cooldown = { months = 6 } + + cooldown_against_recipient = { years = 10 } + + is_shown = { + scope:actor = { + any_character_artifact = { + scope:actor = { can_benefit_from_artifact = prev } + has_variable = paiza_patron + OR = { + scope:recipient.top_liege = var:paiza_patron + scope:recipient = { + is_independent_ruler = yes + primary_title.tier < scope:actor.primary_title.tier + government_has_flag = government_is_nomadic + } + scope:recipient = { + liege = { + OR = { + government_has_flag = government_is_nomadic + scope:recipient.top_liege = prev.var:paiza_patron + } + } + } + } + } + NOT = { + has_character_flag = established_paiza_system + } + } + scope:recipient = { + is_ai = yes + is_gurkhan = no + age >= 12 + NOT = { + has_character_flag = established_paiza_system + } + } + } + + is_valid_showing_failures_only = { + scope:actor = { + custom_tooltip = { + text = mpo_abuse_authority_paiza_decision.no_more_paiza_abuse + NOT = { has_character_flag = no_more_paiza_abuse } + } + custom_tooltip = { + text = mpo_abuse_authority_paiza_decision.paiza_patron_not_topdog + any_character_artifact = { + scope:actor = { can_benefit_from_artifact = prev } + exists = var:paiza_patron + var:paiza_patron ?= { + is_gurkhan = yes + } + } + } + NOT = { + is_at_war_with = scope:recipient + } + } + } + + ai_accept = { + base = -60 + modifier = { + add = 10 + has_trait = craven + desc = BLACKMAIL_INTERACTION_CRAVEN_ACCEPTANCE + } + modifier = { + add = -20 + has_trait = arrogant + desc = BLACKMAIL_INTERACTION_ARROGANT_ACCEPTANCE + } + modifier = { + add = -20 + has_trait = brave + desc = BLACKMAIL_INTERACTION_BRAVE_ACCEPTANCE + } + modifier = { + add = -20 + has_trait = paranoid + desc = BLACKMAIL_INTERACTION_PARANOID_ACCEPTANCE + } + modifier = { + add = { + value = scope:recipient.intrigue + multiply = -2 + } + desc = INDEBT_GUEST_INTRIGUE_RECIPIENT + } + modifier = { + add = { + value = scope:actor.intrigue + } + desc = INDEBT_GUEST_INTRIGUE_ACTOR + } + modifier = { + add = { + value = scope:actor.dread + divide = 2 + } + scope:actor.dread >= 2 + desc = offer_vassalization_interaction_aibehavior_dreaded_tt + } + opinion_modifier = { + opinion_target = situation:the_great_steppe.situation_top_herd + who = scope:recipient + multiplier = 0.4 + } + opinion_modifier = { + opinion_target = scope:actor + who = scope:recipient + multiplier = 0.2 + } + } + + ai_will_do = { + base = -40 + modifier = { + add = 40 + domicile ?= { herd <= twenty_percent_herd_value } + } + modifier = { + add = 10 + domicile ?= { herd <= sixty_percent_herd_value } + } + modifier = { + add = 10 + domicile ?= { herd <= eighty_percent_herd_value } + } + modifier = { + add = 10 + has_trait = greedy + } + modifier = { + add = 10 + has_trait = wrathful + } + modifier = { + add = 10 + has_trait = ambitious + } + modifier = { + add = -10 + var:paiza_patron ?= { + domicile ?= { has_domicile_parameter = nomad_yurt_paiza_abuse_less_likely_lvl_1 } + } + } + modifier = { + add = -20 + var:paiza_patron ?= { + domicile ?= { has_domicile_parameter = nomad_yurt_paiza_abuse_less_likely_lvl_2 } + } + } + modifier = { + add = -35 + var:paiza_patron ?= { + domicile ?= { has_domicile_parameter = nomad_yurt_paiza_abuse_less_likely_lvl_3 } + } + } + } + + ai_targets = { + ai_recipients = peer_vassals + } + + on_accept = { + scope:actor = { + send_interface_toast = { + left_icon = scope:recipient + right_icon = situation:the_great_steppe.situation_top_herd + title = mpo_interaction_leverage_khan_authority + make_obedient_recipient_to_actor_effect = yes + scope:recipient = { + pay_short_term_gold = { + target = scope:actor + gold = { + value = current_gold_value + divide = 2 + } + } + if = { + limit = { + government_has_flag = government_is_nomadic + scope:recipient = { + government_has_flag = government_is_nomadic + } + } + pay_herd = { + target = scope:actor + value = { + value = domicile.herd + multiply = 0.5 + } + } + } + } + if = { + limit = { + scope:recipient = { + OR = { + is_landed = yes + } + } + } + add_prestige = medium_prestige_value + } + else = { + add_prestige = minor_prestige_value + } + } + + if = { + limit = { + government_has_flag = government_is_nomadic + scope:recipient = { + government_has_flag = government_is_nomadic + } + } + pay_herd = { + target = scope:actor + value = { + value = domicile.herd + multiply = 0.5 + } + } + } + } + + scope:actor = { + random_character_artifact = { + limit = { + scope:actor = { can_benefit_from_artifact = prev } + has_variable = paiza_patron + } + var:paiza_patron = { + scope:actor = { + mpo_paiza_abuse_counter_effect = { + PAIZA_PATRON = prev + PAIZA_ABUSER = scope:actor + } + } + } + } + } + } +} + +# Interrogate +# Used in the Ill-Advised event chain - nomad_events.0001 - 0099 +interrogate_interaction = { + category = interaction_category_hostile + icon = icon_scheme_challenge_status + common_interaction = no + + auto_accept = yes + + desc = interrogate_interaction_desc + + is_shown = { + scope:actor = { has_variable = can_interrogate_var } + scope:recipient = { + is_target_in_variable_list = { + name = valid_to_interrogate_var + target = scope:actor + } + } + # And Achmach is still around + scope:actor = { + any_courtier_or_guest = { + has_variable = achmach_loyalty + } + } + } + + cooldown_against_recipient = { years = 10 } + + on_accept = { + scope:actor = { + custom_tooltip = interrogate_interaction_tt + trigger_event = nomad_events.0006 + } + scope:recipient = { + custom_tooltip = interrogate_interaction_recipient_tt + } + } + + ai_will_do = { + base = 100 + } +} + +# Steal Herd +steal_herd_interaction = { + icon = icon_scheme_steal_herd + interface_priority = 90 + common_interaction = yes + category = interaction_category_hostile + + send_name = START_SCHEME + + scheme = steal_herd + ignores_pending_interaction_block = yes + + is_shown = { + NOT = { scope:recipient = scope:actor } + scope:actor = { + is_landed = yes + is_adult = yes + is_imprisoned = no + government_has_flag = government_is_nomadic + in_diplomatic_range = scope:recipient + trigger_if = { + limit = { + is_ai = yes + } + NOR = { + is_tributary_of_suzerain_or_above = scope:recipient + is_vassal_or_below_of = scope:recipient + scope:recipient = { + is_ai = no + any_targeting_scheme = { + scheme_type = steal_herd + } + } + } + } + } + scope:recipient = { + is_landed = yes + is_adult = yes + government_has_flag = government_is_nomadic + highest_held_title_tier >= tier_county + } + } + + is_valid_showing_failures_only = { + scope:actor = { + can_start_scheme = { + type = steal_herd + target_character = scope:recipient + } + } + scope:recipient = { NOT = { has_strong_hook = scope:actor } } + trigger_if = { + limit = { scope:actor = { has_variable = no_scheming_allowed_var } } + custom_tooltip = { + text = no_scheming_allowed_var_tt + scope:actor.var:no_scheming_allowed_var != scope:recipient + } + } + } + + desc = { + triggered_desc = { + trigger = { + scope:actor = { + can_start_scheme = { + type = steal_herd + target_character = scope:recipient + } + } + } + desc = scheme_interaction_tt_steal_herd_approved + } + } + + on_accept = { + scope:actor = { + stress_impact = { + compassionate = minor_stress_impact_gain + honest = minor_stress_impact_gain + craven = minor_stress_impact_gain + content = minor_stress_impact_gain + } + send_interface_toast = { + type = event_toast_effect_neutral + title = steal_herd_interaction_notification + + left_icon = scope:actor + right_icon = scope:recipient + + begin_scheme_basic_effect = { + SCHEME_TYPE = steal_herd + TARGET_TYPE = target_character + TARGET_SCOPE = scope:recipient + } + + if = { + limit = { + domicile ?= { herd >= ninety_percent_herd_value } + } + custom_tooltip = steal_herd_interaction_tt.warning + } + scope:new_scheme ?= { + if = { + limit = { + scope:steal_herd_low ?= yes + } + set_variable = steal_herd_low + } + else_if = { + limit = { + scope:steal_herd_normal ?= yes + } + set_variable = steal_herd_normal + } + else_if = { + limit = { + scope:steal_herd_high ?= yes + } + set_variable = steal_herd_high + } + } + } + } + } + + ai_potential = { + prestige >= medium_prestige_value # In case they fail + trigger_if = { + limit = { + NOT = { + domicile ?= { + has_domicile_building_or_higher = steal_herd_yurt_01 + } + } + } + ai_honor <= 50 + } + NOR = { + scheme_generic_ai_blocker_trigger = yes + primary_title = { + is_mercenary_company = yes + } + } + } + + auto_accept = yes + + ai_will_do = { + base = -30 + + modifier = { + add = 20 + domicile ?= { herd <= twenty_percent_herd_value } + } + + modifier = { + add = 20 + domicile ?= { herd <= sixty_percent_herd_value } + } + + modifier = { + add = { + value = intrigue + multiply = 3 + } + } + + modifier = { + add = { + value = ai_greed + multiply = -1 + } + } + modifier = { + add = { + value = ai_honor + multiply = -0.25 + } + } + modifier = { + scope:actor = { + has_trait = schemer + } + add = 60 + } + modifier = { + scope:actor = { + has_relation_rival = scope:recipient + } + add = 60 + } + modifier = { + scope:actor = { + has_relation_nemesis = scope:recipient + } + add = 150 + } + modifier = { + scope:actor = { + opinion = { + target = scope:recipient + value >= low_positive_opinion + } + ai_greed <= high_positive_ai_value + } + factor = 0 + } + modifier = { + scope:recipient = { + OR = { + has_relation_friend = scope:actor + has_relation_lover = scope:actor + is_obedient_to = scope:actor + } + } + factor = 0 + } + start_hostile_scheme_ai_base_modifiers = yes # At the end so Cowed can block it completely + } + + ai_targets = { + ai_recipients = scripted_relations + ai_recipients = neighboring_rulers + ai_recipients = peer_vassals + } + + # Options + options_heading = schemes.t.herd_amount + send_options_exclusive = yes + ## Steal a little herd + send_option = { + flag = steal_herd_low + current_description = steal_herd_interaction.tt.low + } + ## Steal a moderate amount of herd + send_option = { + flag = steal_herd_normal + current_description = steal_herd_interaction.tt.normal + } + ## Steal a lot of herd + send_option = { + flag = steal_herd_high + current_description = steal_herd_interaction.tt.high + } + + ai_frequency_by_tier = { + barony = 0 + county = 72 + duchy = 36 + kingdom = 36 + empire = 36 + hegemony = 36 + } +} + +mpo_ask_for_herd_interaction = { + category = interaction_category_hostile + icon = demand_herd + desc = mpo_ask_for_herd_interaction_desc + interface_priority = 80 + common_interaction = yes + + ai_frequency_by_tier = { + barony = 0 + county = 92 + duchy = 12 + kingdom = 8 + empire = 8 + hegemony = 8 + } + popup_on_receive = yes + pause_on_receive = yes + + is_shown = { + scope:actor = { + government_has_flag = government_is_nomadic + exists = domicile + } + scope:recipient = { + government_has_flag = government_is_nomadic + exists = domicile + is_ai = yes + } + NOT = { + scope:actor = { + has_variable = had_mpo_temujin_flavor_0020 + var:had_mpo_temujin_flavor_0020 ?= scope:recipient + } + } + } + + is_valid_showing_failures_only = { + scope:actor = { + NOT = { + is_imprisoned = yes + } + } + scope:recipient = { + NOR = { + is_imprisoned = yes + is_at_war = yes + is_a_faction_member = yes + custom_description = { + text = ask_for_herd_not_enough_herd + domicile.herd < scope:recipient.domicile.ask_for_herd_base_value + government_has_flag = government_is_nomadic + } + } + } + } + + ai_potential = { + primary_title.tier >= tier_duchy + } + + send_option = { + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + flag = hook + localization = GENERIC_SPEND_A_HOOK + } + + send_option = { + is_valid = { + scope:recipient.domicile ?= { + herd > ask_for_herd_double_value + } + scope:recipient = { + NOT = { + government_has_flag = government_is_herder + } + } + } + flag = more_herd + localization = ASK_FOR_HERD_MORE_HERD + } + + send_options_exclusive = no + + ai_accept = { + base = -100 + modifier = { + trigger = { + scope:more_herd ?= yes + } + add = -100 + desc = ASK_FOR_HERD_MORE_HERD_REASON + } + modifier = { + trigger = { + scope:hook ?= yes + } + add = 1000 + desc = MIGRATION_HOOK_USED + } + modifier = { + add = { + value = ai_boldness + multiply = -1 + divide = 4 + } + NOT = { ai_boldness = 0 } + desc = ARTIFACT_BOLDNESS_REASON + } + opinion_modifier = { + who = scope:recipient + opinion_target = scope:actor + desc = AI_OPINION_REASON + } + bp2_hostage_dread_modifier = yes + } + + ai_will_do = { + base = 0 + modifier = { + add = 20 + scope:actor.domicile.herd < scope:actor.domicile.ask_for_herd_double_value + } + } + + cooldown_against_recipient = { years = 6 } + + ai_targets = { + ai_recipients = vassals + ai_recipients = neighboring_rulers + ai_recipients = peer_vassals + } + + on_accept = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_good + title = ask_for_herd_toast + left_icon = scope:recipient + scope:recipient = { + # How much Herd are you getting? + if = { + limit = { + scope:more_herd ?= yes + } + if = { + limit = { + scope:actor = { has_variable = nomad_events_0210_herd_var } + } + pay_herd = { + target = scope:actor + value = { + value = scope:recipient.domicile.ask_for_herd_double_value + multiply = 2 + } + } + } + else = { + pay_herd = { + target = scope:actor + value = scope:recipient.domicile.ask_for_herd_double_value + } + } + } + else = { + if = { + limit = { + scope:actor = { has_variable = nomad_events_0210_herd_var } + } + pay_herd = { + target = scope:actor + value = { + value = scope:recipient.domicile.ask_for_herd_base_value + multiply = 2 + } + } + } + else = { + pay_herd = { + target = scope:actor + value = scope:recipient.domicile.ask_for_herd_base_value + } + } + } + # Extra Herd during the Abundant Grazing season + if = { + limit = { + any_character_situation = { + any_situation_sub_region = { + has_sub_region_phase_parameter = the_great_steppe_demand_herd_higher_rate + any_situation_sub_region_participant_group = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = scope:actor + } + } + } + } + custom_tooltip = { + text = ask_for_herd_abundant_grazing_tt + pay_herd = { + target = scope:actor + value = scope:recipient.domicile.ask_for_herd_half_value + } + } + } + # Now opinion maluses + if = { + limit = { + scope:more_herd ?= yes + } + if = { + limit = { + scope:recipient = { + has_dread_level_towards = { target = scope:actor level = 2 } + } + } + custom_tooltip = ask_for_herd_dread_effect_tt + add_opinion = { + target = scope:actor + modifier = ask_for_herd_opinion + opinion = -20 + } + } + else_if = { + limit = { + scope:recipient = { + has_dread_level_towards = { target = scope:actor level = 1 } + } + } + custom_tooltip = ask_for_herd_dread_effect_tt + add_opinion = { + target = scope:actor + modifier = ask_for_herd_opinion + opinion = -40 + } + } + else = { + add_opinion = { + target = scope:actor + modifier = ask_for_herd_opinion + opinion = -60 + } + } + } + else = { + if = { + limit = { #herders cannot give you more herd + scope:recipient = { + government_has_flag = government_is_herder + } + } + scope:actor = { + domicile ?= { change_herd = major_herd_gain } + add_legitimacy = minor_legitimacy_loss + } + scope:recipient.primary_title = { + custom_tooltip = ask_for_herd_herder_recipient_tt + add_county_modifier = { + modifier = ask_for_herd_county_depleted_modifier + years = 12 + } + } + } + else = { + if = { + limit = { + scope:recipient = { + has_dread_level_towards = { target = scope:actor level = 2 } + } + } + custom_tooltip = ask_for_herd_dread_effect_tt + add_opinion = { + target = scope:actor + modifier = ask_for_herd_opinion + opinion = -10 + } + } + else_if = { + limit = { + scope:recipient = { + has_dread_level_towards = { target = scope:actor level = 1 } + } + } + custom_tooltip = ask_for_herd_dread_effect_tt + add_opinion = { + target = scope:actor + modifier = ask_for_herd_opinion + opinion = -20 + } + } + else = { + add_opinion = { + target = scope:actor + modifier = ask_for_herd_opinion + opinion = -40 + } + } + } + } + } + } + } + } +} + +### Demand Obedience +mpo_demand_obedience_interaction = { + category = interaction_category_vassal + icon = demand_obedience + desc = mpo_demand_obedience_interaction_desc + interface_priority = 80 + common_interaction = yes + + ai_frequency_by_tier = { + barony = 0 + county = 24 + duchy = 4 + kingdom = 4 + empire = 4 + hegemony = 4 + } + popup_on_receive = yes + pause_on_receive = yes + + is_shown = { + scope:actor = { + government_allows = obedience + } + scope:recipient = { + is_ai = yes + obedience_target ?= scope:actor + is_obedient = no + } + } + + is_valid_showing_failures_only = { + scope:actor = { + age >= 16 + is_physically_able = yes + NOT = { + is_at_war_with = scope:recipient + } + } + scope:actor = { dread >= medium_dread_value } + } + + cost = { prestige = minor_prestige_value } + + ai_potential = { + government_allows = obedience + primary_title.tier >= tier_duchy + } + + send_option = { + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + flag = hook + localization = GENERIC_SPEND_A_HOOK + } + + send_options_exclusive = no + + ai_accept = { + base = -50 + modifier = { + trigger = { + scope:hook ?= yes + } + add = 100 + desc = MIGRATION_HOOK_USED + } + modifier = { + add = 10 + scope:actor = { + OR = { + has_realm_law = nomadic_authority_2 + has_realm_law = meritocratic_bureaucracy_1 + } + } + desc = DEMAND_OBEDIENCE_INTERACTION_DOMINANCE_ACCEPTANCE + } + modifier = { + add = 20 + scope:actor = { + OR = { + has_realm_law = nomadic_authority_3 + has_realm_law = meritocratic_bureaucracy_2 + } + } + desc = DEMAND_OBEDIENCE_INTERACTION_DOMINANCE_ACCEPTANCE + } + modifier = { + add = 50 + scope:actor = { + OR = { + has_realm_law = nomadic_authority_4 + has_realm_law = meritocratic_bureaucracy_3 + } + } + desc = DEMAND_OBEDIENCE_INTERACTION_DOMINANCE_ACCEPTANCE + } + modifier = { + add = 100 + scope:actor = { has_realm_law = nomadic_authority_5 } + desc = DEMAND_OBEDIENCE_INTERACTION_DOMINANCE_ACCEPTANCE + } + modifier = { + add = -20 + scope:actor = { legitimacy_level = 1 } + desc = DEMAND_OBEDIENCE_INTERACTION_LEGITIMACY_ACCEPTANCE + } + modifier = { + add = 10 + scope:actor = { legitimacy_level = 3 } + desc = DEMAND_OBEDIENCE_INTERACTION_LEGITIMACY_ACCEPTANCE + } + modifier = { + add = 25 + scope:actor = { legitimacy_level = 4 } + desc = DEMAND_OBEDIENCE_INTERACTION_LEGITIMACY_ACCEPTANCE + } + modifier = { + add = 50 + scope:actor = { legitimacy_level = 5 } + desc = DEMAND_OBEDIENCE_INTERACTION_LEGITIMACY_ACCEPTANCE + } + modifier = { + add = { + value = ai_boldness + multiply = -1 + divide = 4 + } + NOT = { ai_boldness = 0 } + desc = ARTIFACT_BOLDNESS_REASON + } + modifier = { + add = -20 + scope:recipient = { + has_trait = brave + } + desc = BLACKMAIL_INTERACTION_BRAVE_ACCEPTANCE + } + modifier = { + add = -50 + scope:recipient = { + has_trait = arrogant + } + desc = BLACKMAIL_INTERACTION_ARROGANT_ACCEPTANCE + } + modifier = { + add = -50 + scope:recipient = { + has_trait = disloyal + } + desc = DEMAND_OBEDIENCE_INTERACTION_DISLOYAL_ACCEPTANCE + } + modifier = { + add = 10 + scope:recipient = { + has_trait = craven + } + desc = BLACKMAIL_INTERACTION_CRAVEN_ACCEPTANCE + } + modifier = { + add = 10 + scope:recipient = { + has_trait = content + } + desc = DEMAND_OBEDIENCE_INTERACTION_CONTENT_ACCEPTANCE + } + modifier = { + add = 25 + any_character_situation = { + any_situation_sub_region = { + has_sub_region_phase_parameter = the_great_steppe_easier_obedience + any_situation_sub_region_participant_group = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = scope:actor + } + } + } + desc = DEMAND_OBEDIENCE_INTERACTION_ZUD_ACCEPTANCE + } + bp2_hostage_dread_modifier = yes + } + + ai_will_do = { + base = 0 + modifier = { + scope:actor = { dread >= major_dread_value } + add = 25 + } + modifier = { + scope:actor = { + any_councillor = { + is_kurultai_trigger = yes + NOT = { is_obedient_to = prev } + } + } + add = 25 + } + } + + cooldown_against_recipient = { years = 10 } + + ai_targets = { + ai_recipients = vassals + ai_recipients = courtiers + ai_recipients = tributaries + chance = 0.25 + } + + ai_targets = { # They will try to get a Stable Succession + ai_recipients = councillors + } + + on_accept = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_good + title = mpo_demand_obedience_interaction_toast + left_icon = scope:recipient + scope:recipient = { + add_opinion = { + target = scope:actor + modifier = obedience_opinion + } + } + # Belligerent Vassal Opinion + if = { + limit = { + any_vassal = { has_vassal_stance = belligerent } + } + every_vassal = { + limit = { has_vassal_stance = belligerent } + custom = every_belligerent_vassal + add_opinion = { + modifier = impressed_opinion + target = scope:actor + opinion = 15 + } + } + } + } + } + } +} + +################## +# Refill MaA +################## + +refill_maa_nomad_interaction = { + icon = icon_soldier_survivor + category = interaction_debug_main + interface_priority = 20 + common_interaction = yes + desc = refill_maa_nomad_interaction_desc + cooldown = { months = 6 } + hidden = yes + + is_shown = { + has_mpo_dlc_trigger = yes + scope:actor = { + is_nomad = yes + government_allows = conditional_maa_refill + } + scope:recipient = scope:actor + } + + is_valid_showing_failures_only = { + custom_tooltip = { + text = reinforce_soldiers_any_regiment_tt + scope:actor.maa_regiments_count >= 1 + } + custom_tooltip = { + text = reinforce_soldiers_unfull_regiment_tt + scope:actor = { + any_maa_regiment = { maa_regiments_valid_to_refill_trigger = yes } + } + } + custom_tooltip = { + text = SUPPLY_LOSS_AT_SEA + scope:actor = { any_laamp_portion_at_sea_trigger = no } + } + custom_tooltip = { + text = REFILL_MAA_AT_WAR_TT + scope:actor = { + NOT = { + any_army = { + location.county.holder = { + OR = { + is_at_war_with = scope:actor + any_liege_or_above = { is_at_war_with = scope:actor } + } + } + } + } + } + } + } + + send_options_exclusive = yes + + send_option = { + flag = herd + localization = reinforce_soldiers_option_herd + is_valid = { + scope:actor.domicile.herd >= 5 + } + } + + send_option = { + flag = gold + localization = reinforce_soldiers_option_gold + is_valid = { + scope:actor.gold >= 5 + } + } + + on_accept = { + scope:actor = { + switch = { + trigger = yes + scope:gold = { + if = { + limit = { gold > replenishable_troops_payed_gold_tt_value } + custom_tooltip = refill_maa_gold_full_tt + } + else = { custom_tooltip = refill_maa_gold_tt } + custom_tooltip = refill_maa_gold_cost_tt + refill_maa_with_gold_effect = yes + } + scope:herd = { + if = { + limit = { domicile.herd > replenishable_troops_payed_herd_tt_value } + custom_tooltip = refill_maa_herd_full_tt + } + else = { custom_tooltip = refill_maa_herd_tt } + custom_tooltip = refill_maa_herd_cost_tt + refill_maa_with_herd_effect = yes + } + } + if = { + limit = { + is_ai = yes + NOR = { + scope:gold = yes + scope:herd = yes + } + } + refill_maa_with_herd_effect = yes + } + custom_tooltip = martial_skill_discount_tt + } + } + + ai_frequency_by_tier = { + barony = 0 + county = 3 + duchy = 1 + kingdom = 1 + empire = 1 + hegemony = 1 + } + ai_targets = { + ai_recipients = self + } + ai_potential = { + is_nomad = yes + government_allows = conditional_maa_refill + any_maa_regiment = { maa_current_troops_count < maa_max_troops_count } + } + + ai_will_do = { + base = 100 + } +} + +### Commander Trait interaction for guardians +# actor = guardian +# recipient = ward/hostage +# This has to be update every time a new Commander trait is added to the game, otherwise you won't be able to pass it down +influence_child_commander_interaction = { + category = interaction_category_friendly + common_interaction = yes + interface_priority = 60 + icon = child + ai_maybe = yes + ai_min_reply_days = 4 + ai_max_reply_days = 9 + can_send_despite_rejection = yes + popup_on_receive = yes + pause_on_receive = yes + + pre_answer_maybe_key = ANSWER_MIGHT_SUCCEED + pre_answer_no_key = ANSWER_CANT_SUCCEED + pre_answer_yes_key = ANSWER_WILL_SUCCEED + pre_answer_maybe_breakdown_key = ANSWER_SUM_CHANCE + + desc = influence_child_commander_interaction_desc + + is_shown = { #any ai ward/hostage + has_mpo_dlc_trigger = yes + scope:recipient = { + is_ai = yes + is_adult = no + OR = { + scope:actor = { has_relation_ward = scope:recipient } + is_hostage_of = scope:actor + } + } + } + + is_valid_showing_failures_only = { + scope:recipient = { #be old enough to fight and don't have any commander traits yet + age >= 10 + number_of_commander_traits <= 1 + #checking all trait individually through the set scope in order to catch if all of your traits are either the same or opposite + trigger_if = { + limit = { + scope:actor = { + number_of_commander_traits > 0 + } + } + custom_description = { + text = influence_child_commander_interaction_all_same_traits + switch = { + trigger = yes + scope:logistician = { + scope:recipient = { NOT = { has_trait = logistician } } + } + scope:military_engineer = { + scope:recipient = { NOT = { has_trait = military_engineer } } + } + scope:aggressive_attacker = { + scope:recipient = { NOT = { has_trait = aggressive_attacker } } + } + scope:unyielding_defender = { + scope:recipient = { NOT = { has_trait = unyielding_defender } } + } + scope:forder = { + scope:recipient = { NOT = { has_trait = forder } } + } + scope:flexible_leader = { + scope:recipient = { NOT = { has_trait = flexible_leader } } + } + scope:desert_warrior = { + scope:recipient = { NOT = { has_trait = desert_warrior } } + } + scope:jungle_stalker = { + scope:recipient = { NOT = { has_trait = jungle_stalker } } + } + scope:reaver = { + scope:recipient = { NOT = { has_trait = reaver } } + } + scope:reckless = { + scope:recipient = { NOT = { has_trait = reckless } } + } + scope:holy_warrior = { + scope:recipient = { NOT = { has_trait = holy_warrior } } + } + scope:open_terrain_expert = { + scope:recipient = { NOT = { has_trait = open_terrain_expert } } + } + scope:rough_terrain_expert = { + scope:recipient = { NOT = { has_trait = rough_terrain_expert } } + } + scope:forest_fighter = { + scope:recipient = { NOT = { has_trait = forest_fighter } } + } + scope:cautious_leader = { + scope:recipient = { NOT = { has_trait = cautious_leader } } + } + scope:organizer = { + scope:recipient = { NOT = { has_trait = organizer } } + } + scope:winter_soldier = { + scope:recipient = { NOT = { has_trait = winter_soldier } } + } + } + } + } + is_physically_able = yes + } + scope:actor = { + is_adult = yes + number_of_commander_traits >= 1 + is_imprisoned = no + is_physically_able = yes + } + } + + cooldown_against_recipient = { years = 3 } + + can_send = { + } + #each option is shown if the actor has the corresponding trait and valid if recipient don't have it yet or don't have an opposite trait + send_option = { + is_shown = { + scope:actor = { has_trait = logistician } + } + is_valid = { + scope:recipient = { + NOR = { + has_trait = logistician + trait:logistician = { + any_opposite_trait = { + scope:recipient = { has_trait = prev } + } + } + } + } + } + flag = logistician + localization = trait_logistician + } + send_option = { + is_shown = { + scope:actor = { has_trait = military_engineer } + } + is_valid = { + scope:recipient = { + NOR = { + has_trait = military_engineer + trait:military_engineer = { + any_opposite_trait = { + scope:recipient = { has_trait = prev } + } + } + } + } + } + flag = military_engineer + localization = trait_military_engineer + } + send_option = { + is_shown = { + scope:actor = { has_trait = aggressive_attacker } + } + is_valid = { + scope:recipient = { + NOR = { + has_trait = aggressive_attacker + trait:aggressive_attacker = { + any_opposite_trait = { + scope:recipient = { has_trait = prev } + } + } + } + } + } + flag = aggressive_attacker + localization = trait_aggressive_attacker + } + send_option = { + is_shown = { + scope:actor = { has_trait = unyielding_defender } + } + is_valid = { + scope:recipient = { + NOR = { + has_trait = unyielding_defender + trait:unyielding_defender = { + any_opposite_trait = { + scope:recipient = { has_trait = prev } + } + } + } + } + } + flag = unyielding_defender + localization = trait_unyielding_defender + } + send_option = { + is_shown = { + scope:actor = { has_trait = forder } + } + is_valid = { + scope:recipient = { + NOR = { + has_trait = forder + trait:forder = { + any_opposite_trait = { + scope:recipient = { has_trait = prev } + } + } + } + } + } + flag = forder + localization = trait_forder + } + send_option = { + is_shown = { + scope:actor = { has_trait = flexible_leader } + } + is_valid = { + scope:recipient = { + NOR = { + has_trait = flexible_leader + trait:flexible_leader = { + any_opposite_trait = { + scope:recipient = { has_trait = prev } + } + } + } + } + } + flag = flexible_leader + localization = trait_flexible_leader + } + send_option = { + is_shown = { + scope:actor = { has_trait = desert_warrior } + } + is_valid = { + scope:recipient = { + NOR = { + has_trait = desert_warrior + trait:desert_warrior = { + any_opposite_trait = { + scope:recipient = { has_trait = prev } + } + } + } + } + } + flag = desert_warrior + localization = trait_desert_warrior + } + send_option = { + is_shown = { + scope:actor = { has_trait = jungle_stalker } + } + is_valid = { + scope:recipient = { + NOR = { + has_trait = jungle_stalker + trait:jungle_stalker = { + any_opposite_trait = { + scope:recipient = { has_trait = prev } + } + } + } + } + } + flag = jungle_stalker + localization = trait_jungle_stalker + } + send_option = { + is_shown = { + scope:actor = { has_trait = reaver } + } + is_valid = { + scope:recipient = { + NOR = { + has_trait = reaver + trait:reaver = { + any_opposite_trait = { + scope:recipient = { has_trait = prev } + } + } + } + } + } + flag = reaver + localization = trait_reaver + } + send_option = { + is_shown = { + scope:actor = { has_trait = reckless } + } + is_valid = { + scope:recipient = { + NOR = { + has_trait = reckless + trait:reckless = { + any_opposite_trait = { + scope:recipient = { has_trait = prev } + } + } + } + } + } + flag = reckless + localization = trait_reckless + } + send_option = { + is_shown = { + scope:actor = { has_trait = holy_warrior } + } + is_valid = { + scope:recipient = { + NOR = { + has_trait = holy_warrior + trait:holy_warrior = { + any_opposite_trait = { + scope:recipient = { has_trait = prev } + } + } + } + } + } + flag = holy_warrior + localization = trait_holy_warrior + } + send_option = { + is_shown = { + scope:actor = { has_trait = open_terrain_expert } + } + is_valid = { + scope:recipient = { + NOR = { + has_trait = open_terrain_expert + trait:open_terrain_expert = { + any_opposite_trait = { + scope:recipient = { has_trait = prev } + } + } + } + } + } + flag = open_terrain_expert + localization = trait_open_terrain_expert + } + send_option = { + is_shown = { + scope:actor = { has_trait = rough_terrain_expert } + } + is_valid = { + scope:recipient = { + NOR = { + has_trait = rough_terrain_expert + trait:rough_terrain_expert = { + any_opposite_trait = { + scope:recipient = { has_trait = prev } + } + } + } + } + } + flag = rough_terrain_expert + localization = trait_rough_terrain_expert + } + send_option = { + is_shown = { + scope:actor = { has_trait = forest_fighter } + } + is_valid = { + scope:recipient = { + NOR = { + has_trait = forest_fighter + trait:forest_fighter = { + any_opposite_trait = { + scope:recipient = { has_trait = prev } + } + } + } + } + } + flag = forest_fighter + localization = trait_forest_fighter + } + send_option = { + is_shown = { + scope:actor = { has_trait = cautious_leader } + } + is_valid = { + scope:recipient = { + NOR = { + has_trait = cautious_leader + trait:cautious_leader = { + any_opposite_trait = { + scope:recipient = { has_trait = prev } + } + } + } + } + } + flag = cautious_leader + localization = trait_cautious_leader + } + send_option = { + is_shown = { + scope:actor = { has_trait = organizer } + } + is_valid = { + scope:recipient = { + NOR = { + has_trait = organizer + trait:organizer = { + any_opposite_trait = { + scope:recipient = { has_trait = prev } + } + } + } + } + } + flag = organizer + localization = trait_organizer + } + send_option = { + is_shown = { + scope:actor = { has_trait = winter_soldier } + } + is_valid = { + scope:recipient = { + NOR = { + has_trait = winter_soldier + trait:winter_soldier = { + any_opposite_trait = { + scope:recipient = { has_trait = prev } + } + } + } + } + } + flag = winter_soldier + localization = trait_winter_soldier + } + + send_options_exclusive = yes + + on_send = { + switch = {#save which trait was chosen as scope:target_trait + trigger = yes + scope:logistician = { + trait:logistician = { save_scope_as = target_trait } + } + scope:military_engineer = { + trait:military_engineer = { save_scope_as = target_trait } + } + scope:aggressive_attacker = { + trait:aggressive_attacker = { save_scope_as = target_trait } + } + scope:unyielding_defender = { + trait:unyielding_defender = { save_scope_as = target_trait } + } + scope:forder = { + trait:forder = { save_scope_as = target_trait } + } + scope:flexible_leader = { + trait:flexible_leader = { save_scope_as = target_trait } + } + scope:desert_warrior = { + trait:desert_warrior = { save_scope_as = target_trait } + } + scope:jungle_stalker = { + trait:jungle_stalker = { save_scope_as = target_trait } + } + scope:reaver = { + trait:reaver = { save_scope_as = target_trait } + } + scope:reckless = { + trait:reckless = { save_scope_as = target_trait } + } + scope:holy_warrior = { + trait:holy_warrior = { save_scope_as = target_trait } + } + scope:open_terrain_expert = { + trait:open_terrain_expert = { save_scope_as = target_trait } + } + scope:rough_terrain_expert = { + trait:rough_terrain_expert = { save_scope_as = target_trait } + } + scope:forest_fighter = { + trait:forest_fighter = { save_scope_as = target_trait } + } + scope:cautious_leader = { + trait:cautious_leader = { save_scope_as = target_trait } + } + scope:organizer = { + trait:organizer = { save_scope_as = target_trait } + } + scope:winter_soldier = { + trait:winter_soldier = { save_scope_as = target_trait } + } + fallback = { + scope:actor = { + random_character_trait = { + limit = { has_trait_category = commander } + save_scope_as = target_trait + } + } + } + } + } + + on_accept = { + scope:actor = { + # Trait you're trying to make your ward gained is saved as scope:target_trait + trigger_event = mpo_interactions_events.0101 + show_as_tooltip = { + add_stress = minor_stress_gain + add_opinion = { + target = scope:recipient + modifier = pleased_opinion + opinion = 20 + } + } + } + scope:recipient = { + show_as_tooltip = { + switch = {#save which trait was chosen as scope:target_trait + trigger = yes + scope:logistician = { + trait:logistician = { save_scope_as = target_trait } + } + scope:military_engineer = { + trait:military_engineer = { save_scope_as = target_trait } + } + scope:aggressive_attacker = { + trait:aggressive_attacker = { save_scope_as = target_trait } + } + scope:unyielding_defender = { + trait:unyielding_defender = { save_scope_as = target_trait } + } + scope:forder = { + trait:forder = { save_scope_as = target_trait } + } + scope:flexible_leader = { + trait:flexible_leader = { save_scope_as = target_trait } + } + scope:desert_warrior = { + trait:desert_warrior = { save_scope_as = target_trait } + } + scope:jungle_stalker = { + trait:jungle_stalker = { save_scope_as = target_trait } + } + scope:reaver = { + trait:reaver = { save_scope_as = target_trait } + } + scope:reckless = { + trait:reckless = { save_scope_as = target_trait } + } + scope:holy_warrior = { + trait:holy_warrior = { save_scope_as = target_trait } + } + scope:open_terrain_expert = { + trait:open_terrain_expert = { save_scope_as = target_trait } + } + scope:rough_terrain_expert = { + trait:rough_terrain_expert = { save_scope_as = target_trait } + } + scope:forest_fighter = { + trait:forest_fighter = { save_scope_as = target_trait } + } + scope:cautious_leader = { + trait:cautious_leader = { save_scope_as = target_trait } + } + scope:organizer = { + trait:organizer = { save_scope_as = target_trait } + } + scope:winter_soldier = { + trait:winter_soldier = { save_scope_as = target_trait } + } + } + if = { + limit = { exists = scope:target_trait } + add_trait = scope:target_trait + } + add_opinion = { + target = scope:actor + modifier = admiration_opinion + opinion = 20 + } + } + } + } + + on_decline = { + scope:actor = { + # Trait you're trying to make your ward gained is saved as scope:target_trait + trigger_event = mpo_interactions_events.0102 + show_as_tooltip = { + add_stress = medium_stress_gain + add_opinion = { + target = scope:recipient + modifier = disappointed_opinion + opinion = -20 + } + } + } + scope:recipient = { + show_as_tooltip = { + add_opinion = { + target = scope:actor + modifier = confused_opinion + opinion = -20 + } + } + } + } + + auto_accept = no + + ai_accept = { + base = 0 # Try to make it 0 for most interactions + opinion_modifier = { # Opinion Factor + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.5 + desc = AI_OPINION_REASON + } + + modifier = { # Perk boost + desc = influence_children_groomed_to_rule_perk_tt + trigger = { + scope:actor = { has_perk = groomed_to_rule_perk } + } + add = groomed_to_rule_value + } + + modifier = { #more likely if you already have something in common + add = { + value = 5 + if = { + limit = { + number_of_personality_traits_in_common = { + target = scope:recipient + value = 2 + } + } + multiply = 2 + } + else_if = { + limit = { + number_of_personality_traits_in_common = { + target = scope:recipient + value = 3 + } + } + multiply = 3 + } + } + number_of_personality_traits_in_common = { + target = scope:recipient + value >= 1 + } + desc = we_are_alike_tt + } + + modifier = { #less likely if you already have opposite traits + add = { + value = -5 + if = { + limit = { + scope:recipient = { + number_of_opposing_personality_traits = { + target = scope:actor + value = 2 + } + } + } + multiply = 2 + } + else_if = { + limit = { + scope:recipient = { + number_of_opposing_personality_traits = { + target = scope:actor + value = 3 + } + } + } + multiply = 3 + } + } + scope:recipient = { + number_of_opposing_personality_traits = { + target = scope:actor + value >= 1 + } + } + desc = we_are_NOT_alike_tt + } + + modifier = { #adding your knowledge + add = { + value = scope:actor.martial + multiply = 0.5 + } + desc = HAS_MARTIAL_SKILL_REASON + } + + modifier = { #adding your fighting skills + add = { + value = scope:actor.prowess + multiply = 0.5 + } + desc = HAS_PROWESS_SKILL_REASON + } + + modifier = { #more likely with a Wet Nurse employed + exists = scope:actor.court_position:champion_court_position + add = 10 + desc = HAS_CHAMPION_REASON + } + + modifier = { #more likely if chosen trait is compatible with recipients childhood personality + add = 15 + switch = { + trigger = yes + scope:logistician = { + scope:recipient = { + OR = { + has_trait = curious + has_trait = pensive + } + } + } + scope:military_engineer = { + scope:recipient = { + OR = { + has_trait = curious + has_trait = pensive + } + } + } + scope:aggressive_attacker = { + scope:recipient = { + OR = { + has_trait = bossy + has_trait = rowdy + } + } + } + scope:unyielding_defender = { + scope:recipient = { + OR = { + has_trait = bossy + has_trait = rowdy + } + } + } + scope:forder = { + scope:recipient = { + OR = { + has_trait = rowdy + has_trait = curious + } + } + } + scope:flexible_leader = { + scope:recipient = { + OR = { + has_trait = charming + has_trait = curious + } + } + } + scope:desert_warrior = { + scope:recipient = { + has_trait = rowdy + } + } + scope:jungle_stalker = { + scope:recipient = { + has_trait = rowdy + } + } + scope:reaver = { + scope:recipient = { + OR = { + has_trait = bossy + has_trait = rowdy + } + } + } + scope:reckless = { + scope:recipient = { + OR = { + has_trait = bossy + has_trait = rowdy + } + } + } + scope:holy_warrior = { + scope:recipient = { + has_trait = pensive + } + } + scope:open_terrain_expert = { + scope:recipient = { + has_trait = rowdy + } + } + scope:rough_terrain_expert = { + scope:recipient = { + has_trait = rowdy + } + } + scope:forest_fighter = { + scope:recipient = { + has_trait = rowdy + } + } + scope:cautious_leader = { + scope:recipient = { + has_trait = pensive + } + } + scope:organizer = { + scope:recipient = { + OR = { + has_trait = bossy + has_trait = charming + } + } + } + scope:winter_soldier = { + scope:recipient = { + has_trait = rowdy + } + } + } + desc = has_compatible_personality_tt + } + + modifier = { #less likely if chosen trait is incompatible with recipients childhood personality + add = -15 + switch = { + trigger = yes + scope:logistician = { + scope:recipient = { + NOR = { + has_trait = curious + has_trait = pensive + } + } + } + scope:military_engineer = { + scope:recipient = { + NOR = { + has_trait = curious + has_trait = pensive + } + } + } + scope:aggressive_attacker = { + scope:recipient = { + NOR = { + has_trait = bossy + has_trait = rowdy + } + } + } + scope:unyielding_defender = { + scope:recipient = { + NOR = { + has_trait = bossy + has_trait = rowdy + } + } + } + scope:forder = { + scope:recipient = { + NOR = { + has_trait = rowdy + has_trait = curious + } + } + } + scope:flexible_leader = { + scope:recipient = { + NOR = { + has_trait = charming + has_trait = curious + } + } + } + scope:desert_warrior = { + scope:recipient = { + NOT = { has_trait = rowdy } + } + } + scope:jungle_stalker = { + scope:recipient = { + NOT = { has_trait = rowdy } + } + } + scope:reaver = { + scope:recipient = { + NOR = { + has_trait = bossy + has_trait = rowdy + } + } + } + scope:reckless = { + scope:recipient = { + NOR = { + has_trait = bossy + has_trait = rowdy + } + } + } + scope:holy_warrior = { + scope:recipient = { + NOT = { has_trait = pensive } + } + } + scope:open_terrain_expert = { + scope:recipient = { + NOT = { has_trait = rowdy } + } + } + scope:rough_terrain_expert = { + scope:recipient = { + NOT = { has_trait = rowdy } + } + } + scope:forest_fighter = { + scope:recipient = { + NOT = { has_trait = rowdy } + } + } + scope:cautious_leader = { + scope:recipient = { + NOT = { has_trait = pensive } + } + } + scope:organizer = { + scope:recipient = { + NOR = { + has_trait = bossy + has_trait = charming + } + } + } + scope:winter_soldier = { + scope:recipient = { + NOT = { has_trait = rowdy } + } + } + } + desc = has_incompatible_personality_tt + } + + modifier = { #more likely if actor is afraid of you + add = intimidated_halved_reason_value + scope:recipient = { + target_is_liege_or_above = scope:actor + has_dread_level_towards = { + target = scope:actor + level = 1 + } + } + desc = INTIMIDATED_REASON + } + modifier = { #more likely if actor is afraid of you + add = cowed_halved_reason_value + scope:recipient = { + target_is_liege_or_above = scope:actor + has_dread_level_towards = { + target = scope:actor + level = 2 + } + } + desc = COWED_REASON + } + modifier = { #less likely if recipient already has a commander trait + add = -50 + scope:recipient = { + number_of_commander_traits >= 1 + } + desc = has_commander_traits_already + } + } + + # AI + ai_potential = { + any_relation = { + type = ward + count >= 1 + } + } + ai_frequency_by_tier = { + barony = 0 + county = 72 + duchy = 12 + kingdom = 12 + empire = 12 + hegemony = 12 + } + ai_targets = { + ai_recipients = courtiers + } + ai_will_do = { + base = -100 + modifier = { # If the recipient is a player, do not bother sending + factor = 0 + scope:recipient = { + is_ai = no + } + } + modifier = { + add = ai_honor + } + modifier = { + add = ai_energy + } + modifier = { + add = ai_sociability + } + modifier = { + add = ai_boldness + } + } +} + +mpo_make_blood_brother = { + category = interaction_category_diplomacy + icon = blood_brother + desc = make_blood_brother_desc + common_interaction = yes + can_send_despite_rejection = yes + interface_priority = 60 + + greeting = positive + notification_text = MAKE_BLOOD_BROTHER_NOTIFICATION + popup_on_receive = yes + ai_maybe = yes + + cooldown = { months = 1 } + cooldown_against_recipient = { years = 5 } + + is_shown = { + # Scope:actor needs to have a suitable CulTrad. + scope:actor = { + mpo_valid_for_blood_brotherhood_trigger = yes + NOT = { var:had_mpo_temujin_flavor_0020 ?= scope:recipient } + } + scope:recipient = { + mpo_valid_for_blood_brotherhood_trigger = yes + NOT = { + this = scope:actor + } + } + } + + is_valid_showing_failures_only = { + mpo_can_be_blood_brothers_trigger = { CHARACTER_1 = scope:actor CHARACTER_2 = scope:recipient } + # Both characters must be available + scope:actor = { + is_imprisoned = no + is_incapable = no + } + scope:recipient = { + is_imprisoned = no + is_incapable = no + } + } + #Mutual enemy that you oppose together + send_option = { + flag = common_enemy + is_valid = { + custom_description = { + text = blood_brother_common_enemy_trigger + mpo_blood_brother_common_enemy_trigger = yes + } + } + localization = BLOOD_BROTHER_COMMON_ENEMY + } + #Shared memories + send_option = { + flag = memories_together + is_valid = { + custom_description = { + text = blood_brother_memory_trigger + scope:actor = { + any_memory = { + has_memory_participant = scope:recipient + mpo_blood_brother_reason_memory_trigger = yes + } + } + } + } + localization = BLOOD_BROTHER_MEMORIES + } + + #Fought together in a war + send_option = { + flag = war_allies + is_valid = { + custom_description = { + text = blood_brother_former_war_allies_trigger + scope:actor = { + has_variable_list = former_war_allies + any_in_list = { + variable = former_war_allies + this = scope:recipient + } + } + } + } + localization = BLOOD_BROTHER_WAR_ALLIES + } + + # Normal + send_option = { + is_shown = { + always = no + } + is_valid = { + always = yes + } + flag = normal + localization = BLOOD_BROTHER_NORMAL + starts_enabled = { always = yes } + } + + cost = { + piety = minor_piety_value + } + + send_options_exclusive = no + + on_accept = { + # Notifications with most effects. + scope:actor = { + # Become blood brothers + #Tooltip effect because it happens later/in the blood brother on action + show_as_tooltip = { + set_relation_blood_brother = scope:recipient + } + custom_tooltip = blood_brother_alliance_actor_alliance_tt + custom_tooltip = blood_brother_actor_gains_hook_tt + if = { + limit = { + scope:recipient = { + mpo_blood_brother_august_trigger = { OTHER_BROTHER = scope:actor } + } + } + if = { + limit = { + scope:actor = { + government_has_flag = government_is_nomadic + } + } + custom_tooltip = blood_brother_august_nomadic_modifier_tt + } + else = { + custom_tooltip = blood_brother_august_modifier_tt + } + } + if = { + limit = { + scope:recipient = { + mpo_blood_brother_warrior_trigger = { OTHER_BROTHER = scope:actor } + } + } + custom_tooltip = blood_brother_warrior_modifier_tt + } + if = { + limit = { + scope:recipient = { + mpo_blood_brother_clever_trigger = yes + } + } + if = { + limit = { + scope:actor = { + government_has_flag = government_is_nomadic + } + } + custom_tooltip = blood_brother_clever_nomadic_modifier_tt + } + else = { + custom_tooltip = blood_brother_clever_modifier_tt + } + } + if = { + limit = { + scope:recipient = { + mpo_blood_brother_loving_trigger = yes + } + } + custom_tooltip = blood_brother_loving_modifier_tt + } + if = { + limit = { + always = scope:common_enemy + } + custom_tooltip = blood_brother_foe_modifier_tt + } + } + scope:recipient = { + # Become blood brothers + #Tooltip effect because it happens later/in the blood brother on action + + show_as_tooltip = { set_relation_blood_brother = scope:actor } + custom_tooltip = blood_brother_alliance_recipient_alliance_tt + custom_tooltip = blood_brother_recipient_gains_hook_tt + if = { + limit = { + scope:actor = { + mpo_blood_brother_august_trigger = { OTHER_BROTHER = scope:recipient } + } + } + if = { + limit = { + scope:recipient = { + government_has_flag = government_is_nomadic + } + } + custom_tooltip = blood_brother_august_nomadic_modifier_tt + } + else = { + custom_tooltip = blood_brother_august_modifier_tt + } + } + if = { + limit = { + scope:actor = { + mpo_blood_brother_warrior_trigger = { OTHER_BROTHER = scope:recipient } + } + } + custom_tooltip = blood_brother_warrior_modifier_tt + } + if = { + limit = { + scope:actor = { + mpo_blood_brother_clever_trigger = yes + } + } + if = { + limit = { + scope:recipient = { + government_has_flag = government_is_nomadic + } + } + custom_tooltip = blood_brother_clever_nomadic_modifier_tt + } + else = { + custom_tooltip = blood_brother_clever_modifier_tt + } + } + if = { + limit = { + scope:actor = { + mpo_blood_brother_loving_trigger = yes + } + } + custom_tooltip = blood_brother_loving_modifier_tt + } + if = { + limit = { + always = scope:common_enemy + } + custom_tooltip = blood_brother_foe_modifier_tt + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_gain + DESC = clan_unity_oath_of_true_friendship.desc + REVERSE_NON_HOUSE_TARGET = no + } + if = { + limit = { + always = scope:common_enemy + } + scope:actor = { + make_blood_brother_save_common_enemy_effect = yes + } + } + #Fire events for each char, resetting scopes to be appropriate in each + hidden_effect = { + scope:recipient = { + save_scope_as = blood_bro + } + scope:actor = { + set_relation_blood_brother = { + reason = sworn_blood_brother + target = scope:recipient + } + trigger_event = mpo_interactions_events.0006 + } + clear_saved_scope = blood_bro + scope:actor = { + save_scope_as = blood_bro + } + scope:recipient = { + trigger_event = mpo_interactions_events.0006 + } + } + } + + on_decline = { + # Scope:actor gains some stress over the whole ordeal. + scope:actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = make_blood_brother_interaction.decline.actor.tt + left_icon = scope:recipient + add_stress = minor_stress_gain + } + } + # Scope:actor loses opinion of scope:recipient. + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = make_blood_brother_interaction.decline.recipient.tt + left_icon = scope:actor + scope:actor = { + add_opinion = { + target = scope:recipient + modifier = hurt_opinion + opinion = -20 + } + } + } + } + # And set up a little hidden drama for later... + hidden_effect = { + scope:recipient = { + if = { + limit = { + # We don't use the standard check for this, since they'll already be friends by definition, so the trigger would always return as false. + # Instead, we just check to make sure they're not *already* potential rivals; this can happen regardless, so really we're just setting them up for drama if the friendship ever falters. + NOT = { has_relation_potential_rival = scope:actor } + } + random = { + chance = 20 + set_relation_potential_rival = scope:actor + } + } + } + } + + # If we're a clan this interaction affects unity + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_loss + DESC = clan_unity_declined_true_friendship.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + # AI + ## Standard Acceptance stuff + ai_accept = { + base = -50 + + mpo_blood_brother_interactions_ai_accept_modifier = yes + + # Common foe send option + # Are you offering confederation leadership? + modifier = { + trigger = { + scope:common_enemy ?= yes + } + add = 75 + desc = BLOOD_BROTHER_COMMON_ENEMY_VALUE + } + # Memories send option + modifier = { + trigger = { + scope:memories_together ?= yes + } + add = 50 + desc = BLOOD_BROTHER_MEMORIES_VALUE + } + # Former war allies send option + modifier = { + trigger = { + scope:war_allies ?= yes + } + add = 30 + desc = BLOOD_BROTHER_WAR_ALLIES_VALUE + } + } + ## Performance-enhancement + ai_potential = { + is_imprisoned = no + is_at_war = no + has_blood_brother = no + } + ai_target_quick_trigger = { adult = yes } + ai_targets = { + ai_recipients = liege + ai_recipients = scripted_relations + } + ai_targets = { + ai_recipients = peer_vassals + max = 10 + } + ai_targets = { + ai_recipients = neighboring_rulers_including_tributary_borders + max = 15 + } + ## Frequency + ai_frequency_by_tier = { + barony = 0 + county = 96 + duchy = 48 + kingdom = 12 + empire = 12 + hegemony = 12 + } + ai_will_do = { + base = -50 + + #Dishonorable characters don't want to be bound like this + modifier = { + scope:recipient = { + ai_honor <= medium_negative_ai_value + } + add = -40 + } + modifier = { + scope:recipient = { + ai_sociability <= medium_negative_ai_value + } + add = -20 + } + + #This will mostly just annoy players, unless AI is worthy and has a good reason + modifier = { + scope:recipient = { + is_ai = no + } + NOT = { + scope:actor = { + is_landed = yes + OR = { + has_relation_friend = scope:recipient + has_relation_soulmate = scope:recipient + is_allied_to = scope:recipient + } + } + } + add = -100 + } + modifier = { + add = 25 + any_ally = { + count < 1 + } + } + modifier = { + add = 75 + any_ally = { + count < 2 + } + scope:recipient = { # Don't propose alliances to tiny insignificant rulers just because + OR = { + current_military_strength >= scope:actor.eighty_percent_of_current_military_strength + primary_title.tier >= scope:actor.primary_title.tier + AND = { + primary_title.tier >= tier_duchy + scope:actor.primary_title.tier < tier_empire + } + } + } + } + + modifier = { + add = 25 + scope:actor = { + mpo_blood_brother_common_enemy_trigger = yes + } + } + modifier = { + add = 25 + scope:actor = { + scope:actor = { + any_memory = { + has_memory_participant = scope:recipient + mpo_blood_brother_reason_memory_trigger = yes + } + } + } + } + modifier = { + add = 10 + scope:actor = { + has_variable_list = former_war_allies + any_in_list = { + variable = former_war_allies + this = scope:recipient + } + } + } + + mpo_blood_brother_interactions_ai_accept_modifier = yes + + modifier = { # The AI shouldn't propose to their Lieges + factor = 0.5 + is_liege_or_above_of = scope:recipient + } + modifier = { # The AI shouldn't propose to their Vassals unless Clan + factor = 0.5 + scope:actor = { + NOT = { government_has_flag = government_is_clan } + } + scope:recipient = { + is_vassal_of = scope:actor + } + } + modifier = { + factor = 0 + scope:recipient = { + has_character_modifier = broke_blood_brotherhood_modifier + } + } + + # Jamukha offers Temujin via Event + modifier = { + trigger = { + scope:actor = { this = character:mpo_mongol_1 } + scope:recipient = { this = character:125501 } + } + factor = 0 + } + } +} + + +################################ +# Feudalize Nomadic Holding +################################ +feudalize_nomadic_holding_interaction = { + category = interaction_category_uncategorized + hidden = yes + special_interaction = feudalize_holding + + desc = feudalize_holding_interaction_desc + + target_type = title + target_filter = actor_domain_titles + + auto_accept = yes + + is_shown = { + scope:actor = { + this = scope:recipient + NOR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + } + + can_be_picked_title = { + scope:target = { + holder = scope:actor + is_capital_barony = no # we'll use the county in that case + trigger_if = { + limit = { tier <= tier_county } + title_province = { + has_holding_type = nomad_holding + } + } + trigger_else = { + custom_description = { + text = "feudalize_nomadic_holding_interaction_title_not_county_or_below" + always = no + } + } + } + } + + has_valid_target_showing_failures_only = { + scope:target = { + trigger_if = { + limit = { tier <= tier_county } + title_province = { + barony_controller = scope:actor + has_ongoing_construction = no + } + } + } + } + + cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + } + scope:actor = { + if = { + limit = { # Less expensive for tribals + government_has_flag = government_is_tribal + } + add = { + value = 50 + desc = BASE + } + } + else = { + add = { + value = feudalize_holding_interaction_cost + desc = BASE + } + if = { + limit = { # More expensive for admin to make barbarians civilized... + government_has_flag = government_is_administrative + } + add = { + value = feudalize_holding_interaction_cost + multiply = 0.25 + desc = has_admin_government + } + if = { + limit = { # Admin get a bonus for high bureaucracy levels + OR = { + has_realm_law = imperial_bureaucracy_2 + has_realm_law = imperial_bureaucracy_3 + } + } + subtract = { + value = feudalize_holding_interaction_cost + multiply = { + value = 0.1 + if = { + limit = { + has_realm_law = imperial_bureaucracy_3 + } + add = 0.15 + } + } + desc = imperial_bureaucracy + } + } + } + } + } + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + } + scope:actor = { + add = { + value = feudalize_holding_interaction_cost + desc = BASE + } + if = { + limit = { # More expensive for admin to make barbarians civilized... + government_has_flag = government_is_administrative + } + add = { + value = feudalize_holding_interaction_cost + multiply = 0.25 + desc = has_admin_government + } + if = { + limit = { # Admin get a bonus for high bureaucracy levels + OR = { + has_realm_law = imperial_bureaucracy_2 + has_realm_law = imperial_bureaucracy_3 + } + } + subtract = { + value = feudalize_holding_interaction_cost + multiply = { + value = 0.1 + if = { + limit = { + has_realm_law = imperial_bureaucracy_3 + } + add = 0.15 + } + } + desc = imperial_bureaucracy + } + } + } + } + } + } + prestige = { + scope:actor = { + if = { + limit = { # Less expensive for tribals + government_has_flag = government_is_tribal + scope:target.county.culture = scope:actor.culture + } + add = { + value = 50 + desc = BASE + } + } + else_if = { + limit = { # Less expensive for tribals + government_has_flag = government_is_tribal + scope:target.county.culture = { has_same_culture_heritage = scope:actor.culture } + } + add = { + value = 100 + desc = BASE + } + } + else_if = { + limit = { # Less expensive for tribals + government_has_flag = government_is_tribal + } + add = { + value = 300 + desc = BASE + } + } + } + } + } + + on_accept = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_good + title = feudalize_holding_interaction_notification + + right_icon = scope:actor + + if = { + limit = { + exists = scope:target.title_province + NOT = { government_has_flag = government_is_tribal } + } + scope:target.title_province = { + set_holding_type = castle_holding + } + } + + if = { + limit = { + exists = scope:target.title_province + government_has_flag = government_is_tribal + } + scope:target.title_province = { + set_holding_type = tribal_holding + } + } + if = { + limit = { + scope:target.county.culture = scope:actor.culture + } + } + else_if = { + limit = { + OR = { + government_has_flag = government_is_tribal + scope:target.county.culture = { has_same_culture_heritage = scope:actor.culture } + } + } + scope:target.county = { + add_county_modifier = { + modifier = mpo_feudalize_nomadic_land_modifier + years = 5 + } + } + } + else = { + scope:target.county = { + add_county_modifier = { + modifier = mpo_feudalize_nomadic_land_modifier + years = 30 + } + } + } + } + } + } + + ai_will_do = { + base = 1500 + } +} + +################################ +# Feudalize Herder Holding +################################ +feudalize_herder_holding_interaction = { + category = interaction_category_uncategorized + hidden = yes + special_interaction = feudalize_holding + + desc = feudalize_holding_interaction_desc + + target_type = title + target_filter = actor_domain_titles + + auto_accept = yes + + is_shown = { + scope:actor = { + this = scope:recipient + NOR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + } + + can_be_picked_title = { + scope:target = { + holder = scope:actor + is_capital_barony = no # we'll use the county in that case + trigger_if = { + limit = { tier <= tier_county } + title_province = { + has_holding_type = herder_holding + } + } + trigger_else = { + custom_description = { + text = "feudalize_herder_holding_interaction_title_not_county_or_below" + always = no + } + } + } + } + + has_valid_target_showing_failures_only = { + scope:target = { + trigger_if = { + limit = { tier <= tier_county } + title_province = { + barony_controller = scope:actor + has_ongoing_construction = no + } + } + } + } + + cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + } + scope:actor = { + if = { + limit = { # Less expensive for tribals + government_has_flag = government_is_tribal + } + add = { + value = 50 + desc = BASE + } + } + else = { + add = { + value = feudalize_holding_interaction_cost + desc = BASE + } + if = { + limit = { # More expensive for admin to make barbarians civilized... + government_has_flag = government_is_administrative + } + add = { + value = feudalize_holding_interaction_cost + multiply = 0.25 + desc = has_admin_government + } + if = { + limit = { # Admin get a bonus for high bureaucracy levels + OR = { + has_realm_law = imperial_bureaucracy_2 + has_realm_law = imperial_bureaucracy_3 + } + } + subtract = { + value = feudalize_holding_interaction_cost + multiply = { + value = 0.1 + if = { + limit = { + has_realm_law = imperial_bureaucracy_3 + } + add = 0.15 + } + } + desc = imperial_bureaucracy + } + } + } + } + } + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + } + scope:actor = { + add = { + value = feudalize_holding_interaction_cost + desc = BASE + } + if = { + limit = { # More expensive for admin to make barbarians civilized... + government_has_flag = government_is_administrative + } + add = { + value = feudalize_holding_interaction_cost + multiply = 0.25 + desc = has_admin_government + } + if = { + limit = { # Admin get a bonus for high bureaucracy levels + OR = { + has_realm_law = imperial_bureaucracy_2 + has_realm_law = imperial_bureaucracy_3 + } + } + subtract = { + value = feudalize_holding_interaction_cost + multiply = { + value = 0.1 + if = { + limit = { + has_realm_law = imperial_bureaucracy_3 + } + add = 0.15 + } + } + desc = imperial_bureaucracy + } + } + } + } + } + } + prestige = { + scope:actor = { + if = { + limit = { # Less expensive for tribals + government_has_flag = government_is_tribal + scope:target.county.culture = scope:actor.culture + } + add = { + value = 50 + desc = BASE + } + } + else_if = { + limit = { # Less expensive for tribals + government_has_flag = government_is_tribal + scope:target.county.culture = { has_same_culture_heritage = scope:actor.culture } + } + add = { + value = 100 + desc = BASE + } + } + else_if = { + limit = { # Less expensive for tribals + government_has_flag = government_is_tribal + } + add = { + value = 300 + desc = BASE + } + } + } + } + } + + on_accept = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_good + title = feudalize_holding_interaction_notification + + right_icon = scope:actor + + if = { + limit = { + exists = scope:target.title_province + NOT = { government_has_flag = government_is_tribal } + } + scope:target.title_province = { + set_holding_type = castle_holding + } + } + + if = { + limit = { + exists = scope:target.title_province + government_has_flag = government_is_tribal + } + scope:target.title_province = { + set_holding_type = tribal_holding + } + } + if = { + limit = { + scope:target.county.culture = scope:actor.culture + } + } + else_if = { + limit = { + OR = { + government_has_flag = government_is_tribal + scope:target.county.culture = { has_same_culture_heritage = scope:actor.culture } + } + } + scope:target.county = { + add_county_modifier = { + modifier = mpo_feudalize_nomadic_land_modifier + years = 5 + } + } + } + else = { + scope:target.county = { + add_county_modifier = { + modifier = mpo_feudalize_nomadic_land_modifier + years = 30 + } + } + } + } + } + } + + ai_will_do = { + base = 1500 + } +} + +mpo_retrieve_land_from_herder_interaction = { + category = interaction_category_diplomacy + common_interaction = yes + notification_text = REVOKE_TITLE_PROPOSAL + interface_priority = 100 + icon = mpo_retrieve_land_from_herder_interaction + desc = mpo_retrieve_land_from_herder_interaction_desc + + special_interaction = revoke_title_interaction + interface = revoke_title + target_type = title + target_filter = recipient_domain_titles + ai_maybe = yes + popup_on_receive = yes + pause_on_receive = yes + + interface_priority = 60 + ai_min_reply_days = 4 + ai_max_reply_days = 9 + + # actor character giving the titles + # recipient character receiving the titles + + is_shown = { + scope:recipient = { + government_has_flag = government_is_herder + } + } + + is_valid_showing_failures_only = { + scope:actor = { + is_adult = yes + is_imprisoned = no + prestige >= minor_prestige_value + trigger_if = { + limit = { is_landed = yes } + custom_tooltip = { + text = mpo_retrieve_land_from_herder_interaction_neighbour_tt + any_sub_realm_county = { + any_neighboring_county = { + holder = { + this = scope:recipient + } + } + } + } + } + trigger_else = { + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + domicile.domicile_location.county.holder ?= scope:recipient + } + } + scope:recipient = { + custom_tooltip = { + text = mpo_retrieve_land_from_herder_independent_tt + OR = { + AND = { + is_independent_ruler = yes + is_tributary = no + } + is_tributary_of_suzerain_or_above = scope:actor + is_vassal_of = scope:actor + } + } + custom_tooltip = { + text = mpo_retrieve_land_migration_tt + capital_county = { is_migration_target = no } + } + } + } + + can_be_picked_title = { + scope:target = { + title_revocation_standard_can_pick_title_trigger = yes + } + } + + has_valid_target = { + scope:target = { + is_landless_type_title = no + NOT = { is_noble_family_title = yes } + NOT = { is_nomad_title = yes } + } + } + + #Use hook -- Has to stay so the UI doesn't break + 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" + + send_options_exclusive = no + + on_auto_accept = { + scope:recipient = { + trigger_event = char_interaction.0200 + } + } + + on_accept = { + scope:recipient = { + if = { + limit = { + is_tributary = yes + NOT = { + is_tributary_of = scope:actor + } + } + suzerain = { + add_opinion = { + target = scope:actor + modifier = upset_opinion + opinion = -25 + } + } + } + } + save_scope_value_as = { + name = revoke_title_interaction + value = yes + } + scope:recipient = { + capital_county = { + change_county_control = -25 + } + } + scope:actor = { + add_prestige = minor_prestige_loss + trigger_event = char_interaction.0199 + } + + + scope:actor = { + if = { + limit = { has_character_flag = flag_hostile_actions_disabled_delay } + remove_character_flag = flag_hostile_actions_disabled_delay + } + if = { + limit = { OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } } + demand_pastureland_adventurer_interaction_effect = yes + } + else = { + revoke_title_interaction_effect = yes + } + } + } + + auto_accept = { + scope:actor = { is_landed = yes } + } + + # AI + ai_targets = { + ai_recipients = tributaries + ai_recipients = top_realm_domicile_owners + } + ai_targets = { + ai_recipients = neighboring_rulers + max = 5 + } + ai_frequency_by_tier = { + barony = 0 + county = 12 + duchy = 4 + kingdom = 4 + empire = 4 + hegemony = 4 + } + + ai_potential = { + domain_size < domain_limit + primary_title.tier >= tier_county + } + + ai_accept = { + base = 0 + modifier = { + scope:actor = { OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } } + add = -50 + desc = YOU_ARE_AN_ADVENTURER_REASON + } + modifier = { + exists = scope:actor.suzerain + add = -25 + desc = ADVENTURER_SUZERAIN_REASON + } + modifier = { + scope:actor = { OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } } + add = { + value = scope:actor.military_power + divide = 100 + } + desc = ADVENTURER_MILITARY_POWER_REASON + } + } + + ai_will_do = { + base = 0 + modifier = { + scope:actor = { + government_has_flag = government_is_nomadic + current_domain_fertility <= bad_county_fertility_level + } + add = 100 + } + modifier = { + scope:actor = { + NOT = { government_has_flag = government_is_nomadic } + short_term_gold >= massive_gold_value + NOR = { + has_trait = humble + has_trait = content + } + } + add = 25 + } + } +} + +mpo_vassal_to_tributary_interaction = { + category = interaction_category_vassal + icon = become_tributary_interaction + common_interaction = yes + + desc = mpo_vassal_to_tributary_interaction_desc + + #ai_frequency = 0 + popup_on_receive = yes + pause_on_receive = yes + + is_shown = { + scope:actor = { + is_ai = no + is_vassal_of = scope:recipient + government_has_flag = government_is_nomadic + } + } + + is_valid_showing_failures_only = { + scope:recipient = { + is_imprisoned = no + } + scope:actor = { + is_imprisoned = no + NOR = { + is_at_war_with = scope:recipient + exists = involved_activity + is_travelling = yes + } + } + } + + is_highlighted = { + always = yes + } + + # Start with higher taxes + send_option = { + flag = high_obligations + localization = VASSAL_TO_TRIBUTARY_HIGHER_OBLIGATIONS + } + + #Use hook + send_option = { + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + flag = hook + localization = GENERIC_SPEND_A_HOOK + } + should_use_extra_icon = { + scope:actor = { has_usable_hook = scope:recipient } + } + extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" + + send_options_exclusive = no + + on_accept = { + scope:actor = { + show_as_tooltip = { + break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:recipient TRIBUTARY = scope:actor } + } + } + scope:actor = { + trigger_event = mpo_interactions_events.0010 + } + } + + on_decline = { + scope:actor = { + #Letter response, they get a bit pissed + trigger_event = mpo_interactions_events.0011 + } + } + + ai_accept = { + base = 0 + + modifier = { + add = -50 + desc = BASE_RELUCTANCE + } + + # Do they like you? + opinion_modifier = { + who = scope:recipient + opinion_target = scope:actor + multiplier = 1 + desc = AI_OPINION_REASON + } + + # If you're friends + modifier = { + add = 50 + scope:recipient = { + has_relation_friend = scope:actor + } + desc = AI_FRIEND_REASON + } + + # If you're lovers + modifier = { + add = 50 + scope:recipient = { + has_relation_lover = scope:actor + } + desc = AI_YOUR_LOVER + } + + # You're using a hook + modifier = { + add = 100 + desc = SCHEME_WEAK_HOOK_USED + scope:hook = yes + } + + # You promised higher taxes + modifier = { + add = 25 + desc = AI_HIGHER_OBLIGATIONS_REASON + scope:high_obligations = yes + } + + # Are they Nomadic + modifier = { + add = 25 + desc = game_concept_nomadic_government + scope:recipient = { government_has_flag = government_is_nomadic } + } + } + + #ai_will_do = { + # base = 0 + #} + # + #ai_targets = { + # ai_recipients = suzerain + #} +} + +mpo_gift_herd_interaction = { + icon = herd_interaction + category = interaction_category_friendly + common_interaction = yes + interface_priority = 65 + desc = mpo_gift_herd_interaction_desc + + greeting = positive + notification_text = SEND_GIFT_HERD_PROPOSAL + + answer_accept_key = SEND_GIFT_HERD_ACCEPT + answer_reject_key = SEND_GIFT_HERD_REJECT + + ai_targets = { + ai_recipients = scripted_relations + ai_recipients = liege + ai_recipients = suzerain + ai_recipients = head_of_faith + } + ai_targets = { + ai_recipients = neighboring_rulers + ai_recipients = peer_vassals + max = 10 + } + ai_targets = { + ai_recipients = vassals + max = 10 + } + ai_targets = { + ai_recipients = tributaries + max = 10 + } + ai_target_quick_trigger = { + adult = yes + } + ai_frequency_by_tier = { + barony = 0 + county = 60 + duchy = 60 + kingdom = 60 + empire = 60 + hegemony = 0 + } + + is_shown = { + NOT = { + scope:recipient = scope:actor + } + scope:actor = { government_has_flag = government_is_nomadic } + scope:recipient = { + government_has_flag = government_is_nomadic + exists = domicile + } + } + + is_valid_showing_failures_only = { + scope:actor.domicile.herd >= herd_gift_value + } + + on_auto_accept = { + scope:recipient = { + trigger_event = mpo_interactions_events.0020 + } + } + + on_accept = { + scope:recipient = { + # Verify that they could become friend + if = { + limit = { + NAND = { + has_relation_friend = scope:actor + has_relation_lover = scope:actor + has_relation_soulmate = scope:actor + has_relation_best_friend = scope:actor + } + } + gifting_leads_towards_friendship_effect = yes + } + } + + scope:actor = { + # Warning for multiple gifts + if = { + limit = { + is_ai = no + scope:recipient = { + has_opinion_modifier = { + target = scope:actor + modifier = sent_herd_opinion + } + } + } + custom_tooltip = ALREADY_SENT_GIFT_HERD_WARNING + } + + send_interface_message = { + type = event_gold_neutral + title = gift_interaction_notification + right_icon = scope:recipient + pay_herd = { + target = scope:recipient + value = domicile.herd_gift_value + } + stress_impact = { + greedy = medium_stress_impact_gain + } + if = { + limit = { + scope:recipient = { + NOT = { + is_heir_of = scope:actor + } + } + } + stress_impact = { + generous = medium_stress_impact_loss + } + } + + #FP3 Tenet Communal Possessions Perk - piety gain for gift giving. + if = { + limit = { + scope:actor = { + faith = { + has_doctrine_parameter = piety_from_gifts_active + } + } + } + scope:actor = { + add_piety = minor_piety_gain + } + } + + # Let's apply the opinion modifier last, as to apply everything else correctly first + scope:recipient = { + add_opinion = { + target = scope:actor + modifier = sent_herd_opinion + opinion = sent_herd_opinion_value + } + } + } + } + } + + ai_accept = { + base = 0 + modifier = { + add = 100 + desc = HERD_REASON + } + } + + ai_potential = { + is_available_at_peace_ai_adult = yes + ai_greed < medium_positive_ai_value + domicile.herd >= { + value = major_herd_value_static + multiply = 3 + } + NOT = { has_variable = conqueror } + ai_should_focus_on_building_in_their_capital = no + } + + auto_accept = { + custom_description = { + text = auto_accept_interaction_ai + object = scope:recipient + scope:recipient = { + is_ai = yes + } + } + } + + ai_min_reply_days = 1 + ai_max_reply_days = 1 + + ai_will_do = { + base = 100 + + modifier = { # Do not send double-gifts + factor = 0 + scope:recipient = { + has_opinion_modifier = { + target = scope:actor + modifier = sent_herd_opinion + } + } + } + + modifier = { # Special Blood Brother weight + add = 100 + scope:actor = { + has_relation_blood_brother = scope:recipient + domicile.herd >= { # Do not lose all your Herd for this + value = herd_gift_value + multiply = 2 + } + } + } + + modifier = { + add = 100 + scope:recipient = { + is_tributary_of = scope:actor + OR = { + ai_greed <= -50 + is_obedient_to = scope:actor + opinion = { + target = scope:actor + value >= 50 + } + } + } + } + + modifier = { # Basic Filtering + factor = 0 + scope:recipient = { + NOR = { + AND = { # Bankrupt lovers, friends and a bankrupt liege should be considered + OR = { + scope:actor = { + any_liege_or_above = { + this = scope:recipient + } + } + has_secret_relation_lover = scope:actor + has_relation_lover = scope:actor + has_relation_soulmate = scope:actor + has_relation_friend = scope:actor + has_relation_best_friend = scope:actor + } + domicile.herd < minor_herd_value_static + } + AND = { # Generous characters will give gifts to their friends/lovers + OR = { + has_secret_relation_lover = scope:actor + has_relation_lover = scope:actor + has_relation_soulmate = scope:actor + has_relation_friend = scope:actor + has_relation_best_friend = scope:actor + } + scope:actor = { + OR = { + ai_greed <= high_negative_ai_value + AND = { + ai_greed < 0 + culture = { + has_cultural_parameter = gives_more_gifts + } + } + } + } + } + AND = { # Characters with the Generous Cultural Tradition will give gifts to more people + is_ruler = yes + OR = { + is_allied_to = scope:actor + is_close_or_extended_family_of = scope:actor + } + scope:actor = { + ai_greed < 0 + culture = { + has_cultural_parameter = gives_more_gifts + } + } + } + AND = { # Characters with the loyal trait more likely to give gifts to friends/lieges + OR = { + scope:actor.liege ?= this + has_relation_friend = scope:actor + has_relation_best_friend = scope:actor + is_allied_to = scope:actor + is_close_or_extended_family_of = scope:actor + } + scope:actor = { + ai_greed <= 0 + has_trait = loyal + } + } + AND = { # Powerful vassals should be considered + is_powerful_vassal_of = scope:actor + opinion = { + target = scope:actor + value < 0 + } + NOT ={ + has_opinion_modifier = { + target = scope:actor + modifier = sent_herd_opinion + } + } + } + AND = { # Factioneering vassals should be considered + is_vassal_of = scope:actor + is_a_faction_member = yes + NOT ={ + has_opinion_modifier = { + target = scope:actor + modifier = sent_herd_opinion + } + } + } + AND = { # Realm Priests should be considered + scope:actor = { + faith = { has_doctrine = doctrine_theocracy_temporal } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = scope:recipient + } + opinion = { + target = scope:actor + value <= 25 + } + NOT = { + has_opinion_modifier = { + target = scope:actor + modifier = sent_herd_opinion + } + } + } + } + } + } + + modifier = { + factor = 0.1 + scope:recipient = { + opinion = { + target = scope:actor + value < 0 + } + NAND = { + is_vassal_of = scope:actor + scope:actor = { + ai_rationality > 50 + } + } + } + } + + modifier = { + factor = 0.1 + scope:recipient = { + has_relation_rival = scope:actor + } + } + } +} + +mpo_offer_submission_or_ruin = { + category = interaction_category_vassal + icon = invasion + popup_on_receive = yes + pause_on_receive = yes + ai_maybe = yes + + desc = mpo_offer_submission_or_ruin_desc + + ai_targets = { + ai_recipients = neighboring_rulers + } + ai_frequency_by_tier = { + barony = 0 + county = 0 + duchy = 0 + kingdom = 0 + empire = 3 + hegemony = 3 + } + interface_priority = 300 + common_interaction = yes + force_notification = yes + + is_shown = { + scope:actor = { + OR = { + mpo_has_gok_mongol_empire_trigger = yes + has_trait = greatest_of_khans + } + mpo_offer_submission_or_ruin_shown_actor_trigger = yes + } + scope:recipient = { + mpo_offer_submission_or_ruin_shown_recipient_trigger = yes + } + + } + + is_valid_showing_failures_only = { + scope:actor = { + mpo_offer_submission_or_ruin_valid_actor_trigger = yes + } + scope:recipient = { + mpo_offer_submission_or_ruin_valid_recipient_trigger = yes + } + } + + is_highlighted = { + always = yes + } + + greeting = positive + notification_text = OFFER_SUBMISSION_OR_RUIN_INTERACTION_NOTIFICATION + + can_send_despite_rejection = yes + + ai_min_reply_days = 3 + ai_max_reply_days = 5 + + ai_accept = { + base = -50 + # MAIN + # Heretic/Infidel modifier. + # Tier difference modifier. + # Dejure modifier. + # Distant/Remote Realm modifier. + # Military power difference modifier. + + # MINOR + # Rivalry modifier. + # Same Dynasty modifier. + # Cultural/Cultural Group modifiers. + # Ageism modifier vs kids. + # Ruler Legitimacy modifier. + # Claimant modifier. + # FP3 Piety Level modifier. + + # OPINION SCALES + # Dread + # Compare Opinion modifier. + + #CONFEDERATION + modifier = { + desc = CONFEDERATION_MEMBER_REASON + scope:recipient = { + is_confederation_member = yes + } + add = -500 + } + + #HERDER + modifier = { + scope:recipient = { government_has_flag = government_is_herder } + add = 10000 + desc = HERDER_REASON + } + + #TRIBUTARY + modifier = { + desc = KING_SUZERAIN_REASON + scope:recipient = { + is_tributary = yes + NOT = { + is_tributary_of_suzerain_or_above = scope:actor + } + suzerain = { + highest_held_title_tier >= tier_kingdom + } + } + add = -50 + } + modifier = { + desc = STRONG_SUZERAIN_REASON + scope:recipient = { + is_tributary = yes + NOT = { + is_tributary_of_suzerain_or_above = scope:actor + } + suzerain = { + sub_realm_size >= 20 + } + } + add = -100 + } + modifier = { + desc = STRONG_SUZERAIN_REASON + scope:recipient = { + is_tributary = yes + NOT = { + is_tributary_of_suzerain_or_above = scope:actor + } + scope:recipient.suzerain = { + current_military_strength >= scope:actor.current_military_strength + } + } + add = -300 + } + modifier = { + desc = ALREADY_TRIBUTARY_REASON + scope:recipient = { + is_tributary_of_suzerain_or_above = scope:actor + } + add = 30 + } + + # PERKS + modifier = { # Perk boost + desc = offer_vassalization_true_ruler_perk_tt + trigger = { + scope:actor = { has_perk = true_ruler_perk } + } + add = 30 + } + modifier = { # Education 5 boost + desc = offer_vassalization_education_diplomacy_5_tt + trigger = { + scope:actor = { has_trait_with_flag = offer_vassalisation_25 } + } + add = 25 + } + + # EVENTS - temporary bonuses gained by events + modifier = { + desc = event_bonus_to_vassal_accept_tt + trigger = { + scope:actor = { has_character_modifier = event_bonus_to_vassal_accept } + } + add = 20 + } + + + # STRUGGLES - bonus gained by successful Sway scheme during the Persian Struggle + modifier = { + desc = fp3_persian_struggle_previously_swayed_tt + trigger = { + scope:recipient = { + has_opinion_modifier = { + modifier = scheme_sway_and_compelled_to_submit_opinion + target = scope:actor + } + } + } + add = 20 + } + + modifier = { + desc = fp3_rekindler_of_iran_modifier_reason + trigger = { + AND = { + scope:actor = { dynasty ?={ has_dynasty_modifier = fp3_rekindler_of_iran_modifier } } + scope:recipient = { culture = { has_cultural_pillar = heritage_iranian } } + } + } + add = 20 + } + + # OBEDIENCE + modifier = { + desc = obedient_interaction_reason + trigger = { + is_obedient_to = scope:actor + } + add = 100 + } + + modifier = { # Cultural Acceptance + add = offer_vassalage_acceptance_value + desc = cultural_acceptance_interaction_reason + trigger = { + scope:actor = { + NOR = { + has_same_culture_as = scope:recipient + government_has_flag = government_is_nomadic # Nomads do not care about Culture + has_trait = nomadic_philosophy + } + culture = { + cultural_acceptance = { target = scope:recipient.culture value <= 90 } + } + } + } + } + + # MAIN + modifier = { #Different faith, no pluralism. + desc = offer_vassalization_interaction_aibehavior_differentfaith_tt + trigger = { + scope:actor = { + NOR = { # Nomads do not care about Faith + government_has_flag = government_is_nomadic + has_trait = nomadic_philosophy + } + } + scope:recipient = { + NOR = { #Of two different faiths AND the potential vassal's faith is not pluralistic. + faith = scope:actor.faith + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + } + add = { + value = -40 + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_hostile_level + } + } + } + add = -40 + } + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_evil_level + } + } + } + add = -40 + } + } + } + + modifier = { #Different faith, pluralism. + desc = offer_vassalization_interaction_aibehavior_differentfaith_tt + trigger = { + scope:actor = { + NOR = { # Nomads do not care about Faith + government_has_flag = government_is_nomadic + has_trait = nomadic_philosophy + } + } + scope:recipient = { + NOT = { + faith = scope:actor.faith + } + NOT = { + scope:actor.faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + add = { + value = -20 + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_hostile_level + } + } + } + add = -20 + } + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_evil_level + } + } + } + add = -20 + } + } + } + + modifier = { #Different faith, both have pluralism. + desc = offer_vassalization_interaction_aibehavior_differentfaith_tt + trigger = { + scope:actor = { + NOR = { # Nomads do not care about Faith + government_has_flag = government_is_nomadic + has_trait = nomadic_philosophy + } + } + scope:recipient = { + NOT = { + faith = scope:actor.faith + } + scope:actor.faith = { has_doctrine = doctrine_pluralism_pluralistic } + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + add = { + value = -10 + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_hostile_level + } + } + } + add = -10 + } + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_evil_level + } + } + } + add = -10 + } + } + } + modifier = { #I am a King! + desc = offer_vassalization_interaction_aibehavior_hightier_tt + trigger = { + scope:recipient = { highest_held_title_tier = tier_kingdom } + } + add = { + value = -50 + if = { + limit = { + scope:recipient = { + OR = { + government_has_flag = government_is_republic + government_has_flag = government_is_theocracy + } + } + } + add = -50 + } + if = { + limit = { + scope:recipient.sub_realm_size >= 5 + } + add = -50 + } + if = { + limit = { + scope:recipient.sub_realm_size >= 10 + } + add = -100 + } + if = { + limit = { + scope:recipient.sub_realm_size >= 20 + } + add = -100 + } + if = { + limit = { + scope:actor = { + is_ai = yes + } + } + add = -10000 + } + } + } + modifier = { #I am an Emperor!!! + desc = offer_vassalization_interaction_aibehavior_hightier_tt + trigger = { + scope:recipient = { highest_held_title_tier >= tier_empire } + } + add = { + value = -200 + if = { + limit = { + scope:recipient = { + OR = { + government_has_flag = government_is_republic + government_has_flag = government_is_theocracy + } + } + } + add = -100 + } + if = { + limit = { + scope:recipient.sub_realm_size >= 10 + } + add = -100 + } + if = { + limit = { + scope:recipient.sub_realm_size >= 20 + } + add = -200 + } + if = { + limit = { + scope:recipient.sub_realm_size >= 40 + } + add = -200 + } + if = { + limit = { + scope:actor = { + is_ai = yes + } + } + add = -10000 + } + } + } + modifier = { #I fought an independence war against you. + desc = offer_vassalization_interaction_aibehavior_independence_war_tt + trigger = { + scope:recipient = { + exists = var:independence_war_former_liege + var:independence_war_former_liege = scope:actor + } + } + add = -300 + } + modifier = { # We are both nomadic + desc = interaction_nonnomad_vs_nomad + trigger = { + scope:actor = { + government_has_flag = government_is_nomadic + } + scope:recipient = { + government_has_flag = government_is_nomadic + } + } + add = 25 + } + modifier = { # Isolationist tradition + desc = isolationist_reason + trigger = { + NOT = { + scope:actor.culture = scope:recipient.culture + } + scope:recipient.culture = { + has_cultural_tradition = tradition_isolationist + } + } + add = -25 + } + modifier = { #Bankrupt + desc = bankrupt_reason + trigger = { + scope:actor.gold <= -1 + } + add = -100 + } + modifier = { #Wide difference in rank + desc = offer_vassalization_interaction_aibehavior_widetitletier_tt + trigger = { + scope:actor = { + tier_difference = { + target = scope:recipient + value > 2 + } + } + } + add = 40 + } + modifier = { # Allied + desc = offer_vassalization_interaction_aibehavior_allied_tt + trigger = { + scope:recipient = { + is_allied_to = scope:actor + } + } + add = 25 + } + modifier = { # Is the Rightful Liege of recipient + desc = offer_vassalization_interaction_aibehavior_rightfulliegetitleholder_tt + trigger = { + scope:actor = { is_rightful_liege_of = scope:recipient } + } + add = 50 + } + modifier = { # Encircled + desc = offer_vassalization_interaction_aibehavior_encircled_tt + trigger = { + scope:recipient = { + NOT = { + any_neighboring_top_liege_realm_owner = { + NOT = { + this = scope:actor + } + } + } + NOT = { + any_realm_county = { + is_coastal_county = yes + } + } + } + } + add = 50 + } + modifier = { #Distant Realm — Overseas Connection + desc = offer_vassalization_interaction_aibehavior_distantrealm_tt + trigger = { + scope:actor = { + character_is_realm_neighbor = scope:recipient + NOT = { #Ibiza should want to be a vassal of Mallorca, etc. + character_is_land_realm_neighbor = scope:recipient + scope:actor = { is_rightful_liege_of = scope:recipient } + } + } + } + add = -50 + } + modifier = { #Distant Realm — No Connection + desc = offer_vassalization_interaction_aibehavior_distantrealm_tt + trigger = { + scope:actor = { + NOT = { + character_is_realm_neighbor = scope:recipient + } + } + scope:recipient.capital_province = { squared_distance = { target = scope:actor.capital_province value < 200000 } } + } + add = -100 + } + modifier = { #Remote Realm. + desc = offer_vassalization_interaction_aibehavior_remoterealm_tt + trigger = { + scope:actor = { + NOT = { + character_is_realm_neighbor = scope:recipient + } + } + scope:recipient.capital_province = { squared_distance = { target = scope:actor.capital_province value >= 200000 } } + } + add = -200 + } + modifier = { + desc = offer_vassalization_interaction_aibehavior_power_tt_submission_or_ruin + add = { + value = 1 + subtract = { + value = scope:recipient.max_military_strength # Intended for recipient to use max, to avoid having vassalizations become too easy for weakened realms + divide = { value = scope:actor.current_military_strength min = 1 } + } + multiply = 100 + ceiling = yes + } + } + modifier = { + desc = offer_vassalization_interaction_aibehavior_vassal_opinion_tt + trigger = { + scope:actor = { + number_of_powerful_vassals >= 1 + } + } + + add = { + value = 0 + scope:actor = { + every_powerful_vassal = { + if = { + limit = { + save_temporary_opinion_value_as = { + name = vassal_opinion + target = scope:actor + } + } + add = scope:vassal_opinion + } + } + + if = { + limit = { + number_of_powerful_vassals > 0 + } + divide = number_of_powerful_vassals + } + else = { + divide = 10 + } + } + + divide = 10 + } + } + + # MINOR + modifier = { #Friend modifier. + desc = offer_vassalization_interaction_aibehavior_friend_tt + trigger = { + scope:recipient = { + has_relation_friend = scope:actor + NOT = { has_relation_best_friend = scope:actor } + } + } + add = 20 + } + modifier = { #Best Friend modifier. + desc = offer_vassalization_interaction_aibehavior_best_friend_tt + trigger = { + scope:recipient = { + has_relation_best_friend = scope:actor + } + } + add = 50 + } + modifier = { #Lover modifier. + desc = interaction_lover + trigger = { + scope:recipient = { + has_relation_lover = scope:actor + NOT = { has_relation_soulmate = scope:actor } + } + } + add = 20 + } + modifier = { #Soulmate modifier. + desc = interaction_soulmate + trigger = { + scope:recipient = { + has_relation_soulmate = scope:actor + } + } + add = 50 + } + modifier = { #Rivalry modifier. + desc = offer_vassalization_interaction_aibehavior_rival_tt + trigger = { + scope:recipient = { + has_relation_rival = scope:actor + NOT = { has_relation_nemesis = scope:actor } + } + } + add = -200 + } + modifier = { #Nemesis modifier. + desc = offer_vassalization_interaction_aibehavior_nemesis_tt + trigger = { + scope:recipient = { + has_relation_nemesis = scope:actor + } + } + add = -2000 + } + modifier = { #Same Dynasty modifier. + desc = offer_vassalization_interaction_aibehavior_dynasty_tt + trigger = { + scope:recipient = { + dynasty = scope:actor.dynasty + } + } + add = 25 + } + + modifier = { # Same language + add = 5 + desc = speaks_same_language_interaction_reason + trigger = { + scope:actor = { + knows_language_of_culture = scope:recipient.culture + } + } + } + + modifier = { # Iberian Struggle, less likely for outsiders to vassalize inside + add = -35 + desc = iberian_struggle_reason_reason + trigger = { + scope:actor = { + NOT = { + any_character_struggle = { is_struggle_type = iberian_struggle } + } + } + scope:recipient = { + any_character_struggle = { is_struggle_type = iberian_struggle } + } + } + } + + modifier = { #Ageism modifier vs kids. + desc = offer_vassalization_interaction_aibehavior_child_tt + trigger = { + scope:actor = { + age < 12 + } + scope:recipient = { + age > 16 + } + } + add = -5 + } + modifier = { #Illegitimacy modifier. + desc = offer_vassalization_interaction_aibehavior_illegitimate_tt + trigger = { + scope:actor = { + OR = { + AND = { + has_trait = bastard + scope:recipient = { + faith = { NOT = { has_doctrine = doctrine_bastardry_none } } + } + } + has_trait = denounced + has_trait = disinherited + } + } + } + add = -10 + } + + modifier = { #Claimant modifier. + desc = offer_vassalization_interaction_aibehavior_claimant_tt + trigger = { + scope:actor.primary_title = { + scope:recipient = { + has_claim_on = prev + } + } + } + add = -50 + } + + modifier = { # Ambitious + desc = TAKE_THE_VOWS_AMBITIOUS + trigger = { + scope:recipient = { + has_trait = ambitious + } + } + add = -30 + } + modifier = { # Brave + desc = INTERACTION_BRAVE + trigger = { + scope:recipient = { + has_trait = brave + } + } + add = -30 + } + modifier = { # wrathful + desc = INTERACTION_WRATHFUL + trigger = { + scope:recipient = { + has_trait = wrathful + } + } + add = -40 + } + modifier = { # vengeful + desc = INTERACTION_VENGEFUL + trigger = { + scope:recipient = { + has_trait = vengeful + } + } + add = -20 + } + modifier = { # peasant leader + desc = INTERACTION_PEASANT_LEADER + trigger = { + scope:recipient = { + has_trait = peasant_leader + } + } + add = -40 + } + modifier = { # populist leader + desc = INTERACTION_POPULIST_LEADER + trigger = { + scope:recipient = { + has_trait = populist_leader + } + } + add = -100 + } + modifier = { #martial leader + desc = INTERACTION_MARTIAL_EDUCATION + trigger = { + scope:recipient = { + OR = { + has_education_martial_trigger = yes + has_martial_lifestyle_trait_trigger = yes + } + } + } + add = -10 + } + modifier = { # Arrogant + desc = INTERACTION_ARROGANT + trigger = { + scope:recipient = { + has_trait = arrogant + } + } + add = -60 + } + + modifier = { # Fickle + desc = INTERACTION_FICKLE + trigger = { + scope:recipient = { + has_trait = fickle + } + } + add = -10 + } + + modifier = { # Stubborn + desc = INTERACTION_STUBBORN + trigger = { + scope:recipient = { + has_trait = stubborn + } + } + add = -180 + } + + modifier = { # Trusting + desc = TAKE_THE_VOWS_TRUSTING + trigger = { + scope:recipient = { + has_trait = trusting + } + } + add = 20 + } + + modifier = { # Humble + desc = INTERACTION_HUMBLE + trigger = { + scope:recipient = { + has_trait = humble + } + } + add = 20 + } + + modifier = { # Content + desc = INTERACTION_CONTENT + trigger = { + scope:recipient = { + has_trait = content + } + } + add = 20 + } + + modifier = { # Craven + desc = INTERACTION_CRAVEN + trigger = { + scope:recipient = { + has_trait = craven + } + } + add = 100 + } + + modifier = { # FP3 modifier. + desc = GENERIC_YOUR_PIETY_LEVEL_MODIFIER + trigger = { scope:actor = { any_character_struggle = { has_struggle_phase_parameter = piety_level_affects_vassalage_acceptance } } } + add = { + value = { + value = scope:actor.piety_level + subtract = low_piety_level + } + multiply = 10 + } + } + + # OPINION INFLUENCE + modifier = { + add = intimidated_reason_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 1 + } + } + desc = INTIMIDATED_REASON + } + modifier = { + add = cowed_reason_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 2 + } + } + desc = COWED_REASON + } + opinion_modifier = { #Compare Opinion modifier - Clans care more about opinion + trigger = { + scope:actor = { + government_has_flag = government_is_clan + } + scope:recipient = { + government_has_flag = government_is_clan + } + } + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.7 + } + opinion_modifier = { #Compare Opinion modifier. + trigger = { + OR = { + scope:actor = { + NOT = { government_has_flag = government_is_clan } + } + scope:recipient = { + NOT = { government_has_flag = government_is_clan } + } + } + } + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.35 + } + + # DIPLOMATIC COURT GRANDEUR BONUS + modifier = { + trigger = { + scope:actor = { + has_royal_court = yes + has_dlc_feature = royal_court + has_court_type = court_diplomatic + court_grandeur_current_level >= 1 + } + } + add = { + value = scope:actor.court_grandeur_current + if = { + limit = { # Reduce the bonus if you are below your expected level + scope:actor = { + court_grandeur_current_level < court_grandeur_minimum_expected_level + } + } + multiply = 0.15 + } + else = { + multiply = 0.3 + } + } + desc = DIPLOMATIC_COURT_ACCEPTANCE_INCREASE_REASON + } + + # CONTRACT OPTIONS + modifier = { + add = 20 + scope:actor = { + faith = { + has_doctrine = doctrine_pluralism_pluralistic + } + } + scope:recipient = { + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + } + } + desc = CONTRACT_RELIGIOUS_EXEMPTION_REASON + } + modifier = { + add = 30 + scope:low_obligations = yes + desc = CONTRACT_MERCIFUL_KHAN_REASON + } + modifier = { + add = -10 + scope:send_siege_weapons = yes + desc = CONTRACT_SEND_SIEGE_WEAPONS_REASON + } + modifier = { + add = -50 + scope:recipient = { + NOT = { + government_has_flag = government_is_herder + } + } + scope:send_tribute = yes + desc = CONTRACT_SEND_TRIBUTE_REASON + } + + # INSPECTION BONUSES + modifier = { + desc = "INSPECTION_REASON" + add = 5 + scope:recipient = { + has_variable_list = lesser_inspection_bonus + is_target_in_variable_list = { + name = lesser_inspection_bonus + target = scope:actor + } + } + } + modifier = { + desc = "INSPECTION_REASON" + add = 10 + scope:recipient = { + has_variable_list = inspection_bonus + is_target_in_variable_list = { + name = inspection_bonus + target = scope:actor + } + } + } + modifier = { + desc = "INSPECTION_REASON_REWARD" + add = 10 + scope:recipient = { + has_variable_list = inspection_reward + is_target_in_variable_list = { + name = inspection_reward + target = scope:actor + } + } + } + modifier = { + desc = "INSPECTION_REASON_REWARD_FOCUSED" + add = 10 + scope:actor = { has_character_modifier = inspection_reward_focused_vassal_acceptance } + } + + # LOW LEGITIMACY + modifier = { + desc = "LOW_LEGITIMACY_REASON" + add = -10 + scope:actor = { + has_legitimacy_flag = reduced_vassalization_acceptance + } + } + modifier = { + desc = "LOW_LEGITIMACY_REASON" + add = -20 + scope:actor = { + has_legitimacy_flag = very_reduced_vassalization_acceptance + } + } + modifier = { + desc = "LOW_LEGITIMACY_REASON" + add = -50 + scope:actor = { + has_legitimacy_flag = massively_reduced_vassalization_acceptance + } + } + + # HIGH LEGITIMACY + modifier = { + desc = "HIGH_LEGITIMACY_REASON" + add = 25 + scope:actor = { + has_legitimacy_flag = increased_vassalization_acceptance + } + } + modifier = { + desc = "HIGH_LEGITIMACY_REASON" + add = 50 + scope:actor = { + has_legitimacy_flag = very_increased_vassalization_acceptance + } + } + modifier = { + desc = "HIGH_LEGITIMACY_REASON" + add = 75 + scope:actor = { + has_legitimacy_flag = extra_increased_vassalization_acceptance + } + } + + # INFLUENCE + modifier = { + add = 25 + scope:influence_send_option = yes + desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION + } + + #HISTORICALLY ADMIN PEOPLES WANT TO BE ADMIN + modifier = { + add = 30 + scope:actor = { + government_has_flag = government_is_administrative + } + scope:recipient = { + culture = { + OR = { + this = culture:greek + any_parent_culture_or_above = { + this = culture:greek + } + this = culture:han + any_parent_culture_or_above = { + this = culture:han + } + } + } + } + + desc = "HISTORICAL_ADMIN_REASON" + } + + modifier = { # AI-only weights, keep the pope from vassalizing too fast + trigger = { + exists = faith:catholic.religious_head + faith:catholic.religious_head = scope:actor + scope:actor = { is_ai = yes } + } + add = -50 + } + + modifier = { + trigger = { + scope:actor = { + has_variable = severed_head_vassalization + var:severed_head_vassalization = { + this = scope:recipient + } + } + } + add = 200 + desc = COWED_BY_SEVERED_HEAD_MODIFIER + } + + modifier = { #You're distracted by another war + desc = IS_AT_WAR_REASON + trigger = { + scope:actor = { + is_at_war = yes + } + } + add = -20 + } + modifier = { #You're distracted by multiple wars + desc = HAS_MULTIPLE_WARS_REASON + trigger = { + scope:actor = { + any_character_war = { + count >= 2 + exists = this + } + } + } + add = { + value = 0 + scope:actor = { + every_character_war = { + add = -15 + } + } + } + } + modifier = { #You have waged terrifying wars of devastation... + desc = WAGED_KHANS_TERROR_WARS_REASON + trigger = { + scope:actor = { + has_variable = gok_terror_war_value + } + } + add = scope:actor.var:gok_terror_war_value + } + #Swift initial spread with nomads for mongol invasion + modifier = { + scope:actor = { + is_ai = yes + realm_size < 50 + any_owned_story = { + story_type = story_mongol_invasion + } + } + scope:recipient = { + is_ai = yes + government_has_flag = government_is_nomadic + realm_size < 10 + highest_held_title_tier < tier_kingdom + } + add = 100 + } + modifier = { # Pacing needed for AI genghis + trigger = { + scope:actor = { + is_ai = yes + } + scope:recipient = { + is_ai = yes + ai_boldness >= 0 + OR = { + realm_size > 10 + is_confederation_member = yes + } + } + #During genghis' initial expanding in Mongolia, nomads are exempt from this malus + NAND = { + scope:recipient = { + government_has_flag = government_is_nomadic + highest_held_title_tier < tier_kingdom + } + scope:actor = { + realm_size < 100 + any_owned_story = { + story_type = story_mongol_invasion + } + } + } + } + add = -1000 + } + } + + # Low starting obligations + send_option = { + is_shown = { + scope:recipient = { + NOT = { + government_has_flag = government_is_herder + } + } + } + flag = low_obligations + localization = lenient_obligations + } + + #Normal obligations for normies + send_option = { + is_shown = { + scope:recipient = { + OR = { + highest_held_title_tier < tier_duchy + government_has_flag = government_is_herder + } + } + } + starts_enabled = { always = yes } + flag = normal_obligations + localization = gok_normal_obligations + } + #Demand army + send_option = { + is_shown = { + scope:recipient = { + NOT = { + government_has_flag = government_is_herder + } + highest_held_title_tier >= tier_duchy + } + } + flag = send_army + localization = send_army + starts_enabled = { + scope:recipient = { + mpo_gok_auto_cultural_maa_trigger = yes + highest_held_title_tier >= tier_duchy + } + } + } + #Demand siege weapons + send_option = { + is_shown = { + scope:recipient = { + NOR = { + government_has_flag = government_is_herder + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + highest_held_title_tier >= tier_duchy + } + } + flag = send_siege_weapons + localization = send_siege_weapons + starts_enabled = { + scope:recipient = { + mpo_gok_auto_cultural_maa_trigger = no + highest_held_title_tier >= tier_duchy + } + } + } + + #Demand immediate tribute + send_option = { + is_shown = { + scope:recipient = { + NOT = { + government_has_flag = government_is_herder + } + } + } + flag = send_tribute + localization = send_tribute + } + + send_option = { # EP3 Influence + is_shown = { + scope:actor = { + government_has_flag = government_has_influence + } + } + is_valid = { + scope:actor = { influence >= medium_influence_value } + } + flag = influence_send_option + localization = TRADE_INFLUENCE_FOR_BETTER_AI_ACCEPTANCE + } + + send_options_exclusive = yes + + on_accept = { + scope:actor = { + save_scope_as = gok + } + mpo_gok_offer_submission_effect = yes + + scope:recipient = { + add_character_flag = { + flag = accepted_gok_submission + years = 3 + } + } + + scope:actor = { + #If recipient isn't a big deal, fire a hidden event that just creates a feed notification (to minimize khan clicking) + if = { + limit = { + scope:recipient = { + NOR = { + highest_held_title_tier >= tier_kingdom + sub_realm_size >= 10 + } + } + } + trigger_event = mpo_greatest_of_khans.0020 + } + else = { + trigger_event = mpo_greatest_of_khans.0021 + } + + ## Remove bonus, it's been used + if = { + limit = { has_character_modifier = event_bonus_to_vassal_accept } + remove_character_modifier = event_bonus_to_vassal_accept + } + + if = { # FP3 + limit = { any_character_struggle = { has_struggle_phase_parameter = offer_vassalization_removes_disloyalty } } + scope:recipient = { remove_trait = disloyal } + } + } + } + + on_decline = { + scope:recipient = { + save_scope_as = gok_victim + if = { + limit = { + is_tributary_of = scope:actor + } + end_tributary = yes + } + } + scope:actor = { + show_as_tooltip = { + mpo_gok_offer_submission_refusal_effect = yes + } + + trigger_event = mpo_greatest_of_khans.0022 + } + } + + ai_potential = { + any_owned_story = { + OR = { + story_type = story_greatest_of_khans + story_type = story_mongol_invasion + } + } + is_independent_ruler = yes + #Not defending or losing an attacking war + NOT = { + any_character_war = { + OR = { + AND = { + any_war_attacker = { + this = root + } + attacker_war_score < 0 + } + any_war_defender = { + this = root + } + } + } + } + #Already engaged in three wars + any_character_war = { + count >= 3 + exists = this + } + } + + ai_will_do = { + base = 100 + + # AI prefers to receive higher obligations from their vassals when possible. + modifier = { + factor = 2 + scope:low_obligations = yes + } + + modifier = { + factor = 3 + scope:normal_obligations = yes + } + + modifier = { + factor = 4 + scope:send_army = yes + } + modifier = { + factor = 4 + scope:send_siege_weapons = yes + } + modifier = { + factor = 5 + scope:send_tribute = yes + } + modifier = { + factor = 3 + scope:recipient = { + sub_realm_size < 3 + } + } + + #really want to get of little realms we encircle + modifier = { + factor = 10 + scope:recipient = { + realm_size <= 20 + NOT = { + any_neighboring_top_liege_realm_owner = { + NOT = { + this = scope:actor + } + } + } + } + } + #Would rather just destroy someone they hate or distrust + modifier = { + factor = 0 + OR = { + has_relation_rival = scope:recipient + opinion = { + target = scope:recipient + value <= -90 + } + scope:recipient = { + has_trait = disloyal + } + scope:recipient = { + has_trait = conqueror + } + scope:recipient = { + has_trait = ambitious + } + scope:recipient = { + ai_greed >= medium_positive_ai_value + ai_honor <= medium_negative_ai_value + } + } + } + #Should only attack China when very strong + modifier = { + factor = 0.1 + scope:recipient = { + primary_title = title:h_china + current_military_strength > scope:actor.half_current_military_strength + } + } + modifier = { + factor = 0 + scope:recipient = { + current_military_strength > 0 + scope:actor.current_military_strength > 0 + current_military_strength > scope:actor.current_military_strength + } + } + } +} + +### Negotiate Obedience +mpo_negotiate_obedience_interaction = { + category = interaction_category_vassal + icon = demand_obedience + desc = mpo_negotiate_obedience_interaction_desc + interface_priority = 80 + common_interaction = yes + + ai_frequency_by_tier = { + barony = 0 + county = 24 + duchy = 6 + kingdom = 6 + empire = 6 + hegemony = 6 + } + popup_on_receive = yes + pause_on_receive = yes + + is_shown = { + scope:actor = { + government_allows = obedience + } + scope:recipient = { + is_ai = yes + obedience_target ?= scope:actor + is_obedient = no + } + } + + cost = { + prestige = { + value = medium_prestige_value + if = { + limit = { + scope:actor = { + OR = { + has_realm_law = nomadic_authority_2 + has_realm_law = meritocratic_bureaucracy_1 + } + } + } + multiply = 1.25 + } + else_if = { + limit = { + scope:actor = { + OR = { + has_realm_law = nomadic_authority_3 + has_realm_law = meritocratic_bureaucracy_2 + } + } + } + multiply = 1.5 + } + else_if = { + limit = { + scope:actor = { + OR = { + has_realm_law = nomadic_authority_4 + has_realm_law = meritocratic_bureaucracy_3 + } + } + } + multiply = 1.75 + } + else_if = { + limit = { + scope:actor = { has_realm_law = nomadic_authority_5 } + } + multiply = 2 + } + } + } + + is_valid_showing_failures_only = { + scope:actor = { + is_imprisoned = no + NOT = { + is_at_war_with = scope:recipient + } + } + trigger_if = { + limit = { + scope:recipient = { is_landed = yes is_independent_ruler = no } + } + scope:recipient = { is_vassal_or_below_of = scope:actor } + } + trigger_else_if = { + limit = { + scope:recipient = { is_independent_ruler = yes } + } + scope:actor = { + custom_tooltip = { + text = mpo_interaction_not_neighbouring_tt + any_land_neighboring_realm_with_tributaries_owner = { + this = scope:recipient + } + } + } + } + trigger_else = {} + } + + ai_potential = { + government_allows = obedience + primary_title.tier >= tier_duchy + prestige >= major_prestige_value + } + + send_option = { + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + flag = hook + localization = GENERIC_SPEND_A_HOOK + } + + send_option = { + is_valid = { + scope:actor = { + gold >= medium_gold_value + } + } + flag = gold + localization = OFFER_GOLD_FOR_BETTER_AI_ACCEPTANCE + } + + send_option = { + is_valid = { + scope:actor = { + trigger_if = { + limit = { government_has_flag = government_is_nomadic } + domicile ?= { + herd >= medium_herd_value + } + } + trigger_else = { + government_has_flag = government_is_nomadic + } + } + } + flag = herd + localization = OFFER_HERD_FOR_BETTER_AI_ACCEPTANCE + } + + send_options_exclusive = no + + ai_accept = { + base = -95 + modifier = { + trigger = { + scope:hook ?= yes + } + add = 100 + desc = MIGRATION_HOOK_USED + } + modifier = { + trigger = { + scope:gold ?= yes + } + add = 100 + desc = TRADE_GOLD_FOR_BETTER_AI_ACCEPTANCE_TT + } + modifier = { + trigger = { + scope:herd ?= yes + } + add = 100 + desc = TRADE_HERD_FOR_BETTER_AI_ACCEPTANCE_TT + } + modifier = { + add = 5 + scope:actor = { + OR = { + has_realm_law = nomadic_authority_2 + has_realm_law = meritocratic_bureaucracy_1 + } + } + desc = DEMAND_OBEDIENCE_INTERACTION_DOMINANCE_ACCEPTANCE + } + modifier = { + add = 10 + scope:actor = { + OR = { + has_realm_law = nomadic_authority_3 + has_realm_law = meritocratic_bureaucracy_2 + } + } + desc = DEMAND_OBEDIENCE_INTERACTION_DOMINANCE_ACCEPTANCE + } + modifier = { + add = 20 + scope:actor = { + OR = { + has_realm_law = nomadic_authority_4 + has_realm_law = meritocratic_bureaucracy_3 + } + } + desc = DEMAND_OBEDIENCE_INTERACTION_DOMINANCE_ACCEPTANCE + } + modifier = { + add = 100 + scope:actor = { has_realm_law = nomadic_authority_5 } + desc = DEMAND_OBEDIENCE_INTERACTION_DOMINANCE_ACCEPTANCE + } + modifier = { + add = -30 + scope:actor = { legitimacy_level = 1 } + desc = DEMAND_OBEDIENCE_INTERACTION_LEGITIMACY_ACCEPTANCE + } + modifier = { + add = -20 + scope:actor = { legitimacy_level = 2 } + desc = DEMAND_OBEDIENCE_INTERACTION_LEGITIMACY_ACCEPTANCE + } + modifier = { + add = 5 + scope:actor = { legitimacy_level = 3 } + desc = DEMAND_OBEDIENCE_INTERACTION_LEGITIMACY_ACCEPTANCE + } + modifier = { + add = 15 + scope:actor = { legitimacy_level = 4 } + desc = DEMAND_OBEDIENCE_INTERACTION_LEGITIMACY_ACCEPTANCE + } + modifier = { + add = 30 + scope:actor = { legitimacy_level = 5 } + desc = DEMAND_OBEDIENCE_INTERACTION_LEGITIMACY_ACCEPTANCE + } + modifier = { + add = { + value = ai_boldness + multiply = -1 + divide = 2 + } + NOT = { ai_boldness = 0 } + desc = ARTIFACT_BOLDNESS_REASON + } + modifier = { + add = { + value = ai_greed + multiply = -1 + divide = 2 + } + ai_greed > 0 + desc = ARTIFACT_GREED_REASON + } + modifier = { + add = { + value = ai_honor + divide = 4 + } + NOT = { ai_honor = 0 } + desc = ARTIFACT_HONOR_REASON + } + modifier = { + add = -20 + scope:recipient = { + has_trait = brave + } + desc = BLACKMAIL_INTERACTION_BRAVE_ACCEPTANCE + } + modifier = { + add = -50 + scope:recipient = { + has_trait = arrogant + } + desc = BLACKMAIL_INTERACTION_ARROGANT_ACCEPTANCE + } + modifier = { + add = 25 + scope:recipient = { + has_trait = trusting + } + desc = BLACKMAIL_INTERACTION_TRUSTING_ACCEPTANCE + } + modifier = { + add = -50 + scope:recipient = { + has_trait = disloyal + } + desc = DEMAND_OBEDIENCE_INTERACTION_DISLOYAL_ACCEPTANCE + } + modifier = { + add = -500 + scope:actor = { government_has_flag = government_is_nomadic } + scope:recipient = { + exists = domicile + domicile.herd >= 100 + domicile.herd > scope:actor.domicile.herd + } + desc = DEMAND_OBEDIENCE_INTERACTION_HERD_ACCEPTANCE + } + modifier = { + add = -500 + scope:recipient = { + current_military_strength >= 100 + current_military_strength > scope:actor.current_military_strength + } + desc = DEMAND_OBEDIENCE_INTERACTION_MILITARY_MIGHT_ACCEPTANCE + } + modifier = { + add = 10 + scope:recipient = { + has_trait = craven + } + desc = BLACKMAIL_INTERACTION_CRAVEN_ACCEPTANCE + } + modifier = { + add = 10 + scope:recipient = { + has_trait = content + } + desc = DEMAND_OBEDIENCE_INTERACTION_CONTENT_ACCEPTANCE + } + modifier = { + add = 25 + any_character_situation = { + any_situation_sub_region = { + has_sub_region_phase_parameter = the_great_steppe_easier_obedience + any_situation_sub_region_participant_group = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = scope:actor + } + } + } + desc = DEMAND_OBEDIENCE_INTERACTION_ZUD_ACCEPTANCE + } + bp2_hostage_dread_modifier = yes + } + + ai_will_do = { + base = 0 + modifier = { + scope:herd ?= yes + add = -1 + } + modifier = { + scope:gold ?= yes + add = -1 + } + modifier = { + scope:hook ?= yes + add = -1 + } + modifier = { + scope:recipient = { + is_kurultai_trigger = yes + } + add = 100 + } + } + + cooldown_against_recipient = { years = 10 } + + ai_targets = { # They will try to get a Stable Succession + ai_recipients = councillors + } + + on_accept = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_good + title = mpo_demand_obedience_interaction_toast + left_icon = scope:recipient + # Pay what you need to pay first + if = { + limit = { scope:hook = yes } + use_hook = scope:recipient + } + if = { + limit = { scope:gold = yes } + pay_short_term_gold = { + target = scope:recipient + gold = medium_gold_value + } + } + if = { + limit = { scope:herd = yes } + if = { + limit = { exists = scope:recipient.domicile } + pay_herd = { + target = scope:recipient + value = domicile.medium_herd_value + } + } + else = { # For a nice tooltip + show_as_tooltip = { + pay_herd = { + target = scope:recipient + value = domicile.medium_herd_value + } + } + hidden_effect = { domicile = { change_herd = medium_herd_loss } } + } + } + scope:recipient = { + add_opinion = { + target = scope:actor + modifier = obedience_opinion + } + } + } + } + } +} + +join_confederation_interaction = { + category = interaction_category_diplomacy + icon = offer_confederation_interaction + + desc = join_confederation_interaction_desc + + #ai_targets = { + # ai_recipients = neighboring_rulers_including_tributary_borders + #} + #ai_frequency = 0 + popup_on_receive = yes + pause_on_receive = yes + + common_interaction = yes + + cooldown_against_recipient = { years = 3 } + + is_shown = { + scope:actor = { + is_playable_character = yes + is_independent_ruler = yes + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_tribal + } + highest_held_title_tier <= tier_duchy + is_landed = yes + is_confederation_member = no + } + scope:recipient.confederation ?= { is_house_based = no } + } + + is_valid_showing_failures_only = { + scope:actor = { + valid_confederation_member_trigger = { CHARACTER = scope:recipient } + is_imprisoned = no + is_at_war = no + NOR = { + has_trait = conqueror + has_trait = greatest_of_khans + } + } + } + + cost = { + prestige = { + value = 0 + if = { + limit = { scope:prestige_send_option = yes } + add = scope:actor.minor_prestige_value + desc = PRESTIGE_INTERACTION_ACCEPTANCE_SEND_OPTION + } + } + } + + greeting = positive + notification_text = OFFER_CONFEDERATION_INTERACTION_NOTIFICATION + + ai_accept = { + base = -50 + + modifier = { # Cultural Acceptance + add = offer_vassalage_acceptance_value + desc = cultural_acceptance_interaction_reason + trigger = { + scope:actor = { + NOT = { has_same_culture_as = scope:recipient } + culture = { + cultural_acceptance = { target = scope:recipient.culture value <= 90 } + } + } + } + } + + modifier = { #Different faith, no pluralism. + desc = offer_vassalization_interaction_aibehavior_differentfaith_tt + trigger = { + scope:recipient = { + NOR = { #Of two different faiths AND the potential vassal's faith is not pluralistic. + faith = scope:actor.faith + faith = { has_doctrine = doctrine_pluralism_pluralistic } + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + } + add = { + value = -30 + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_hostile_level + } + } + } + add = -30 + } + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_evil_level + } + } + } + add = -30 + } + } + } + + modifier = { #Different faith, pluralism. + desc = offer_vassalization_interaction_aibehavior_differentfaith_tt + trigger = { + scope:recipient = { + NOR = { + faith = scope:actor.faith + scope:actor.faith = { has_doctrine = doctrine_pluralism_pluralistic } + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + add = { + value = -15 + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_hostile_level + } + } + } + add = -15 + } + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_evil_level + } + } + } + add = -15 + } + } + } + + modifier = { #Different faith, both have pluralism. + desc = offer_vassalization_interaction_aibehavior_differentfaith_tt + trigger = { + scope:recipient = { + NOR = { + faith = scope:actor.faith + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + scope:actor.faith = { has_doctrine = doctrine_pluralism_pluralistic } + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + add = { + value = -10 + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_hostile_level + } + } + } + add = -10 + } + if = { + limit = { + scope:recipient.faith = { + faith_hostility_level = { + target = scope:actor.faith + value >= faith_evil_level + } + } + } + add = -10 + } + } + } + modifier = { #We just fought against each other. + desc = offer_vassalization_interaction_aibehavior_recent_war_tt + trigger = { + scope:recipient = { + any_truce_holder = { + this = scope:actor + } + } + # Ensure the truce wasn't purchased and is indeed from a war + scope:actor = { + NOT = { + has_purchased_truce_with_char = { TARGET = scope:recipient } + } + } + } + add = -40 + } + modifier = { #You fought an independence war against me + desc = offer_confederation_independence_war_reverse_tt + trigger = { + scope:actor = { + exists = var:independence_war_former_liege + var:independence_war_former_liege = scope:recipient.top_liege + } + } + add = -100 + } + modifier = { #I fought an independence war against you. + desc = offer_confederation_independence_war_tt + trigger = { + scope:recipient = { + exists = var:independence_war_former_liege + var:independence_war_former_liege = scope:actor.top_liege + } + } + add = -50 + } + modifier = { #Bankrupt + desc = bankrupt_reason + trigger = { + scope:actor.gold <= -1 + } + add = -30 + } + modifier = { #Wide difference in rank + desc = offer_vassalization_interaction_aibehavior_widetitletier_tt + trigger = { + scope:actor = { + tier_difference = { + target = scope:recipient + value > 1 + } + } + } + add = 10 + } + modifier = { # Allied + desc = offer_vassalization_interaction_aibehavior_allied_tt + trigger = { + scope:recipient = { + is_allied_to = scope:actor + } + } + add = 50 + } + modifier = { # Is the Rightful Liege of actor + desc = offer_vassalization_interaction_aibehavior_rightfulvassaltitleholder_tt + trigger = { + scope:recipient = { is_rightful_liege_of = scope:actor } + } + add = -75 + } + modifier = { # Is the Rightful Liege of recipient + desc = offer_vassalization_interaction_aibehavior_rightfulliegetitleholder_tt + trigger = { + scope:actor = { is_rightful_liege_of = scope:recipient } + } + add = 20 + } + modifier = { #No adjacency + desc = offer_vassalization_interaction_aibehavior_unconnectedrealm_tt + trigger = { + scope:recipient = { + NOT = { + any_land_neighboring_realm_with_tributaries_owner = { + OR = { + this = scope:actor + AND = { + exists = scope:actor.confederation + is_member_of_confederation = scope:actor.confederation + } + AND = { + exists = scope:actor.confederation + suzerain ?= { + is_member_of_confederation = scope:actor.confederation + } + } + suzerain ?= { + this = scope:actor + } + } + } + } + } + scope:recipient.capital_province = { squared_distance = { target = scope:actor.capital_province value < 100000 } } + } + add = -25 + } + modifier = { #Distant Realm + desc = offer_vassalization_interaction_aibehavior_distantrealm_tt + trigger = { + scope:recipient = { + NOT = { + any_land_neighboring_realm_with_tributaries_owner = { + OR = { + this = scope:actor + AND = { + exists = scope:actor.confederation + is_member_of_confederation = scope:actor.confederation + } + AND = { + exists = scope:actor.confederation + suzerain ?= { + is_member_of_confederation = scope:actor.confederation + } + } + suzerain ?= { + this = scope:actor + } + } + } + } + } + scope:recipient.capital_province = { squared_distance = { target = scope:actor.capital_province value >= 100000 } } + } + add = -50 + } + modifier = { #Remote Realm. + desc = offer_vassalization_interaction_aibehavior_remoterealm_tt + trigger = { + scope:recipient = { + NOT = { + any_land_neighboring_realm_with_tributaries_owner = { + OR = { + this = scope:actor + AND = { + exists = scope:actor.confederation + is_member_of_confederation = scope:actor.confederation + } + AND = { + exists = scope:actor.confederation + suzerain ?= { + is_member_of_confederation = scope:actor.confederation + } + } + suzerain ?= { + this = scope:actor + } + } + } + } + } + scope:recipient.capital_province = { squared_distance = { target = scope:actor.capital_province value >= 200000 } } + } + add = -125 + } + #Relative power + modifier = { + desc = offer_vassalization_interaction_aibehavior_power_tt + add = { + value = 1 + subtract = { + value = scope:recipient.max_military_strength # Intended for recipient to use max, to avoid having vassalizations become too easy for weakened realms + divide = { value = scope:actor.top_liege.current_military_strength min = 1 } + } + multiply = 5 + ceiling = yes + min = -100 + } + } + + #Powerful vassal opinion of you + modifier = { + desc = offer_confederation_offerer_vassal_opinion_tt + trigger = { + scope:actor.top_liege = { + number_of_powerful_vassals >= 1 + } + } + + add = { + value = 0 + scope:actor.top_liege = { + every_powerful_vassal = { + if = { + limit = { + save_temporary_opinion_value_as = { + name = vassal_opinion + target = scope:actor.top_liege + } + } + add = scope:vassal_opinion + } + } + + if = { + limit = { + number_of_powerful_vassals > 0 + } + divide = number_of_powerful_vassals + } + else = { + divide = 5 + } + } + + divide = 10 + } + } + + modifier = { #Friend modifier. + desc = offer_vassalization_interaction_aibehavior_friend_tt + trigger = { + scope:recipient = { + has_relation_friend = scope:actor + NOT = { has_relation_best_friend = scope:actor } + } + } + add = 25 + } + modifier = { #Best Friend modifier. + desc = offer_vassalization_interaction_aibehavior_best_friend_tt + trigger = { + scope:recipient = { + has_relation_best_friend = scope:actor + } + } + add = 50 + } + modifier = { #Lover modifier. + desc = interaction_lover + trigger = { + scope:recipient = { + has_relation_lover = scope:actor + NOT = { has_relation_soulmate = scope:actor } + } + } + add = 25 + } + modifier = { #Soulmate modifier. + desc = interaction_soulmate + trigger = { + scope:recipient = { + has_relation_soulmate = scope:actor + } + } + add = 50 + } + modifier = { #Rivalry modifier. + desc = offer_vassalization_interaction_aibehavior_rival_tt + trigger = { + scope:recipient = { + has_relation_rival = scope:actor + NOT = { has_relation_nemesis = scope:actor } + } + } + add = -200 + } + modifier = { #Nemesis modifier. + desc = offer_vassalization_interaction_aibehavior_nemesis_tt + trigger = { + scope:recipient = { + has_relation_nemesis = scope:actor + } + } + add = -1000 + } + modifier = { #Rivalry modifier. + desc = offer_vassalization_interaction_aibehavior_rival_confederation_tt + trigger = { + scope:recipient.confederation ?= { + any_confederation_member = { + NOT = { this = scope:recipient } + has_relation_rival = scope:actor + NOT = { has_relation_nemesis = scope:actor } + } + } + } + add = -100 + } + modifier = { #Nemesis modifier. + desc = offer_vassalization_interaction_aibehavior_nemesis_confederation_tt + trigger = { + scope:recipient.confederation ?= { + any_confederation_member = { + NOT = { this = scope:recipient } + has_relation_nemesis = scope:actor + } + } + } + add = -500 + } + + modifier = { #Same Dynasty modifier. + desc = offer_vassalization_interaction_aibehavior_dynasty_tt + trigger = { + exists = scope:actor.dynasty + exists = scope:recipient.dynasty + scope:recipient = { + dynasty = scope:actor.dynasty + } + } + add = 25 + } + + modifier = { #Same House modifier. + desc = offer_vassalization_interaction_aibehavior_house_tt + trigger = { + exists = scope:actor.house + exists = scope:recipient.house + scope:recipient = { + house = scope:actor.house + } + } + add = 50 + } + + modifier = { # Same language + add = 20 + desc = speaks_same_language_interaction_reason + trigger = { + scope:actor = { + knows_language_of_culture = scope:recipient.culture + } + } + } + + modifier = { #Ageism modifier vs kids. + desc = offer_vassalization_interaction_aibehavior_child_tt + trigger = { + scope:actor = { + age < 12 + } + scope:recipient = { + age > 16 + } + } + add = -5 + } + + modifier = { #Illegitimacy modifier. + desc = confederation_offerer_illegitimate_tt + trigger = { + scope:actor.top_liege = { + OR = { + AND = { + has_trait = bastard + scope:recipient = { + faith = { NOT = { has_doctrine = doctrine_bastardry_none } } + } + } + has_trait = denounced + has_trait = disinherited + } + } + } + add = -20 + } + + modifier = { #Claimant modifier. + desc = confederation_interaction_aibehavior_claimant_tt + trigger = { + scope:actor = { + any_held_title = { + scope:recipient = { + has_claim_on = prev + } + } + } + } + add = -50 + } + + modifier = { # Ambitious + desc = TAKE_THE_VOWS_AMBITIOUS + trigger = { + scope:recipient = { + has_trait = ambitious + } + } + add = -25 + } + + modifier = { # Paranoid + desc = INTERACTION_PARANOID + trigger = { + scope:recipient = { + has_trait = paranoid + } + } + add = -25 + } + + modifier = { # Arrogant + desc = INTERACTION_ARROGANT + trigger = { + scope:recipient = { + has_trait = arrogant + } + } + add = -25 + } + + modifier = { # Greedy + desc = INTERACTION_GREEDY + trigger = { + scope:recipient = { + has_trait = greedy + } + } + add = -15 + } + + modifier = { # Trusting + desc = TAKE_THE_VOWS_TRUSTING + trigger = { + scope:recipient = { + has_trait = trusting + } + } + add = 15 + } + + modifier = { # Craven + desc = INTERACTION_CRAVEN + trigger = { + scope:recipient = { + has_trait = craven + } + } + add = 25 + } + + opinion_modifier = { #Compare Opinion modifier. + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.35 + } + modifier = { + add = intimidated_external_reason_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 1 + } + } + desc = INTIMIDATED_REASON + } + modifier = { + add = cowed_external_reason_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level = 2 + } + } + desc = COWED_REASON + } + # DIPLOMATIC COURT GRANDEUR BONUS + modifier = { + trigger = { + scope:actor.top_liege = { + has_royal_court = yes + has_dlc_feature = royal_court + has_court_type = court_diplomatic + court_grandeur_current_level >= 1 + } + } + add = { + value = scope:actor.top_liege.court_grandeur_current + if = { + limit = { # Reduce the bonus if you are below your expected level + scope:actor.top_liege = { + court_grandeur_current_level < court_grandeur_minimum_expected_level + } + } + multiply = 0.15 + } + else = { + multiply = 0.3 + } + } + desc = DIPLOMATIC_COURT_ACCEPTANCE_INCREASE_REASON + } + + # LOW LEGITIMACY + modifier = { + desc = "LOW_LEGITIMACY_REASON" + add = -10 + scope:actor = { + has_legitimacy_flag = reduced_confederation_acceptance + } + } + modifier = { + desc = "LOW_LEGITIMACY_REASON" + add = -25 + scope:actor = { + has_legitimacy_flag = very_reduced_confederation_acceptance + } + } + + # HIGH LEGITIMACY + modifier = { + desc = "HIGH_LEGITIMACY_REASON" + add = 15 + scope:actor = { + has_legitimacy_flag = increased_confederation_acceptance + } + } + modifier = { + desc = "HIGH_LEGITIMACY_REASON" + add = 40 + scope:actor = { + has_legitimacy_flag = very_increased_confederation_acceptance + } + } + + modifier = { + add = 50 + scope:actor = { + culture = scope:recipient.culture + } + desc = "SAME_CULTURE_REASON" + } + modifier = { + add = -20 + NOT = { + scope:actor = { + culture = scope:recipient.culture + } + } + scope:actor = { + NOR = { + culture = { + any_parent_culture_or_above = { + this = scope:recipient.culture + } + } + scope:recipient.culture = { + any_parent_culture_or_above = { + this = scope:actor.culture + } + } + culture = { + has_same_culture_heritage = scope:recipient.culture + } + } + } + desc = "DIFFERENT_CULTURE_REASON" + } + # Are you using a hook? + modifier = { + trigger = { + scope:hook ?= yes + } + add = 100 + desc = LEGEND_HOOK_USED + } + # PRESTIGE + modifier = { + add = 40 + scope:prestige_send_option = yes + desc = PRESTIGE_INTERACTION_ACCEPTANCE_SEND_OPTION + } + # HERD + modifier = { + add = 40 + scope:herd_send_option = yes + desc = HERD_INTERACTION_ACCEPTANCE_SEND_OPTION + } + modifier = { + add = 20 + desc = join_confederation_neighboring_foe_tt + scope:recipient = { + confederation_neighboring_foe_trigger = { CHARACTER = scope:recipient } + } + } + #No neighbor scaring them + modifier = { + add = -30 + desc = NO_FRIGHTENING_NEIGHBOR_REASON + NOT = { + scope:recipient = { + confederation_neighboring_foe_trigger = { CHARACTER = scope:recipient } + } + } + } + #Neighbor is TERRIFYING them + modifier = { + add = 50 + desc = TERRIFYING_NEIGHBOR_REASON + scope:recipient = { + save_temporary_scope_as = confederate + any_land_neighboring_realm_with_tributaries_owner = { + top_suzerain ?= { + NOR = { + this = scope:actor + this = scope:actor.top_liege + } + confederation_worthy_foe_strength_ratio_value <= 0.25 + NOT = { is_allied_to = scope:recipient } + OR = { + highest_held_title_tier >= tier_kingdom + faith = { + faith_hostility_level = { + target = scope:recipient.faith + value >= faith_evil_level + } + } + has_trait = conqueror + has_trait = greatest_of_khans + any_owned_story = { + OR = { + story_type = story_greatest_of_khans + story_type = story_mongol_invasion + } + } + } + } + } + } + } + modifier = { + add = 100 + desc = JOINING_CONFEDERATION_WAR_REASON + scope:recipient.confederation ?= { + any_confederation_member = { + is_at_war_as_defender = yes + any_character_war = { + is_war_leader = prev + is_defender = prev + NOR = { + any_war_attacker = { + is_allied_to = scope:actor + } + any_war_attacker = { + this = scope:actor + } + any_war_defender = { + this = scope:actor + } + } + defender_war_score < 80 + } + } + } + } + + modifier = { + add = -100 + desc = join_confederation_abandoned_confederation_tt + scope:actor = { + has_variable = left_confederation + var:left_confederation ?= { + this = scope:recipient.confederation + } + } + } + modifier = { + add = -100 + desc = join_confederation_abandoned_confederation_tt + scope:actor = { + has_variable = left_confederation + var:left_confederation ?= { + this = scope:recipient.confederation + } + } + } + modifier = { + add = duchy_confederation_vassals_value_recipient + desc = TOO_MANY_CONFEDERATION_VASSALS_REASON + scope:recipient.confederation ?= { + any_confederation_member = { + count >= 6 + highest_held_title_tier >= tier_county + } + } + } + + modifier = { + add = 50 + desc = join_confederation_loyal_tt + scope:actor = { + has_trait = loyal + } + } + modifier = { + add = -50 + desc = join_confederation_disloyal_tt + scope:actor = { + has_trait = disloyal + } + } + } + + send_option = { + flag = hook + is_valid = { + scope:actor = { + has_usable_hook = scope:recipient + } + } + localization = GENERIC_SPEND_A_HOOK + } + + send_option = { # Herd + is_shown = { + scope:actor = { + government_has_flag = government_is_nomadic + exists = domicile + } + } + is_valid = { + scope:recipient = { + government_has_flag = government_is_nomadic + exists = domicile + } + scope:actor.domicile = { herd >= minor_herd_value } + } + flag = herd_send_option + localization = TRADE_HERD_FOR_BETTER_AI_ACCEPTANCE_CONFEDERATION + } + + send_option = { # Prestige + is_shown = { + always = yes + } + is_valid = { + scope:actor = { prestige >= minor_prestige_value } + } + flag = prestige_send_option + localization = TRADE_PRESTIGE_FOR_BETTER_AI_ACCEPTANCE + } + + send_options_exclusive = no + + on_accept = { + if = { + #checking that the delay hasn't made the character invalid + limit = { + scope:recipient = { + is_playable_character = yes + } + } + if = { + limit = { + scope:actor = { + has_character_flag = forming_confederation + } + } + scope:actor = { remove_character_flag = forming_confederation } + } + scope:recipient.confederation ?= { + every_confederation_member = { + limit = { is_at_war_as_defender = yes } + every_character_war = { + limit = { + is_war_leader = prev + is_defender = prev + NOR = { + any_war_attacker = { + is_allied_to = scope:actor + } + any_war_attacker = { + this = scope:actor + } + any_war_defender = { + this = scope:actor + } + } + defender_war_score < 80 + } + add_to_list = recipient_wars + } + } + } + every_in_list = { + list = recipient_wars + save_scope_as = recipient_war + primary_attacker = { + save_scope_as = attacker + } + add_defender = scope:actor + } + scope:recipient = { + save_scope_as = confederation_offerer + } + scope:actor = { + save_scope_as = confederation_accepter + } + scope:recipient.confederation = { + save_scope_as = confederation + } + show_as_tooltip = { + #If actor is top liege and offering vassaldom + scope:actor = { + custom_tooltip = join_confederation_recipient_tt + custom_tooltip = confederation_defensive_wars_tt + custom_tooltip = unlock_leave_confederation_interaction_tt + } + } + if = { + limit = { + scope:actor = { + government_has_flag = government_is_nomadic + } + } + scope:actor = { + add_character_modifier = { + modifier = mpo_confederation_member_modifier + years = 5 + } + capital_county ?= { + change_county_fertility = major_county_fertility_level_gain + } + } + } + if = { + limit = { + scope:actor = { + is_ai = no + } + } + scope:actor = { + custom_tooltip = confederation_raiding_attacking_tt + if = { + limit = { + government_has_flag = government_is_nomadic + } + custom_tooltip = confederation_restrictions_warning_tt + } + else = { + custom_tooltip = confederation_restrictions_tribe_warning_tt + } + } + } + scope:actor = { + if = { + limit = { + government_has_flag = government_is_nomadic + } + custom_tooltip = confederation_migrating_leaving_warning_tt + } + } + scope:actor = { + #Event distributor event + trigger_event = mpo_interactions_events.0030 + } + if = { + limit = { + scope:prestige_send_option = yes + } + scope:recipient = { + add_prestige = scope:actor.minor_prestige_value + } + } + if = { + limit = { + scope:herd_send_option = yes + } + scope:actor = { + pay_herd = { + target = scope:recipient + value = domicile.minor_herd_value + } + } + } + } + } + + on_decline = { + scope:actor = { + #So that the right desc is used + save_scope_as = asking_to_join + #letter response + trigger_event = mpo_interactions_events.0004 + } + } + + #ai_potential = { + # #AI rely on the offer interaction, not this one + # always = no + #} + # + #ai_will_do = { + # base = 0 + #} +} diff --git a/common/court_positions/types/00_camp_officers.txt b/common/court_positions/types/00_camp_officers.txt new file mode 100644 index 00000000..2830113a --- /dev/null +++ b/common/court_positions/types/00_camp_officers.txt @@ -0,0 +1,7131 @@ +@minspec_skill_rating = decent_skill_rating +@base_position_score = 500 +@base_candidate_score = 500 + +# Have a look at _court_positions.info for documentation + +# CAMP OFFICERS +# Second +# Quartermaster +# Armorer +# Chief Forager +# Master Thief +# Head Porter +# Head Groom +# Huntperson +# Kennelperson +# Chief Engineer +# Witness +# Person-person_haggler +# Camp Cook +# Master Bard +# Stooge +# Master of Arms +# Light Cav. Captain +# Camelry Captain +# Elephantry Captain +# Heavy Cav. Captain +# Horse Arch. Captain +# Archer Captain +# Heavy Inf. Captain +# Light Inf. Captain +# Pike Captain +# Master of Spoils +# Camp Priest + +# Regular Camp Officers ### ( Sort Order 49 - 0 ) +second_camp_officer = { + sort_order = 49 + max_available_positions = 1 + skill = diplomacy + + court_position_asset = { + animation = stressed_teacher + background = "gfx/interface/illustrations/event_scenes/ep3_camp_arid_terrain.dds" + } + + opinion = { + value = high_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { has_perk = local_arbitration_perk } + } + add = { + value = 15 + desc = court_position_local_arbitration_perk_boon + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = diplomacy + multiply = 1.5 + max = 60 + desc = court_position_skill_diplomacy + } + add = { + value = martial + multiply = 0.75 + max = 60 + desc = court_position_skill_martial + } + add = { + value = stewardship + multiply = 0.75 + max = 60 + desc = court_position_skill_stewardship + } + add = { + value = intrigue + multiply = 0.75 + max = 60 + desc = court_position_skill_intrigue + } + add = { + value = learning + multiply = 0.75 + max = 60 + desc = court_position_skill_learning + } + add = { + value = prowess + multiply = 0.75 + max = 60 + desc = court_position_skill_prowess + } + if = { + limit = { + has_trait = sadistic + } + add = 10 + desc = court_position_sadistic_trait + } + if = { + limit = { + has_trait = callous + } + add = 10 + desc = court_position_callous_trait + } + if = { + limit = { + has_trait = overseer + } + add = 20 + desc = court_position_overseer_trait + } + if = { + limit = { + has_trait = loyal + } + add = 15 + desc = court_position_loyal_trait + } + if = { + limit = { + has_trait = craven + } + add = -20 + desc = court_position_craven_trait + } + if = { + limit = { + has_trait = fickle + } + add = -20 + desc = court_position_fickle_trait + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + custom_tooltip = { + text = second_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_second_officer } + } + } + + is_shown_character = { + scope:employee = { + is_incapable = no + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = second + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = second_camp_officer + any_court_position_holder = { + type = second_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + diplomacy = 1 + martial = 1 + stewardship = 1 + intrigue = 1 + learning = 1 + prowess = 1 + } + poor = { + diplomacy = 1 + martial = 1 + stewardship = 1 + intrigue = 1 + learning = 1 + prowess = 1 + } + average = { + diplomacy = 2 + martial = 2 + stewardship = 2 + intrigue = 2 + learning = 2 + prowess = 2 + } + good = { + diplomacy = 3 + martial = 3 + stewardship = 3 + intrigue = 3 + learning = 3 + prowess = 3 + } + excellent = { + diplomacy = 5 + martial = 5 + stewardship = 5 + intrigue = 5 + learning = 5 + prowess = 5 + } + } + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + second_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + second_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + second_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = second_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +quartermaster_camp_officer = { + sort_order = 48 + max_available_positions = 1 + skill = stewardship + + court_position_asset = { + animation = writing + background = "gfx/interface/illustrations/event_scenes/ep3_military_tent.dds" + } + + opinion = { + value = high_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 10 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { has_perk = local_inspection_perk } + } + add = { + value = 10 + desc = court_position_local_inspection_perk_boon + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = stewardship + multiply = 2.5 + max = 60 + desc = court_position_skill_stewardship + } + if = { + limit = { + has_trait = generous + } + add = { + value = -20 + desc = court_position_generous_trait + } + } + if = { + limit = { + has_trait = logistician + } + add = { + value = 20 + desc = court_position_logistician_trait + } + } + if = { + limit = { + has_trait = greedy + } + add = { + value = 10 + desc = court_position_greedy_trait + } + } + if = { + limit = { + has_trait = avaricious + } + add = { + value = 20 + desc = court_position_avaricious_trait + } + } + if = { + limit = { + has_trait = administrator + } + add = { + value = 20 + desc = court_position_administrator_trait + } + } + if = { + limit = { + has_trait = profligate + } + add = -50 + desc = court_position_profligate_trait + } + if = { + limit = { + has_trait = improvident + } + add = -50 + desc = court_position_improvident_trait + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + OR = { + custom_tooltip = { + text = quartermaster_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_quartermaster_officer } + } + has_perk = local_inspection_perk + } + } + + is_shown_character = { + scope:employee = { + is_incapable = no + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = quartermaster + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = quartermaster_camp_officer + any_court_position_holder = { + type = quartermaster_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + supply_capacity_mult = 0.1 + provisions_loss_mult = -0.1 + } + poor = { + supply_capacity_mult = 0.15 + provisions_loss_mult = -0.15 + } + average = { + supply_capacity_mult = 0.25 + provisions_loss_mult = -0.25 + } + good = { + supply_capacity_mult = 0.3 + provisions_loss_mult = -0.3 + } + excellent = { + supply_capacity_mult = 0.5 + provisions_loss_mult = -0.5 + } + } + + #custom_employer_modifier_description = quartermaster_camp_officer_employer_custom_effect_description + base_employer_court_modifier = { + supply_capacity_mult = 0.2 + provisions_capacity_add = 500 + } + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + quartermaster_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + quartermaster_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + quartermaster_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = quartermaster_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +armorer_camp_officer = { + sort_order = 47 + max_available_positions = 1 + skill = stewardship + + court_position_asset = { + animation = throne_room_one_handed_passive_3 + background = "gfx/interface/illustrations/event_scenes/ep3_military_tent.dds" + } + + opinion = { + value = high_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = stewardship + multiply = 2.5 + max = 60 + desc = court_position_skill_stewardship + } + add = { + value = learning + multiply = 2 + max = 60 + desc = court_position_skill_learning + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + custom_tooltip = { + text = armorer_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_armorer_officer } + } + } + + is_shown_character = { + scope:employee = { + is_incapable = no + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = armorer + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + exists = dynasty + house = prev.house + } + } + desc = inner_circle_salary_mod + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + maa_toughness_mult = 0.02 + } + poor = { + maa_toughness_mult = 0.05 + } + average = { + maa_toughness_mult = 0.2 + } + good = { + maa_toughness_mult = 0.3 + } + excellent = { + maa_toughness_mult = 0.5 + } + } + + base_employer_court_modifier = { + maa_toughness_mult = 0.1 + } + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + armorer_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + armorer_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + armorer_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = armorer_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +chief_forager_camp_officer = { + sort_order = 46 + max_available_positions = 1 + skill = learning + + court_position_asset = { + animation = survey_staff + background = "gfx/interface/illustrations/event_scenes/forest_pine.dds" + } + + opinion = { + value = high_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = prowess + max = 60 + desc = court_position_skill_prowess + } + add = { + value = learning + multiply = 2.5 + max = 50 + desc = court_position_skill_learning + } + if = { + limit = { + has_trait = lifestyle_herbalist + } + add = { + value = 5 + desc = court_position_herbalist_trait + } + } + if = { + limit = { + has_trait = lifestyle_hunter + } + add = { + value = 5 + desc = court_position_hunter_1_trait + } + } + if = { + limit = { + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 75 + } + } + add = { + value = 40 + desc = court_position_traveler_trait_experienced + } + } + else_if = { + limit = { + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 75 + } + } + add = { + value = 40 + desc = court_position_traveler_trait_experienced_danger + } + } + else_if = { + limit = { + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 50 + } + } + add = { + value = 30 + desc = court_position_traveler_trait_experienced + } + } + else_if = { + limit = { + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 50 + } + } + add = { + value = 30 + desc = court_position_traveler_trait_experienced_danger + } + } + else_if = { + limit = { + has_trait = lifestyle_traveler + } + add = { + value = 20 + desc = court_position_traveler_trait + } + } + if = { + limit = { + has_character_modifier = ep2_beastmaster_modifier + } + add = { + value = 30 + desc = court_position_beastmaster_modifier + } + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + custom_tooltip = { + text = chief_forager_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_chief_forager_officer } + } + } + + is_shown_character = { + scope:employee = { + is_incapable = no + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = chief_forager + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = chief_forager_camp_officer + any_court_position_holder = { + type = chief_forager_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + supply_duration = 0.1 + provisions_gain_mult = 0.1 + } + poor = { + supply_duration = 0.15 + provisions_gain_mult = 0.15 + } + average = { + supply_duration = 0.25 + provisions_gain_mult = 0.25 + } + good = { + supply_duration = 0.4 + provisions_gain_mult = 0.4 + } + excellent = { + supply_duration = 0.66 + provisions_gain_mult = 0.66 + } + } + + custom_employer_modifier_description = chief_forager_camp_officer_employer_custom_effect_description + + base_employer_court_modifier = { + supply_duration = 0.2 + } + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + chief_forager_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + chief_forager_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + chief_forager_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = chief_forager_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_position_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +master_thief_camp_officer = { + sort_order = 45 + max_available_positions = 1 + skill = intrigue + + court_position_asset = { + animation = hunting_knife_start + background = "gfx/interface/illustrations/event_scenes/ep3_campfire.dds" + } + + opinion = { + value = high_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = intrigue + multiply = 2.5 + max = 60 + desc = court_position_skill_intrigue + } + add = { + value = prowess + multiply = 2 + max = 50 + desc = court_position_skill_prowess + } + if = { + limit = { + has_trait = schemer + } + add = { + value = 20 + desc = court_position_schemer_trait + } + } + if = { + limit = { + has_trait = deceitful + } + add = { + value = 10 + desc = court_position_deceitful_trait + } + } + if = { + limit = { + has_trait = honest + } + add = { + value = -20 + desc = court_position_honest_trait + } + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + government_has_flag = government_is_landless_adventurer + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + government_has_flag = government_is_landless_adventurer + } + custom_tooltip = { + text = master_thief_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_master_thief_officer } + } + } + + is_shown_character = { + scope:employee = { + is_incapable = no + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = master_thief + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = master_thief_camp_officer + any_court_position_holder = { + type = master_thief_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + owned_scheme_secrecy_add = 3 + } + poor = { + owned_scheme_secrecy_add = 6 + } + average = { + owned_scheme_secrecy_add = 10 + } + good = { + owned_scheme_secrecy_add = 15 + } + excellent = { + owned_scheme_secrecy_add = 25 + } + } + + #unlocking Steal Artifact interaction, see start_stealing_back_artifact in 00_artifact_interactions.txt + custom_employer_modifier_description = master_thief_camp_officer_employer_custom_effect_description + + base_employer_court_modifier = { + domicile_monthly_gold_add = 0.25 + } + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + master_thief_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + master_thief_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + master_thief_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = master_thief_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +head_porter_camp_officer = { + sort_order = 44 + max_available_positions = 1 + skill = martial + + court_position_asset = { + animation = hero_flex + background = "gfx/interface/illustrations/event_scenes/ep2_village_festival_western.dds" + } + + opinion = { + value = high_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { has_perk = local_inspection_perk } + } + add = { + value = 10 + desc = court_position_local_inspection_perk_boon + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = martial + multiply = 2.5 + max = 60 + desc = court_position_skill_martial + } + add = { + value = stewardship + max = 60 + desc = court_position_skill_stewardship + } + if = { + limit = { + has_trait = logistician + } + add = 15 + desc = court_position_logistician_trait + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + OR = { + custom_tooltip = { + text = head_porter_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_head_porter_officer } + } + has_perk = local_inspection_perk + } + } + + is_shown_character = { + scope:employee = { + is_incapable = no + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = head_porter + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = head_porter_camp_officer + any_court_position_holder = { + type = head_porter_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + supply_capacity_add = 5 + provisions_loss_mult = -0.02 + } + poor = { + supply_capacity_add = 15 + provisions_loss_mult = -0.04 + } + average = { + supply_capacity_add = 25 + provisions_loss_mult = -0.08 + } + good = { + supply_capacity_add = 35 + provisions_loss_mult = -0.16 + + } + excellent = { + supply_capacity_add = 50 + provisions_loss_mult = -0.32 + } + } + + base_employer_court_modifier = { + provisions_capacity_add = 500 + } + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + head_porter_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + head_porter_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + head_porter_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = head_porter_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +head_groom_camp_officer = { + sort_order = 43 + max_available_positions = 1 + skill = stewardship + + court_position_asset = { + animation = throne_room_two_handed_passive_1 + background = "gfx/interface/illustrations/event_scenes/steppe.dds" + } + + opinion = { + value = high_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = learning + multiply = 1 + max = 50 + desc = court_position_skill_learning + } + add = { + value = stewardship + multiply = 1.3 + max = 50 + desc = court_position_skill_stewardship + } + + # SPEED + add = { + value = travel_leader_speed + multiply = 1.8 + subtract = 10 + max = 50 + min = 0 + desc = court_position_speed + } + + # SAFETY + add = { + value = travel_leader_safety + multiply = 1.8 + subtract = 10 + max = 50 + min = 0 + desc = court_position_safety + } + + # POSITIVES + if = { + limit = { + has_trait = brave + } + add = { + value = 5 + desc = court_position_brave_trait + } + } + if = { + limit = { + has_trait = lifestyle_herbalist + } + add = { + value = 5 + desc = court_position_herbalist_trait + } + } + if = { + limit = { + has_trait = lifestyle_hunter + } + add = { + value = 5 + desc = court_position_hunter_1_trait + } + } + if = { + limit = { + has_trait = diligent + } + add = { + value = 5 + desc = court_position_diligent_trait + } + } + if = { + limit = { + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 75 + } + } + add = { + value = 40 + desc = court_position_traveler_trait_experienced + } + } + else_if = { + limit = { + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 75 + } + } + add = { + value = 40 + desc = court_position_traveler_trait_experienced_danger + } + } + else_if = { + limit = { + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 50 + } + } + add = { + value = 30 + desc = court_position_traveler_trait_experienced + } + } + else_if = { + limit = { + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 50 + } + } + add = { + value = 30 + desc = court_position_traveler_trait_experienced_danger + } + } + else_if = { + limit = { + has_trait = lifestyle_traveler + } + add = { + value = 20 + desc = court_position_traveler_trait + } + } + if = { + limit = { + has_character_modifier = ep2_beastmaster_modifier + } + add = { + value = 30 + desc = court_position_beastmaster_modifier + } + } + + # NEGATIVES + if = { + limit = { + has_trait = craven + } + add = { + value = -20 + desc = court_position_craven_trait + } + } + if = { + limit = { + has_trait = lazy + } + add = { + value = -10 + desc = court_position_lazy_trait + } + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + custom_tooltip = { + text = head_groom_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_head_groom_officer } + } + } + + is_shown_character = { + scope:employee = { + is_incapable = no + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = head_groom + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = head_groom_camp_officer + any_court_position_holder = { + type = head_groom_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + character_travel_speed = 5 + } + poor = { + character_travel_speed = 5 + movement_speed = 0.1 + } + average = { + character_travel_speed = 10 + movement_speed = 0.15 + } + good = { + character_travel_speed = 10 + movement_speed = 0.2 + } + excellent = { + character_travel_speed = 15 + movement_speed = 0.25 + } + } + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + head_groom_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + head_groom_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + head_groom_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = head_groom_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_position_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +huntperson_camp_officer = { + sort_order = 42 + max_available_positions = 1 + skill = prowess + + court_position_asset = { + animation = hunting_carcass_start + background = "gfx/interface/illustrations/event_scenes/forest.dds" + } + + opinion = { + value = regular_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = prowess + multiply = 2 + max = 50 + desc = court_position_skill_prowess + } + add = { + value = learning + multiply = 1.5 + max = 50 + desc = court_position_skill_learning + } + if = { + limit = { + hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 100 } + } + add = { + value = 40 + desc = court_position_hunter_3_trait + } + } + else_if = { + limit = { + hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 50 } + } + add = { + value = 30 + desc = court_position_hunter_2_trait + } + } + else_if = { + limit = { has_trait = lifestyle_hunter } + add = { + value = 20 + desc = court_position_hunter_1_trait + } + } + if = { + limit = { has_trait = brave } + add = { + value = 5 + desc = court_position_brave_trait + } + } + if = { + limit = { has_trait = craven } + add = { + value = -10 + desc = court_position_craven_trait + } + } + if = { + limit = { + has_character_modifier = ep2_beastmaster_modifier + } + add = { + value = 10 + desc = court_position_beastmaster_modifier + } + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + custom_tooltip = { + text = huntperson_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_huntperson_officer } + } + } + + is_shown_character = { + scope:employee = { + is_incapable = no + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = huntperson + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = huntperson_camp_officer + any_court_position_holder = { + type = huntperson_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + archers_damage_mult = 0.02 + } + poor = { + archers_damage_mult = 0.05 + } + average = { + archers_damage_mult = 0.2 + } + good = { + archers_damage_mult = 0.3 + } + excellent = { + archers_damage_mult = 0.5 + } + } + + #Improves Martial Education outcomes - see huntperson_camp_officer_education_boost_effect in 00_education_effects + custom_employer_modifier_description = huntperson_camp_officer_employer_custom_effect_description + + modifier = { + monthly_prestige = 0.1 + hills_provisions_use_mult = -0.15 + mountains_provisions_use_mult = -0.15 + jungle_provisions_use_mult = -0.15 + forest_provisions_use_mult = -0.15 + taiga_provisions_use_mult = -0.15 + wetlands_provisions_use_mult = -0.15 + floodplains_provisions_use_mult = -0.15 + drylands_provisions_use_mult = -0.15 + } + + on_court_position_received = { + huntperson_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + huntperson_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + huntperson_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = huntperson_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +kennelperson_camp_officer = { + sort_order = 41 + max_available_positions = 1 + skill = martial + + court_position_asset = { + animation = schadenfreude + background = "gfx/interface/illustrations/event_scenes/ep2_dog_kennels.dds" + } + + opinion = { + value = regular_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = martial + multiply = 2.5 + max = 60 + desc = court_position_skill_martial + } + add = { + value = prowess + multiply = 1.5 + max = 60 + desc = court_position_skill_prowess + } + if = { + limit = { + OR = { + has_character_flag = dog_person + any_owned_story = { type = story_cycle_pet_dog } + has_character_modifier = dog_story_modifier + } + } + add = 20 + } + if = { + limit = { + OR = { + has_character_flag = cat_person + any_owned_story = { type = story_cycle_pet_cat } + has_character_modifier = cat_story_modifier + } + } + add = -20 + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + custom_tooltip = { + text = kennelperson_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_kennelperson_officer } + } + } + + is_shown_character = { + scope:employee = { + is_incapable = no + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = kennelperson + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = kennelperson_camp_officer + any_court_position_holder = { + type = kennelperson_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + knight_effectiveness_mult = 0.05 + } + poor = { + knight_effectiveness_mult = 0.1 + } + average = { + knight_effectiveness_mult = 0.15 + } + good = { + knight_effectiveness_mult = 0.2 + } + excellent = { + knight_effectiveness_mult = 0.33 + } + } + + #unlocking Toss to Dogs execution method, see execute_prisoner_interaction in 00_prison_interactions.txt + custom_employer_modifier_description = kennelperson_camp_officer_employer_custom_effect_description + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + kennelperson_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + kennelperson_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + kennelperson_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = kennelperson_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +chief_engineer_camp_officer = { + sort_order = 40 + max_available_positions = 1 + skill = learning + + court_position_asset = { + animation = page_flipping + background = "gfx/interface/illustrations/event_scenes/genericcamp.dds" + } + + opinion = { + value = high_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = learning + multiply = 2.5 + max = 60 + desc = court_position_skill_learning + } + add = { + value = martial + multiply = 1.5 + max = 60 + desc = court_position_skill_martial + } + if = { + limit = { + has_trait = strategist + } + add = 15 + } + if = { + limit = { + has_perk = engineered_for_destruction_perk + } + add = 15 + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + custom_tooltip = { + text = chief_engineer_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_chief_engineer_officer } + } + } + + is_shown_character = { + scope:employee = { + is_incapable = no + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = chief_engineer + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = chief_engineer_camp_officer + any_court_position_holder = { + type = chief_engineer_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + maa_siege_value_mult = 0.1 + siege_morale_loss = 0.1 + } + poor = { + maa_siege_value_mult = 0.15 + siege_morale_loss = 0.15 + } + average = { + maa_siege_value_mult = 0.25 + siege_morale_loss = 0.2 + } + good = { + maa_siege_value_mult = 0.4 + siege_morale_loss = 0.25 + } + excellent = { + maa_siege_value_mult = 0.66 + siege_morale_loss = 0.33 + } + } + + #custom_employer_modifier_description = chief_engineer_camp_officer_employer_custom_effect_description + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + chief_engineer_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + chief_engineer_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + chief_engineer_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = chief_engineer_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +witness_camp_officer = { + sort_order = 39 + max_available_positions = 1 + skill = diplomacy + + court_position_asset = { + animation = wedding_objection_start + background = "gfx/interface/illustrations/event_scenes/ep2_feast_steppe.dds" + } + + opinion = { + value = regular_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = diplomacy + multiply = 2.5 + max = 60 + desc = court_position_skill_diplomacy + } + if = { + limit = { + has_trait = diplomat + } + add = 20 + desc = court_position_diplomat_trait + } + if = { + limit = { + has_trait = trusting + } + add = 10 + desc = court_position_trusting_trait + } + if = { + limit = { + has_trait = loyal + } + add = 10 + desc = court_position_loyal_trait + } + if = { + limit = { + has_trait = gregarious + } + add = 10 + desc = court_position_gregarious_trait + } + if = { + limit = { + has_trait = humble + } + add = 10 + desc = court_position_humble_trait + } + if = { + limit = { + has_trait = flagellant + } + add = 20 + desc = court_position_flagellant_trait + } + if = { + limit = { + has_trait = arrogant + } + add = -20 + desc = court_position_arrogant_trait + } + if = { + limit = { + has_trait = shy + } + add = -20 + desc = court_position_shy_trait + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + government_has_flag = government_is_landless_adventurer + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + government_has_flag = government_is_landless_adventurer + } + custom_tooltip = { + text = witness_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_witness_officer } + } + } + + is_shown_character = { + scope:employee = { + is_incapable = no + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = witness + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = witness_camp_officer + any_court_position_holder = { + type = witness_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + monthly_prestige = 0.05 + } + poor = { + monthly_prestige = 0.1 + } + average = { + monthly_prestige = 0.2 + } + good = { + monthly_prestige = 0.4 + } + excellent = { + monthly_prestige = 1 + } + } + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + witness_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + witness_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + witness_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = witness_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +person_haggler_camp_officer = { + sort_order = 38 + max_available_positions = 1 + skill = diplomacy + + court_position_asset = { + animation = wedding_objection_start + background = "gfx/interface/illustrations/event_scenes/fp1_tribal_prison.dds" + } + + opinion = { + value = regular_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = diplomacy + multiply = 1.5 + max = 60 + desc = court_position_skill_diplomacy + } + add = { + value = intrigue + multiply = 0.5 + max = 60 + desc = court_position_skill_intrigue + } + add = { + value = stewardship + multiply = 0.5 + max = 60 + desc = court_position_skill_stewardship + } + add = { + value = prowess + multiply = 0.5 + max = 60 + desc = court_position_skill_prowess + } + if = { + limit = { + has_trait = deceitful + } + add = { + value = 10 + desc = court_position_deceitful_trait + } + } + if = { + limit = { + has_trait = gregarious + } + add = { + value = 10 + desc = court_position_gregarious_trait + } + } + if = { + limit = { + has_trait = patient + } + add = { + value = 10 + desc = court_position_patient_trait + } + } + if = { + limit = { + has_trait = honest + } + add = { + value = -20 + desc = court_position_honest_trait + } + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + government_has_flag = government_is_landless_adventurer + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + government_has_flag = government_is_landless_adventurer + } + custom_tooltip = { + text = person_haggler_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_person_haggler_officer } + } + } + + is_shown_character = { + scope:employee = { + is_incapable = no + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = person_haggler + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = person_haggler_camp_officer + any_court_position_holder = { + type = person_haggler_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + + } + poor = { + + } + average = { + + } + good = { + + } + excellent = { + + } + } + + custom_employer_modifier_description = person_haggler_camp_officer_employer_custom_effect_description + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + person_haggler_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + person_haggler_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + person_haggler_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = person_haggler_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +camp_cook_camp_officer = { + sort_order = 37 + max_available_positions = 1 + skill = intrigue + + court_position_asset = { + animation = drink + background = "gfx/interface/illustrations/event_scenes/ep3_campfire.dds" + } + + opinion = { + value = regular_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = intrigue + multiply = 2.5 + max = 60 + desc = court_position_skill_intrigue + } + if = { + limit = { + has_trait = gluttonous + } + add = { + value = 25 + desc = court_position_gluttonous_trait + } + } + if = { + limit = { + has_trait = comfort_eater + } + add = { + value = 15 + desc = court_position_comfort_eater_trait + } + } + if = { + limit = { + has_trait = lifestyle_herbalist + } + add = { + value = 15 + desc = court_position_herbalist_trait + } + } + if = { + limit = { + has_trait = lifestyle_reveler + } + add = { + value = 20 + desc = court_position_reveler_trait + } + } + if = { + limit = { + has_trait = inappetetic + } + add = { + value = -50 + desc = court_position_inappetetic_trait + } + } + if = { + limit = { + culture = { has_cultural_parameter = characters_are_better_food_tasters } + } + add = { + value = 20 + desc = court_position_tradition_culinary_art + } + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + government_has_flag = government_is_landless_adventurer + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + government_has_flag = government_is_landless_adventurer + } + custom_tooltip = { + text = camp_cook_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_camp_cook_officer } + } + } + + is_shown_character = { + scope:employee = { + is_incapable = no + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = camp_cook + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = camp_cook_camp_officer + any_court_position_holder = { + type = camp_cook_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + enemy_hostile_scheme_success_chance_add = -3 + } + poor = { + enemy_hostile_scheme_success_chance_add = -5 + } + average = { + enemy_hostile_scheme_success_chance_add = -8 + } + good = { + enemy_hostile_scheme_success_chance_add = -12 + } + excellent = { + enemy_hostile_scheme_success_chance_add = -20 + } + } + + base_employer_court_modifier = { + enemy_hostile_scheme_success_chance_add = -5 + } + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + camp_cook_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + camp_cook_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + camp_cook_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = camp_cook_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +master_bard_camp_officer = { + sort_order = 36 + max_available_positions = 1 + skill = diplomacy + + court_position_asset = { + animation = lute_active + background = "gfx/interface/illustrations/event_scenes/ep3_adventurer_background.dds" + } + + opinion = { + value = high_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = diplomacy + multiply = 2.5 + max = 60 + desc = court_position_skill_diplomacy + } + add = { + value = learning + multiply = 1 + max = 50 + desc = court_position_skill_learning + } + add = court_position_aptitude_high_penalty_value + add = court_position_aptitude_low_penalty_value + if = { + limit = { + has_trait = gregarious + } + add = { + value = 15 + desc = court_position_gregarious_trait + } + } + if = { + limit = { + has_trait = lifestyle_poet + } + add = { + value = 30 + desc = court_position_poet_trait + } + } + if = { + limit = { + has_trait = shy + } + add = { + value = -10 + desc = court_position_shy_trait + } + } + if = { + limit = { + has_trait = lifestyle_reveler + } + add = { + value = 20 + desc = court_position_reveler_trait + } + } + if = { + limit = { + has_trait = seducer + } + add = { + value = 20 + desc = court_position_seducer_trait + } + } + if = { #Cultural Tradition that improves the aptitude of characters of that culture + limit = { + culture = { has_cultural_parameter = characters_are_better_court_musicians } + } + add = { + value = 20 + desc = court_position_tradition_music_theory + } + } + if = { #Cultural Tradition that improves the aptitude of characters of that culture + limit = { + culture = { has_cultural_parameter = characters_are_better_court_poets } + } + add = { + value = 20 + desc = court_position_tradition_poetry + } + } + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + government_has_flag = government_is_landless_adventurer + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + government_has_flag = government_is_landless_adventurer + } + custom_tooltip = { + text = master_bard_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_master_bard_officer } + } + } + + is_shown_character = { + scope:employee = { + is_incapable = no + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = master_bard + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = master_bard_camp_officer + any_court_position_holder = { + type = master_bard_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + monthly_prestige = 0.05 + } + poor = { + monthly_prestige = 0.1 + } + average = { + monthly_prestige = 0.2 + } + good = { + monthly_prestige = 0.25 + } + excellent = { + monthly_prestige = 0.3 + } + } + + custom_employer_modifier_description = master_bard_camp_officer_employer_custom_effect_description + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + master_bard_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + master_bard_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + master_bard_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = master_bard_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +stooge_camp_officer = { + sort_order = 35 + max_available_positions = 1 + skill = learning + + court_position_asset = { + animation = anger + background = "gfx/interface/illustrations/event_scenes/bp1_bonfire.dds" + } + + opinion = { + value = -5 + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = { + value = 100 + desc = BASE + } + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = learning + multiply = -2 + max = 100 + desc = court_position_skill_learning + } + add = { + value = sum_of_all_skills_value + multiply = -1 + max = 100 + desc = court_position_skill_all + } + if = { + limit = { + employer ?= { domicile ?= { has_domicile_parameter = camp_improves_stooge_officer } } + } + multiply = { + value = 1.25 + desc = court_position_improved_by_camp_fire_capering_fools + } + } + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + government_has_flag = government_is_landless_adventurer + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + government_has_flag = government_is_landless_adventurer + } + } + + is_shown_character = { + scope:employee = { + is_incapable = no + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = stooge + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = stooge_camp_officer + any_court_position_holder = { + type = stooge_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + custom_employer_modifier_description = stooge_employer_custom_effect_description + + modifier = { + monthly_prestige = -0.25 + } + + on_court_position_received = { + stooge_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + stooge_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + stooge_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = stooge_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +master_of_arms_camp_officer = { + sort_order = 34 + max_available_positions = 1 + skill = martial + + court_position_asset = { + animation = marshal_random_weapon + background = "gfx/interface/illustrations/event_scenes/ep3_military_tent.dds" + } + + opinion = { + value = high_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = martial + multiply = 2.5 + max = 60 + desc = court_position_skill_martial + } + add = { + value = prowess + max = 60 + desc = court_position_skill_prowess + } + if = { + limit = { + has_trait = overseer + } + add = { + value = 20 + desc = court_position_overseer_trait + } + } + if = { + limit = { + any_character_trait = { + has_trait_category = commander + } + } + add = { + value = 10 + desc = court_position_commander_traits + } + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + custom_tooltip = { + text = master_of_arms_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_master_of_arms_officer } + } + } + + is_shown_character = { + scope:employee = { + can_be_combatant_based_on_gender_trigger = { + ARMY_OWNER = this + } + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = master_of_arms + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = master_of_arms_camp_officer + any_court_position_holder = { + type = master_of_arms_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + maa_toughness_mult = 0.01 + maa_damage_mult = 0.02 + } + poor = { + maa_toughness_mult = 0.025 + maa_damage_mult = 0.05 + } + average = { + maa_toughness_mult = 0.1 + maa_damage_mult = 0.2 + } + good = { + maa_toughness_mult = 0.15 + maa_damage_mult = 0.3 + } + excellent = { + maa_toughness_mult = 0.2 + maa_damage_mult = 0.4 + } + } + + custom_employer_modifier_description = master_of_arms_employer_custom_effect_description + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + master_of_arms_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + master_of_arms_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + master_of_arms_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = master_of_arms_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +light_cavalry_captain_camp_officer = { + sort_order = 33 + max_available_positions = 1 + skill = martial + + court_position_asset = { + animation = throne_room_two_handed_passive_1 + background = "gfx/interface/illustrations/event_scenes/bp1_plains.dds" + } + + opinion = { + value = regular_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = martial + multiply = 2.5 + max = 60 + desc = court_position_skill_martial + } + add = { + value = prowess + max = 60 + desc = court_position_skill_prowess + } + if = { + limit = { + has_trait = strategist + } + add = { + value = 20 + desc = court_position_strategist_trait + } + } + if = { + limit = { + any_character_trait = { + has_trait_category = commander + } + } + add = { + value = 10 + desc = court_position_commander_traits + } + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + custom_tooltip = { + text = light_cavalry_captain_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_light_cavalry_captain_officer } + } + } + + is_shown_character = { + scope:employee = { + can_be_combatant_based_on_gender_trigger = { + ARMY_OWNER = this + } + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = light_cavalry_captain + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = light_cavalry_captain_camp_officer + any_court_position_holder = { + type = light_cavalry_captain_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + light_cavalry_damage_mult = 0.05 + light_cavalry_pursuit_mult = 0.05 + } + poor = { + light_cavalry_damage_mult = 0.1 + light_cavalry_pursuit_mult = 0.1 + + } + average = { + light_cavalry_damage_mult = 0.3 + light_cavalry_pursuit_mult = 0.3 + + } + good = { + light_cavalry_damage_mult = 0.4 + light_cavalry_pursuit_mult = 0.4 + + } + excellent = { + light_cavalry_damage_mult = 0.5 + light_cavalry_pursuit_mult = 0.5 + } + } + + modifier = { + monthly_prestige = 0.1 + } + + search_for_courtier = { + + } + + on_court_position_received = { + light_cavalry_captain_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + light_cavalry_captain_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + light_cavalry_captain_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = light_cavalry_captain_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +camelry_captain_camp_officer = { + sort_order = 32 + max_available_positions = 1 + skill = martial + + court_position_asset = { + animation = throne_room_two_handed_passive_1 + background = "gfx/interface/illustrations/event_scenes/bp1_desert.dds" + } + + opinion = { + value = regular_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = martial + multiply = 2.5 + max = 60 + desc = court_position_skill_martial + } + add = { + value = prowess + max = 60 + desc = court_position_skill_prowess + } + if = { + limit = { + has_trait = strategist + } + add = { + value = 20 + desc = court_position_strategist_trait + } + } + if = { + limit = { + any_character_trait = { + has_trait_category = commander + } + } + add = { + value = 10 + desc = court_position_commander_traits + } + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + custom_tooltip = { + text = camelry_captain_captain_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_camelry_captain_officer } + } + } + + is_shown_character = { + scope:employee = { + can_be_combatant_based_on_gender_trigger = { + ARMY_OWNER = this + } + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = camelry_captain + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = camelry_captain_camp_officer + any_court_position_holder = { + type = camelry_captain_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + camel_cavalry_damage_mult = 0.05 + camel_cavalry_pursuit_mult = 0.05 + } + poor = { + camel_cavalry_damage_mult = 0.1 + camel_cavalry_pursuit_mult = 0.1 + + } + average = { + camel_cavalry_damage_mult = 0.3 + camel_cavalry_pursuit_mult = 0.3 + + } + good = { + camel_cavalry_damage_mult = 0.4 + camel_cavalry_pursuit_mult = 0.4 + + } + excellent = { + camel_cavalry_damage_mult = 0.5 + camel_cavalry_pursuit_mult = 0.5 + } + } + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + camelry_captain_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + camelry_captain_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + camelry_captain_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = camelry_captain_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +elephantry_captain_camp_officer = { + sort_order = 31 + max_available_positions = 1 + skill = martial + + court_position_asset = { + animation = throne_room_two_handed_passive_1 + background = "gfx/interface/illustrations/event_scenes/bp1_jungle.dds" + } + + opinion = { + value = regular_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = martial + multiply = 2.5 + max = 60 + desc = court_position_skill_martial + } + add = { + value = prowess + max = 60 + desc = court_position_skill_prowess + } + if = { + limit = { + has_trait = strategist + } + add = { + value = 20 + desc = court_position_strategist_trait + } + } + if = { + limit = { + any_character_trait = { + has_trait_category = commander + } + } + add = { + value = 10 + desc = court_position_commander_traits + } + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + custom_tooltip = { + text = elephantry_captain_captain_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_elephantry_captain_officer } + } + } + + is_shown_character = { + scope:employee = { + can_be_combatant_based_on_gender_trigger = { + ARMY_OWNER = this + } + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = elephantry_captain + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = elephantry_captain_camp_officer + any_court_position_holder = { + type = elephantry_captain_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + elephant_cavalry_damage_mult = 0.05 + elephant_cavalry_pursuit_mult = 0.05 + elephant_cavalry_toughness_mult = 0.025 + } + poor = { + elephant_cavalry_damage_mult = 0.1 + elephant_cavalry_pursuit_mult = 0.1 + elephant_cavalry_toughness_mult = 0.05 + + } + average = { + elephant_cavalry_damage_mult = 0.15 + elephant_cavalry_pursuit_mult = 0.15 + elephant_cavalry_toughness_mult = 0.075 + + } + good = { + elephant_cavalry_damage_mult = 0.2 + elephant_cavalry_pursuit_mult = 0.2 + elephant_cavalry_toughness_mult = 0.1 + + } + excellent = { + elephant_cavalry_damage_mult = 0.25 + elephant_cavalry_pursuit_mult = 0.25 + elephant_cavalry_toughness_mult = 0.125 + } + } + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + elephantry_captain_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + elephantry_captain_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + elephantry_captain_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = elephantry_captain_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +heavy_cavalry_captain_camp_officer = { + sort_order = 30 + max_available_positions = 1 + skill = martial + + court_position_asset = { + animation = throne_room_two_handed_passive_1 + background = "gfx/interface/illustrations/event_scenes/battlefield.dds" + } + + opinion = { + value = regular_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = martial + multiply = 2.5 + max = 60 + desc = court_position_skill_martial + } + add = { + value = prowess + max = 60 + desc = court_position_skill_prowess + } + if = { + limit = { + has_trait = strategist + } + add = { + value = 20 + desc = court_position_strategist_trait + } + } + if = { + limit = { + any_character_trait = { + has_trait_category = commander + } + } + add = { + value = 10 + desc = court_position_commander_traits + } + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + custom_tooltip = { + text = heavy_cavalry_captain_captain_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_heavy_cavalry_captain_officer } + } + } + + is_shown_character = { + scope:employee = { + can_be_combatant_based_on_gender_trigger = { + ARMY_OWNER = this + } + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = heavy_cavalry_captain + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = heavy_cavalry_captain_camp_officer + any_court_position_holder = { + type = heavy_cavalry_captain_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + heavy_cavalry_damage_mult = 0.05 + heavy_cavalry_pursuit_mult = 0.05 + } + poor = { + heavy_cavalry_damage_mult = 0.1 + heavy_cavalry_pursuit_mult = 0.1 + + } + average = { + heavy_cavalry_damage_mult = 0.3 + heavy_cavalry_pursuit_mult = 0.3 + + } + good = { + heavy_cavalry_damage_mult = 0.4 + heavy_cavalry_pursuit_mult = 0.4 + + } + excellent = { + heavy_cavalry_damage_mult = 0.5 + heavy_cavalry_pursuit_mult = 0.5 + } + } + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + heavy_cavalry_captain_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + heavy_cavalry_captain_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + heavy_cavalry_captain_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = heavy_cavalry_captain_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +horse_archer_captain_camp_officer = { + sort_order = 29 + max_available_positions = 1 + skill = martial + + court_position_asset = { + animation = hunting_shortbow_aim_arrow_default + background = "gfx/interface/illustrations/event_scenes/steppe.dds" + } + + opinion = { + value = regular_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = martial + multiply = 2.5 + max = 60 + desc = court_position_skill_martial + } + add = { + value = prowess + max = 60 + desc = court_position_skill_prowess + } + if = { + limit = { + has_trait = strategist + } + add = { + value = 20 + desc = court_position_strategist_trait + } + } + if = { + limit = { + any_character_trait = { + has_trait_category = commander + } + } + add = { + value = 10 + desc = court_position_commander_traits + } + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + custom_tooltip = { + text = horse_archer_captain_captain_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_horse_archer_captain_officer } + } + } + + is_shown_character = { + scope:employee = { + can_be_combatant_based_on_gender_trigger = { + ARMY_OWNER = this + } + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = horse_archer_captain + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = horse_archer_captain_camp_officer + any_court_position_holder = { + type = horse_archer_captain_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + archer_cavalry_damage_mult = 0.05 + archer_cavalry_pursuit_mult = 0.05 + } + poor = { + archer_cavalry_damage_mult = 0.1 + archer_cavalry_pursuit_mult = 0.1 + + } + average = { + archer_cavalry_damage_mult = 0.3 + archer_cavalry_pursuit_mult = 0.3 + + } + good = { + archer_cavalry_damage_mult = 0.4 + archer_cavalry_pursuit_mult = 0.4 + + } + excellent = { + archer_cavalry_damage_mult = 0.5 + archer_cavalry_pursuit_mult = 0.5 + } + } + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + horse_archer_captain_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + horse_archer_captain_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + horse_archer_captain_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = horse_archer_captain_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +archer_captain_camp_officer = { + sort_order = 28 + max_available_positions = 1 + skill = martial + + court_position_asset = { + animation = bow_idle + background = "gfx/interface/illustrations/event_scenes/ep2_travel_hills.dds" + } + + opinion = { + value = regular_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = martial + multiply = 2.5 + max = 60 + desc = court_position_skill_martial + } + add = { + value = prowess + max = 60 + desc = court_position_skill_prowess + } + if = { + limit = { + has_trait = strategist + } + add = { + value = 20 + desc = court_position_strategist_trait + } + } + if = { + limit = { + any_character_trait = { + has_trait_category = commander + } + } + add = { + value = 10 + desc = court_position_commander_traits + } + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + custom_tooltip = { + text = archer_captain_captain_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_archer_captain_officer } + } + } + + is_shown_character = { + scope:employee = { + can_be_combatant_based_on_gender_trigger = { + ARMY_OWNER = this + } + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = archer_captain + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = archer_captain_camp_officer + any_court_position_holder = { + type = archer_captain_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + archers_damage_mult = 0.05 + archers_screen_mult = 0.05 + } + poor = { + archers_damage_mult = 0.1 + archers_screen_mult = 0.1 + + } + average = { + archers_damage_mult = 0.3 + archers_screen_mult = 0.3 + + } + good = { + archers_damage_mult = 0.4 + archers_screen_mult = 0.4 + + } + excellent = { + archers_damage_mult = 0.5 + archers_screen_mult = 0.5 + } + } + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + archer_captain_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + archer_captain_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + archer_captain_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = archer_captain_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +heavy_infantry_captain_camp_officer = { + sort_order = 27 + max_available_positions = 1 + skill = martial + + court_position_asset = { + animation = marshal_shield + background = "gfx/interface/illustrations/event_scenes/ep2_travel_farm.dds" + } + + opinion = { + value = regular_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = martial + multiply = 2.5 + max = 60 + desc = court_position_skill_martial + } + add = { + value = prowess + max = 60 + desc = court_position_skill_prowess + } + if = { + limit = { + has_trait = strategist + } + add = { + value = 20 + desc = court_position_strategist_trait + } + } + if = { + limit = { + any_character_trait = { + has_trait_category = commander + } + } + add = { + value = 10 + desc = court_position_commander_traits + } + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + custom_tooltip = { + text = heavy_infantry_captain_captain_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_heavy_infantry_captain_officer } + } + } + + is_shown_character = { + scope:employee = { + can_be_combatant_based_on_gender_trigger = { + ARMY_OWNER = this + } + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = heavy_infantry_captain + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = heavy_infantry_captain_camp_officer + any_court_position_holder = { + type = heavy_infantry_captain_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + heavy_infantry_damage_mult = 0.05 + heavy_infantry_screen_mult = 0.05 + } + poor = { + heavy_infantry_damage_mult = 0.1 + heavy_infantry_screen_mult = 0.1 + + } + average = { + heavy_infantry_damage_mult = 0.3 + heavy_infantry_screen_mult = 0.3 + + } + good = { + heavy_infantry_damage_mult = 0.4 + heavy_infantry_screen_mult = 0.4 + + } + excellent = { + heavy_infantry_damage_mult = 0.5 + heavy_infantry_screen_mult = 0.5 + } + } + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + heavy_infantry_captain_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + heavy_infantry_captain_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + heavy_infantry_captain_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = heavy_infantry_captain_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +light_infantry_captain_camp_officer = { + sort_order = 26 + max_available_positions = 1 + skill = martial + + court_position_asset = { + animation = throne_room_one_handed_passive_1 + background = "gfx/interface/illustrations/event_scenes/drylands.dds" + } + + opinion = { + value = regular_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = martial + multiply = 2.5 + max = 60 + desc = court_position_skill_martial + } + add = { + value = prowess + max = 60 + desc = court_position_skill_prowess + } + if = { + limit = { + has_trait = strategist + } + add = { + value = 20 + desc = court_position_strategist_trait + } + } + if = { + limit = { + any_character_trait = { + has_trait_category = commander + } + } + add = { + value = 10 + desc = court_position_commander_traits + } + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + custom_tooltip = { + text = light_infantry_captain_captain_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_light_infantry_captain_officer } + } + } + + is_shown_character = { + scope:employee = { + can_be_combatant_based_on_gender_trigger = { + ARMY_OWNER = this + } + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = light_infantry_captain + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = light_infantry_captain_camp_officer + any_court_position_holder = { + type = light_infantry_captain_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + skirmishers_damage_mult = 0.05 + skirmishers_screen_mult = 0.05 + } + poor = { + skirmishers_damage_mult = 0.1 + skirmishers_screen_mult = 0.1 + + } + average = { + skirmishers_damage_mult = 0.3 + skirmishers_screen_mult = 0.3 + + } + good = { + skirmishers_damage_mult = 0.4 + skirmishers_screen_mult = 0.4 + + } + excellent = { + skirmishers_damage_mult = 0.5 + skirmishers_screen_mult = 0.5 + } + } + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + light_infantry_captain_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + light_infantry_captain_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + light_infantry_captain_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = light_infantry_captain_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +pike_captain_camp_officer = { + sort_order = 25 + max_available_positions = 1 + skill = martial + + court_position_asset = { + animation = throne_room_two_handed_passive_1 + background = "gfx/interface/illustrations/event_scenes/ep2_travel_mountains.dds" + } + + opinion = { + value = regular_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = martial + multiply = 2.5 + max = 60 + desc = court_position_skill_martial + } + add = { + value = prowess + max = 60 + desc = court_position_skill_prowess + } + if = { + limit = { + has_trait = strategist + } + add = { + value = 20 + desc = court_position_strategist_trait + } + } + if = { + limit = { + any_character_trait = { + has_trait_category = commander + } + } + add = { + value = 10 + desc = court_position_commander_traits + } + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + custom_tooltip = { + text = pike_captain_captain_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_pike_captain_officer } + } + } + + is_shown_character = { + scope:employee = { + can_be_combatant_based_on_gender_trigger = { + ARMY_OWNER = this + } + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = pike_captain + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = pike_captain_camp_officer + any_court_position_holder = { + type = pike_captain_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + pikemen_damage_mult = 0.05 + pikemen_toughness_mult = 0.025 + } + poor = { + pikemen_damage_mult = 0.1 + pikemen_toughness_mult = 0.05 + + } + average = { + pikemen_damage_mult = 0.3 + pikemen_toughness_mult = 0.15 + + } + good = { + pikemen_damage_mult = 0.4 + pikemen_toughness_mult = 0.2 + + } + excellent = { + pikemen_damage_mult = 0.5 + pikemen_toughness_mult = 0.25 + } + } + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + pike_captain_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + pike_captain_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + pike_captain_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = pike_captain_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +master_of_spoils_camp_officer = { + sort_order = 24 + max_available_positions = 1 + skill = stewardship + + court_position_asset = { + animation = bribing + background = "gfx/interface/illustrations/event_scenes/ep3_camp_arid_terrain.dds" + } + + opinion = { + value = high_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = stewardship + multiply = 2 + max = 60 + desc = court_position_skill_stewardship + } + add = { + value = intrigue + max = 60 + desc = court_position_skill_intrigue + } + add = { + value = martial + max = 60 + desc = court_position_skill_martial + } + if = { + limit = { + has_trait = greedy + } + add = { + value = 10 + desc = court_position_greedy_trait + } + } + if = { + limit = { + has_trait = reaver + } + add = 15 + desc = court_position_reaver_trait + } + if = { + limit = { + has_trait = avaricious + } + add = 15 + desc = court_position_avaricious_trait + } + if = { + limit = { + has_trait = profligate + } + add = -50 + desc = court_position_profligate_trait + } + if = { + limit = { + has_trait = improvident + } + add = -50 + desc = court_position_improvident_trait + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + custom_tooltip = { + text = master_of_spoils_captain_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_master_of_spoils_officer } + } + } + + is_shown_character = { + scope:employee = { + is_incapable = no + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = master_of_spoils + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = master_of_spoils_camp_officer + any_court_position_holder = { + type = master_of_spoils_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + + #increase chance of stealing an artifact after a siege, see siege_events.txt event siege.0031 + #increase gold/prestige/piety gain after battle, see battle_winner_gold_gain in 01_dynamic_values.txt + custom_employer_modifier_description = master_of_spoils_camp_officer_employer_custom_effect_description + + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + master_of_spoils_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + master_of_spoils_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + master_of_spoils_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = master_of_spoils_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +laureate_camp_officer = { + sort_order = 23 + max_available_positions = 1 + skill = diplomacy + + court_position_asset = { + animation = debating + background = "gfx/interface/illustrations/event_scenes/ep2_village_festival_western.dds" + } + + opinion = { + value = high_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = diplomacy + multiply = 2 + max = 60 + desc = court_position_skill_diplomacy + } + add = { + value = learning + max = 60 + desc = court_position_skill_learning + } + add = { + value = intrigue + max = 60 + desc = court_position_skill_intrigue + } + if = { + limit = { + has_trait = lifestyle_poet + } + add = { + value = 50 + desc = court_position_poet_trait + } + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + has_trait = violet_poet + } + + is_shown_character = { + scope:employee = { + is_incapable = no + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = laureate + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = laureate_camp_officer + any_court_position_holder = { + type = laureate_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + custom_employer_modifier_description = laureate_camp_officer_employer_custom_effect_description + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + monthly_prestige_gain_mult = 0.05 + monthly_dynasty_prestige_mult = 0.01 + } + poor = { + monthly_prestige_gain_mult = 0.1 + monthly_dynasty_prestige_mult = 0.02 + } + average = { + diplomacy = 1 + monthly_prestige_gain_mult = 0.15 + monthly_dynasty_prestige_mult = 0.03 + } + good = { + diplomacy = 2 + monthly_prestige_gain_mult = 0.2 + monthly_dynasty_prestige_mult = 0.04 + } + excellent = { + diplomacy = 3 + monthly_prestige_gain_mult = 0.25 + monthly_dynasty_prestige_mult = 0.05 + } + } + modifier = { + monthly_prestige = 0.1 + } + + on_court_position_received = { + laureate_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + laureate_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + laureate_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = laureate_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + +# Camp Priest +camp_priest_camp_officer = { + sort_order = 22 + max_available_positions = 1 + skill = learning + + court_position_asset = { + animation = prayer + background = "gfx/interface/illustrations/event_scenes/ep3_relaxing_tent.dds" + } + + opinion = { + value = regular_camp_officer_opinion + } + + # How high the aptitude has to be to reach the 5 different modifier levels + aptitude_level_breakpoints = { 20 40 60 80 } + + # How good is this character in this position? root scope is the holder of the court position + aptitude = { + value = 0 + if = { + limit = { + employer ?= { has_perk = soon_forgiven_perk } + } + add = { + value = 10 + desc = court_position_soon_forgiven_perk + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + any_relation = { type = friend } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_friend + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + any_relation = { type = lover } + } + add = { + value = 5 + desc = court_position_positions_of_power_perk_lover + } + } + if = { + limit = { + employer ?= { + has_government = landless_adventurer_government + has_perk = positions_of_power_perk + } + is_married = yes + } + add = { + value = 10 + desc = court_position_positions_of_power_perk_marriage + } + } + if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_best_friend = prev + } + } + add = { + value = 30 + desc = court_position_best_friend + } + } + else_if = { + limit = { + employer ?= { + has_perk = likable_perk + has_relation_friend = prev + } + } + add = { + value = 15 + desc = court_position_friend + } + } + add = { + value = learning + multiply = 4 + max = 65 + desc = court_position_skill_learning + } + if = { + limit = { + has_trait = theologian + } + add = { + value = 20 + desc = court_position_theologian_trait + } + } + if = { + limit = { has_trait = scholar } + add = { + value = 15 + desc = court_position_scholar_trait + } + } + if = { + limit = { has_trait = lifestyle_mystic } + add = { + value = 15 + desc = court_position_mystic_1_trait + } + } + add = court_position_aptitude_high_penalty_value + } + + is_shown = { + has_ep3_dlc_trigger = yes + custom_tooltip = { + text = landless_government_tt + government_has_flag = government_is_landless_adventurer + } + } + + valid_position = { + custom_tooltip = { + text = landless_government_tt + government_has_flag = government_is_landless_adventurer + } + custom_tooltip = { + text = camp_priest_camp_officer_parameter_tt + domicile ?= { has_domicile_parameter = camp_unlocks_camp_priest_officer } + } + } + + is_shown_character = { + scope:employee = { + is_incapable = no + faith = scope:liege.faith + can_be_clergy_due_to_gender_trigger = yes + } + } + + valid_character = { + valid_camp_officer_trigger = { + OFFICER = camp_priest + } + } + + revoke_cost = { + prestige = { + value = minor_court_position_prestige_revoke_cost + + # Set to 0 with Dynasty Perk Inner Circle + if = { + limit = { + dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } + + employs_court_position = camp_priest_camp_officer + any_court_position_holder = { + type = camp_priest_camp_officer + exists = dynasty + house = prev.house + } + } + multiply = 0 + } + } + } + + salary = { + #officers have no salary + } + + # These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) + scaling_employer_modifiers = { + terrible = { + monthly_piety_gain_mult = 0.02 + } + poor = { + monthly_piety_gain_mult = 0.05 + } + average = { + monthly_piety_gain_mult = 0.075 + learning = 1 + } + good = { + monthly_piety_gain_mult = 0.1 + learning = 2 + } + excellent = { + monthly_piety_gain_mult = 0.2 + learning = 3 + } + } + + modifier = { + monthly_piety = 0.5 + } + + on_court_position_received = { + camp_priest_camp_officer_title_accepted_effect = yes + } + on_court_position_revoked = { + camp_priest_camp_officer_title_revoked_effect = yes + } + on_court_position_invalidated = { + camp_priest_camp_officer_title_invalidated_effect = yes + } + on_court_position_vacated = { + court_position_vacated_event_effect = { + COURT_POSITION_TYPE = camp_priest_camp_officer + } + } + # Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation! + ai_position_score = { + value = @base_position_score + } + ai_candidate_score = { + value = @base_candidate_score + add = scope:base_value + add = court_position_candidate_score_base_value + add = court_position_candidate_aptitude_value + } +} + diff --git a/common/decisions/dlc_decisions/ep3_decisions.txt b/common/decisions/dlc_decisions/ep3_decisions.txt index ff09ad82..5853f80f 100644 --- a/common/decisions/dlc_decisions/ep3_decisions.txt +++ b/common/decisions/dlc_decisions/ep3_decisions.txt @@ -3768,7 +3768,7 @@ go_fishing_decision = { is_shown = { #DLC check. has_ep3_dlc_trigger = yes - has_government = landless_adventurer_government + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } } is_valid_showing_failures_only = { diff --git a/common/decisions/dlc_decisions/ep_3/06_ep3_laamp_decisions.txt b/common/decisions/dlc_decisions/ep_3/06_ep3_laamp_decisions.txt new file mode 100644 index 00000000..01c7d69c --- /dev/null +++ b/common/decisions/dlc_decisions/ep_3/06_ep3_laamp_decisions.txt @@ -0,0 +1,3275 @@ +@laamp_gallivanter_ai_will_do_bonus_1_value = 10 +@laamp_gallivanter_ai_will_do_bonus_2_value = 30 +@laamp_gallivanter_ai_will_do_bonus_3_value = 50 + +@laamp_gallivanter_ai_will_do_malus_1_value = -10 +@laamp_gallivanter_ai_will_do_malus_2_value = -30 +@laamp_gallivanter_ai_will_do_malus_3_value = -50 + + +############################################# +# Abandom Realm to Become an Adventurer # +# by Joe Parkin # +############################################# + +### Become Adventurer ### +become_landless_adventurer_decision = { + picture = { + trigger = { + government_is_japanese_trigger = yes + } + reference = "gfx/interface/illustrations/decisions/tgp_dominance.dds" + } + picture = { + trigger = { + OR = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } + culture = { has_graphical_india_culture_group_trigger = yes } + } + } + reference = "gfx/interface/illustrations/decisions/tgp_silk_road.dds" + } + picture = { + reference = "gfx/interface/illustrations/decisions/ep3_decision_laamp_neutral_mountain.dds" + } + sort_order = 82 + + ai_check_interval_by_tier = { + barony = 0 + county = 120 + duchy = 120 + kingdom = 0 + empire = 0 + hegemony = 0 + } + + desc = become_landless_adventurer_decision_desc + selection_tooltip = become_landless_adventurer_decision_tooltip + + is_shown = { + #DLC check. + has_ep3_dlc_trigger = yes + OR = { + ai_can_valid_to_create_laamp_trigger = yes + is_ai = no + } + #Standard filter checks. + OR = { + is_landed = yes + AND = { + is_ai = no + government_allows = administrative + top_liege = this + is_landed = no + } + } + # Relevant cultures/faiths + OR = { + culture = { has_cultural_parameter = unlock_voluntary_laampdom } + faith = { has_doctrine_parameter = unlock_voluntary_laampdom_faith } + has_trait = nomadic_philosophy + has_character_modifier = tgp_gave_up_modifier + AND = { + is_ai = no + government_allows = administrative + top_liege = this + is_landed = no + } + } + save_temporary_scope_as = potential_laamp_temp + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:potential_laamp_temp } # Registered fighting license + } + + is_valid = { + is_valid_for_laampdom = yes + # Is not HOF + custom_tooltip = { + text = become_landless_adventurer_decision_hof_tt + faith.religious_head_title.holder != root + } + # Counts and dukes only + custom_tooltip = { + text = become_landless_adventurer_decision_tier_tt + highest_held_title_tier >= tier_county + highest_held_title_tier <= tier_duchy + } + # Not too big + custom_tooltip = { + text = become_landless_adventurer_decision_domain_size_tt + domain_size <= 3 + } + # Relevant cultures/faiths + trigger_if = { + limit = { + NAND = { + is_ai = no + government_allows = administrative + top_liege = this + is_landed = no + } + } + OR = { + culture = { has_cultural_parameter = unlock_voluntary_laampdom } + faith = { has_doctrine_parameter = unlock_voluntary_laampdom_faith } + has_trait = nomadic_philosophy + custom_tooltip = { + text = nomadic_government_tt + government_has_flag = government_is_nomadic + } + has_character_modifier = tgp_gave_up_modifier + } + } + } + + is_valid_showing_failures_only = { + is_at_war = no + is_alive = yes + is_available_adult = yes + has_contagious_deadly_disease_trigger = no + } + + effect = { + save_scope_as = adventurer + if = { + limit = { + player_heir ?= { + this != root + is_adult = yes + } + } + player_heir = { + save_scope_as = laamp_heir + save_scope_as = laamp_inheritor + custom_tooltip = become_landless_adventurer_decision_title_scope_tt + } + } + else_if = { + limit = { top_liege != this } + liege = { + save_scope_as = laamp_liege + save_scope_as = laamp_inheritor + custom_tooltip = become_landless_adventurer_decision_title_scope_tt + } + } + else = { + custom_tooltip = become_landless_adventurer_decision_title_created_tt + if = { + limit = { + NOT = { exists = scope:laamp_inheritor } + } + hidden_effect_new_object = { + create_character = { + template = laamp_inheritor_template + culture = root.capital_county.culture + faith = root.capital_county.faith + dynasty = generate + location = root.capital_province + after_creation = { + save_scope_as = laamp_inheritor + add_character_flag = new_laamp_inheritor + } + } + } + } + } + create_landless_adventurer_title_tooltip_effect = yes + show_as_tooltip = { + add_prestige = medium_prestige_gain + add_character_modifier = { + modifier = ep3_voluntary_laamp_character_modifier + years = 5 + } + } + trigger_event = { id = ep3_laamps.0030 } + # Debug tracking + if = { + limit = { + is_ai = yes + debug_only = yes + } + if = { + limit = { exists = global_var:ai_voluntary_laamp_count } + change_global_variable = { + name = ai_voluntary_laamp_count + add = 1 + } + } + else = { + set_global_variable = { + name = ai_voluntary_laamp_count + value = 1 + } + } + debug_log = "AI became adventurer voluntarily" + debug_log_scopes = yes + } + stress_impact = { + craven = minor_stress_impact_gain + content = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + } + + ai_potential = { + is_valid_for_laampdom = yes + trigger_if = { # Temujun stays, he needs to become Genghis Khan after all! + limit = { + exists = character:125501 + } + NOT = { this = character:125501 } + } + } + + ai_will_do = { + base = -75 + modifier = { add = ep3_laamp_chance_score_value } + modifier = { # If we don't have this, everyone will leave your realm constantly + add = -45 + culture = { has_cultural_parameter = much_more_likely_to_be_laamps } + } + modifier = { # If we don't have this, everyone will leave your realm constantly + add = -20 + culture = { has_cultural_parameter = more_likely_to_be_laamps } + } + modifier = { + factor = 0 + OR = { + #Stahp it, John de Courcy + this = character:214000 + #No adventurer should want to be one again... right? + has_variable = adventurer_creation_reason + } + } + } +} + +become_landless_minority_decision = { + picture = { + trigger = { + government_is_japanese_trigger = yes + } + reference = "gfx/interface/illustrations/decisions/tgp_dominance.dds" + } + picture = { + trigger = { + OR = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } + culture = { has_graphical_india_culture_group_trigger = yes } + } + } + reference = "gfx/interface/illustrations/decisions/tgp_silk_road.dds" + } + picture = { + reference = "gfx/interface/illustrations/decisions/ep3_decision_laamp_neutral_mountain.dds" + } + sort_order = 82 + + ai_check_interval_by_tier = { + barony = 0 + county = 120 + duchy = 120 + kingdom = 0 + empire = 0 + hegemony = 0 + } + + desc = become_landless_minority_decision_desc + selection_tooltip = become_landless_minority_decision_tooltip + + is_shown = { + culture = { + has_cultural_tradition = tradition_diasporic + } + #DLC check. + has_ep3_dlc_trigger = yes + OR = { + ai_can_valid_to_create_laamp_trigger = yes + is_ai = no + } + # Relevant cultures/faiths + prestige_level >= 3 + save_temporary_scope_as = potential_laamp_temp + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:potential_laamp_temp } # Registered fighting license + } + + is_valid = { + is_valid_for_laampdom = yes + culture = { + has_cultural_tradition = tradition_diasporic + } + prestige_level >= 3 + # Is not HOF + custom_tooltip = { + text = become_landless_adventurer_decision_hof_tt + faith.religious_head_title.holder != root + } + # Counts and dukes only + custom_tooltip = { + text = become_landless_adventurer_decision_tier_tt + highest_held_title_tier >= tier_county + highest_held_title_tier <= tier_duchy + } + # Not too big + custom_tooltip = { + text = become_landless_adventurer_decision_domain_size_tt + domain_size <= 3 + } + } + + is_valid_showing_failures_only = { + is_at_war = no + is_alive = yes + is_available_adult = yes + has_contagious_deadly_disease_trigger = no + } + + effect = { + save_scope_as = minority_leader + if = { + limit = { + player_heir ?= { + this != root + is_adult = yes + } + } + player_heir = { + save_scope_as = laamp_heir + save_scope_as = laamp_inheritor + custom_tooltip = become_landless_adventurer_decision_title_scope_tt + } + } + else_if = { + limit = { top_liege != this } + liege = { + save_scope_as = laamp_liege + save_scope_as = laamp_inheritor + custom_tooltip = become_landless_adventurer_decision_title_scope_tt + } + } + else = { + custom_tooltip = become_landless_adventurer_decision_title_created_tt + if = { + limit = { + NOT = { exists = scope:laamp_inheritor } + } + hidden_effect_new_object = { + create_character = { + template = laamp_inheritor_template + culture = root.culture + faith = root.faith + dynasty = generate + location = root.capital_province + after_creation = { + save_scope_as = laamp_inheritor + add_character_flag = new_laamp_inheritor + } + } + } + } + } + create_landless_adventurer_title_tooltip_effect = yes + show_as_tooltip = { + add_prestige = medium_prestige_gain + add_character_modifier = { + modifier = ep3_voluntary_laamp_character_modifier + years = 5 + } + } + trigger_event = { id = ep3_laamps.1030 } + # Debug tracking + if = { + limit = { + is_ai = yes + debug_only = yes + } + if = { + limit = { exists = global_var:ai_voluntary_laamp_count } + change_global_variable = { + name = ai_voluntary_laamp_count + add = 1 + } + } + else = { + set_global_variable = { + name = ai_voluntary_laamp_count + value = 1 + } + } + debug_log = "AI became adventurer voluntarily" + debug_log_scopes = yes + } + stress_impact = { + craven = minor_stress_impact_gain + content = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + } + + ai_potential = { + is_valid_for_laampdom = yes + trigger_if = { # Temujun stays, he needs to become Genghis Khan after all! + limit = { + exists = character:125501 + } + NOT = { this = character:125501 } + } + } + + ai_will_do = { + base = -75 + modifier = { add = ep3_laamp_chance_score_value } + modifier = { # If we don't have this, everyone will leave your realm constantly + add = -45 + culture = { has_cultural_parameter = much_more_likely_to_be_laamps } + } + modifier = { # If we don't have this, everyone will leave your realm constantly + add = -20 + culture = { has_cultural_parameter = more_likely_to_be_laamps } + } + } +} +############################################# +# Wipe Slate # +# by Joe Parkin & Ewan Cowhig Croft # +############################################# + +### Wipe Slate ### +wipe_slate_decision = { + picture = { reference = "gfx/interface/illustrations/decisions/decision_recruitment.dds" } + desc = wipe_slate_decision_desc + selection_tooltip = wipe_slate_decision_tooltip + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 36 + kingdom = 0 + empire = 0 + hegemony = 0 + } + decision_group_type = adventurer_minor + + cooldown = { years = 1 } + + is_shown = { + # DLC check. + has_ep3_dlc_trigger = yes + # Plus, we must have the actual trait. + has_trait = gallowsbait + } + + cost = { + gold = { + value = 100 + add = { + value = highest_held_title_tier + multiply = 25 + } + } + prestige = { + add = { + value = highest_held_title_tier + multiply = 25 + } + } + piety = { + add = { + value = highest_held_title_tier + multiply = 50 + } + } + } + + is_valid_showing_failures_only = { + # Standard filter checks. + is_available_adult = yes + } + + widget = { + gui = "decision_view_widget_option_list_generic" + controller = decision_option_list_controller + decision_to_second_step_button = "WIPE_SLATE_DECISION_NEXT_STEP_BUTTON" + item = { + value = track_bandit + is_valid = { + has_trait_xp = { + trait = gallowsbait + track = bandit + value >= wipe_slate_min_xp_to_remove_trait_value + } + } + localization = wipe_slate_decision_option_bandit + icon = "gfx/interface/icons/trait_level_tracks/bandit.dds" + } + item = { + value = track_trickster + is_valid = { + has_trait_xp = { + trait = gallowsbait + track = trickster + value >= wipe_slate_min_xp_to_remove_trait_value + } + } + localization = wipe_slate_decision_option_trickster + icon = "gfx/interface/icons/trait_level_tracks/trickster.dds" + } + item = { + value = track_thief + is_valid = { + has_trait_xp = { + trait = gallowsbait + track = thief + value >= wipe_slate_min_xp_to_remove_trait_value + } + } + localization = wipe_slate_decision_option_thief + icon = "gfx/interface/icons/trait_level_tracks/thief.dds" + } + item = { + value = track_poacher + is_valid = { + has_trait_xp = { + trait = gallowsbait + track = poacher + value >= wipe_slate_min_xp_to_remove_trait_value + } + } + localization = wipe_slate_decision_option_poacher + icon = "gfx/interface/icons/trait_level_tracks/poacher.dds" + } + item = { + value = track_marauder + is_valid = { + has_trait_xp = { + trait = gallowsbait + track = marauder + value >= wipe_slate_min_xp_to_remove_trait_value + } + } + localization = wipe_slate_decision_option_marauder + icon = "gfx/interface/icons/trait_level_tracks/marauder.dds" + } + item = { + value = trait_gallowsbait + is_valid = { + custom_tooltip = { + text = wipe_slate_decision_option_gallowsbait.tt.must_have_below_max_in_all_values + has_trait_xp = { + trait = gallowsbait + track = bandit + value < wipe_slate_min_xp_to_remove_trait_value + } + has_trait_xp = { + trait = gallowsbait + track = trickster + value < wipe_slate_min_xp_to_remove_trait_value + } + has_trait_xp = { + trait = gallowsbait + track = thief + value < wipe_slate_min_xp_to_remove_trait_value + } + has_trait_xp = { + trait = gallowsbait + track = poacher + value < wipe_slate_min_xp_to_remove_trait_value + } + has_trait_xp = { + trait = gallowsbait + track = marauder + value < wipe_slate_min_xp_to_remove_trait_value + } + } + } + localization = wipe_slate_decision_option_gallowsbait + icon = "gfx/interface/icons/traits/gallowsbait.dds" + } + } + + effect = { + save_scope_value_as = { + name = scrubbable + value = { + value = -35 + if = { + limit = { + domicile ?= { has_domicile_parameter = camp_improves_wipe_slate_decision } + } + add = -35 + } + } + } + show_as_tooltip = { + random_list = { + 100 = { + show_chance = no + desc = wipe_slate_decision.tt.remove_bandit + send_interface_toast = { + title = wipe_slate_decision.tt.slate_wiped + add_trait_xp = { + trait = gallowsbait + track = bandit + value = scope:scrubbable + } + } + } + 100 = { + show_chance = no + desc = wipe_slate_decision.tt.remove_trickster + send_interface_toast = { + title = wipe_slate_decision.tt.slate_wiped + add_trait_xp = { + trait = gallowsbait + track = trickster + value = scope:scrubbable + } + } + } + 100 = { + show_chance = no + desc = wipe_slate_decision.tt.remove_thief + send_interface_toast = { + title = wipe_slate_decision.tt.slate_wiped + add_trait_xp = { + trait = gallowsbait + track = thief + value = scope:scrubbable + } + } + } + 100 = { + show_chance = no + desc = wipe_slate_decision.tt.remove_poacher + send_interface_toast = { + title = wipe_slate_decision.tt.slate_wiped + add_trait_xp = { + trait = gallowsbait + track = poacher + value = scope:scrubbable + } + } + } + 100 = { + show_chance = no + desc = wipe_slate_decision.tt.remove_marauder + send_interface_toast = { + title = wipe_slate_decision.tt.slate_wiped + add_trait_xp = { + trait = gallowsbait + track = marauder + value = scope:scrubbable + } + } + } + 100 = { + show_chance = no + desc = wipe_slate_decision.tt.remove_gallowsbait + send_interface_toast = { + title = wipe_slate_decision.tt.slate_wiped + remove_trait = gallowsbait + } + } + } + } + hidden_effect = { + switch = { + trigger = yes + scope:track_bandit = { + add_trait_xp = { + trait = gallowsbait + track = bandit + value = scope:scrubbable + } + } + scope:track_trickster = { + add_trait_xp = { + trait = gallowsbait + track = trickster + value = scope:scrubbable + } + } + scope:track_thief = { + add_trait_xp = { + trait = gallowsbait + track = thief + value = scope:scrubbable + } + } + scope:track_poacher = { + add_trait_xp = { + trait = gallowsbait + track = poacher + value = scope:scrubbable + } + } + scope:track_marauder = { + add_trait_xp = { + trait = gallowsbait + track = marauder + value = scope:scrubbable + } + } + scope:trait_gallowsbait = { remove_trait = gallowsbait } + } + } + } + + ai_potential = { + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + ai_honor > 0 + ai_compassion >= -25 + ai_rationality >= 0 + gold >= 500 + } + + ai_will_do = { + base = 100 + } +} + +############################################# +# Adopt kennel dog # +# by James Beaumont # +############################################# + +adopt_a_kennel_dog = { + picture = { reference = "gfx/interface/illustrations/decisions/decision_pet_dog.dds" } + desc = adopt_a_kennel_dog_desc + selection_tooltip = adopt_a_kennel_dog_tooltip + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 36 + kingdom = 0 + empire = 0 + hegemony = 0 + } + decision_group_type = adventurer_minor + + cooldown = { years = 5 } + is_shown = { + #DLC check. + has_ep3_dlc_trigger = yes + #Standard filter checks. + domicile ?= { has_domicile_parameter = camp_unlocks_adopt_a_kennel_dog_decision } + NOT = { + any_owned_story = { + type = story_cycle_pet_dog + } + } + } + + is_valid_showing_failures_only = { + is_alive = yes + is_available_adult = yes + has_contagious_deadly_disease_trigger = no + } + + effect = { + show_as_tooltip = { start_dog_story_cycle_effect = yes } + trigger_event = ep3_laamps.8010 + } + + ai_potential = { + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + # Has enough gold. + short_term_gold >= minor_gold_value + NOR = { + has_trait = lazy + has_trait = callous + } + } + + ai_will_do = { + base = 100 + # You're richer. + modifier = { + add = 50 + faith = { has_doctrine_parameter = gruesome_festivals_active } + short_term_gold >= massive_gold_value + } + modifier = { + add = 50 + faith = { has_doctrine_parameter = gruesome_festivals_active } + short_term_gold >= monumental_gold_value + } + ai_value_modifier = { + ai_compassion = 1.5 + ai_rationality = 1 + } + } +} + +############################################# +# Treasure Hunting Contract # +# by Arkadiusz Majewski # +############################################# +### Search for Treasures ### +treasure_hunting_contract_decision = { + picture = { reference = "gfx/interface/illustrations/army_status/moving.dds" } + desc = treasure_hunting_contract_decision_desc + selection_tooltip = treasure_hunting_contract_decision_tooltip + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 32 + kingdom = 0 + empire = 0 + hegemony = 0 + } + decision_group_type = adventurer_minor + + is_shown = { + #DLC check. + has_ep3_dlc_trigger = yes + + any_character_active_contract = { + task_contract_type = laamp_treasure_hunting_contract + } + } + + is_valid_showing_failures_only = { + is_available_adult = yes + has_contagious_deadly_disease_trigger = no + } + + is_valid = { + any_character_active_contract = { + task_contract_type = laamp_treasure_hunting_contract + } + } + widget = { + gui = "decision_view_widget_option_list_generic" + controller = decision_option_list_controller + decision_to_second_step_button = "TREASURE_HUNTING_CONTRACT_DECISION_NEXT_STEP_BUTTON" + #cover world regions, have to be the same as in get_adventure_inspiration_start_location + item = { + value = search_europe_north + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_europe + geographical_region = world_steppe_west + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_europe_north + icon = "gfx/interface/icons/terrain_types/taiga.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_europe_west + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_europe + geographical_region = world_africa_north + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_europe_west + icon = "gfx/interface/icons/terrain_types/plains.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_europe_east + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_europe + geographical_region = world_steppe_west + geographical_region = world_asia_minor + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_europe_east + icon = "gfx/interface/icons/terrain_types/forest.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_europe_south + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_europe + geographical_region = world_steppe_west + geographical_region = world_asia_minor + geographical_region = world_africa_north + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_europe_south + icon = "gfx/interface/icons/terrain_types/coastal_sea.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_africa_north + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_europe_south + geographical_region = world_europe_west + geographical_region = world_asia_minor + geographical_region = world_middle_east_jerusalem + geographical_region = world_africa + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_africa_north + icon = "gfx/interface/icons/terrain_types/drylands.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_africa_west + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_europe_south + geographical_region = world_africa + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_africa_west + icon = "gfx/interface/icons/terrain_types/jungle.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_africa_east + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_europe_south + geographical_region = world_asia_minor + geographical_region = world_middle_east_jerusalem + geographical_region = world_middle_east_arabia + geographical_region = world_africa + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_africa_east + icon = "gfx/interface/icons/terrain_types/hills.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_middle_east_jerusalem + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_europe_south + geographical_region = world_asia_minor + geographical_region = world_middle_east + geographical_region = world_africa_north + geographical_region = world_africa_east + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_middle_east_jerusalem + icon = "gfx/interface/icons/terrain_types/drylands.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_asia_minor + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_europe_south + geographical_region = world_middle_east + geographical_region = world_africa_north + geographical_region = world_africa_east + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_asia_minor + icon = "gfx/interface/icons/terrain_types/hills.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_middle_east_arabia + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_europe_south + geographical_region = world_middle_east + geographical_region = world_africa_north + geographical_region = world_africa_east + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_middle_east_arabia + icon = "gfx/interface/icons/terrain_types/desert.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_middle_east_persia + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_europe_south + geographical_region = world_middle_east + geographical_region = world_africa_north + geographical_region = world_africa_east + geographical_region = world_india_rajastan + geographical_region = world_steppe_west + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_middle_east_persia + icon = "gfx/interface/icons/terrain_types/desert_mountains.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_india_rajastan + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_middle_east + geographical_region = world_india + geographical_region = world_steppe_west + geographical_region = world_burma + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_india_rajastan + icon = "gfx/interface/icons/terrain_types/desert.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_india_deccan + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_middle_east + geographical_region = world_india + geographical_region = world_steppe_west + geographical_region = world_burma + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_india_deccan + icon = "gfx/interface/icons/terrain_types/drylands.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_india_bengal + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_middle_east + geographical_region = world_india + geographical_region = world_steppe_west + geographical_region = world_burma + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_india_bengal + icon = "gfx/interface/icons/terrain_types/jungle.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_burma + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_india + geographical_region = world_tibet + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_burma + icon = "gfx/interface/icons/terrain_types/floodplains.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_tibet + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_india + geographical_region = world_steppe + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_tibet + icon = "gfx/interface/icons/terrain_types/mountains.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_steppe_tarim + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_india + geographical_region = world_tibet + geographical_region = world_steppe + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_steppe_tarim + icon = "gfx/interface/icons/terrain_types/desert.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_steppe_west + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_india + geographical_region = world_tibet + geographical_region = world_steppe + geographical_region = world_europe_east + geographical_region = world_europe_north + geographical_region = world_asia_minor + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_steppe_west + icon = "gfx/interface/icons/terrain_types/steppe.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_steppe_east + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + OR = { + geographical_region = world_india + geographical_region = world_tibet + geographical_region = world_steppe + geographical_region = world_asia_china + } + } + } + } + localization = treasure_hunting_contract_decision_option_search_steppe_east + icon = "gfx/interface/icons/terrain_types/mountains.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_east_asia + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + geographical_region = world_asia_east + } + } + } + localization = treasure_hunting_contract_decision_option_search_east_asia + icon = "gfx/interface/icons/terrain_types/mountains.dds" + ai_chance = { + value = 50 + } + } + item = { + value = search_east_southeast_asia + is_valid = { + custom_description = { + text = treasure_hunting_contract_decision_limit + capital_province = { + geographical_region = world_asia_southeast + } + } + } + localization = treasure_hunting_contract_decision_option_search_east_southeast_asia + icon = "gfx/interface/icons/terrain_types/mountains.dds" + ai_chance = { + value = 50 + } + } + } + + effect = { + switch = { + trigger = yes + scope:search_africa_north = { + set_variable = { + name = adventure_destination + value = flag:africa_north + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_africa_west = { + set_variable = { + name = adventure_destination + value = flag:africa_west + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_africa_east = { + set_variable = { + name = adventure_destination + value = flag:africa_east + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_europe_north = { + set_variable = { + name = adventure_destination + value = flag:europe_north + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_europe_west = { + set_variable = { + name = adventure_destination + value = flag:europe_west + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_europe_east = { + set_variable = { + name = adventure_destination + value = flag:europe_east + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_europe_south = { + set_variable = { + name = adventure_destination + value = flag:europe_south + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_middle_east_jerusalem = { + set_variable = { + name = adventure_destination + value = flag:middle_east_jerusalem + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_middle_east_arabia = { + set_variable = { + name = adventure_destination + value = flag:middle_east_arabia + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_middle_east_persia = { + set_variable = { + name = adventure_destination + value = flag:middle_east_persia + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_india_deccan = { + set_variable = { + name = adventure_destination + value = flag:india_deccan + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_india_bengal = { + set_variable = { + name = adventure_destination + value = flag:india_bengal + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_india_rajastan = { + set_variable = { + name = adventure_destination + value = flag:india_rajastan + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_steppe_west = { + set_variable = { + name = adventure_destination + value = flag:steppe_west + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_steppe_east = { + set_variable = { + name = adventure_destination + value = flag:steppe_east + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_steppe_tarim = { + set_variable = { + name = adventure_destination + value = flag:steppe_tarim + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_asia_minor = { + set_variable = { + name = adventure_destination + value = flag:asia_minor + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_burma = { + set_variable = { + name = adventure_destination + value = flag:burma + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_tibet = { + set_variable = { + name = adventure_destination + value = flag:tibet + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_east_asia = { + set_variable = { + name = adventure_destination + value = flag:east_asia + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + scope:search_east_southeast_asia = { + set_variable = { + name = adventure_destination + value = flag:southeast_asia + } + get_adventure_inspiration_start_location = { + ADVENTURER = root + } + } + } + random_character_task_contract = { + task_contract_type = laamp_treasure_hunting_contract + save_scope_as = task_contract + } + scope:location.county = { + random_county_province = { + save_scope_as = task_contract_destination + } + } + scope:task_contract = { + set_variable = { + name = task_contract_destination + value = scope:task_contract_destination + } + } + start_travel_plan = { + destination = scope:task_contract_destination + on_arrival_event = ep3_contract_event.0006 + } + custom_tooltip = treasure_hunting_contract_decision_effect + } + + ai_potential = { + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + + ai_will_do = { + base = 100 + } +} + +############################################# +# Visit Local Settlement # +############################################# + +### Visit [ROOT.Char.Custom('LocalHoldingTypeCapitalized')] ### +visit_local_settlement_decision = { + picture = { reference = "gfx/interface/illustrations/decisions/decision_destiny_goal.dds" } + desc = visit_local_settlement_decision_desc + selection_tooltip = visit_local_settlement_decision_tooltip + sort_order = 200 + decision_group_type = adventurer_minor + + #The cooldown is set separately, if you only entered and left you shouldn't get punished for it + + is_shown = { + #DLC check. + has_ep3_dlc_trigger = yes + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + } + + is_valid_showing_failures_only = { + is_alive = yes + is_available_adult = yes + has_contagious_deadly_disease_trigger = no + root.location = { + has_holding = yes + is_occupied = no + is_raided = no + } + custom_description = { + text = "visit_local_settlement_decision_sieged" + subject = root + root.location = { + NOT = { + any_army_in_location = { + is_army_in_siege = yes + } + } + } + } + custom_description = { + text = "decision_already_visiting_local_settlement" + subject = root + NOT = { has_variable = ep3_laamp_decision_1000_is_visiting } + } + } + + effect = { + if = { + limit = { + root.location = { + OR = { + has_holding = no + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + #The base tooltip + custom_tooltip = visit_local_settlement_tribal_holding_decision_tt + } + else_if = { + limit = { + root.location = { + OR = { + has_holding_type = church_holding + has_holding_type = temple_citadel_holding + } + } + } + #Add on church holding-specific effects + custom_tooltip = visit_local_settlement_church_holding_decision_tt + } + else_if = { + limit = { + root.location = { has_holding_type = castle_holding } + } + #Add on castle holding-specific effects + custom_tooltip = visit_local_settlement_castle_holding_decision_tt + } + else_if = { + limit = { + root.location = { has_holding_type = city_holding } + } + #Add on castle holding-specific effects + custom_tooltip = visit_local_settlement_city_holding_decision_tt + } + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + trigger_event = ep3_laamp_decision_event.1000 + close_view = { + view = decisions + player = root + } + } + + ai_check_interval = 0 + + ai_potential = { + always = no + } + + ai_will_do = { + base = 0 + } +} + +############################################# +# Visit Local Settlement - Use Treasure Map # +############################################# + +### Excavate Treasure ### +treasure_map_contract_decision = { + picture = { reference = "gfx/interface/illustrations/army_status/moving.dds" } + desc = treasure_map_contract_decision_desc + selection_tooltip = treasure_map_contract_decision_tooltip + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 36 + kingdom = 0 + empire = 0 + hegemony = 0 + } + decision_group_type = adventurer_minor + + is_shown = { + #DLC check. + has_ep3_dlc_trigger = yes + any_character_active_contract = { task_contract_type = laamp_treasure_map_contract } + any_character_artifact = { has_variable = 1025_treasure_map } + } + + is_valid_showing_failures_only = { + is_available_allow_travelling = yes + custom_description = { + text = "decision_already_excavating_treasure" + subject = root + NOR = { + has_variable = ep3_laamp_decision_1000_is_planning_excavation_trip + has_variable = ep3_laamp_decision_1000_is_excavating + } + } + } + + is_valid = { + any_character_task_contract = { task_contract_type = laamp_treasure_map_contract } + } + + widget = { + gui = "decision_view_widget_option_list_generic" + controller = decision_option_list_controller + decision_to_second_step_button = "TREASURE_MAP_CONTRACT_DECISION_NEXT_STEP_BUTTON" + item = { + value = travel_with_camp + localization = option_travel_with_camp + icon = "gfx/interface/icons/travel/icon_travel_hud_placeholder.dds" + ai_chance = { + value = 50 + } + } + item = { + value = travel_without_camp + localization = option_travel_without_camp + icon = "gfx/interface/icons/trait_level_tracks/travel.dds" + ai_chance = { + value = 50 + } + } + } + + effect = { + random_character_task_contract = { + limit = { has_variable = contract_treasure_location } + save_scope_as = task_contract + } + switch = { + trigger = yes + scope:travel_with_camp = { + start_travel_plan = { + destination = scope:task_contract.var:contract_treasure_location + travel_with_domicile = yes + return_trip = no + on_arrival_event = ep3_contract_event.0044 + on_arrival_destinations = last + } + } + scope:travel_without_camp = { + start_travel_plan = { + destination = scope:task_contract.var:contract_treasure_location + on_arrival_event = ep3_contract_event.0044 + } + } + } + custom_tooltip = treasure_map_contract_decision_effect_tooltip + #Make sure to remove this variable upon completion, invalidation, cancelling travel plan etc + set_variable = ep3_laamp_decision_1000_is_planning_excavation_trip + #To remove the variable for those who go into the travel planner but then decide not to travel to the Excavation Site + trigger_event = { + id = ep3_contract_event.0055 + days = 1 + } + } + + ai_potential = { + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + + ai_will_do = { + base = 100 + } +} + +############################################# +# Reject Inheritance # +# by Ewan Cowhig Croft # +############################################# + +### Reject Inheritance ### +reject_inheritance_decision = { + # Laamp picture. + picture = { + trigger = { has_government = landless_adventurer_government } + reference = "gfx/interface/illustrations/decisions/ep3_decision_laamp_negative.dds" + } + # Everyone else's picture. + picture = { + trigger = { is_landless_adventurer = no } + reference = "gfx/interface/illustrations/decisions/decision_family_tree.dds" + } + desc = reject_inheritance_decision_desc + selection_tooltip = reject_inheritance_decision_tooltip + decision_group_type = adventurer_minor + + is_shown = { + # Only characters that don't want to obtain more titles. + can_access_reject_inheritance_decision_trigger = yes + # Standard filter checks. + is_playable_character = yes + exists = dynasty + # And naturally, you can't do this if you've already got the trait. + NOT = { has_trait = gallivanter } + } + + is_valid = { + # General access. + ## This is in twice (three times, even) so that we can show you _why_ you have access to this decision. + can_access_reject_inheritance_decision_trigger = yes + # Plus, you can't waffle on this. You get one wild phase per character. + NOT = { has_character_flag = has_embraced_responsibilities } + # Must be an heir to something, else this is just free stress loss. + trigger_if = { + limit = { is_landed = yes } + custom_tooltip = { + text = reject_inheritance_decision.tt.is_heir_to_higher_tier_title + any_heir_title = { + count >= 1 + tier >= root.highest_held_title_tier + } + } + } + } + + is_valid_showing_failures_only = { is_available_healthy_adult = yes } + + effect = { + # Sort trait shenanigans. + ## Fake-gain the trait — we do this up here so that it's at the top, but also so that the trait being added doesn't affect the stress block below.. + show_as_tooltip = { add_trait = gallivanter } + ## Next, we just _nuke_ your stress for this one. + stress_impact = { + base = -200 + arrogant = 100 + ambitious = 100 + diligent = 25 + } + ## Finally, actually add the trait. + hidden_effect = { + add_trait = gallivanter + # And flag how long you've had it for for removal purposes. + add_character_flag = { + flag = recently_added_gallivanter + years = 20 + } + } + # Opinion loss. + ## Lose a bunch of opinion with your family, who are not amused. + every_close_or_extended_family_member = { + limit = { would_judge_new_gallivanters_trigger = yes } + custom = custom.every_judgemental_close_or_extended_family_member + add_opinion = { + target = root + modifier = insulted_family_opinion + opinion = -30 + } + } + ## And your spouse(s), assuming they either have kids with you or were expecting to. + every_spouse = { + limit = { + would_judge_new_gallivanters_trigger = yes + OR = { + # They have children with you. + any_child = { + count >= 1 + NOT = { has_trait = disinherited } + any_parent = { this = root } + } + # Or thought they might. + AND = { + # Which means you're compatible for childbirth. + OR = { + AND = { + is_female = yes + age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE + root = { is_male = yes } + } + AND = { + is_male = yes + root = { + is_female = yes + age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE + } + } + } + can_have_children = yes + root = { can_have_children = yes } + } + } + } + add_opinion = { + target = root + modifier = insulted_family_opinion + opinion = -30 + } + } + # Plus make sure we flag this to players. + hidden_effect = { + every_player = { + limit = { + any_heir = { this = root } + } + send_interface_toast = { + type = event_toast_effect_neutral + title = disinherit_interaction_notification + left_icon = root + + root = { + show_as_tooltip = { + custom_tooltip = reject_inheritance_decision.tt.heir_rejects_inheritance + add_trait_force_tooltip = gallivanter + } + } + } + } + } + # Let newbs know that this doesn't rule them out of _all_ land. + custom_tooltip = reject_inheritance_decision.tt.newb_explainer + } + + cost = { prestige = 100 } + + ai_potential = { + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + NOR = { + has_realm_law = camp_purpose_legitimists + has_trait = arrogant + has_trait = ambitious + } + can_access_reject_inheritance_decision_trigger = yes + any_heir_title = { } + } + + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 36 + kingdom = 0 + empire = 0 + hegemony = 0 + } + + ai_will_do = { + # Start the base low so that you need a fair amount of positive reasons to take it. + base = -70 + + # Boost up for various traits. + ## +++ Content. + modifier = { + add = @laamp_gallivanter_ai_will_do_bonus_3_value + has_trait = content + } + ## +++ Eccentric. + modifier = { + add = @laamp_gallivanter_ai_will_do_bonus_3_value + has_trait = eccentric + } + ## ++ Lazy. + modifier = { + add = @laamp_gallivanter_ai_will_do_bonus_2_value + has_trait = lazy + } + ## ++ Fickle. + modifier = { + add = @laamp_gallivanter_ai_will_do_bonus_2_value + has_trait = fickle + } + ## ++ Humble. + modifier = { + add = @laamp_gallivanter_ai_will_do_bonus_2_value + has_trait = humble + } + ## + Arbitrary. + modifier = { + add = @laamp_gallivanter_ai_will_do_bonus_1_value + has_trait = arbitrary + } + ## + Craven. + modifier = { + add = @laamp_gallivanter_ai_will_do_bonus_1_value + has_trait = craven + } + # Hurt somewhat by others. + ## -- Greedy. + modifier = { + add = @laamp_gallivanter_ai_will_do_malus_2_value + has_trait = greedy + } + ## --- Diligent. + modifier = { + add = @laamp_gallivanter_ai_will_do_malus_3_value + has_trait = diligent + } + # Plus stress. + ## Level 1. + modifier = { + add = 25 + stress_level = 1 + } + ## Level 2. + modifier = { + add = 50 + stress_level = 2 + } + ## Level 3. + modifier = { + add = 75 + stress_level >= 3 + } + } +} + +############################################# +# Renounce Vows # +############################################# + +### Renounce Vows ### +renounce_vows_decision = { + picture = { + reference = "gfx/interface/illustrations/decisions/ep3_decision_laamp_neutral_mountain.dds" + } + desc = renounce_vows_decision_desc + selection_tooltip = renounce_vows_decision_tooltip + decision_group_type = adventurer_minor + + is_shown = { + has_government = landless_adventurer_government + has_trait = devoted + } + + is_valid = { + has_trait = devoted + } + + effect = { + stress_impact = { + zealous = medium_stress_impact_gain + humble = medium_stress_impact_gain + cynical = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + } + remove_trait = devoted + add_piety_level = -3 + } + + ai_potential = { + has_trait = devoted + } + + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 64 + kingdom = 0 + empire = 0 + hegemony = 0 + } + + ai_will_do = { + base = 0 + + modifier = { + add = 100 + NOT = { + any_child = { + count >= 2 + is_physically_able = yes + } + } + } + } +} + +### Embrace Responsibilities ### +embrace_responsibilities_decision = { + # Everyone else's picture. + picture = { reference = "gfx/interface/illustrations/decisions/decision_dynasty_house.dds" } + desc = embrace_responsibilities_decision_desc + selection_tooltip = embrace_responsibilities_decision_tooltip + decision_group_type = adventurer_minor + + is_shown = { + # Remove the trait from yourself. + has_trait = gallivanter + # Standard filter checks. + is_playable_character = yes + exists = dynasty + } + + is_valid = { + # We show the trait again so that we're explicit about what this means. + has_trait = gallivanter + NOR = { + # Can't access if you've accessed recently. + custom_tooltip = { + text = embrace_responsibilities_decision.tt.recently_added_gallivanter + has_character_flag = recently_added_gallivanter + } + # And, if you accessed gallivanter again via content somehow, then you can't remove it _again_. + custom_tooltip = { + text = embrace_responsibilities_decision.tt.has_embraced_responsibilities + has_character_flag = has_embraced_responsibilities + } + } + } + + is_valid_showing_failures_only = { is_available_healthy_adult = yes } + + effect = { + # Sort trait shenanigans. + ## Fake-lose the trait — we do this up here so that it's at the top, but also so that the trait being removed doesn't affect the stress block below.. + show_as_tooltip = { remove_trait = gallivanter } + ## Next, stress is quite high from this, unless you're keen for the resumption of responsibilities. + stress_impact = { + base = 100 + diligent = -10 + arrogant = -50 + ambitious = -80 + } + ## Plus make sure we flag this to players. + hidden_effect = { + every_player = { + limit = { + OR = { + # Normal inheritance. + any_close_or_extended_family_member = { this = root } + # House inheritance. + AND = { + has_realm_law = single_heir_dynasty_house + house = root.house + } + } + } + send_interface_toast = { + type = event_toast_effect_neutral + title = restore_inheritance_interaction_notification + left_icon = root + + root = { + show_as_tooltip = { + custom_tooltip = embrace_responsibilities_decision.tt.possible_heir_embraces_inheritance + remove_trait = gallivanter + } + } + } + } + } + ## Finally, actually toss the trait. + hidden_effect = { + remove_trait = gallivanter + # And flag how long you've had it for for removal purposes. + add_character_flag = { + flag = has_embraced_responsibilities + years = 10 + } + } + # Does anyone in our dynasty even have titles for us to care? + if = { + limit = { + dynasty = { + any_dynasty_member = { + is_ruler = yes + OR = { + # Holds an elective title, which will generally make families candidates. + any_held_title = { + # Pre-filter out to higher tiers. + title_tier >= kingdom + # Aaand then check if they're actually elective. + has_title_law_flag = elective_succession_law + } + # Holds house seniority, in which case if we're the same house... + AND = { + has_realm_law = single_heir_dynasty_house + house = root.house + } + # Is an ancestor, which we spoof a smidge. + OR = { + is_parent_of = root + is_grandparent_of = root + is_great_grandparent_of = root + } + } + } + } + } + # Reinheritance can take a bit, unlike disinheritance, so we tell the player not to worry. + custom_tooltip = embrace_responsibilities_decision.tt.effects_delayed + # Opinion loss. + ## Lose a bunch of opinion with your family, who don't appreciate the upset. + ### It'd be very annoying to try to set this up to _only_ grab the family who are below you in succession for each type of succession, largely because succession won't update immediately on removal of the trait, so we just assume you piss off everyone a little. + every_close_or_extended_family_member = { + limit = { + # Excepting direct descendants or partners. + NOR = { + any_ancestor = { this = root } + is_consort_of = root + } + } + custom = custom.every_close_or_extended_family_member + add_opinion = { + target = root + modifier = barging_into_succession_opinion + opinion = -20 + } + } + } + } + + cost = { prestige = 400 } + ai_check_interval = 0 +} + +############################################# +# Reject Election # +# by Ewan Cowhig Croft # +############################################# + +### Change Election Candidacy Status ### +change_election_candidacy_status_decision = { + # Everyone else's picture. + picture = { reference = "gfx/interface/illustrations/decisions/decision_found_kingdom.dds" } + desc = { + first_valid = { + triggered_desc = { + trigger = { has_variable = rejects_electioneering } + desc = change_election_candidacy_status_decision_desc.embrace + } + desc = change_election_candidacy_status_decision_desc.reject + } + } + selection_tooltip = change_election_candidacy_status_decision_tooltip + + is_shown = { + is_ai = no + liege = { + any_held_title = { + title_tier >= kingdom + has_title_law_flag = elective_succession_law + } + } + } + + is_valid = { + custom_tooltip = { + text = change_election_candidacy_status_decision.tt.you_are_an_election_candidate + liege = { + any_held_title = { + title_tier >= kingdom + has_title_law_flag = elective_succession_law + any_election_candidate = { this = root } + } + } + } + } + + cooldown = { years = 20 } + + effect = { + # If we already do not want to be a candidate, then step up. + if = { + limit = { has_variable = rejects_electioneering } + remove_variable = rejects_electioneering + custom_tooltip = change_election_candidacy_status_decision.tt.embraces_candidacy + liege = { + add_opinion = { + target = root + modifier = indecision_opinion + opinion = -25 + } + every_vassal = { + custom = custom.every_co_vassal_not_arrogant_or_ambitious + limit = { + NOR = { + has_trait = arrogant + has_trait = ambitious + } + } + add_opinion = { + target = root + modifier = indecision_opinion + opinion = -25 + } + } + } + } + # Otherwise, we are a candidate that wants not to be, so step down. + else = { + set_variable = { + name = rejects_electioneering + value = yes + } + custom_tooltip = change_election_candidacy_status_decision.tt.renounces_candidacy + liege = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -25 + } + every_vassal = { + custom = custom.every_co_vassal_not_humble_or_content + limit = { + NOR = { + has_trait = humble + has_trait = content + } + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = -25 + } + } + } + } + } + + cost = { prestige = 250 } + ai_check_interval = 0 +} + +############################################# +# Bandit King +############################################# + +### Levy the Outcasts ### +bandit_king_decision = { + picture = { reference = "gfx/interface/illustrations/decisions/decision_levy_outcasts.dds" } + desc = bandit_king_decision_desc + decision_group_type = adventurer + selection_tooltip = bandit_king_decision_tooltip + sort_order = 150 + + is_shown = { + has_ep3_dlc_trigger = yes + government_has_flag = government_is_landless_adventurer + NOT = { has_character_flag = bandit_king_var } + } + + is_valid = { + calc_true_if = { + amount >= 3 + has_trait = ambitious + has_trait = schemer + has_trait_xp = { + trait = gallowsbait + track = bandit + value >= 40 + } + has_trait_xp = { + trait = gallowsbait + track = thief + value >= 40 + } + has_trait_xp = { + trait = gallowsbait + track = poacher + value >= 40 + } + has_trait_xp = { + trait = gallowsbait + track = marauder + value >= 40 + } + has_trait_xp = { + trait = gallowsbait + track = trickster + value >= 40 + } + } + } + + effect = { + add_character_flag = bandit_king_var + show_as_tooltip = { become_bandit_king_decision_effect = yes } + custom_tooltip = bandit_king_decision_reward + trigger_event = ep3_laamp_decision_event.1120 + } + + cost = { + gold = 500 + prestige = 2000 + } + + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 32 + kingdom = 0 + empire = 0 + hegemony = 0 + } + + ai_potential = { + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + + ai_will_do = { + base = 100 + } +} + +############################################# +# Gather Provisions +# by Joe Parkin +############################################# + +### Gather Provisions ### +gather_provisions_decision = { + picture = { reference = "gfx/interface/illustrations/decisions/ep3_decision_laamp_neutral_mountain.dds" } + desc = gather_provisions_decision_desc + selection_tooltip = gather_provisions_decision_tooltip + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 36 + kingdom = 0 + empire = 0 + hegemony = 0 + } + sort_order = 200 + cooldown = { years = 3 } + decision_group_type = adventurer_minor + + is_shown = { + #DLC check. + has_ep3_dlc_trigger = yes + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + } + + is_valid_showing_failures_only = { + is_available_allow_travelling = yes + } + + effect = { + custom_tooltip = { + text = gather_provisions_decision_effect_tt + trigger_event = ep3_decisions_event.7000 + } + close_view = { + view = decisions + player = root + } + } + + ai_potential = { + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + domicile ?= { provisions < max_provisions } + } + + ai_will_do = { + base = 100 + } +} + +############################################# +# The Travels of CHAR.Root +# by Krzysztof Lankowski +############################################# + +### The Travels of [ROOT.Char.GetFullNameNoTooltip] ### +seasoned_visitor_decision = { + picture = { + reference = "gfx/interface/illustrations/decisions/fp3/fp3_decision_foundation.dds" + } + sort_order = 200 + decision_group_type = adventurer + desc = seasoned_visitor_decision_desc + selection_tooltip = seasoned_visitor_decision_tooltip + + is_shown = { + has_ep3_dlc_trigger = yes + government_has_flag = government_is_landless_adventurer + NOT = { + has_character_flag = had_seasoned_visitor_decision + } + } + + is_valid = { + custom_tooltip = { + text = seasoned_visitor_decision_not_enough_poi + has_variable = poi_visited + var:poi_visited >= 26 #1066 all poi in India. If you change the value here, please also change the value in loc string above + } + calc_true_if = { + amount >= 2 + custom_tooltip = { + text = seasoned_visitor_decision_not_enough_poi_advanced + has_variable = poi_visited + var:poi_visited >= 42 #1066 all poi in two Indias. If you change the value here, please also change the value in loc string above + } + prestige_level >= 4 + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 60 + } + } + } + + is_valid_showing_failures_only = { + NOT = { + has_trait = incapable + } + } + + cost = { + prestige = 1500 + gold = 500 + } + + effect = { + custom_tooltip = { + text = seasoned_visitor_decision_reward_desc + } + hidden_effect = { + trigger_event = ep3_laamp_decision_event.1100 + } + } + + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 32 + kingdom = 0 + empire = 0 + hegemony = 0 + } + + ai_potential = { + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + + ai_will_do = { + base = 100 + } +} + +############################################# +# A Catholic Path +# by Krzysztof Lankowski +############################################# + +### The [ROOT.Char.GetFaith.GetAdherentNameNoTooltip] Path — Ascension ### +zealous_missionary_prep_decision = { + picture = { + reference = "gfx/interface/illustrations/decisions/decision_personal_religious.dds" + } + sort_order = 200 + decision_group_type = adventurer + desc = zealous_missionary_prep_decision_desc + selection_tooltip = zealous_missionary_prep_decision_tooltip + + is_shown = { + has_ep3_dlc_trigger = yes + government_has_flag = government_is_landless_adventurer + is_adult = yes + NOR = { + has_trait = cynical + has_character_flag = zealous_missionary_prep + } + } + + is_valid = { + calc_true_if = { + amount >= 2 + custom_tooltip = { + text = zealous_missionary_prep_decision_holy_sites_visited_req + has_variable = visited_unique_holy_sites_count + OR = { + var:visited_unique_holy_sites_count >= 2 + is_ai = yes + } + + } + has_trait = theologian + piety_level >= 4 + } + + + custom_tooltip = { + text = zealous_missionary_prep_decision_holy_site + OR = { + AND = { + is_ai = no + location = { + barony = { + is_holy_site_of = root.faith + } + county.faith = root.faith + county.holder.top_liege.faith = root.faith + } + } + AND = { + is_ai = yes + has_trait = zealous + learning > 18 + NOT = { + any_player = { + faith = location.faith + } + } + current_month = 4 # 12 times less ai missionaries getting spawned + } + } + } + } + + is_valid_showing_failures_only = { + NOT = { + has_trait = incapable + } + } + + cost = { + piety = 2500 + } + + effect = { + if = { + limit = { + NOT = { + has_trait = zealous + } + } + add_trait = zealous + add_stress = medium_stress_gain + } + hidden_effect = { + trigger_event = ep3_laamp_decision_event.1101 + add_character_flag = zealous_missionary_prep + } + custom_tooltip = { + text = zealous_missionary_prep_decision_reward_desc + } + if = { + limit = { + any_owned_story = { + story_type = story_hasan + } + } + custom_tooltip = chance_to_advance_to_the_assassins_tt + } + } + + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 32 + kingdom = 0 + empire = 0 + hegemony = 0 + } + + ai_potential = { + ai_zeal >= 50 + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + + ai_will_do = { + base = 100 + } +} + +### The [ROOT.Char.GetFaith.GetAdherentNameNoTooltip] Path — Prelude ### +zealous_missionary_start_decision = { + picture = { + reference = "gfx/interface/illustrations/decisions/decision_personal_religious.dds" + } + sort_order = 400 + decision_group_type = adventurer + desc = zealous_missionary_prep_decision_desc + selection_tooltip = zealous_missionary_prep_decision_tooltip + + is_shown = { + has_ep3_dlc_trigger = yes + government_has_flag = government_is_landless_adventurer + has_character_flag = zealous_missionary_prep + NOR = { + has_character_flag = zealous_missionary_start + is_ai = yes + any_player = { + OR = { + this = location.county.holder + this = location.county.holder.top_liege + } + } + } + } + + is_valid = { + location.county = { hasan_evangelize_province_trigger = yes } + } + + is_valid_showing_failures_only = { + NOT = { + has_trait = incapable + } + } + + effect = { + custom_tooltip = { + text = zealous_missionary_start_decision_reward_desc + } + show_as_tooltip = { + ep3_hasan_advance_radicalism = yes + } + hidden_effect = { + trigger_event = ep3_laamp_decision_event.1102 + } + } + + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 32 + kingdom = 0 + empire = 0 + hegemony = 0 + } + + ai_potential = { + ai_zeal >= 50 + has_character_flag = zealous_missionary_prep + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + + ai_will_do = { + base = 100 + } +} + +############################################# +# Become Conqueror +# by Krzysztof Lankowski +############################################# + +### Become a Great Conqueror ### +become_conqueror_decision = { + picture = { + reference = "gfx/interface/illustrations/decisions/fp2_decision_struggle_hostility.dds" + } + sort_order = 400 + decision_group_type = adventurer + desc = become_conqueror_decision_desc + selection_tooltip = become_conqueror_decision_tooltip + + is_shown = { + has_ep3_dlc_trigger = yes + government_has_flag = government_is_landless_adventurer + NOR = { + has_game_rule = no_conquerors_frequency + has_character_flag = had_laamp_conq_decision + has_trait = conqueror + } + trigger_if = { + limit = { + is_ai = yes + OR = { + exists = location.county.holder + exists = location.duchy.holder + exists = location.county.holder.top_liege + } + } + NOT = { + any_player = { + OR = { + this = location.county.holder + this = location.duchy.holder + this = location.county.holder.top_liege + } + } + } + } + } + + is_valid = { + calc_true_if = { + amount >= 8 + martial >= 22 + prestige_level >= 5 + AND = { + has_trait = strategist + has_trait = gallant + } + custom_tooltip = { + text = become_conqueror_decision_war_participation + any_memory = { + count >= 20 + OR = { + has_memory_type = offensive_war + has_memory_type = defensive_war + has_memory_type = joined_allys_war + } + } + } + custom_tooltip = { + text = become_conqueror_decision_war_participation_kingdom + any_memory = { + count >= 5 + OR = { + has_memory_type = offensive_war + has_memory_type = defensive_war + has_memory_type = joined_allys_war + } + any_memory_participant = { + primary_title.tier >= tier_kingdom + } + } + } + calc_true_if = { + amount >= 1 + custom_tooltip = { + text = become_conqueror_decision_two_commander_traits + any_character_trait = { + count >= 2 + has_trait_category = commander + } + } + martial >= 28 + } + + custom_tooltip = { + text = become_conqueror_decision_enough_troops + current_military_strength >= 4000 + } + custom_tooltip = { + text = become_conqueror_decision_enough_battle_kills + any_killed_character = { + count >= 12 + } + } + custom_tooltip = { + text = become_conqueror_decision_enough_war_contracts + has_variable = war_contract_tracker + var:war_contract_tracker >= 20 + } + calc_true_if = { + amount >= 1 + custom_tooltip = { + text = become_conqueror_decision_enough_high_level_knights + any_knight = { + count >= 6 + prowess >= 18 + } + } + custom_tooltip = { + text = become_conqueror_decision_enough_mediocre_knights + any_knight = { + count >= 12 + prowess >= 12 + } + } + } + + } + } + + is_valid_showing_failures_only = { + NOT = { + has_trait = incapable + } + } + + cost = { + prestige = 5000 + } + + effect = { + custom_tooltip = become_conqueror_decision_reward + custom_tooltip = become_conqueror_decision_troops + if = { + limit = { has_dlc_feature = legends } + custom_tooltip = become_conqueror_decision_legend_seed + } + trigger_event = ep3_laamp_decision_event.1110 + show_as_tooltip = { + if = { + limit = { + exists = location.kingdom.holder + } + add_pressed_claim = location.kingdom + start_war = { + cb = ep3_laamp_adventurer_kingdom_invasion + target = location.kingdom.holder + claimant = root + target_title = location.kingdom + target_title = location.kingdom.title_capital_county + } + } + else_if = { + limit = { + exists = location.duchy.holder + } + add_pressed_claim = location.duchy + start_war = { + cb = claim_cb + target = location.duchy.holder + claimant = root + target_title = location.duchy + target_title = location.duchy.title_capital_county + } + } + else_if = { + limit = { + exists = location.county.holder + } + add_pressed_claim = location.county + start_war = { + cb = claim_cb + target = location.county.holder + claimant = root + target_title = location.county + } + } + } + + } + ai_check_interval = 0 +} + +############################################# +# Found a City +# by Krzysztof Lankowski +############################################# + +### Found a Holding ### +start_city_construction_decision = { + picture = { + reference = "gfx/interface/illustrations/decisions/ep3_decision_city.dds" + } + sort_order = 200 + decision_group_type = adventurer + desc = start_city_construction_decision_desc + selection_tooltip = start_city_construction_decision_tooltip + + is_shown = { + has_ep3_dlc_trigger = yes + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + NOT = { has_character_flag = laamp_city_builder } + } + + is_valid = { + custom_tooltip = { + text = start_city_construction_decision_empty_holding + exists = location.county.holder + location = { has_holding = no } + } + culture = { has_innovation = innovation_city_planning } + location.county.holder ?= { + opinion = { + target = root + value >= 10 + } + } + calc_true_if = { + amount >= 3 + gold >= 1000 + piety_level >= 3 + prestige_level >= 3 + has_trait = architect + stewardship >= 18 + } + } + + is_valid_showing_failures_only = { + NOT = { has_trait = incapable } + } + + cost = { + gold = 400 + } + + effect = { + if = { + limit = { + location.county.holder = { government_has_flag = government_is_mandala } + } + show_as_tooltip = { + location = { + begin_create_holding = { type = temple_citadel_holding } + } + } + set_variable = { + name = city_construction_is_temple_citadel + value = location.county + } + } + else = { + show_as_tooltip = { + location = { + begin_create_holding = { type = castle_holding } + } + } + set_variable = { + name = city_construction_is_castle + value = location.county + } + } + custom_tooltip = start_city_construction_decision_more_rewards + trigger_event = ep3_laamp_decision_event.1130 + } + + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 32 + kingdom = 0 + empire = 0 + hegemony = 0 + } + + ai_potential = { + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + } + + ai_will_do = { + base = 100 + } +} + +############################################# +# Become a Knight Errant +############################################# + +### The $knight_culture_player_no_tooltip$ of the [ROOT.Char.CustomFixedRandom('GetKnightErrantAnimal')|U] ### +knight_errant_decision = { + picture = { reference = "gfx/interface/illustrations/decisions/decision_tale.dds" } + desc = knight_errant_decision_desc + decision_group_type = adventurer + selection_tooltip = knight_errant_decision_tooltip + sort_order = 300 + + is_shown = { + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + NOT = { has_trait = knight_errant } + NOT = { has_variable = knight_errant_decision_var } + } + + is_valid = { + prestige_level >= 4 + custom_tooltip = { + text = camp_purpose_mercenaries_tt + has_realm_law = camp_purpose_mercenaries + } + NOT = { has_trait = gallowsbait } + trigger_if = { + limit = { + has_variable = justicar_contracts_succeeded_counter + } + save_temporary_scope_value_as = { + name = contract_tally + value = var:justicar_contracts_succeeded_counter + } + } + trigger_else = { + save_temporary_scope_value_as = { + name = contract_tally + value = 0 + } + } + custom_tooltip = { + text = knight_errant_decision_tt + has_variable = justicar_contracts_succeeded_counter + var:justicar_contracts_succeeded_counter >= 10 + } + } + + is_valid_showing_failures_only = { + NOR = { + is_available = no + has_trait = infirm + is_incapable = yes + } + } + + cost = { + prestige = 2000 + } + + effect = { + set_variable = knight_errant_decision_var + show_as_tooltip = { + disburse_knight_errant_decision_rewards_effect = yes + } + trigger_event = ep3_decisions_event.5001 + } + + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 32 + kingdom = 0 + empire = 0 + hegemony = 0 + } + + ai_potential = { + ai_honor >= 25 + OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } + prestige > 500 + NOT = { has_trait = arrogant } + } + + ai_will_do = { + base = 50 + modifier = { + add = -30 + has_trait = humble + } + } +} + +############################################# +# Butcher Animals # +# by Ewan Cowhig Croft # +############################################# + +### Butcher Animals Decision ### +butcher_animals_decision = { + title = butcher_animals_decision_name + picture = { reference = "gfx/interface/illustrations/decisions/decision_pet_dog.dds" } + desc = butcher_animals_decision_desc + selection_tooltip = butcher_animals_decision_tooltip + decision_group_type = adventurer + + sort_order = 80 + + is_shown = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard filters. + OR = { has_government = landless_adventurer_government has_government = landless_minority_government } + # Flavour checks. + ## We deliberately don't show you this most of the time — it should be hidden unless things are absolutely dire. + domicile.provisions <= 500 + } + + is_valid = { + OR = { + # Dogs. + butcher_animals_decision_available_dogs_trigger = yes + # Cats. + butcher_animals_decision_available_cats_trigger = yes + # Horses. + butcher_animals_decision_available_horses_trigger = yes + # Elephants. + butcher_animals_decision_available_elephants_trigger = yes + } + } + + is_valid_showing_failures_only = { + # Standard checks. + is_available_allow_travelling = yes + # Shouldn't be at war. + is_at_war = no + } + + widget = { + gui = "decision_view_widget_option_list_generic" + controller = decision_option_list_controller + decision_to_second_step_button = "BUTCHER_ANIMALS_DECISION_NEXT_STEP_BUTTON" + item = { + value = butcher_dogs + is_valid = { + custom_tooltip = { + text = butcher_animals_decision.tt.you_have_no_dogs + butcher_animals_decision_available_dogs_trigger = yes + } + } + localization = butcher_animals_decision_option_dogs + icon = "gfx/interface/icons/pets/artifact_dog_folded_ears_fox_colored.dds" + } + item = { + value = butcher_cats + is_valid = { + custom_tooltip = { + text = butcher_animals_decision.tt.you_have_no_cats + butcher_animals_decision_available_cats_trigger = yes + } + } + localization = butcher_animals_decision_option_cats + icon = "gfx/interface/icons/pets/artifact_cat_tabby.dds" + } + item = { + value = butcher_horses + is_valid = { + custom_tooltip = { + text = butcher_animals_decision.tt.you_have_no_horses + butcher_animals_decision_available_horses_trigger = yes + } + } + localization = butcher_animals_decision_option_horses + icon = "gfx/interface/icons/regimenttypes/konni.dds" + } + item = { + value = butcher_elephants + is_valid = { + custom_tooltip = { + text = butcher_animals_decision.tt.you_have_no_elephants + butcher_animals_decision_available_elephants_trigger = yes + } + } + localization = butcher_animals_decision_option_elephants + icon = "gfx/interface/icons/regimenttypes/war_elephants.dds" + } + } + + cost = { prestige = medium_prestige_value } + + effect = { + show_as_tooltip = { + random_list = { + 100 = { + show_chance = no + desc = butcher_animals_decision.tt.dogs + custom_tooltip = butcher_animals_decision.tt.provisions_gain.per_dog_mod + custom_tooltip = butcher_animals_decision.tt.provisions_gain.building.dog + custom_tooltip = butcher_animals_decision.tt.cooldown.dogs + } + 100 = { + show_chance = no + desc = butcher_animals_decision.tt.cats + custom_tooltip = butcher_animals_decision.tt.provisions_gain.per_cat_mod + custom_tooltip = butcher_animals_decision.tt.cooldown.cats + } + 100 = { + show_chance = no + desc = butcher_animals_decision.tt.horses + # War horse is niche content, so we don't show it unless it applies. + if = { + limit = { has_character_modifier = horse_story_modifier } + custom_tooltip = butcher_animals_decision.tt.provisions_gain.your_horse_mod + } + custom_tooltip = butcher_animals_decision.tt.provisions_gain.building.horse + custom_tooltip = butcher_animals_decision.tt.cooldown.horses + } + 100 = { + show_chance = no + desc = butcher_animals_decision.tt.elephants + custom_tooltip = butcher_animals_decision.tt.provisions_gain.building.elephant + custom_tooltip = butcher_animals_decision.tt.cooldown.elephants + } + } + } + switch = { + trigger = yes + scope:butcher_dogs = { trigger_event = ep3_laamp_decision_event.1201 } + scope:butcher_cats = { trigger_event = ep3_laamp_decision_event.1202 } + scope:butcher_horses = { trigger_event = ep3_laamp_decision_event.1203 } + scope:butcher_elephants = { trigger_event = ep3_laamp_decision_event.1204 } + } + } + ai_check_interval = 0 +} + +############################################# +# Humiliate the Stooge +############################################# + +### Humiliate the Stooge ### +humiliate_the_stooge_decision = { + picture = { reference = "gfx/interface/illustrations/decisions/decision_prison.dds" } + desc = humiliate_the_stooge_decision_desc + selection_tooltip = humiliate_the_stooge_decision_tooltip + + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 24 + kingdom = 0 + empire = 0 + hegemony = 0 + } + sort_order = 150 + decision_group_type = adventurer_minor + + cooldown = { years = 2 } + + ai_potential = { + stress > 0 + } + + is_shown = { + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + } + + is_valid = { + employs_court_position = stooge_camp_officer + } + + is_valid_showing_failures_only = { + NOR = { + is_available = no + has_trait = infirm + is_incapable = yes + } + } + + cost = { + prestige = 20 + } + + effect = { + custom_tooltip = humiliate_the_stooge_decision_rewards + random_courtier = { + limit = { has_court_position = stooge_camp_officer } + save_scope_as = stooge + } + scope:stooge ?= { + humiliate_stooge_counter_effect = yes + } + humiliate_stooge_reward_effect = yes + close_view = { + view = decisions + player = root + } + } + + ai_will_do = { + base = 50 + modifier = { + add = -50 + has_trait = compassionate + } + modifier = { + add = 50 + OR = { + has_trait = callous + has_trait = sadistic + } + } + modifier = { + add = -50 + prestige <= 50 + } + } +} diff --git a/events/dlc/ep3/ep3_laamp_events.txt b/events/dlc/ep3/ep3_laamp_events.txt index 967db813..21038fc3 100644 --- a/events/dlc/ep3/ep3_laamp_events.txt +++ b/events/dlc/ep3/ep3_laamp_events.txt @@ -1175,6 +1175,124 @@ ep3_laamps.0032 = { } } +ep3_laamps.1030 = { + type = character_event + window = fullscreen_event + title = ep3_laamps.1030.t + desc = { + desc = ep3_laamps.1030.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:laamp_heir } + desc = ep3_laamps.1030.heir + } + triggered_desc = { + trigger = { exists = scope:laamp_liege } + desc = ep3_laamps.1030.liege + } + desc = ep3_laamps.1030.new + } + } + theme = realm + left_portrait = { + character = root + animation = marshal + } + lower_right_portrait = scope:laamp_inheritor + override_background = { reference = ep3_fullscreen_adventurer_positive } + cooldown = { days = 5 } + + trigger = { exists = scope:laamp_inheritor } + + immediate = { + # Save scopes for loc + primary_title = { save_scope_as = old_primary_title } + capital_province = { save_scope_as = old_capital_province } + if = { + limit = { top_liege != this } + liege = { save_scope_as = old_liege } + } + # Transfer landed titles + every_held_title = { + title_tier > barony + limit = { + OR = { + is_landless_type_title = no + is_nomad_title = yes + } + } + add_to_list = target_titles + } + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + add_claim_on_loss = no + } + hidden_effect = { + every_in_list = { + list = target_titles + change_title_holder_include_vassals = { + holder = scope:laamp_inheritor + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + # Create Adventurer + create_landless_adventurer_title_effect = { + REASON = flag:voluntary + FLAVOR_CHAR = scope:laamp_inheritor + } + scope:laamp_inheritor = { + # Tooltip for player + custom_tooltip = become_landless_adventurer_decision_title_scope_tt + # Create a loving family so inheritance isn't so borked + if = { + limit = { has_character_flag = new_laamp_inheritor } + trigger_event = game_rule.1001 + remove_character_flag = new_laamp_inheritor + } + } + scope:old_liege ?= { trigger_event = ep3_laamps.1032 } + adventurer_prestige_reset_effect = yes + hidden_effect = { + every_held_title = { + limit = { + is_noble_family_title = yes + } + root = { destroy_title = prev } + } + } + } + + option = { + name = ep3_laamps.1030.a + create_landless_adventurer_title_tooltip_effect = yes + add_prestige = medium_prestige_gain + add_character_modifier = { + modifier = ep3_voluntary_laamp_character_modifier + years = 5 + } + } +} + +# Liege event +ep3_laamps.1032 = { + type = letter_event + opening = ep3_laamps.1032.opening + desc = ep3_laamps.1032.desc + sender = scope:adventurer + + trigger = { is_ai = no } + + immediate = { + scope:adventurer = { create_landless_adventurer_title_tooltip_effect = yes } + } + + option = { + name = ep3_laamps.1032.a + } +} ################################################## # Become Adventurer - Revocation # by Joe Parkin diff --git a/localization/english/replace/buildings_l_english.yml b/localization/english/replace/buildings_l_english.yml index 6a82de82..bb88b740 100644 --- a/localization/english/replace/buildings_l_english.yml +++ b/localization/english/replace/buildings_l_english.yml @@ -2776,7 +2776,7 @@ duke_landless_minority_community_female_minority_community: "Mistress" spouse_landless_minority_community_male: "Master" spouse_landless_minority_community_holder_female: "Mistress" - d_laamp_test_jewish:0 "$congregationist$ Community of $dynn_britannia_kohn$" + d_laamp_test_jewish:0 "$ashkenazi$ Community of the $dynn_britannia_kohn$'s" d_laamp_test_jewish_adj:0 "Jewish" d_laamp_test_jewish_article:0 "The " minority_community_domicile_title: "[CHARACTER.GetFirstNamePossessiveNoTooltip] $game_concept_minority_community$" @@ -2790,3 +2790,13 @@ minority_community_move_desc: "#T Move $minority_community_type$#!\nMove your [game_concept_minority_community|E] to another [barony|E] within the [realm|E].\n@alert_icon! #alert_trial You will be unable to move it again for [EmptyScope.ScriptValue('estate_move_cooldown_value')|V0] days#!\n\n#S Cost:\n#![GetCostString( DOMICILE_TYPE.GetMoveCost( Character.Self ) )]\n\n#P Click to move your $minority_community_type$#!" MINORITY_COMMUNITY_CONCEPT: "[game_concept_minority_community|E]" domicile_minority_community: "the [CHARACTER.GetFaith.GetNameNoTooltip] $Community$ of [CHARACTER.GetHouse.GetNameNoTooltip]" + + ep3_laamps.1030.t: "On the Move Again" + ep3_laamps.1030.desc: "My people no longer feel secure in this realm, as such we are leaving to ensure our safety.\n\nI am joined by my family and people, with varying degrees of enthusiasm for their new lives on the road.\n\n" + ep3_laamps.1030.heir: "In my stead, my [ROOT.Char.Custom2('RelationToMeShort', SCOPE.sC('laamp_inheritor'))] and heir, [laamp_inheritor.GetFirstName], has assumed my titles as the [laamp_inheritor.GetTitleAsNameNoTooltip] of [laamp_inheritor.GetPrimaryTitle.GetNameNoTierNoTooltip]." + ep3_laamps.1030.liege: "Any lands you ruled have been given to my erstwhile liege." + ep3_laamps.1030.new: "Any lands you ruled have been given to a local knight." + ep3_laamps.1030.a: "Well, what we are we waiting for?" + ep3_laamps.1032.opening: "[adventurer.Custom2('AppropriateGreetingPositive', ROOT.Char)]" + ep3_laamps.1032.desc: "My people no longer feel secure in this realm, as such we are leaving. Good Day my Liege." + ep3_laamps.1032.a: "A bold move, some might call foolish." \ No newline at end of file diff --git a/localization/english/replace/court_positions_2_l_english.yml b/localization/english/replace/court_positions_2_l_english.yml new file mode 100644 index 00000000..31792f16 --- /dev/null +++ b/localization/english/replace/court_positions_2_l_english.yml @@ -0,0 +1,177 @@ +l_english: + master_of_hunt_court_position_task_dangerous_game: "Track Dangerous Game" + master_of_hunt_court_position_task_dangerous_game_desc: "Your $master_of_hunt_court_position$ will track down dangerous game, such as wolves or bears, that would yield a lot of prestige to hunt." + master_of_hunt_court_position_task_dangerous_game_tt: "Every year your $master_of_hunt_court_position$ has a chance of [hunt_sighting_no_prefix|E] dangerous game for you to[GetActivityType('activity_hunt').GetTextIcon][GetActivityType('activity_hunt').GetName]\n$master_of_hunt_court_position_task_generic_tt$" + + master_of_hunt_court_position_task_regular_game: "Track Regular Game" + master_of_hunt_court_position_task_regular_game_desc: "Your $master_of_hunt_court_position$ will track down regular game, such as foxes or deer, that would yield an average amount of prestige to hunt." + master_of_hunt_court_position_task_regular_game_tt: "Every year your $master_of_hunt_court_position$ has a chance of [hunt_sighting_no_prefix|E] regular game for you to[GetActivityType('activity_hunt').GetTextIcon][GetActivityType('activity_hunt').GetName]\n$master_of_hunt_court_position_task_generic_tt$" + + master_of_hunt_court_position_task_legendary_game: "Track Legendary Game" + master_of_hunt_court_position_task_legendary_game_desc: "Your $master_of_hunt_court_position$ will attempt to track down legendary beasts that would yield an enormous of prestige to hunt." + master_of_hunt_court_position_task_legendary_game_tt: "Every year your $master_of_hunt_court_position$ has a small chance of [hunt_sighting_no_prefix|E] legendary game for you to[GetActivityType('activity_hunt').GetTextIcon][GetActivityType('activity_hunt').GetName]\n$master_of_hunt_court_position_task_generic_tt$" + + master_of_hunt_court_position_task_generic_tt: "The frequency of [hunt_sightings_no_prefix|E] increases with [aptitude|E] #weak (max one Sighting every 3 years)#!" + + court_jester_court_position_task_entertain_court: "Entertain Courtiers" + court_jester_court_position_task_entertain_court_desc: "Your $court_jester_court_position$ will spend their time entertaining your courtiers with jokes, stories, and acrobatics." + court_jester_court_position_task_entertain_court_tt: "Every year the $court_jester_court_position$ has a chance to reduce the [stress_loss_i] [stress|E] of a random [courtier|E] #weak (preferring those close to you, such as your [children|E])#!\nIf their [aptitude|E] is at least $aptitude_good$, up to two [courtiers|E] can be targeted every year" + foreign_emissary_court_position_task_entertain_court_tt: "Every year the $foreign_emissary_court_position$ has a chance to reduce the [stress_loss_i] [stress|E] of a random [courtier|E] #weak (preferring those close to you, such as your [children|E])#!\nIf their [aptitude|E] is at least $aptitude_good$, up to two [courtiers|E] can be targeted every year" + + court_jester_court_position_task_fuel_the_rumour_mill: "Fuel the Rumor Mill" + court_jester_court_position_task_fuel_the_rumour_mill_desc: "This character will spend their time spreading nonsensical rumors and misleading stories to slow down enemy schemes." + court_jester_court_position_task_fuel_the_rumour_mill_tt: "Every year the $court_jester_court_position$ has a chance to reduce the [stress_loss_i] [stress|E] of a random [courtier|E] #weak (preferring those close to you, such as your [children|E])#!" + + court_jester_court_position_task_abuse_the_jester: "Abuse the Jester" + court_jester_court_position_task_abuse_the_jester_desc: "Your $court_jester_court_position$ will spend their time being abused and humiliated." + court_jester_court_position_task_abuse_the_jester_tt: "Every year the $court_jester_court_position$ has a chance to reduce the [stress_loss_i] [stress|E] of a random [courtier|E] #weak (preferring those close to you, such as your [children|E])#!" + + court_artificer_court_position_task_martial: "Create Weapons, Armor, & go Adventuring" + court_artificer_court_position_task_martial_desc: "Your $court_artificer_court_position$ will gather inspiration to make swords, shields, armor, and go adventuring for the martially-inclined ruler." + court_artificer_court_position_task_martial_tt: "Every year the $court_artificer_court_position$ has a chance to gain a #V Weapon#!, #V Armor#!, or #V Adventure#! [inspiration|E] #weak (preferring [artifacts|E] you do not already have)#!\n$court_artificer_court_position_task_improved_chances_tt$" + + court_artificer_court_position_task_learning: "Create Books & Tapestries" + court_artificer_court_position_task_learning_desc: "Your $court_artificer_court_position$ will gather inspiration to make books, tapestries, or archemical concoctions to please the learned ruler." + court_artificer_court_position_task_learning_tt: "Every year the $court_artificer_court_position$ has a chance to gain a #V Book#!, #V Weaver#!, or #V Alchemy#! [inspiration|E] #weak (preferring [artifacts|E] you do not already have)#!\n$court_artificer_court_position_task_improved_chances_tt$" + + court_artificer_court_position_task_stewardship: "Create Crowns & Sculptures" + court_artificer_court_position_task_stewardship_desc: "Your $court_artificer_court_position$ will gather inspiration to make regalia, crowns, thrones, and other artifacts for the stewardly ruler." + court_artificer_court_position_task_stewardship_tt: "Every year the $court_artificer_court_position$ has a chance to gain a #V Smith#! or #V Artisan#! [inspiration|E]\n$court_artificer_court_position_task_improved_chances_tt$" + + court_artificer_court_position_task_improved_chances_tt: "Using this task drastically increases the chance of gaining an [inspiration|E]" + + must_have_an_equipped_illustrious_court_artifact: "You do #bold not#! have an equipped #V Illustrious#! [court_artifact|E]" + must_have_upgradeable_artifact_tt: "You do #bold not#! have an equipped [artifact|E] that can be upgraded" + + antiquarian_court_position_task_scout_for_artifacts: "Search for Rare Artifacts" + antiquarian_court_position_task_scout_for_artifacts_desc: "Your $antiquarian_court_position$ will scour ancient tomes and investigate loose rumors, searching for those who might be able to bring something spectacular back to court." + antiquarian_court_position_task_scout_for_artifacts_tt: "Every year the $antiquarian_court_position$ has a chance to give someone at [court|E] an Adventure [inspiration|E] #weak (Chance increases with [aptitude|E])#!" + antiquarian_inspired_adventurer_message: "$antiquarian_court_position$ Inspires Adventure!" + antiquarian_inspired_adventurer_effect: "Your [ROOT.Char.Custom2('RelationToMeShort', SCOPE.sC('adventure_target'))] [adventure_target.GetFirstName] gained an #V Adventure#! [inspiration|E]" + + antiquarian_court_position_task_improve_artifacts: "Improve Artifacts" + antiquarian_court_position_task_improve_artifacts_desc: "Your $antiquarian_court_position$ will improve and polish artifacts so that they are as impressive and effective as they can possibly be." + antiquarian_court_position_task_improve_artifacts_tt: "Every year the $antiquarian_court_position$ has a chance to improve an equipped [artifact|E]\nThe chance of improvement #weak (#bold not#! the quality)#! increases with [aptitude|E]\nCommon [artifacts|E] can be improved once, Masterworks twice, and so on" + antiquarian_improved_artifact_message: "[artifact_target.GetName] Improved!" + + artifact_prowess_1_modifier: "Prowess" + artifact_knight_effectiveness_1_modifier: "Knight Effectiveness" + artifact_glory_hound_levy_contribution_mult_1_modifier: "Glory Hound Levy Contribution" + artifact_enemy_hard_casualty_modifier_1_modifier: "Enemy Hard Casualty Modifier" + artifact_plains_advantage_1_modifier: "Plains Advantage" + artifact_farmlands_advantage_1_modifier: "Farmlands Advantage" + artifact_hills_advantage_1_modifier: "Hills Advantage" + artifact_mountains_advantage_1_modifier: "Mountains Advantage" + artifact_desert_advantage_1_modifier: "Desert Advantage" + artifact_desert_mountains_advantage_1_modifier: "Desert Mountain Advantage" + artifact_oasis_advantage_1_modifier: "Oasis Advantage" + artifact_jungle_advantage_1_modifier: "Jungle Advantage" + artifact_forest_advantage_1_modifier: "Forest Advantage" + artifact_taiga_advantage_1_modifier: "Taiga Advantage" + artifact_wetlands_advantage_1_modifier: "Wetlands Advantage" + artifact_steppe_advantage_1_modifier: "Steppe Advantage" + artifact_floodplains_advantage_1_modifier: "Floodplains Advantage" + artifact_drylands_advantage_1_modifier: "Drylands Advantage" + artifact_controlled_province_advantage_1_modifier: "Controlled Territory Defender Advantage" + artifact_hard_casualty_modifier_1_modifier: "Hard Casualty Modifier" + artifact_monthly_minor_prestige_1_modifier: "Monthly Prestige" + artifact_monthly_prestige_1_modifier: "Monthly Prestige" + artifact_monthly_piety_1_modifier: "Monthly Piety" + artifact_monthly_prestige_add_1_modifier: "Monthly Renown" + artifact_short_reign_duration_mult_1_modifier: "Short Reign Reduction" + artifact_short_reign_duration_mult_3_modifier: "$artifact_short_reign_duration_mult_1_modifier$" + artifact_monthly_tyranny_1_modifier: "Monthly Tyranny Reduction" + artifact_happy_powerful_vassal_tax_contribution_mult_1_modifier: "Powerful Vassal Councillor Tax Contribution" + artifact_courtly_tax_contribution_mult_1_modifier: "Courtly Tax Contribution" + artifact_courtly_vassal_opinion_1_modifier: "Courtly Opinion" + artifact_powerful_vassal_opinion_1_modifier: "Powerful Vassal Opinion" + artifact_parochial_vassal_opinion_1_modifier: "Parochial Opinion" + artifact_parochial_tax_contribution_mult_1_modifier: "Parochial Tax Contribution" + artifact_courtier_and_guest_opinion_1_modifier: "Courtier and Guest Opinion" + artifact_men_at_arms_maintenance_1_modifier: "Men-at-Arms Maintenance Reduction" + artifact_build_gold_cost_1_modifier: "Build Cost Reduction" + artifact_domain_tax_mult_1_modifier: "Domain Taxes" + artifact_zealot_vassal_opinion_1_modifier: "Zealot Opinion" + artifact_zealot_tax_contribution_mult_1_modifier: "Zealot Tax Contribution" + artifact_belligerent_tax_contribution_mult_1_modifier: "Belligerent Tax Contribution" + artifact_court_grandeur_baseline_add_1_modifier: "Court Grandeur" + artifact_development_growth_1_modifier: "Development Growth" + artifact_glory_hound_vassal_opinion_1_modifier: "Glory Hound Opinion" + artifact_belligerent_vassal_opinion_1_modifier: "Belligerent Opinion" + artifact_vassal_limit_1_modifier: "Vassal Limit" + artifact_owned_scheme_secrecy_add_1_modifier: "Scheme Secrecy" + artifact_hostile_scheme_phase_duration_add_1_modifier: "Hostile Scheme Speed" + artifact_personal_scheme_phase_duration_add_1_modifier: "Personal Scheme Speed" + artifact_learn_language_scheme_phase_duration_add_1_modifier: "Learn Language Scheme Speed" + artifact_monthly_lifestyle_xp_minor_modifier: "Monthly Lifestyle Experience" + artifact_monthly_lifestyle_xp_miniscule_modifier: "Monthly Lifestyle Experience" + artifact_glory_hound_tax_contribution_mult_1_modifier: "Glory Hound Tax Contribution" + artifact_mercenary_hire_cost_mult_1_modifier: "Mercenary Hire Cost" + artifact_fertility_growth_1_modifier: "Fertility Growth" + artifact_herd_gain_1_modifier: "Herd Gain" + artifact_herd_conversion_1_modifier: "Herd Conversion" + artifact_health_gain_2_modifier: "Improved Health" + artifact_dread_baseline_add_2_modifier: "Dread" + artifact_pursue_efficiency_2_modifier: "Pursue Efficiency" + artifact_controlled_province_advantage_5_modifier: "Controlled Province Advantage" + artifact_negate_health_penalty_add_2_modifier: "Negate Health Penalty" + artifact_scheme_resistance_add_3_modifier: "Scheme Resistance" + + antiquarian_court_position_task_exibit_artifacts: "Exibit Illustrious Artifacts" + antiquarian_court_position_task_exibit_artifacts_desc: "Your $antiquarian_court_position$ will exibit your illustrious artifacts to the public, showing everyone that you are in possession of something truly unique." + + court_musician_court_position_task_bolster_legitimacy: "Bolster Legitimacy" + court_musician_court_position_task_bolster_legitimacy_desc: "This character will strengthen your right to rule through song and dance." + + cupbearer_court_position_task_flatter_dignitaries: "Flatter Dignitaries" + cupbearer_court_position_task_flatter_dignitaries_desc: "This character will make sure that the cups of those you care for the most runneth over with vigor." + + cupbearer_court_position_task_collect_tallage: "Collect Tallage" + cupbearer_court_position_task_collect_tallage_desc: "Your $cupbearer_court_position$ will collect extra taxes from vassal socialites and revelers, the feasts must not run out of food and drink, after all!" + cupbearer_court_position_task_collect_tallage_tt: "You do not have any [GetVassalStance( 'courtly' ).GetName] [vassals|E]" + high_almoner_court_position_task_appease_zealots_tt: "You do not have any [GetVassalStance( 'zealot' ).GetName] [vassals|E]" + + chief_qadi_court_position_task_public_alms: "Lead Public Sadaqah" + chief_qadi_court_position_task_public_alms_desc: "Your $chief_qadi_court_position$ will divide alms to the poor and destitute of your domain in your name." + + high_almoner_court_position_task_appease_zealots: "Appease Zealots" + high_almoner_court_position_task_appease_zealots_desc: "This character will drum up your name in the eyes of the pious vassals of the realm." + + food_taster_court_position_task_brew_poisons: "Brew Poisons" + food_taster_court_position_task_brew_poisons_desc: "This character will spend their time behind the scenes, concocting poisons for use in schemes." + + food_taster_court_position_task_ear_to_the_ground: "Keep an Ear to the Ground" + food_taster_court_position_task_ear_to_the_ground_desc: "This character will spend their time hiding behind curtains, listening intently for rumors and gossip." + + court_poet_court_position_task_create_poetry: "Write Poetry" + court_poet_court_position_task_create_poetry_desc: "Your $court_poet_court_position$ will spend their time penning and reciting beautiful poems about you, your realm, and your achievements." + court_poet_court_position_task_create_poetry_tt: "Every year the $court_poet_court_position$ will write a poem, giving you a [modifier|E] improving either your [legitimacy|E], [piety|E], [advantage|E], or [attraction|E] for three years #weak (Effect increases with [aptitude|E])#!" + court_poet_court_position_task_japanese_legacy_addendum: "Each finished Poem will provide a one time increase of [bloc_cohesion|E]" + court_poet_poetry_desc: "[court_poet_from_task.Custom('GeneratePoem_Outro_Rhyming')]" + court_poet_poetry_title: "[court_poet_from_task.Custom('GeneratePoem_Title')|U]" + + court_poet_romance_aptitude_1_modifier: "Court Poet: Poetry about Romance" + court_poet_romance_aptitude_2_modifier: "$court_poet_romance_aptitude_1_modifier$" + court_poet_romance_aptitude_3_modifier: "$court_poet_romance_aptitude_1_modifier$" + court_poet_romance_aptitude_4_modifier: "$court_poet_romance_aptitude_1_modifier$" + court_poet_romance_aptitude_5_modifier: "$court_poet_romance_aptitude_1_modifier$" + + court_poet_mourning_aptitude_1_modifier: "Court Poet: Poetry about Mourning" + court_poet_mourning_aptitude_2_modifier: "$court_poet_mourning_aptitude_1_modifier$" + court_poet_mourning_aptitude_3_modifier: "$court_poet_mourning_aptitude_1_modifier$" + court_poet_mourning_aptitude_4_modifier: "$court_poet_mourning_aptitude_1_modifier$" + court_poet_mourning_aptitude_5_modifier: "$court_poet_mourning_aptitude_1_modifier$" + + court_poet_legacy_aptitude_1_modifier: "Court Poet: Poetry about Legacy" + court_poet_legacy_aptitude_2_modifier: "$court_poet_legacy_aptitude_1_modifier$" + court_poet_legacy_aptitude_3_modifier: "$court_poet_legacy_aptitude_1_modifier$" + court_poet_legacy_aptitude_4_modifier: "$court_poet_legacy_aptitude_1_modifier$" + court_poet_legacy_aptitude_5_modifier: "$court_poet_legacy_aptitude_1_modifier$" + + court_poet_strife_aptitude_1_modifier: "Court Poet: Poetry about Strife" + court_poet_strife_aptitude_2_modifier: "$court_poet_strife_aptitude_1_modifier$" + court_poet_strife_aptitude_3_modifier: "$court_poet_strife_aptitude_1_modifier$" + court_poet_strife_aptitude_4_modifier: "$court_poet_strife_aptitude_1_modifier$" + court_poet_strife_aptitude_5_modifier: "$court_poet_strife_aptitude_1_modifier$" + + drinks_alcohol: "They drink alcohol" diff --git a/localization/english/replace/court_positions_l_english.yml b/localization/english/replace/court_positions_l_english.yml new file mode 100644 index 00000000..5fc97b40 --- /dev/null +++ b/localization/english/replace/court_positions_l_english.yml @@ -0,0 +1,1087 @@ +l_english: + APPOINT_COURT_POSITION_VIEW_replace_character_header: "Replace [AppointCourtPositionView.GetCourtPositionToReplace.GetEmployee.GetShortUINameNoTooltip] as [AppointCourtPositionView.GetPositionName]" + APPOINT_COURT_POSITION_VIEW_select_character_header: "Appoint [AppointCourtPositionView.GetPositionName]" + APPOINT_COURT_POSITION_VIEW_EMPLOYER_SALARY: "Salary: [CourtPositionType.GetEmployerSalaryTextFor( Character.Self )|V]" + APPOINT_COURT_POSITION_VIEW_EMPLOYEE_SALARY: "Salary: [CourtPositionType.GetEmployeeSalaryTextFor( Character.Self )|V]" + APPOINT_COURT_POSITION_VIEW_salary_per_travel:0 "Salary when a travel starts: [Character.GetTravelLeaderCost|U]" + APPOINT_COURT_POSITION_VIEW_header:2 "Appoint Court Position" + APPOINT_COURT_POSITION_VIEW_back_button:1 "Back" + APPOINT_COURT_POSITION_VIEW_appoint_button:1 "Appoint" + APPOINT_COURT_POSITION_VIEW_appoint_button_no_eligible_courtiers_tooltip:0 "@warning_icon! #X No one in your court is eligible for this [court_positions|E]#!" + APPOINT_COURT_POSITION_VIEW_search_for_position_button:1 "Search for candidate" + APPOINT_COURT_POSITION_VIEW_search_for_position_button_tooltip:0 "Start a search to find a candidate for this [court_position|E]." + APPOINT_COURT_POSITION_VIEW_appoint_courtier_or_vassal_button:2 "Appoint" + APPOINT_COURT_POSITION_VIEW_REVOKE_CONSEQUENCES_HEADER:0 "@warning_icon! Revoking this court position will:" + APPOINT_COURT_POSITION_VIEW_REVOKE_COST:0 "• Cost you $COST$." + APPOINT_COURT_POSITION_VIEW_COURTIER_SORT_APTITUDE:0 "Aptitude" + APPOINT_COURT_POSITION_VIEW_COURTIER_SORT_TRAVEL_SPEED:0 "Travel Speed" + APPOINT_COURT_POSITION_VIEW_COURTIER_SORT_TRAVEL_SAFETY:0 "Travel Safety" + APPOINT_COURT_POSITION_VIEW_NO_SELECTED_COURTIER:0 "Select a character to fill the role" + APPOINT_COURT_POSITION_VIEW_CANNOT_AFFORD:1 "@warning_icon! #X Hiring this position will make your expenses higher than your income, causing you to lose $RESOURCES$ every month.#!" + APPOINT_COURT_POSITION_VIEW_REVOKE_CONSEQUENCE_FOR_APPOINTMENT:0 "#T If you choose to revoke this position later it will: #!" + APPOINT_COURT_POSITION_VIEW_REVOKE_CONSEQUENCE_FOR_APPOINTMENT_TOOLTIP:0 "#X [AppointCourtPositionView.AppointingRevokeText] #!" + APPOINT_COURT_POSITION_VIEW_REPLACE_CURRENTLY_APPOINTED:0 "Currently appointed [CourtPosition.GetNameNoTooltip]" + APPOINT_COURT_POSITION_VIEW_REPLACE_FIRE_CURRENT_HOLDER:0 "Fire" + APPOINT_COURT_POSITION_VIEW_REPLACE_CURRENT_SALARY:0 "Monthly Salary: #L [CourtPosition.GetEmployerSalaryText]#!" + APPOINT_COURT_POSITION_VIEW_REPLACE_CONSEQUENCE_FOR_REVOKE:0 "#T Revoking this position will: #!" + APPOINT_COURT_POSITION_VIEW_REPLACE_CONSEQUENCE_FOR_REVOKE_TOOLTIP:0 "#X [AppointCourtPositionView.ReplaceRevokeText] #!" + APPOINT_COURT_POSITION_VIEW_APTITUDE: "[aptitude|e]: [AppointCourtPositionView.GetAptitudeTextFor(Character.Self)]" + APPOINT_COURT_POSITION_VIEW_OPINION_BONUS:0 "[opinion|e] with [AppointCourtPositionView.GetSelectedCharacter.GetShortUINameNoTooltip]: [AppointCourtPositionView.GetOpinionBonusForSelectedEmployee|=+]" + + COURT_POSITION_NAME: "[CourtPosition.GetNameNoTooltip]" + COURT_POSITION_FOR_EMPLOYER:1 "For [CourtPosition.GetEmployer.GetUINameNoTooltip]" + + COURT_WINDOW_COURT_POSITIONS:0 "[CourtWindow.GetCourtOwner.Custom('GetCourtPositionPlural')|U]" + COURT_POSITION_REPLACE:0 "#T Replace [Character.GetShortUINameNoTooltip]#!" + COURT_POSITION_REVOKE:0 "#T Fire [Character.GetShortUINameNoTooltip]#!" + COURT_POSITION_POWERFUL_AGENT: "@alert_icon! #alert_trial Powerful [agent|E] in [hostile_schemes|E] against their $game_concept_liege$#!" + COURT_POSITION_OPINION_BONUS:0 "[opinion|e] Bonus: [CourtPosition.GetOpinionBonus|=+]" + COURT_POSITION_TOGGLE_AUTOMATION: "#T Toggle Automation #!\n$COURT_POSITION_AUTOMATION_CURRENT$\n#I Click to toggle automation options#!" + COURT_POSITION_AUTOMATION_DISABLE_TOOLTIP: "#T Current Automation #!\n$COURT_POSITION_AUTOMATION_CURRENT$\n#I Click to disable automation#!" + COURT_POSITION_AUTOMATION_CURRENT: "When vacated:\n[Select_CString( CourtPositionType.HasAutomationNone( GetPlayer.Self ), '@check_icon!', '@small_dot!')] No automation\n[Select_CString( CourtPositionType.HasAutomationShowEvent( GetPlayer.Self ), '@check_icon!', '@small_dot!' )] Suggest best candidates in event\n#indent_newline:5 [Select_CString( CourtPositionType.HasAutomationAssignBest( GetPlayer.Self ), '@check_icon!', '@small_dot!')] Auto-assign highest [aptitude|e] candidate, if available#!\n#indent_newline:5 [Select_CString( CourtPositionType.HasAutomationAssignBestOrEvent( GetPlayer.Self ), '@check_icon!', '@small_dot!')] Auto-assign highest [aptitude|e] candidate, or notify with event#!" + + COURT_POSITIONS_WINDOW_EMPTY_POSITION_NO_ADD_TT:1 "[SelectLocalization( Not( CourtPositionType.CanHirePosition( Character.Self ) ), 'COURT_POSITIONS_WINDOW_EMPTY_POSITION_YOU_DONT_MEET_REQUIREMENTS', '' )]\n[SelectLocalization( Not( CourtPositionType.HasValidCourtiersForCharacter( Character.Self ) ), 'COURT_POSITIONS_WINDOW_EMPTY_POSITION_NO_ELIGIBLE_COURTIERS', '' )]" + + COURT_POSITIONS_WINDOW_GROUP_HEADER: "$NAME$" + COURT_POSITIONS_WINDOW_GROUP_DENIED: "Unavailable Potential Court Positions" + COURT_POSITIONS_WINDOW_MONTHLY_SALARY: "Monthly Salaries:" + COURT_POSITIONS_WINDOW_MONTHLY_SALARY_YOUR: "Your Salary:" + COURT_POSITIONS_WINDOW_EMPLOYER_SALARY_SHORT: "#L [CourtPosition.GetEmployerSalaryTextShort]#!" + COURT_POSITIONS_WINDOW_EMPLOYEE_SALARY_SHORT: "#L [CourtPosition.GetEmployeeSalaryTextShort]#!" + COURT_POSITIONS_WINDOW_POSITION_AI_SHORT: "Pos AI: [CourtPositionItem.GetPositionAiScore|0]" + COURT_POSITIONS_WINDOW_BEST_CANDIDATE_AI_SHORT: "Can AI: [CourtPositionItem.GetBestCandidateAiScore|0]" + COURT_POSITIONS_WINDOW_POSITION_DENIED: "@warning_icon! #X You do not fulfill all the requirements#!\n$REASONS$" + COURT_POSITIONS_WINDOW_YOUR_POSITIONS: "Your Held Positions:" + + COURT_POSITIONS_WINDOW_EMPTY_POSITION_HEADER:0 "Vacant [CourtPositionsWindow.CourtOwner.Custom('GetCourtOrOfficerPositionConceptPlural')] in your [CourtPositionsWindow.CourtOwner.Custom('GetRealmOrDomicileConcept')]" + COURT_POSITIONS_WINDOW_EMPTY_POSITION_EFFECTS_VARY:0 "Effects vary based on [aptitude|e]:" + COURT_POSITIONS_WINDOW_EMPTY_POSITION_YOU_DONT_MEET_REQUIREMENTS:0 "@warning_icon! #X You do not fulfill the requirements to hire this [court_position|e]#!" + COURT_POSITIONS_WINDOW_EMPTY_POSITION_YOU_DONT_MEET_REQUIREMENTS_TT:0 "#T $COURT_POSITION_TOOLTIP_LIEGE_REQUIREMENT$#!\n[CourtPositionType.GetLiegeRequirementDescriptionText]" + COURT_POSITIONS_WINDOW_EMPTY_POSITION_NO_ELIGIBLE_COURTIERS:0 "@warning_icon! #X No courtiers meet the [court_position|e] requirements#!" + COURT_POSITIONS_WINDOW_EMPTY_POSITION_NO_ELIGIBLE_COURTIERS_TT:0 "#T $COURT_POSITION_TOOLTIP_EMPLOYEE_REQUIREMENT$#!\n[CourtPositionType.GetEmployeeRequirementDescriptionText]" + COURT_POSITIONS_WINDOW_FILTER_ALL:0 "All" + COURT_POSITIONS_WINDOW_FILTER_TAB_ALL_NUM_HIRES:0 "[CourtPositionsWindow.NumHiredPositions]/[CourtPositionsWindow.MaxNumAvailablePositions]" + COURT_POSITIONS_WINDOW_FILTER_TAB_CATEGORY_NUM_HIRES:0 "[CourtPositionsWindow.NumHiredInCategory(CourtPositionCategory.Self)]/[CourtPositionsWindow.MaxNumHirableInCategory(CourtPositionCategory.Self)]" + + COURT_POSITIONS_COURT_VIEW_appoint_court_position_button:2 "Appoint Court Position" + COURT_POSITIONS_COURT_VIEW_appoint_court_position_button_tooltip:1 "#T Appoint Court Position#!\n\nAppoint a [vassal|E] or a member of your court to a [court_position|E]." + COURT_POSITIONS_COURT_VIEW_positions_in_your_court:2 "[CourtPositionsWindow.CourtOwner.Custom('GetCourtOrOfficerPositionConceptPlural')] in your [CourtPositionsWindow.CourtOwner.Custom('GetRealmOrDomicileConcept')]" + COURT_POSITIONS_COURT_VIEW_salaries_gained:1 "Monthly Income from your Salary:" + COURT_POSITIONS_COURT_VIEW_salaries_paid:2 "Monthly Salaries paid:" + COURT_POSITIONS_SALARY_FOR:0 "$EMPLOYEE$ ($COURT_POSITION$)" + COURT_POSITIONS_INCOME:0 "Income from [court_positions|E]" + COURT_POSITIONS_EXPENSES:0 "Expenses to [court_positions|E]" + COURT_POSITIONS_SALARIES_PAID:0 "Salaries paid" + COURT_POSITIONS_SALARIES_GAINED:0 "Salaries earned" + COURT_POSITION_TYPE_SCALING_MODIFIER_DESCRIPTION:1 "$MODIFIER$: $RANGED_MODIFIER$ (based on [aptitude|E])" + + COURT_POSITIONS_your_positions_in_liege_court:2 "Your [court_positions|E] at your [liege|e]'s Court" + COURT_POSITIONS_no_positions_with_liege:2 "You have no [court_positions|E] at your [liege|e]'s Court" + COURT_POSITIONS_no_positions_in_your_court:1 "You have not employed any [court_position|E] in your court." + COURT_POSITIONS_cannot_hire_more_positions:2 "You cannot hire any [court_positions|E]." + COURT_POSITIONS_cannot_hire_more_positions_in_category:2 "You cannot hire any [court_positions|E] in this category." + + COURT_POSITIONS_revoke_confirm_header:2 "Confirm Revoke [GetPlayer.Custom('GetCourtPositionConcept')]" + COURT_POSITIONS_revoke_confirm_accept:1 "Revoke" + COURT_POSITIONS_revoke_position_cost:1 "Doing this will cost you $COSTS$" + COURT_POSITIONS_revoke_position_cost_cannot_afford:1 "Doing this will cost you $COSTS$. You cannot afford this and it will put you at a deficit" + COURT_POSITIONS_revoke_position_confirmation:1 "[CHARACTER.GetShortUINameNoTooltip]'s $COURT_POSITION$ position will be revoked." + COURT_POSITIONS_revoke_position_confirmation_with_cost:1 "[CHARACTER.GetShortUINameNoTooltip]'s $COURT_POSITION$ position will be revoked. $COSTS$" + COURT_POSITIONS_revoke_position_confirmation_with_effect:1 "[CHARACTER.GetShortUINameNoTooltip]'s $COURT_POSITION$ position will be revoked. Doing this will have the following effect:\n$EFFECT$" + COURT_POSITIONS_revoke_position_confirmation_with_cost_and_effect:1 "[CHARACTER.GetShortUINameNoTooltip]'s $COURT_POSITION$ position will be revoked. $COSTS$, and have the following effect:\n$EFFECT$" + + COURT_POSITIONS_replace_confirm_header:2 "Confirm Replace [court_position|E]" + COURT_POSITIONS_replace_confirm_accept:1 "Replace" + COURT_POSITIONS_replace_position_confirmation:1 "[CHARACTER.GetShortUINameNoTooltip] will be replaced by [TARGET_CHARACTER.GetShortUINameNoTooltip] as $COURT_POSITION$." + COURT_POSITIONS_replace_position_confirmation_with_cost:1 "[CHARACTER.GetShortUINameNoTooltip] will be replaced by [TARGET_CHARACTER.GetShortUINameNoTooltip] as $COURT_POSITION$. $COSTS$" + COURT_POSITIONS_replace_position_confirmation_with_effect:1 "[CHARACTER.GetShortUINameNoTooltip] will be replaced by [TARGET_CHARACTER.GetShortUINameNoTooltip] as $COURT_POSITION$. Doing this will have the following effect:\n$EFFECT$" + COURT_POSITIONS_replace_position_confirmation_with_cost_and_effect:1 "[CHARACTER.GetShortUINameNoTooltip] will be replaced by [TARGET_CHARACTER.GetShortUINameNoTooltip] as $COURT_POSITION$. $COSTS$, and have the following effect:\n$EFFECT$" + + COURT_POSITIONS_category_day_to_day:0 "Day-to-day" + COURT_POSITIONS_category_honorary:0 "Honorary" + COURT_POSITIONS_category_personal_servants:0 "Personal Servants" + COURT_POSITIONS_category_frivolous:0 "Frivolous" + COURT_POSITIONS_category_fighters:0 "Fighters" + COURT_POSITIONS_months_of_service:1 "Months of service: $MONTHS$" + COURT_POSITIONS_years_of_service:1 "Years of service: $YEARS$" + + COURT_POSITION_TOOLTIP_EFFECT_ON_YOUR_LIEGE:0 "Effect on your [liege|e]:" + COURT_POSITION_TOOLTIP_EFFECT_ON_LIEGE: "Effect on [liege|e]:" + COURT_POSITION_TOOLTIP_EFFECT_ON_LIEGE_WITH_HEADING: "#S $COURT_POSITION_TOOLTIP_EFFECT_ON_LIEGE$#!#indent_newline:2 \n[CourtPositionType.GetEmployerModifierDescription]#!" + + + COURT_POSITION_TOOLTIP_SCALED_EFFECT_ON_LIEGE:0 "Effect on [liege|e], based on employee's [aptitude|e]:" + COURT_POSITION_TOOLTIP_LIEGE_REQUIREMENT:0 "[liege|e] requirements:" + COURT_POSITION_TOOLTIP_LIEGE_REQUIREMENT_NESTED: "#TOOLTIP:COURT_POSITION_TOOLTIP_LIEGE_REQUIREMENT_NESTED_TT #L Liege Requirements#!#!" + COURT_POSITION_TOOLTIP_LIEGE_REQUIREMENT_NESTED_TT: "[CourtPositionType.GetLiegeRequirementDescriptionText]" + COURT_POSITION_TOOLTIP_EFFECT_ON_YOU:0 "Effect on you:" + COURT_POSITION_TOOLTIP_EFFECT_ON_EMPLOYEE:1 "Effect on [CourtPosition.GetNameNoTooltip]:" + COURT_POSITION_TOOLTIP_EFFECT_ON_HOLDER: "Effect on holder:" + COURT_POSITION_TOOLTIP_EMPLOYEE_REQUIREMENT:1 "[CourtPositionType.GetNameNoTooltip] requirements:" + COURT_POSITION_TOOLTIP_EMPLOYEE_REQUIREMENT_NESTED: "#TOOLTIP:COURT_POSITION_TOOLTIP_EMPLOYEE_REQUIREMENT_NESTED_TT #L [CourtPositionType.GetNameNoTooltip] Requirements#!#!" + COURT_POSITION_TOOLTIP_EMPLOYEE_REQUIREMENT_NESTED_TT: "[CourtPositionType.GetEmployeeRequirementDescriptionText]" + COURT_POSITION_TOOLTIP_SALARY: "Salary: [CourtPosition.GetSalaryText]" + COURT_POSITION_TOOLTIP_SALARIES_GOLD_PAID: "[gold_i][gold|E] Salaries Paid" + COURT_POSITION_TOOLTIP_SALARIES_GOLD_EARNED: "[gold_i][gold|E] Salaries Earned" + COURT_POSITION_TOOLTIP_SALARIES_PRESTIGE_PAID: "[prestige_i][prestige|E] Salaries Paid" + COURT_POSITION_TOOLTIP_SALARIES_PRESTIGE_EARNED: "[prestige_i][prestige|E] Salaries Earned" + COURT_POSITION_TOOLTIP_SALARIES_PIETY_PAID: "[piety_i][piety|E] Salaries Paid" + COURT_POSITION_TOOLTIP_SALARIES_PIETY_EARNED: "[piety_i][piety|E] Salaries Earned" + COURT_POSITION_TOOLTIP_SALARIES_DYNASTY_PRESTIGE_PAID: "[dynasty_prestige_i][dynasty_prestige|E] Salaries Paid" + COURT_POSITION_TOOLTIP_SALARIES_DYNASTY_PRESTIGE_EARNED: "[dynasty_prestige_i][dynasty_prestige|E] Salaries Earned" + COURT_POSITION_TOOLTIP_SALARIES_INFLUENCE_PAID: "[influence_i][influence|E] Salaries Paid" + COURT_POSITION_TOOLTIP_SALARIES_INFLUENCE_EARNED: "[influence_i][influence|E] Salaries Earned" + COURT_POSITION_TOOLTIP_SALARIES_HERD_PAID: "[herd_i][herd|E] Salaries Paid" + COURT_POSITION_TOOLTIP_SALARIES_HERD_EARNED: "[herd_i][herd|E] Salaries Earned" + COURT_POSITION_TOOLTIP_SALARIES_TREASURY_PAID: "[treasury_i][treasury|E] Salaries Paid" + COURT_POSITION_TOOLTIP_SALARIES_TREASURY_EARNED: "[treasury_i][treasury|E] Salaries Earned" + COURT_POSITION_TOOLTIP_SALARIES_MERIT_PAID: "[merit_i][merit|E] Salaries Paid" + COURT_POSITION_TOOLTIP_SALARIES_MERIT_EARNED: "[merit_i][merit|E] Salaries Earned" + COURT_POSITION_TOOLTIP_REVOKE_COST:1 "• Cost you: [CourtPosition.GetRevokeCostText]" + COURT_POSITION_TOOLTIP_REVOKE_EFFECT_HEADER:0 "Revoking this [SelectLocalization( IsLandlessAdventurer( GetPlayer ), 'COURT_POSITION_TOOLTIP_REVOKE_EFFECT_HEADER.CAMP_OFFICER', 'COURT_POSITION_TOOLTIP_REVOKE_EFFECT_HEADER.COURT_POSITION')] will cause:" + COURT_POSITION_TOOLTIP_REVOKE_EFFECT_HEADER.COURT_POSITION: "[court_position|E]" + COURT_POSITION_TOOLTIP_REVOKE_EFFECT_HEADER.CAMP_OFFICER: "[officer|E]" + COURT_POSITION_TYPE_TOOLTIP_EFFECT_ON_EMPLOYEE: "Effect on [CourtPositionType.GetNameNoTooltip]:" + COURT_POSITION_TYPE_TOOLTIP_EFFECT_ON_EMPLOYEE_WITH_HEADING: "#S $COURT_POSITION_TYPE_TOOLTIP_EFFECT_ON_EMPLOYEE$#!#indent_newline:2 \n[CourtPositionType.GetEmployeeModifierDescription]#!" + + COURT_POSITION_TYPE_TOOLTIP_EMPLOYER_SALARY: "Salary: [CourtPositionType.GetEmployerSalaryTextFor( GetPlayer )|V]" + COURT_POSITION_TYPE_TOOLTIP_EMPLOYEE_SALARY: "Salary: [CourtPositionType.GetEmployeeSalaryTextFor( GetPlayer )|V]" + COURT_POSITION_TYPE_TOOLTIP_REVOKE_COST: "Revocation cost: [CourtPositionType.GetRevokeCostText|V]" + + COURT_POSITION_SALARY_BREAKDOWN_BASE:0 "Base Salary" + + COURT_POSITION_TASK_COST_BREAKDOWN_BASE: "[court_position_task_short|E] Cost" + COURT_POSITION_TASK: "[court_position_task_short|E]" + COURT_POSITION_TASK_HEADER: "#T [CourtPositionTaskType.GetName]#!" + COURT_POSITION_TASK_CLICK_TT: "[SelectLocalization( CourtPosition.IsActiveTask( CourtPositionTaskType.Self ), 'ACTIVE_COURT_POSITION_TASK_CLICK_TT', 'POTENTIAL_COURT_POSITION_TASK_CLICK_TT' )]" + ACTIVE_COURT_POSITION_TASK_CLICK_TT: "Click to deactivate [CourtPositionTaskType.GetName]" + POTENTIAL_COURT_POSITION_TASK_CLICK_TT: "Click to activate [CourtPositionTaskType.GetName]" + ACTIVE_COURT_POSITION_TASK_TT: "My [CourtPosition.GetPositionType.GetNameNoTooltip] will stop performing the [CourtPositionTaskType.GetName|V] [court_position_task_short|e]." + POTENTIAL_COURT_POSITION_TASK_TT: "My [CourtPosition.GetPositionType.GetNameNoTooltip] will actively perform the [CourtPositionTaskType.GetName|V] [court_position_task_short|e]." + COURT_POSITION_NO_ACTIVE_TASK: "#weak Regular duties #!" + COURT_POSITION_NO_ACTIVE_TASK_DESCRIPTION: "#T Regular duties#!\nThe [CourtPosition.GetNameNoTooltip] will perform only their regular duties." + COURT_POSITION_NO_ACTIVE_TASK_COST: "@gold_icon! #weak 0 #!" + + COURT_POSITION_TASK_EFFECTS_HEADER: "#S Effects#!\n" + COURT_POSITION_TASK_EMPLOYER_EFFECTS: "#S Effect on [liege|E]:#!#indent_newline:2 \n[CourtPositionTaskType.GetEmployerModifierDescription( CourtPosition.Self )]#!" + COURT_POSITION_TASK_EMPLOYER_COURT_EFFECTS: "#S Effect on [liege|E]'s [court|E]:#!#indent_newline:2 \n[CourtPositionTaskType.GetEmployerCourtModifierDescription( CourtPosition.Self )]#!" + COURT_POSITION_TASK_EMPLOYEE_EFFECTS: "#S Effect on [CourtPositionType.GetName]:#!#indent_newline:2 \n[CourtPositionTaskType.GetEmployeeModifierDescription]#!" + COURT_POSITION_TASK_START_EFFECTS: "#S When started:#!#indent_newline:2 \n[CourtPositionTaskType.GetOnStartEffectDesc( CourtPosition.Self )]#!" + COURT_POSITION_TASK_END_EFFECTS: "#S When stopped:#!#indent_newline:2 \n[CourtPositionTaskType.GetOnEndEffectDesc( CourtPosition.Self )]#!" + COURT_POSITION_TASK_COST: "#S Cost (per month):#!#indent_newline:2 \n[CourtPositionTaskType.GetEmployerCostText( CourtPosition.GetEmployer.Self )]#!" + + COURT_POSITION_TASK_HINT: "Potential [court_position_tasks_short|E]:" + COURT_POSITION_TASK_GENERIC_TT: "My [CourtPositionType.GetNameNoTooltip] will actively perform the [CourtPositionTaskType.GetName|V] [court_position_task_short|e]." + COURT_POSITION_TASK_EMPLOYER_GENERIC_EFFECTS: "#S Effect on [liege|E]:#!#indent_newline:2 \n[CourtPositionTaskType.GetEmployerModifierGenericDescription]#!" + COURT_POSITION_TASK_EMPLOYER_COURT_GENERIC_EFFECTS: "#S Effect on [liege|E]'s [court|E]:#!#indent_newline:2 \n[CourtPositionTaskType.GetEmployerCourtModifierGenericDescription]#!" + COURT_POSITION_TASK_START_GENERIC_EFFECTS: "#S When started:#!#indent_newline:2 \n[CourtPositionTaskType.GetOnStartEffectGenericDesc]#!" + COURT_POSITION_TASK_END_GENERIC_EFFECTS: "#S When stopped:#!#indent_newline:2 \n[CourtPositionTaskType.GetOnEndEffectGenericDesc]#!" + COURT_POSITION_TASK_GENERIC_COST: "#S Cost (per month):#!#indent_newline:2 \n[CourtPositionTaskType.GetEmployerCostText( GetPlayer )]#!" + + COURT_POSITION_TYPE_EMPLOYER_COURT_EFFECTS: "#S Effect on [GetPlayer.Custom('GetCourtiersTypeConcept')|U]:#!#indent_newline:2 \n[CourtPositionType.GetEmployerCourtModifierDescription]#!" + COURT_POSITION_EMPLOYER_COURT_EFFECTS: "#S Effects on [Character.Custom('GetCourtOwnerConcept')]'s [Character.Custom('GetRealmOrDomicileConcept')]:#!#indent_newline:2 \n[CourtPosition.GetEmployerCourtBonuses]#!" + COURT_POSITION_APPOINT_EMPLOYER_COURT_EFFECTS: "#S Effects on [GetPlayer.Custom('GetCourtOwnerConcept')]'s [GetPlayer.Custom('GetRealmOrDomicileConcept')]:#!#indent_newline:2 \n[AppointCourtPositionView.GetLiegeCourtModifierForPositionType( AppointCourtPositionView.GetSelectedCharacter.Self )]#!" + + physician_treat_epidemic: "Control Plagues" + physician_treat_epidemic_desc: "This character is tasked with increasing the [epidemic_resistance|E] of every [barony|E] owned by their [liege|E]." + physician_guard_family: "Advanced Research" + physician_guard_family_desc: "This character is tasked with assisting their [liege|E]'s learning." + physician_improve_self: "Improve Skills" + physician_improve_self_desc: "This character is focusing on improving their skills as a physician." + physician_improve_self_tt: "Every month this character has a chance of gaining [GetTrait('lifestyle_physician').GetName( root_scope )] [trait_level_track_xp|E] or [learning_i][learning_skill|E]" + physician_improve_self_fallback_tt: "Every month this character has a chance of gaining [GetTrait('lifestyle_physician').GetName( GetNullCharacter )] [trait_level_track_xp|E] or [learning_i][learning_skill|E]" + high_almoner_attend_poor: "Divine Charity" + high_almoner_attend_poor_desc: "This character is tasked with arranging charity in your name." + chronicler_promote_legend_realm: "Extol Domestic Legend" + chronicler_promote_legend_realm_desc: "This character is tasked with glorifying their [liege|E]'s [legend|E], amplifying its spread." + culture_era_late_medieval_salary_mod:0 "#V $culture_era_late_medieval$#! [era|E]" + culture_era_high_medieval_salary_mod:0 "#V $culture_era_high_medieval$#! [era|E]" + culture_era_early_medieval_salary_mod:0 "#V $culture_era_early_medieval$#! [era|E]" + esteemed_hospitality_salary_mod:0 "#V $tradition_esteemed_hospitality_name$#! [tradition|E]" + empire_salary_mod:0 "[emperor|E]" + tribal_salary_mod:0 "[tribal|E]" + nomad_salary_mod: "[nomad|E]" + small_realm_salary_mod:0 "Significant [realm_size|E] #low (30+)#!" + medium_realm_salary_mod:0 "Large [realm_size|E] #low (60+)#!" + large_realm_salary_mod:0 "Very Large [realm_size|E] #low (90+)#!" + enormous_realm_salary_mod:0 "Enormous [realm_size|E] #low (120+)#!" + holds_court_position_opinion:0 "$POSITION$: $VALUE|=+$" + + COURT_POSITION_APTITUDE_TOOLTIP_HEADER:0 "Aptitude" + COURT_POSITION_aptitude_description_position:1 "[aptitude|e]: [CourtPosition.GetAptitudeText|V]" + COURT_POSITION_aptitude_breakdown:0 "[CHARACTER.GetShortUINameNoTooltip]'s [aptitude|e] as a $COURT_POSITION$ is affected by:" + COURT_POSITION_aptitude_character_possessive:0 "[Character.GetShortUINameNoTooltip]'s [aptitude|e]:" + + court_position_skill_learning:0 "[learning|E] Skill" + court_position_skill_martial:0 "[martial|E] Skill" + court_position_skill_prowess:0 "[prowess|E] Skill" + court_position_skill_diplomacy:0 "[diplomacy|E] Skill" + court_position_skill_stewardship:0 "[stewardship|E] Skill" + court_position_skill_intrigue:0 "[intrigue|E] Skill" + court_position_skill_all: "Sum of all [skills|E]" + court_position_languages:0 "Known [languages|E]" + court_position_landed_penalty:0 "Busy ruling" + court_position_imprisoned_penalty: "Imprisoned" + court_position_skill_health_good:0 "Excellent [health|E]" + court_position_skill_health:0 "Good [health|E]" + court_position_skill_health_low:0 "Low [health|E]" + court_position_physician_3_trait:1 "$court_position_physician_1_trait$" + court_position_physician_2_trait:1 "$court_position_physician_1_trait$" + court_position_physician_1_trait:1 "[GetTrait('lifestyle_physician').GetName( ROOT.Char )]" + court_position_mystic_3_trait:1 "$court_position_mystic_1_trait$" + court_position_mystic_2_trait:1 "$court_position_mystic_1_trait$" + court_position_mystic_1_trait:1 "[GetTrait('lifestyle_mystic').GetName( ROOT.Char )]" + court_position_hunter_3_trait:1 "$court_position_hunter_1_trait$" + court_position_hunter_2_trait:1 "$court_position_hunter_1_trait$" + court_position_hunter_1_trait:1 "[GetTrait('lifestyle_hunter').GetName( ROOT.Char )]" + court_position_reveler_3_trait:0 "$court_position_reveler_1_trait$" + court_position_reveler_2_trait:0 "$court_position_reveler_1_trait$" + court_position_reveler_1_trait:0 "[GetTrait('lifestyle_reveler').GetName( ROOT.Char )]" + court_position_intellect_good_3_trait:0 "[GetTrait('intellect_good_3').GetName( ROOT.Char )]" + court_position_intellect_good_2_trait:0 "[GetTrait('intellect_good_2').GetName( ROOT.Char )]" + court_position_intellect_good_1_trait:0 "[GetTrait('intellect_good_1').GetName( ROOT.Char )]" + court_position_physique_good_3_trait: "[GetTrait('physique_good_3').GetName( ROOT.Char )]" + court_position_physique_good_2_trait: "[GetTrait('physique_good_2').GetName( ROOT.Char )]" + court_position_physique_good_1_trait: "[GetTrait('physique_good_1').GetName( ROOT.Char )]" + court_position_strong_trait: "[GetTrait('strong').GetName( ROOT.Char )]" + court_position_loyal_trait: "[GetTrait('loyal').GetName( ROOT.Char )]" + court_position_patient_trait:0 "[GetTrait('patient').GetName( ROOT.Char )]" + court_position_calm_trait: "[GetTrait('calm').GetName( ROOT.Char )]" + court_position_impatient_trait:0 "[GetTrait('impatient').GetName( ROOT.Char )]" + court_position_generous_trait:0 "[GetTrait('generous').GetName( ROOT.Char )]" + court_position_greedy_trait:0 "[GetTrait('greedy').GetName( ROOT.Char )]" + court_position_profligate_trait:0 "[GetTrait('profligate').GetName( ROOT.Char )]" + court_position_scholar_trait:0 "[GetTrait('scholar').GetName( ROOT.Char )]" + court_position_shrewd_trait:0 "[GetTrait('shrewd').GetName( ROOT.Char )]" + court_position_theologian_trait: "[GetTrait('theologian').GetName( ROOT.Char )]" + court_position_architect_trait:0 "[GetTrait('architect').GetName( ROOT.Char )]" + court_position_architect_study_experience:0 "Has studied books on architecture" + court_position_gregarious_trait:0 "[GetTrait('gregarious').GetName( ROOT.Char )]" + court_position_diplomat_trait:0 "[GetTrait('diplomat').GetName( ROOT.Char )]" + court_position_poet_trait:0 "[GetTrait('lifestyle_poet').GetName( ROOT.Char )]" + court_position_no_poet_trait: "Does #bold not#! have the [GetTrait('lifestyle_poet').GetName( ROOT.Char )] [trait|E]" + court_position_blademaster_3_trait:1 "$court_position_blademaster_1_trait$" + court_position_blademaster_2_trait:1 "$court_position_blademaster_1_trait$" + court_position_blademaster_1_trait:1 "[GetTrait('lifestyle_blademaster').GetName( ROOT.Char )]" + court_position_shieldmaiden_trait:0 "[GetTrait('shieldmaiden').GetName( ROOT.Char )]" + court_position_brave_trait:0 "[GetTrait('brave').GetName( ROOT.Char )]" + court_position_craven_trait:0 "[GetTrait('craven').GetName( ROOT.Char )]" + court_position_blind_trait:0 "[GetTrait('blind').GetName( ROOT.Char )]" + court_position_infirm_trait:0 "[GetTrait('infirm').GetName( ROOT.Char )]" + court_position_maimed_trait:0 "[GetTrait('maimed').GetName( ROOT.Char )]" + court_position_wounded_3_trait:0 "[GetTrait('wounded_3').GetName( ROOT.Char )]" + court_position_wounded_2_trait:0 "[GetTrait('wounded_2').GetName( ROOT.Char )]" + court_position_administrator_trait:0 "[GetTrait('administrator').GetName( ROOT.Char )]" + court_position_family_first_trait: "[GetTrait('family_first').GetName( ROOT.Char )]" + court_position_shy_trait:0 "[GetTrait('shy').GetName( ROOT.Char )]" + court_position_gluttonous_trait:0 "[GetTrait('gluttonous').GetName( ROOT.Char )]" + court_position_comfort_eater_trait:0 "[GetTrait('comfort_eater').GetName( ROOT.Char )]" + court_position_inappetetic_trait:0 "[GetTrait('inappetetic').GetName( ROOT.Char )]" + court_position_torturer_trait:0 "[GetTrait('torturer').GetName( ROOT.Char )]" + court_position_sadistic_trait:0 "[GetTrait('sadistic').GetName( ROOT.Char )]" + court_position_callous_trait: "[GetTrait('callous').GetName( ROOT.Char )]" + court_position_fickle_trait: "[GetTrait('fickle').GetName( ROOT.Char )]" + court_position_clergy_trait:0 "Is part of the [clergy|E]" + court_position_completed_inspiration:0 "Has completed an [inspiration|E]" + court_position_high_skills_trait:0 "Very skilled" + court_position_gardener_trait:0 "[GetTrait('lifestyle_gardener').GetName( ROOT.Char )]" + court_position_herbalist_trait:0 "[GetTrait('lifestyle_herbalist').GetName( ROOT.Char )]" + court_position_overseer_trait:0 "[GetTrait('overseer').GetName( ROOT.Char )]" + court_position_organizer_trait: "[GetTrait('organizer').GetName( ROOT.Char )]" + court_position_gallant_trait:0 "[GetTrait('gallant').GetName( ROOT.Char )]" + court_position_tradition_music_theory:0 "$tradition_music_theory_name$ [culture_tradition|E]" + court_position_just_trait:0 "[GetTrait('just').GetName( ROOT.Char )]" + court_position_arbitrary_trait:0 "[GetTrait('arbitrary').GetName( ROOT.Char )]" + court_position_temperate_trait:0 "[GetTrait('temperate').GetName( ROOT.Char )]" + court_position_tradition_culinary_art:0 "$tradition_culinary_art_name$ [culture_tradition|E]" + court_position_compassionate_trait:0 "[GetTrait('compassionate').GetName( ROOT.Char )]" + court_position_avaricious_trait:0 "[GetTrait('avaricious').GetName( ROOT.Char )]" + court_position_schemer_trait: "[GetTrait('schemer').GetName( ROOT.Char )]" + court_position_trusting_trait:0 "[GetTrait('trusting').GetName( ROOT.Char )]" + court_position_deceitful_trait:0 "[GetTrait('deceitful').GetName( ROOT.Char )]" + court_position_honest_trait:0 "[GetTrait('honest').GetName( ROOT.Char )]" + court_position_stubborn_trait:0 "[GetTrait('stubborn').GetName( ROOT.Char )]" + court_position_paranoid_trait:0 "[GetTrait('paranoid').GetName( ROOT.Char )]" + court_position_reclusive_trait:0 "[GetTrait('reclusive').GetName( ROOT.Char )]" + court_position_athletic_trait:0 "[GetTrait('athletic').GetName( ROOT.Char )]" + court_position_zealous_trait: "[GetTrait('zealous').GetName( ROOT.Char )]" + court_position_murderer_trait: "[GetTrait('murderer').GetName( ROOT.Char )]" + court_position_order_member_trait: "[GetTrait('order_member').GetName( ROOT.Char )]" + court_position_faith_warrior_trait: "[GetTrait('faith_warrior').GetName( ROOT.Char )]" + court_position_diligent_trait:0 "[GetTrait('diligent').GetName( ROOT.Char )]" + court_position_lazy_trait:0 "[GetTrait('lazy').GetName( ROOT.Char )]" + court_position_reveler_trait: "[GetTrait('lifestyle_reveler').GetName( ROOT.Char )]" + court_position_flagellant_trait: "[GetTrait('flagellant').GetName( ROOT.Char )]" + court_position_seducer_trait: "[GetTrait('seducer').GetName( ROOT.Char )]" + court_position_improvident_trait: "[GetTrait('improvident').GetName( ROOT.Char )]" + court_position_strategist_trait: "[GetTrait('strategist').GetName( ROOT.Char )]" + court_position_logistician_trait:0 "[GetTrait('logistician').GetName( ROOT.Char )]" + court_position_forder_trait:0 "[GetTrait('forder').GetName( ROOT.Char )]" + court_position_lots_of_travel:0 "Travel Experience" + court_position_pilgrim_trait:0 "[GetTrait('pilgrim').GetName( ROOT.Char )]" + court_position_hajjaj_trait:0 "[GetTrait('hajjaj').GetName( ROOT.Char )]" + court_position_adventurer_trait:0 "[GetTrait('adventurer').GetName( ROOT.Char )]" + court_position_clubfooted_trait:0 "[GetTrait('clubfooted').GetName( ROOT.Char )]" + court_position_incapable_trait:0 "[GetTrait('incapable').GetName( ROOT.Char )]" + court_position_flexible_leader_trait:0 "[GetTrait('flexible_leader').GetName( ROOT.Char )]" + court_position_forest_fighter_trait:0 "[GetTrait('forest_fighter').GetName( ROOT.Char )]" + court_position_open_terrain_expert_trait:0 "[GetTrait('open_terrain_expert').GetName( ROOT.Char )]" + court_position_rough_terrain_expert_trait:0 "[GetTrait('rough_terrain_expert').GetName( ROOT.Char )]" + court_position_desert_warrior_trait:0 "[GetTrait('desert_warrior').GetName( ROOT.Char )]" + court_position_jungle_stalker_trait:0 "[GetTrait('jungle_stalker').GetName( ROOT.Char )]" + court_position_winter_soldier_trait:0 "[GetTrait('winter_soldier').GetName( ROOT.Char )]" + court_position_commander_traits: "Has any [commander_trait|E]" + court_position_whole_of_body_trait:0 "[GetTrait('whole_of_body').GetName( ROOT.Char )]" + court_position_traveler_trait:0 "[GetTrait('lifestyle_traveler').GetName( ROOT.Char )]" + court_position_traveler_trait_experienced:0 "[GetTrait('lifestyle_traveler').GetName( ROOT.Char )]" + court_position_traveler_trait_experienced_danger:0 "[GetTrait('lifestyle_traveler').GetName( ROOT.Char )]" + court_position_humble_trait: "[GetTrait('humble').GetName( ROOT.Char )]" + court_position_arrogant_trait: "[GetTrait('arrogant').GetName( ROOT.Char )]" + court_position_wrathful_trait: "[GetTrait('wrathful').GetName( ROOT.Char )]" + court_position_reaver_trait: "[GetTrait('reaver').GetName( ROOT.Char )]" + court_position_military_engineer_trait: "[GetTrait('military_engineer').GetName( ROOT.Char )]" + court_position_aggressive_attacker_trait: "[GetTrait('aggressive_attacker').GetName( ROOT.Char )]" + court_position_unyielding_defender_trait: "[GetTrait('unyielding_defender').GetName( ROOT.Char )]" + court_position_reckless_trait: "[GetTrait('reckless').GetName( ROOT.Char )]" + court_position_holy_warrior_trait: "[GetTrait('holy_warrior').GetName( ROOT.Char )]" + court_position_cautious_leader_trait: "[GetTrait('cautious_leader').GetName( ROOT.Char )]" + court_position_ambitious_trait: "[GetTrait('ambitious').GetName( ROOT.Char )]" + court_position_beastmaster_modifier:0 "$ep2_beastmaster_modifier$" + court_position_speed:0 "[travel_speed|E] Contribution" + court_position_safety:0 "[travel_safety|E] Contribution" + court_position_soulmate: "Is your [soulmate|E]" + court_position_best_friend: "Is your [best_friend|E]" + court_position_friend: "Is your [friend|E]" + court_position_improved_by_camp_fire_capering_fools: "[GetDomicileBuilding('camp_fire_capering_fools').GetName]" + seneschal_improve_court_aptitude_desc: "[GetCourtPositionType('seneschal_court_position').GetName()] Organizing Court" + yeke_jarquchi_improve_court_aptitude_desc: "[GetCourtPositionType('yeke_jarquchi_court_position').GetName()] Organizing Court" + court_position_merit_level: "[merit_level|E]" + court_position_disciples: "[disciples|E]" + court_position_your_disciple: "Your [disciple|E]" + court_position_tgp_dynasty_legacy: "[GetDynastyPerk( 'tgp_chinese_legacy_5' ).GetName]" + court_position_surveyor_trait: "[GetTrait('lifestyle_surveyor').GetName( ROOT.Char )]" + + court_position_poet_is_advancement: "Member of [GetSituation('dynastic_cycle').GetTopParticipantGroupByKey( 'advancement_movement' ).GetName]" + court_position_liege_is_advancement: "Liege is a member of [GetSituation('dynastic_cycle').GetTopParticipantGroupByKey( 'advancement_movement' ).GetName]" + court_position_tradition_poetry:0 "$tradition_poetry_name$ [culture_tradition|E]" + court_position_tradition_horse_lords:0 "$tradition_horse_lords_name$ [culture_tradition|E]" + court_position_tradition_caravaneers:0 "$tradition_caravaneers_name$ [culture_tradition|E]" + court_position_tradition_saharan_nomads:0 "$tradition_saharan_nomads_name$ [culture_tradition|E]" + court_position_tradition_desert_nomads:0 "$tradition_desert_nomads_name$ [culture_tradition|E]" + + court_physician_court_position:0 "Personal Physician" + + court_physician_tradition_bonus:0 "From [culture_tradition|E]" + court_physician_court_position_desc:1 "The $court_physician_court_position$ is responsible for the health and well-being of the [court|E] they are in. They will treat disease and suture wounds to the best of their abilities." + court_physician_employer_custom_effect_description:4 "$BULLET$Performs [medical_treatments|E]" + court_physician_not_employed_or_away_tt: "You do not have a [GetCourtPositionType('court_physician_court_position').GetName()], or they are not with you" + + hire_physician_decision:0 "Search for Physician" + hire_physician_decision_tooltip:3 "Your servants will suggest a number of suitable candidates for the position of [GetCourtPositionType('court_physician_court_position').GetName()]" + hire_physician_decision_desc: "A $court_physician_court_position$ is essential to care for the sick and wounded at my [ROOT.Char.Custom('GetCourtLower')]. I will ask my servants to bring forth a number of suitable candidates." + hire_physician_decision_effect_tooltip:4 "You will be presented with a group of [GetCourtPositionType('court_physician_court_position').GetName()] candidates and may hire one of them for a fee and a monthly salary of [gold_i][SCOPE.ScriptValue('court_position_physician_salary')]" + hire_physician_decision_confirm:0 "Start the search" + + antiquarian_employer_custom_effect_description: "[SelectLocalization( HasDlcFeature( 'court_artifacts' ), 'antiquarian_employer_custom_effect_reforge_description', '' )]$BULLET$Unlocks the #V $commission_artifact_decision$#! [decision|E]\n$BULLET$Protects [artifacts|E] during [sieges|E] and [raids|E]" + antiquarian_employer_custom_effect_reforge_description: "$BULLET$Enables you to [reforge|E] [artifacts|E]\n" + + chief_eunuch_court_position:1 "Chief Eunuch" + chief_eunuch_court_position_desc:1 "The $chief_eunuch_court_position$ is a trusted servant responsible for the eunuchs at court. Not much goes on that they don't hear about, both among the servants and the royals." + keeper_of_swans_court_position:0 "Keeper of the Swans" + keeper_of_swans_court_position_desc:1 "The $keeper_of_swans_court_position$ is in charge of the royal swans. Keeping count on the number of feathered marvels that their Liege lays claim to and providing them care; this position comes with grave responsibilities." + + master_of_horse_court_position:0 "Master of the Horse" + master_of_horse_court_position_desc:1 "The $master_of_horse_court_position$ is responsible for their Liege's majestic steeds and stables. They have their work cut out for them since a well-kept horse is a boon both on the battlefield and on the road." + master_of_horse_oversee_breeding: "Oversee Breeding" + master_of_horse_oversee_breeding_desc: "This character is tasked with overseeing the breeding of the royal stables." + master_of_horse_mightiest_warhorse: "Warhorse Grooming" + master_of_horse_mightiest_warhorse_desc: "Only the best of steeds is worthy of a warlike ruler." + + court_jester_court_position:0 "Court Jester" + court_jester_employer_custom_effect_description:1 "$BULLET$Unlocks the #V $jester_entertainment_decision$#! [decision|E]" + court_jester_court_position_desc:1 "A $court_jester_court_position$ – a fool – is there to entertain both their Liege and any guests visiting the court. While a clever turn of phrase can be appreciated from time to time a nasty fall always wins laughter." + master_of_hunt_court_position:0 "Master of the Hunt" + master_of_hunt_court_position_nomadic: "Master of the Chase" + master_of_hunt_employer_custom_effect_description:4 "$BULLET$[GetActivityType('activity_hunt').GetName] [hunt_success_chance_no_prefix|E] increases with [aptitude|E]" + master_of_hunt_employee_custom_effect_description: "Increased [hunt_success_chance_no_prefix|E] in [GetActivityType('activity_hunt').GetName]" + master_of_hunt_court_position_desc:1 "The $master_of_hunt_court_position$ is responsible for any hunting parties that members of their Liege's court arrange. They are also in charge of the kennels and the dogs within it." + master_of_hunt_court_position_nomadic_desc: "The $master_of_hunt_court_position_nomadic$ is responsible for great hunting parties, and ensuring a successful hunt for their liege." + high_almoner_court_position:0 "High Almoner" + high_almoner_court_position_desc:1 "The $high_almoner_court_position$ is in charge of distributing alms to the deserving poor and other subjects in need." + cupbearer_court_position:0 "Cup-Bearer" + cupbearer_employer_custom_effect_description:3 "$BULLET$Chance of stopping Poison [GetScheme('murder').GetTypeName] [schemes|E]#!" + cupbearer_court_position_desc:1 "A $cupbearer_court_position$ is responsible for pouring drinks at the royal table and to make sure that no one's cup ever runs dry." + + seneschal_court_position:0 "Seneschal" + seneschal_court_position_desc:1 "The $seneschal_court_position$ serves an important role in the day-to-day life of the royal household, administering the servants and keeping everything running smoothly." + seneschal_improve_court: "Organize Court" + seneschal_improve_court_desc: "This character is organizing the court, to ensure everyone are doing their job." + seneschal_improve_court_task_tt: "@aptitude:4:color_green![aptitude|E] of other [court_positions|E]: #p +[SCOPE.ScriptValue('seneschal_improve_court_value')|0]#!" + seneschal_improve_court_task_fallback_tt: "@aptitude:4:color_green![aptitude|E] of other [court_positions|E]: #p +2/+10#!" + seneschal_improve_domain: "Manage Domain" + seneschal_improve_domain_desc: "This character is tasked with handling the realm of their liege." + seneschal_handling_estate: "Handle the Estate" + seneschal_handling_estate_desc: "This character is tasked with taking care of their liege's estate." + + antiquarian_court_position:0 "Antiquarian" + antiquarian_court_position_desc:2 "The $antiquarian_court_position$ is responsible for the upkeep, care, and procurement of artifacts." + + court_tutor_court_position:0 "Tutor" + court_tutor_court_position_desc:1 "The $court_tutor_court_position$ is in charge of the [education|E] of all children at court, and their skill will influence how much they influence the students. Children can still have individual [guardians|E]." + court_tutor_employer_custom_effect_description:3 "$BULLET$Acts as [guardian|E] for [children|E] without one\n$BULLET$Unlocks the #V $make_child_learn_language_interaction$#! [interaction|E]" + court_tutor_improve_others: "Teach Court" + court_tutor_improve_others_desc: "This character is tasked with assisting the rest of the court." + court_tutor_improve_others_title: "Taught by [ROOT.Char.GetName]" + court_tutor_improve_others_notification_desc: "[target_character.GetShortUIName|U] [CharHaveHas( target_character )] improved [CharYourHerHis( target_character )] skills with the help of [ROOT.Char.GetShortUIName]" + court_tutor_improve_others_fallback_tt: "[liege|E], liege's [heir|E], or other [court_position|E] holders at [court|E] may gain [diplomacy_i][stewardship_i][learning_i][martial_i][skills|E] or [traits|E] every month" + court_tutor_teach_kids: "Educate Children" + court_tutor_teach_kids_desc: "This character is going above and beyond in their duty to educate the children of the court." + court_tutor_teach_kids_title: "Tutor Educates Child" + court_tutor_teach_kids_notification_desc: "Your [court_owner.Custom2('RelationToMeShort', SCOPE.sC('child') )] has been taught by [court_tutor_scope.GetShortUIName]" + court_tutor_teach_kids_notification_desc_you: "You have been taught by [court_tutor_scope.GetShortUIName]" + court_tutor_teach_kids_tt: "[children|E] at [court|E] have a chance to have one of their [diplomacy_i][stewardship_i][learning_i][martial_i][skills|E] increased by #p +1#! or #p +2#! every year" + + royal_architect_court_position:0 "Royal Architect" + royal_architect_court_position_desc:1 "The $royal_architect_court_position$ oversees any prestigious building projects within the realm; not a brick is laid, nor a second spent, without their express permission." + royal_architect_fortify_lands: "Fortify Lands" + royal_architect_fortify_lands_desc: "This character is tasked with ensuring the safety of their liege's lands and people." + royal_architect_public_works: "Public Works" + royal_architect_public_works_desc: "This character is tasked with managing the development of the capital city." + + court_poet_court_position:0 "Court Poet" + court_poet_employer_custom_effect_description:2 "$BULLET$May randomly become [inspired|E]" + court_poet_court_position_desc:1 "The $court_poet_court_position$ is a connoisseur of words and verse, providing their Liege and all at court with entertainment, intellectual stimulation, and emotional experiences." + poet_inspired_message:0 "Inspiration Strikes!" + poet_inspired_effect:0 "Your [GetCourtPositionType('court_poet_court_position').GetName()] [inspired_poet.GetFirstName] gained an [inspiration|E]" + courtier_inspired_message: "$poet_inspired_message$" + courtier_inspired_effect: "Your [courtier|E] [inspired_courtier.GetFirstName] gained an @inspiration_icon![inspiration|E]" + court_poet_skald: "Court Skald" + + bodyguard_court_position:0 "Bodyguard" + bodyguard_court_position_nomadic: "Kheshig" + bodyguard_employer_custom_effect_description:3 "$BULLET$Has a chance to prevent Assassination [GetScheme('murder').GetTypeName] [schemes|E]#!\n#indent_newline:3 $BULLET$Reduces your risk to die or be captured in [battles|E] you're both fighting in#!#!" + stooge_employer_custom_effect_description: "$BULLET$Unlocks special options in events\n#indent_newline:3 $BULLET$Unlocks the $humiliate_the_stooge_decision$ [decision|E]#!#!" + bodyguard_court_position_desc:1 "A $bodyguard_court_position$ is the final line of defense against any and all attackers. Where their charge goes they follow, and they will not hesitate to put themselves in the way of any danger that might be lurking out there." + bodyguard_court_position_nomadic_desc: "A $bodyguard_court_position_nomadic$ has the honor of defending their liege, both during battle and at peace. Split into a day guard and a night guard, they are ready to put their life on the line at all times." + + champion_court_position:1 "Personal Champion" + champion_employer_custom_effect_description:3 "$BULLET$Can take your place in some [single_combat_duel_plural|E]\n[AddLocalizationIf( HasDlcFeature( 'tours_and_tournaments' ), 'champion_employer_custom_effect_description_TOTO_DLC' )]" + champion_employer_custom_effect_description_TOTO_DLC:1 "$BULLET$Earns you [prestige|E] when competing in a [GetActivityType( 'activity_tournament' ).GetName]" + champion_court_position_desc:1 "A $champion_court_position$ is a skilled and deadly fighter that can represent their Liege in duels." + champion_compete_task: "Compete in Name" + champion_compete_task_desc: "This character is actively taking part in local tournaments around the realm in their liege's name." + champion_exercise_ruler: "Exercise with Ruler" + champion_exercise_ruler_desc: "This character is tasked with ensuring their liege is healthy and in shape." + champion_exercise_ruler_fallback_tt: "[liege|E] may gain [prowess_i][prowess_skill|E] every month" + champion_exercise_ruler_title: "Exercise with [ROOT.Char.GetShortUIName]" + champion_exercise_ruler_notification_desc: "[liege.GetShortUIName|U] [CharHaveHas( liege )] been taught by [ROOT.Char.GetShortUIName]" + champion_improve_self: "Improve Skills" + champion_improve_self_desc: "This character is focusing on improving their skills as a personal champion." + champion_improve_self_fallback_tt: "Every month this character has a chance of gaining [GetTrait('tourney_participant').GetName( GetNullCharacter )] [trait_level_track_xp|E] or [prowess_i][prowess_skill|E]" + + court_musician_court_position:0 "Court Musician" + court_musician_employer_custom_effect_description:2 "$BULLET$Increases [opinion|E] gain when hosting a [GetActivityType('activity_feast').GetName]" + court_musician_court_position_desc:1 "A $court_musician_court_position$ is an artist who sings and plays instruments to entertain their Liege and the court." + food_taster_court_position:0 "Food Taster" + food_taster_employer_custom_effect_description:3 "$BULLET$Chance of stopping Poison [GetScheme('murder').GetTypeName] [schemes|E]#!" + food_taster_court_position_desc:1 "A $food_taster_court_position$ has the solemn duty to ensure that their Liege's plate never is touched by poison, and if some nefarious powder or liquid nevertheless makes it into the meal... Well, that's why the food taster has to taste the food before the meal begins." + lady_in_waiting_court_position:0 "Lady-in-waiting" + lady_in_waiting_court_position_desc:1 "A $lady_in_waiting_court_position$ is an assistant and companion to a Queen or Empress, attending to her every need and fulfilling every whim." + + executioner_court_position:0 "Executioner" + executioner_employer_custom_effect_description:2 "$BULLET$Can publicly [execute|E] [prisoners|E] for increased [control|E] and [county_opinion|E]\n@warning_icon! #X The character's crimes are forgiven#!" + executioner_court_position_desc:1 "Executioners are criminals who, in exchange for their freedom, have to execute any and all enemies to the throne. Some would call it an honor, some a burden." + executioner_terrify_court: "Terrify Court" + executioner_terrify_court_desc: "This character is paraded around in court to ensure that everyone knows that they are only one step away from the chopping block." + + garuda_court_position:0 "Garuda" + garuda_employer_custom_effect_description:1 "$BULLET$Reduces your risk to die or be captured in battles you're both fighting in" + garuda_court_position_desc:0 "This knight has sworn to fulfill the will of his liege or die trying. Just as the mythological $garuda_court_position$ bird bore the weight of Vishnu, the $garuda_court_position$ warriors bear the sovereignty of the monarch." + court_gardener_court_position:0 "Court Gardener" + court_gardener_court_position_desc:0 "The $court_gardener_court_position$ is responsible for the well-being of the gardens belonging to their liege, pouring time and skill into making them truly flourish." + chief_qadi_court_position:0 "Chief Qadi" + chief_qadi_court_position_desc:0 "The $chief_qadi_court_position$ is the ultimate judge of the realm, responsible for applying Islamic law in various disputes and legal matters." + cultural_emissary_court_position:0 "Cultural Emissary" + cultural_emissary_court_position_desc:0 "The purpose of the $cultural_emissary_court_position$ is to promote understanding between different cultures by way of celebration and reverence." + court_artificer_court_position:0 "Court Artificer" + court_artificer_court_position_desc:0 "A $court_artificer_court_position$ is someone who's proven themselves able to craft great things. While they mostly lull around in your court, the hope is for inspiration to strike once more." + court_artificer_employer_custom_effect_description:2 "$BULLET$Has a chance to become [inspired|E] again (based on [aptitude|E])\n@alert_icon! #alert_trial Will leave the [court|E] if fired#!" + court_artificer_inspired_effect:0 "Your [GetCourtPositionType('court_artificer_court_position').GetName()] [artificer.GetFirstName] gained an [inspiration|E]" + has_an_inspiration:0 "Has an active [inspiration|E]" + has_a_completed_inspiration:0 "Has previously completed an [inspiration|E]" + COURT_POSITIONS_YOUR_SALARY:0 "$COURT_POSITION$" + does_not_have_a_full_time_job:0 "Is #bold not#! already employed in a full time [court_position|E] or as a [councillor|E]" + none_does_not_have_a_full_time_job: "They are #bold not#! already employed as a [councillor|E], camp [officer|E], or in a full time [court_position|E]" + IS_NOT_APPLICABLE_DIARCH_COURT_POSITION: "They are #bold not#! currently [sharing_power|E] or in a [line_of_succession|E] to [share_power|E]" + IS_NOT_GONE_ADVENTURING: "They have #bold not#! gone adventuring" + none_has_no_particular_noble_roots_trigger: "They are [lowborn|E] or of an insignificant [dynasty|E]" + faith_allows_recruitment_court_position: "They are #bold not#! [clergy|E], or their [liege|E]'s faith allows recruitment of [clergy|E]" + is_imprisoned_court_position_executioner: "They are imprisoned and #bold not#! currently employed as an [GetCourtPositionType('executioner_court_position').GetName()]" + faith_allows_master_assassin: "Their [faith|E]:\n$BULLET$Has the [GetFaithDoctrine('tenet_fp3_fedayeen').GetBaseName] [core_tenet|E]\n$BULLET$Does #bold not#! have the [GetFaithDoctrine('tenet_pacifism').GetBaseName] [core_tenet|E] or the [GetFaithDoctrine('tenet_dharmic_pacifism').GetBaseName] [core_tenet|E]" + is_not_a_ceremonial_liege_trigger: "They are #bold not#! a [ceremonial_liege|E]" + + clan_tax_collector_court_position: "Tax Collector" + clan_tax_collector_court_position_desc: "The $clan_tax_collector_court_position$ is tasked with organizing and collecting taxes, making sure that [clan|E] [vassals|E] pay their due diligence." + court_position_khvarenah_legacy_4: "Employer's [dynasty|E] has [GetDynastyPerk( 'fp3_khvarenah_legacy_4' ).GetName]" + court_position_khvarenah_legacy_1: "[dynasty|E] has [GetDynastyPerk( 'fp3_khvarenah_legacy_1' ).GetName]" + court_position_innovation_mural_sextant: "[dynasty|E] has $fp3_innovation_mural_sextant$" + capable_magistrates_modifier: "Capable Magistrates" + opinion_of_liege: "Opinion of [liege|E]" + + cave_hermit_court_position:0 "Garden Hermit" + cave_hermit_court_position_desc:0 "The $cave_hermit_court_position$ is someone that will inhabit your castle grounds and entertain your guests with prophecies and riddles. Some say they may be actual mystics." + cave_hermit_court_position_tt:0 "You've found a #V [GetCourtPositionType( 'cave_hermit_court_position' ).GetName()]#! during your [travels|E]" + + travel_leader_court_position:0 "Caravan Master" + travel_leader_court_position_desc:0 "The $travel_leader_court_position$ assists you when traveling and takes charge of all itineraries. They aim to ensure you arrive at your destination safely and on-time." + + hire_travel_leader_decision:0 "Search for $travel_leader_court_position$" + hire_travel_leader_decision_tooltip:0 "Your servants will suggest a number of suitable candidates for the position of [GetCourtPositionType('travel_leader_court_position').GetName()]" + travel_leader_court_position_custom_desc: "$EFFECT_LIST_BULLET$Provides @travel_safety_icon![travel_safety|E] and @travel_speed_icon![travel_speed|E] during [travels|E]" + hire_travel_leader_decision_desc:0 "A good $travel_leader_court_position$ is the key to a successful journey. I will request for a number of suitable candidates to be suggested." + hire_travel_leader_decision_confirm:0 "Start the search" + caravan_master_prepare_travels: "Stock Up for Travels" + caravan_master_prepare_travels_desc: "This character is tasked with preparing for their liege's next journey." + caravan_master_prepare_travels_tt: "@travel_safety_icon![travel_safety|E] and @travel_speed_icon![travel_speed|E] will be increased by #P +[SCOPE.ScriptValue('caravan_master_prepare_travels_current_value')]#! next time you [travel|E] #weak (This value is increased by #P +[SCOPE.ScriptValue('caravan_master_prepare_travels_change_value')]#! every month, up to #P +[SCOPE.ScriptValue('caravan_master_prepare_travels_max_value')]#!)#!" + caravan_master_prepare_travels_fallback_tt: "@travel_safety_icon![travel_safety|E] and @travel_speed_icon![travel_speed|E] will be increased by #P +[SCOPE.ScriptValue('caravan_master_prepare_travels_current_value_employer')]#! next time you [travel|E] #weak (The value is increased by #P +0.3/+2#! every month, up to #P +3/+20#!)#!" + prepare_travels_modifier: "Prepared Journey" + prepare_travels_modifier_desc: "A caravan master prepared for this travel ahead of time." + prepare_travels_modifier_scale_desc: "\t#weak Increased by Caravan Master Court Position Task#!" + MODIFIER_DEFINITION_PREPARE_TRAVELS_VALUE: "\n#emp Multiplier:#! #bold $MULTIPLIER|0$#!" + caravan_master_prepare_armies: "Prepare Armies" + caravan_master_prepare_armies_desc: "This character is tasked with preparing the armies for their forays into foreign realms." + caravan_master_improve_self: "Improve Skills" + caravan_master_improve_self_desc: "This character is focusing on improving their skills as a caravan master." + caravan_master_improve_self_tt: "Every month this character has a chance of gaining [GetTrait('lifestyle_traveler').GetName( root_scope )] [trait_level_track_xp|E], [martial_i][martial_skill|E], or [stewardship_i][stewardship_skill|E]" + caravan_master_improve_self_fallback_tt: "Every month this character has a chance of gaining [GetTrait('lifestyle_traveler').GetName( GetNullCharacter )] [trait_level_track_xp|E], [martial_i][martial_skill|E], or [stewardship_i][stewardship_skill|E]" + + wet_nurse_court_position: "Wet Nurse" + wet_nurse_court_position_desc: "A $wet_nurse_court_position$ is a caretaker of your [children|E] and child [hostages|E]." + wet_nurse_employer_custom_effect_description: "$BULLET$[influence_ward_personality|E] Acceptance: #P +10#!\n$BULLET$Reduces chance for [children|E] to contract [illnesses|E]\n$BULLET$Possibility for [child|E] development events" + find_wet_nurse_decision: "Search for $wet_nurse_court_position$" + find_wet_nurse_decision_desc: "A $wet_nurse_court_position$ is a symbol of the court's wealth and prosperity: a woman tasked with nursing children, shielding them from disease, and minding their development. A hale and healthful candidate is essential." + find_wet_nurse_decision_tooltip: "Your servants will suggest a number of suitable candidates for the position of [GetCourtPositionType('wet_nurse_court_position').GetName()]" + find_wet_nurse_decision_confirm: "Start the search" + court_position_has_child: "Has a child" + wet_nurse_age_tt: "They are under the age of #V 46#!" + wet_nurse_instill_virtue: "Instill Virtue" + wet_nurse_instill_virtue_desc: "This character is teaching kids at court what kind of behavior is expected from them." + wet_nurse_instill_virtue_notification_desc: "[ROOT.Char.GetShortUIName] taught [child_character.GetShortUIName] how to behave like a proper [notification_character.GetFaith.GetAdherentName]" + wet_nurse_instill_virtue_fallback_tt: "[children|E] at [court|E] may gain a [virtuous|E] [trait|E] every month" + wet_nurse_promote_relationships: "Promote Friendship" + wet_nurse_promote_relationships_desc: "This character is tasked with ensuring a healthy environment where the children at court can thrive." + wet_nurse_promote_relationships_fallback_tt: "[children|E] at [court|E] may gain [opinion_i][opinion|E] with one another, become [friends|E], or stop being [bullies|E]" + wet_nurse_promote_competition: "Encourage Competition" + wet_nurse_promote_competition_desc: "This character is tasked with ensuring the best have the chance to thrive — even at the cost of the other children if need be." + wet_nurse_promote_competition_fallback_tt: "[children|E] at [court|E] may gain [intrigue_i][intrigue_skill|E] or [prowess_i][prowess_skill|E], but at the cost of [opinion_i][opinion|E] with other children" + + ALL_COURT_POSITIONS_FILTER: "All positions" + COURT_POSITION_HAS_TASKS_FILTER: "Positions with tasks" + + chronicler_court_position: "Court Chronicler" + chronicler_court_position_nomadic_tribal: "Storyteller" + court_position_chronicler: "[GetCourtPositionType('chronicler_court_position').GetName()]" + chronicler_court_position_desc: "The $chronicler_court_position$ is tasked with dedicating the deeds of their employer to paper." + chronicler_court_position_nomadic_tribal_desc: "A $chronicler_court_position_nomadic_tribal$ has the honor of sharing their liege's greatest exploits and tales far and wide." + chronicler_generate_seeds: "Search for Legends" + chronicler_generate_seeds_desc: "Your $chronicler_court_position$ will search the records to find reasons to immortalize you as a legend." + yearly_legend_seed_tt: "Every year you will have a random chance to gain a [legend_seed|E]. Higher levels of [aptitude|E] will increase the chances of this occurring." + chronicler_espouse_legend: "Commend Legend Abroad" + chronicler_espouse_legend_desc: "This character will travel your realm and beyond to convince [vassals|E] and neighboring [rulers|E] to make your legend their [promoted_legend|E]" + yearly_legend_spread_tt: "Every year, one of your [vassals|E] or neighboring [rulers|E] may make your legend their [promoted_legend|E]. Higher levels of [aptitude|E] will increase the chances of this occurring." + + court_position_tourney_participant_trait: "$tourney_participant_horse$" + charioteer_court_position: "Champion Charioteer" + charioteer_court_position_desc: "The $charioteer_court_position$ is a professional chariot racer, sponsored by their employer." + charioteer_employer_custom_effect_description: "$BULLET$Placing 3rd or higher during a [GetActivityType( 'activity_chariot_race' ).GetName] grants [influence|E]" + + bookmaker_court_position: "Bookmaker" + bookmaker_court_position_desc: "The $bookmaker_court_position$ is a professional bookkeeper for handling gambling at [GetActivityType( 'activity_chariot_race' ).GetName]." + bookmaker_employer_custom_effect_description: "$BULLET$Reduces the cost of hosting a [GetActivityType( 'activity_chariot_race' ).GetName] (based on [aptitude|E])\n$BULLET$Provides [gold|E] from bets placed during a [GetActivityType( 'activity_chariot_race' ).GetName]" + + bookmaker_cook_the_books: "Cook the Books" + bookmaker_cook_the_books_desc: "This character will ensure that betting outcomes at a [GetActivityType('activity_chariot_race').GetName] are always in your favor" + bookmaker_cook_the_books.tt: "During the next [GetActivityType('activity_chariot_race').GetName] that you host, your [GetCourtPositionType('bookmaker_court_position').GetName()] will employ some creative arithmetic to lower the amount of [gold|E] paid out for successful wagers — meaning more for the crown." + + bookmaker_distribute_bribes: "Distribute Bribes" + bookmaker_distribute_bribes_desc: "This character will distribute bribes discreetly on your behalf, increasing your influence across the realm." + + charioteer_training: "Chariot Training" + charioteer_training_desc: "This character will train day and night to improve their skills as a charioteer, and gain valuable experience." + charioteer_training_tt: "$charioteer_court_position$ will gain experience in their #high Charioteer#! [trait|E] over time" + + court_position_fickle: "[GetTrait('fickle').GetName( ROOT.Char )]" + court_position_varangian_trait: "[GetTrait('varangian').GetName( ROOT.Char )]" + court_position_fp1_coastal_warriors: "Their [culture|E] has the [GetCultureTradition('tradition_fp1_coastal_warriors').GetName] [tradition|E]" + court_position_hird: "Their [culture|E] has the [GetCultureTradition('tradition_hird').GetName] [tradition|E]" + court_position_fp1_performative_honour: "Their [culture|E] has the [GetCultureTradition('tradition_fp1_performative_honour').GetName] [tradition|E]" + + akolouthos_court_position:0 "Akolouthos" + akolouthos_employer_custom_effect_description: "$BULLET$Increases [GetTrait('varangian').GetName( GetNullCharacter )] [GetCourtPositionType('bodyguard_court_position').GetName()] [aptitude|E] (based on [aptitude|E])\n$BULLET$More eligible [courtiers|E] gain the [GetTrait('varangian').GetName( GetNullCharacter )] and [GetTrait('loyal').GetName( GetNullCharacter )] [traits|E]\n$BULLET$More Varangians will appear\n@warning_icon! #X The Varangians will claim some [gold_i] Gold after the Basileus's death.#!" + akolouthos_court_position_desc: "The $akolouthos_court_position$ commands much of the Byzantine imperial guard, including the famed Varangians, who are most willing to die honorably for their master." + akolouthos_founded_varangians_trigger_tt: "You have founded the Varangians" + + court_position_akolouthos_bonus: "[GetCourtPositionType('akolouthos_court_position').GetName()]" + + court_brewmaster_court_position: "Court Brewmaster" + court_brewmaster_court_position_desc: "The $court_brewmaster_court_position$ is a representative chosen to interact directly with the brewers of the realm, to ensure the liege can get their hands on the best of brews." + court_brewmaster_employer_custom_effect_description: "$BULLET$[GetActivityType( 'activity_feast' ).GetName] costs reduced by #positive_value @gold_icon!-5%#! to #positive_value @gold_icon!-25%#! (based on [aptitude|E])\n$BULLET$[GetActivityType( 'activity_feast' ).GetName] rewards increased by #positive_value +5%#! to #positive_value +25%#! (based on [aptitude|E])" + court_brewmaster_requirement_tt: "A [barony|E] in your [domain|E] has a #color_white [GetBuilding('breweries_01').GetName]#! [building|E] or one of its upgrades" + court_brewmaster_popular_opinion: "Empty the Cellars" + court_brewmaster_popular_opinion_desc: "Increase production across the realm so we can regularly share some of our better brews with our people." + court_brewmaster_court_opinion: "Share with the Court" + court_brewmaster_court_opinion_desc: "Bring out some of the best brews so the court can see what we have." + court_brewmaster_experimental_brew: "Experimental Brew" + court_brewmaster_experimental_brew_desc: "The brewmaster has put together something truly unique and memorable, though... Not necessarily good." + court_brewmaster_experimental_brew_tt: "You gain an #color_yellow Experimental Brew#! for #color_white 6 months#!\n#color_yellow Experimental Brew#! will be changed every #color_white 6 months#!" + court_brewmaster_explanation: "[GetCourtPositionType('court_brewmaster_court_position').GetName]" + court_brewmaster_task_cooldown: "This task cannot be initiated until #color_white [GetCurrentDateWithDiff( GetVarTimeRemaining( liege.MakeScope, 'experimental_brew_cooldown') )]#!" + + court_position_palace_politics: "[GetCultureTradition('tradition_ep3_palace_politics').GetName]" + court_position_north_germanic: "Their culture is of $heritage_north_germanic_name$ [heritage|E]" + court_position_west_germanic: "Their culture is of $heritage_west_germanic_name$ [heritage|E]" + court_position_not_same_culture_heritage: "Different [heritage|E] from [liege|E]'s [culture|E]" + court_position_not_same_culture_language: "Different [language|E] from [liege|E]'s [culture|E]" + + eparch_court_position: "Eparch" + eparch_court_position_desc: "The Eparch is the main administrator and ultimate authority of the capital, second only to the reigning monarch." + eparch_appease_populace: "Appease Populace" + eparch_appease_populace_desc: "The [GetCourtPositionType('eparch_court_position').GetNameNoTooltip()] will attend to the needs of the citizens of the capital." + eparch_support_troops: "Support Troops" + eparch_support_troops_desc: "The [GetCourtPositionType('eparch_court_position').GetNameNoTooltip()] will oversee the organization of the local garrisons and ensure an effective command." + eparch_enforce_public_order: "Enforce Public Order" + eparch_enforce_public_order_desc: "The [GetCourtPositionType('eparch_court_position').GetNameNoTooltip()] will have soldiers patrol the streets to keep the peace and secure public order no matter the cost." + eparch_development: "Develop Capital" + eparch_development_desc: "The [GetCourtPositionType('eparch_court_position').GetNameNoTooltip()] will put the city's administrators to good use to develop and improve the city." + eparch_base_desc: "$EFFECT_LIST_BULLET$[governor_efficiency|E]" + eparch_base_family_desc: "$EFFECT_LIST_BULLET$[governor_efficiency|E] for owners of [estates|E] located in the [capital|E]" + eparch_terrible_desc: "$eparch_base_desc$: #P +2%#!\n$eparch_base_family_desc$: #P +1%#!" + eparch_poor_desc: "$eparch_base_desc$: #P +4%#!\n$eparch_base_family_desc$: #P +2%#!" + eparch_average_desc: "$eparch_base_desc$: #P +6%#!\n$eparch_base_family_desc$: #P +3%#!" + eparch_good_desc: "$eparch_base_desc$: #P +8%#!\n$eparch_base_family_desc$: #P +4%#!" + eparch_excellent_desc: "$eparch_base_desc$: #P +10%#!\n$eparch_base_family_desc$: #P +5%#!" + eparch_range_desc: "$eparch_base_desc$: #P +2%#! to #P +10%#! (based on [aptitude|E])\n$eparch_base_family_desc$: #P +1%#! to #P +5%#! (based on [aptitude|E])" + eparch_distance_trigger_desc: "Governs a [GetPlayer.Custom( 'GetProvinceConcept' )] close to the [capital|E]" + eparch_custom_effect_desc: "$EFFECT_LIST_BULLET$The [GetCourtPositionType('eparch_court_position').GetNameNoTooltip()] will oversee the capital's administration" + eparch_capital_has_grain_dole_desc: "The [capital|E] has [GetModifier('panem_et_circenses_county_modifier').GetNameWithTooltip]" + eparch_capital_bureau: "[GetBuilding('capital_bureau_02').GetTypeName] [building|E] line" + +#CAMP OFFICERS + landless_government_tt: "You are an [adventurer|E]" + camp_with_following_buildings_tt: "You have a [camp|E] with one of the following [buildings|E]:" + officer_positions: "[officer|E] positions" + second_camp_officer: "Second" + second_camp_officer_desc: "A $second_camp_officer$ is the most trusted officer at [DOMICILE_TYPE.GetName]., aiding the leader as next-in-command. They are responsible for orders and organization in the leader's absence." + second_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('camp_main_01').GetName]" + + quartermaster_camp_officer: "Storekeeper" + quartermaster_camp_officer_desc: "The $quartermaster_camp_officer$ is responsible for ensuring the [DOMICILE_TYPE.GetName] is well fed and watered. They manage, safeguard, and distribute the provisions as needed." + quartermaster_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('supply_tent_01').GetName]" + + armorer_camp_officer: "Armorer" + armorer_camp_officer_desc: "The $armorer_camp_officer$ is a smith who specializes in helmets and maile. They are responsible for making and mending the garb of the men-at-arms and horses." + armorer_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('supply_tent_smithy').GetName]" + + chief_forager_camp_officer: "Chief Forager" + chief_forager_camp_officer_desc: "The $chief_forager_camp_officer$ is tasked with supplementing the [DOMICILE_TYPE.GetName]'s provisions. They are responsible for organizing parties to gather fare from the local area." + chief_forager_camp_officer_employer_custom_effect_description: "$BULLET$May aid in Gather Provisions [decisions|E]" + chief_forager_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('supply_tent_reserve_provisions').GetName]" + + master_thief_camp_officer: "Master Thief" + master_thief_camp_officer_desc: "The $master_thief_camp_officer$ is a rogue tasked with the varied and morally dubious arts of burglary. They may ensure access to objects otherwise out of reach." + master_thief_camp_officer_employer_custom_effect_description: "$BULLET$Unlocks $steal_back_artifact$ [interaction|E]" + master_thief_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('supply_tent_subdued_gear').GetName]" + + head_porter_camp_officer: "Head Porter" + head_porter_camp_officer_desc: "The $head_porter_camp_officer$ is in charge of transporting the [DOMICILE_TYPE.GetName] and all its provisions. They ensure everything arrives at the next destination in one piece." + head_porter_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('baggage_train_01').GetName]" + + head_groom_camp_officer: "Head Groom" + head_groom_camp_officer_desc: "The $head_groom_camp_officer$ is charged with the livery of the [DOMICILE_TYPE.GetName]'s horses and beasts of burden. They are responsible for the animal's provender, care, and tack." + head_groom_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('baggage_train_ample_steeds').GetName]" + + huntperson_camp_officer: "Huntsman" + huntperson_camp_officer_desc: "The $huntperson_camp_officer$ is an acolyte in the ways of the horn, hound, and bow. They are responsible for planning and leading the [DOMICILE_TYPE.GetName]'s hunting expeditions." + huntperson_camp_officer_employer_custom_effect_description: "$BULLET$[GetActivityType('activity_hunt').GetName] [hunt_success_chance_no_prefix|E] increases with [aptitude|E]\n$BULLET$Improves [martial|E] [education|E] outcomes for all [children|E] in your [DOMICILE_TYPE.GetName]\n$BULLET$May aid in Gather Provisions [decisions|E]" + huntperson_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('baggage_train_trackers').GetName]" + + kennelperson_camp_officer: "Kenneler" + kennelperson_camp_officer_desc: "The $kennelperson_camp_officer$ is tasked with the care and training of the [DOMICILE_TYPE.GetName]'s pack of hounds. They keep the dogs healthy and well fed — most of the time." + kennelperson_camp_officer_employer_custom_effect_description: "$BULLET$Enables Toss to Dogs [execution|E] [prisoners|E] method" + kennelperson_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('baggage_train_kennel').GetName]" + + chief_engineer_camp_officer: "Chief Engineer" + chief_engineer_camp_officer_desc: "The $chief_engineer_camp_officer$ is responsible for all tasks requiring a knowledge of mechanisms and machinery. They build and repair siege weapons, and instruct the men in their use." + chief_engineer_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('baggage_train_siege_engineers').GetName]" + + witness_camp_officer: "Witness" + witness_camp_officer_desc: "The $witness_camp_officer$ has the solemn task of recording the deeds and rightful claims of the [DOMICILE_TYPE.GetName]'s leader. They attest to the great deeds and struggles of the [DOMICILE_TYPE.GetName]." + witness_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('baggage_train_proof_of_claims').GetName]" + + person_haggler_camp_officer: "Man-Haggler" + person_haggler_camp_officer_desc: "The $person_haggler_camp_officer$ is responsible for valuable prisoners, and extracting the greatest possible profit from them. They look to the captives, and handle the ransom negotiations." + person_haggler_camp_officer_employer_custom_effect_description: "$BULLET$[gold|E] gain from ransoming [prisoners|E]: [gold_i]#P +7%#! to [gold_i]#P +33%#! (based on [aptitude|E])\n$BULLET$[gold|E] to pay to ransom your [followers|E]: [gold_i]#P -9%#! to [gold_i]#P -33%#! (based on [aptitude|E])" + person_haggler_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('baggage_train_ransom_cages').GetName]" + + person_haggler_aptitude_effect_1: "$BULLET$ [gold_i][gold|E] from ransoming [prisoners|E]: #P +7%#!\n$BULLET$[gold_i][gold|E] to ransom your [followers|E]: #P -9%#!" + person_haggler_aptitude_effect_2: "$BULLET$ [gold_i][gold|E] from ransoming [prisoners|E]: #P +13%#!\n$BULLET$[gold_i][gold|E] to ransom your [followers|E]: #P -17%#!" + person_haggler_aptitude_effect_3: "$BULLET$ [gold_i][gold|E] from ransoming [prisoners|E]: #P +20%#!\n$BULLET$[gold_i][gold|E] to ransom your [followers|E]: #P -23%#!" + person_haggler_aptitude_effect_4: "$BULLET$ [gold_i][gold|E] from ransoming [prisoners|E]: #P +27%#!\n$BULLET$[gold_i][gold|E] to ransom your [followers|E]: #P -29%#!" + person_haggler_aptitude_effect_5: "$BULLET$ [gold_i][gold|E] from ransoming [prisoners|E]: #P +33%#!\n$BULLET$[gold_i][gold|E] to ransom your [followers|E]: #P -33%#!" + + camp_cook_camp_officer: "Chief Cook" + camp_cook_camp_officer_desc: "The $camp_cook_camp_officer$ rustles up hearty grub, keeping the [DOMICILE_TYPE.GetName] well fed and in good spirits. They are also responsible for preparing the officers' meals." + camp_cook_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('mess_tent_01').GetName]" + + master_bard_camp_officer: "Master Bard" + master_bard_camp_officer_desc: "The $master_bard_camp_officer$ entertains the [DOMICILE_TYPE.GetName] and its officers with ballads and tall tales. Their efforts may also go some way to immortalizing an adventurer's grand deeds." + master_bard_camp_officer_employer_custom_effect_description: "$BULLET$Unlocks $send_poem_interaction$ [interaction|E]" + master_bard_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('camp_fire_trailing_musicians').GetName]" + + stooge_camp_officer: "Stooge" + stooge_camp_officer_desc: "The $stooge_camp_officer$ is the involuntary focus of the [DOMICILE_TYPE.GetName]'s irritation and cruel humor. Their maltreatment is a great source of morale and the origin of many risible fireside yarns." + master_of_arms_camp_officer: "Master of Arms" + master_of_arms_camp_officer_desc: "The $master_of_arms_camp_officer$ is tasked with keeping the fighting men in line, both at [DOMICILE_TYPE.GetName] and on the battlefield. They are responsible for discipline and training." + master_of_arms_employer_custom_effect_description: "$BULLET$Unlocks $train_for_tournament_decision_name$ [decision|E]#!" + master_of_arms_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('proving_grounds_01').GetName]" + + light_cavalry_captain_camp_officer: "Light Cavalry Captain" + light_cavalry_captain_camp_officer_desc: "The $light_cavalry_captain_camp_officer$ is commander of the [DOMICILE_TYPE.GetName]'s swiftest horsemen. They are responsible for the contingent's leadership, training, and tactics." + light_cavalry_captain_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('proving_grounds_horse_run').GetName]" + + camelry_captain_camp_officer: "Camelry Captain" + camelry_captain_camp_officer_desc: "The $camelry_captain_camp_officer$ commands the [DOMICILE_TYPE.GetName]'s camel-riders. They are responsible for the contingent's leadership, training, and tactics." + camelry_captain_captain_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('proving_grounds_camel_run').GetName]" + + elephantry_captain_camp_officer: "Elephantry Captain" + elephantry_captain_camp_officer_desc: "The $elephantry_captain_camp_officer$ commands the [DOMICILE_TYPE.GetName]'s mahouts. They are responsible for the contingent's leadership, training, and tactics." + elephantry_captain_captain_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('proving_grounds_elephantry_reserve').GetName]" + + heavy_cavalry_captain_camp_officer: "Heavy Cavalry Captain" + heavy_cavalry_captain_camp_officer_desc: "The $heavy_cavalry_captain_camp_officer$ commands the [DOMICILE_TYPE.GetName]'s armored chargers. They are responsible for the contingent's leadership, training, and tactics." + heavy_cavalry_captain_captain_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('proving_grounds_nightly_barding_drills').GetName]" + + horse_archer_captain_camp_officer: "Horse Archer Captain" + horse_archer_captain_camp_officer_desc: "The $horse_archer_captain_camp_officer$ commands the [DOMICILE_TYPE.GetName]'s mounted skirmishers. They are responsible for the contingent's leadership, training, and tactics." + horse_archer_captain_captain_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('proving_grounds_life_in_the_saddle').GetName]" + + archer_captain_camp_officer: "Archer Captain" + archer_captain_camp_officer_desc: "The $archer_captain_camp_officer$ commands the [DOMICILE_TYPE.GetName]'s bowmen. They are responsible for the contingent's leadership, training, and tactics." + archer_captain_captain_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('proving_grounds_the_stump').GetName]" + + heavy_infantry_captain_camp_officer: "Heavy Infantry Captain" + heavy_infantry_captain_camp_officer_desc: "The $heavy_infantry_captain_camp_officer$ commands the [DOMICILE_TYPE.GetName]'s armored battle-line. They are responsible for the contingent's leadership, training, and tactics." + heavy_infantry_captain_captain_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('proving_grounds_personal_bouts').GetName]" + + light_infantry_captain_camp_officer: "Light Infantry Captain" + light_infantry_captain_camp_officer_desc: "The $light_infantry_captain_camp_officer$ commands the [DOMICILE_TYPE.GetName]'s skirmishers. They are responsible for the contingent's leadership, training, and tactics." + light_infantry_captain_captain_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('proving_grounds_training_circle').GetName]" + + pike_captain_camp_officer: "Pike Captain" + pike_captain_camp_officer_desc: "The $pike_captain_camp_officer$ commands of the spear lines. They are responsible for the contingent's leadership, training, and tactics." + pike_captain_captain_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('proving_grounds_mock_battle_drills').GetName]" + + master_of_spoils_camp_officer: "Master of Spoils" + master_of_spoils_camp_officer_desc: "The $master_of_spoils_camp_officer$ is responsible for the collection and distribution of the [DOMICILE_TYPE.GetName]'s booty. They ensure the spoils of war are properly divided between the men." + master_of_spoils_camp_officer_employer_custom_effect_description: "$BULLET$Increases [gold_i][gold|E], [prestige_i][prestige|E], and [piety_i][piety|E] gain from winning [battles|E] and [sieges|E] (based on [aptitude|E])\n$BULLET$Increases the chance of stealing an [artifact|E] after a [siege|E] (based on [aptitude|E])" + master_of_spoils_captain_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('proving_grounds_lockwagon').GetName]" + + court_position_eunuch_trait: "[GetTrait('eunuch_1').GetName( ROOT.Char )]" + court_position_beardless_eunuch_trait: "[GetTrait('beardless_eunuch').GetName( ROOT.Char )]" + court_position_eunuch_falsetto: "[GetTrait('beardless_eunuch').GetName( ROOT.Char )]'s Falsetto" + court_position_traveling_friend: "Traveling comrade holds another [court_position|E]" + camp_priest_camp_officer: "[DOMICILE_TYPE.GetName] Priest" + camp_priest_camp_officer_desc: "The $camp_priest_camp_officer$ offers spiritual support to the [DOMICILE_TYPE.GetName]." + camp_priest_camp_officer_parameter_tt: "$camp_with_following_buildings_tt$\n$BULLET$[GetDomicileBuilding('baggage_train_shrine').GetName]" + + laureate_camp_officer: "Laureate" + laureate_camp_officer_desc: "The $laureate_camp_officer$ is a live-in verse writer for all occasions. Their work is known far and wide, and brings in plenty of eager poets to learn at their feet." + laureate_camp_officer_employer_custom_effect_description: "$master_bard_camp_officer_employer_custom_effect_description$\n$BULLET$Enables the Invite Poets [decision|E]" + + court_position_bodyguard_modifier: "[GetPerk('praetorian_guard_perk').GetName( GetNullCharacter )]" + court_position_bodyguard_liege_modifier: "Employer has [GetPerk('praetorian_guard_perk').GetName( GetNullCharacter )]" + + # BP3 + court_position_travel_companion_modifier: "[GetPerk('travel_companion_perk').GetName( GetNullCharacter )]" + court_position_travel_companion_liege_modifier: "Employer has [GetPerk('travel_companion_perk').GetName( GetNullCharacter )]" + gracious_host_impeccable_guest_perk_bonus: "[GetPerk('gracious_host_impeccable_guest_perk').GetName( GetNullCharacter )]" + + # MPO + court_astrologer_court_position: "Stargazer" + court_astrologer_court_position_desc: "The $court_astrologer_court_position$ searches the skies to predict what fate may be upon us." + court_astrologer_employer_custom_effect_description: "$BULLET$Enables the #EMP $mpo_divination_decision$#! [decision|E]#!\n$BULLET$Enables the #EMP $mpo_decision_fertility_dance$#! [decision|E]#!" + court_position_mongolic: "Their culture is of $heritage_mongolic_name$ [heritage|E]" + court_position_turkic: "Their culture is of $heritage_turkic_name$ [heritage|E]" + court_position_nomadic: "Their government is [GetGovernment( 'nomad_government' ).GetName]" + court_position_not_kurultai: "They are not a [kurultai_member|E]" + court_astrologer_guide_shepherds: "Guide Shepherds" + court_astrologer_guide_shepherds_desc: "This character is aiding the herders and shepherds of the realm to find the best grazing lands." + court_astrologer_guide_shepherds_tt: "[GetGovernment( 'herder_government' ).GetName] [vassals|E] or [tributaries|E] may gain the [GetTrait('lifestyle_seasoned_pastor').GetName(GetNullCharacter)] [trait|E] or [county_fertility|E]" + court_astrologer_guide_shepherds_trigger_tt: "No [GetGovernment( 'herder_government' ).GetName] [vassals|E]" + court_astrologer_handling_weather: "Oversee Preparations" + court_astrologer_handling_weather_desc: "This character is tasked with ensuring the best outcome for the season, either by utilizing the effects of the good weather or mitigating the effects of the bad weather." + court_astrologer_handling_weather_tt: "Effect due to [liege.GetCapitalLocation.GetCounty.GetSubRegionInSituation( tooltip_season ).GetCurrentPhase.GetName|V] in [liege.GetCapitalLocation.GetName|V]:\n\t$BULLET$" + court_astrologer_handling_weather_trigger_tt: "Your [capital|E] is outside of a Migration [situation|E]" + court_astrologer_handling_weather_abundant_grazing: "$court_astrologer_handling_weather_tt$$MOD_HERD_GAIN$: #P +15%#!" + court_astrologer_handling_weather_everlasting_summer: "$court_astrologer_handling_weather_tt$[vassal|E] [opinion|E]: #P +10#!" + court_astrologer_handling_weather_blue_sky: "$court_astrologer_handling_weather_tt$[piety|E]: [piety_i]#P +3.0#!/month" + court_astrologer_handling_weather_white_zud: "$court_astrologer_handling_weather_tt$$MOD_MONTHLY_COUNTY_FERTILITY_GROWTH$: #P +20%#!" + court_astrologer_handling_weather_cold_zud: "$court_astrologer_handling_weather_tt$$MOD_MONTHLY_COUNTY_FERTILITY_GROWTH$: #P +0.25#!" + court_astrologer_handling_weather_severe_drought: "$court_astrologer_handling_weather_tt$$MOD_MONTHLY_COUNTY_FERTILITY_DECLINE$: #P -30%#!" + court_astrologer_handling_weather_havsarsan_zud: "$court_astrologer_handling_weather_tt$$game_concept_domicile_travel_speed$: #P +33%#!" + court_astrologer_abundant_grazing_modifier: "$court_astrologer_handling_weather$: $situation_steppe_abundant_grazing_season$" + court_astrologer_warm_nights_modifier: "$court_astrologer_handling_weather$: $situation_steppe_warm_nights_season$" + court_astrologer_sky_blessing_modifier: "$court_astrologer_handling_weather$: $situation_steppe_sky_blessing_season$" + court_astrologer_white_zud_modifier: "$court_astrologer_handling_weather$: $situation_steppe_white_zud_season$" + court_astrologer_cold_zud_modifier: "$court_astrologer_handling_weather$: $situation_steppe_cold_zud_season$" + court_astrologer_severe_drought_modifier: "$court_astrologer_handling_weather$: $situation_steppe_severe_drought_season$" + court_astrologer_havsarsan_zud_modifier: "$court_astrologer_handling_weather$: $situation_steppe_havsarsan_zud_season$" + + boyan_court_position: "Noyan" + boyan_court_position_fallback: "General" + boyan_court_position_desc: "A $boyan_court_position$ is one of the leading generals in their liege's armies, ensuring success in battle." + boyan_court_position_fallback_desc: "The $boyan_court_position_fallback$ is in charge of segments of their liege's armies, ensuring success in battle." + boyan_impress_vassals: "Cow Vassals" + boyan_impress_vassals_desc: "This character is tasked with putting vassals back in line." + boyan_impress_vassals_tt: "[vassal|E] [faction_commitment|E]: #P -20#!" + boyan_prepare_raids: "Prepare Raids" + boyan_prepare_raids_desc: "This character is preparing their liege's armies to raid far away realms." + boyan_validity_trigger_tt: "[martial_i][martial|E] is #high 12#! or above" + + siege_engineer_court_position: "Siege Engineer" + siege_engineer_court_position_desc: "A $siege_engineer_court_position$ is usually a foreign agent recruited to the Steppes for their expertise in siege warfare." + siege_engineer_build_equipment: "Build Siege Equipment" + siege_engineer_build_equipment_desc: "This character is focusing on building siege equipment for their liege." + siege_engineer_build_equipment_tt: "Every month there's a small chance to gain a [siege_weapon|E] [men_at_arms|E]" + siege_engineer_build_equipment_trigger_tt: "Already have a fully built [siege_weapon|E] [men_at_arms|E]" + siege_engineer_build_equipment_trigger_tt_2: "No room for more [men_at_arms|E]" + + yurtchi_court_position: "Yurtchi" + yurtchi_court_position_fallback: "Quartermaster" + yurtchi_court_position_desc: "A $yurtchi_court_position$ oversees the organization of and the well-being of the clan, as well as ensuring that it is well-equipped for battle." + yurtchi_court_position_fallback_desc: "The $yurtchi_court_position_fallback$ ensures the clan is equipped to move at a moment's notice, as well as equipped for battle." + yurtchi_lean_times: "Embrace Frugality" + yurtchi_lean_times_desc: "This character is undertaking measures to limit the spending of the clan." + yurtchi_prosperous_times: "Commence with Revelry" + yurtchi_prosperous_times_desc: "This character is ensuring the happiness of the clan, even at a heavy cost." + yurtchi_validity_trigger_tt: "[stewardship_i][stewardship|E] is #high 12#! or above" + + cherbi_court_position: "Cherbi" + cherbi_court_position_fallback: "Chief Bodyguard" + cherbi_court_position_desc: "A $cherbi_court_position$ oversees the $bodyguard_court_position_nomadic$, guaranteeing the safety of their liege. As the head of their liege's safety, it is one of the most prestigious positions in the clan." + cherbi_court_position_fallback_desc: "The $cherbi_court_position_fallback$ is in charge of the safety of their liege, an equally prestigious and dangerous position." + cherbi_custom_modifier: "$BULLET$[GetCourtPositionType('bodyguard_court_position').GetName|U] [aptitude|E]: [aptitude_i]" + cherbi_custom_modifier_range: "$cherbi_custom_modifier$#P 1-15#! (based on [aptitude|E])" + cherbi_custom_modifier_terrible: "$cherbi_custom_modifier$#P 1#!" + cherbi_custom_modifier_poor: "$cherbi_custom_modifier$#P 4#!" + cherbi_custom_modifier_average: "$cherbi_custom_modifier$#P 7#!" + cherbi_custom_modifier_good: "$cherbi_custom_modifier$#P 10#!" + cherbi_custom_modifier_excellent: "$cherbi_custom_modifier$#P 15#!" + court_position_bodyguard_cherbi_modifier: "[GetCourtPositionType('cherbi_court_position').GetName|U] [aptitude|E]" + cherbi_double_the_guard: "Double the Guard" + cherbi_double_the_guard_desc: "This character is tasked with the safety of their liege, at #bold any#! cost." + cherbi_validity_trigger_tt: "[prowess_i][prowess|E] is #high 12#! or above" + + yeke_jarquchi_court_position: "Yeke Jarquchi" + yeke_jarquchi_court_position_fallback: "Chief Law Overseer" + yeke_jarquchi_court_position_turkic: "El Ögäsi" + yeke_jarquchi_court_position_desc: "A $yeke_jarquchi_court_position$ oversees the law of the land, the Yassa. As the eyes of their liege, they make certain all follow the rules of the clan." + yeke_jarquchi_court_position_fallback_desc: "The $yeke_jarquchi_court_position_fallback$ is the one ensuring the laws of their liege are followed all throughout the realm." + yeke_jarquchi_court_position_turkic_desc: "The $yeke_jarquchi_court_position_turkic$ is the one ensuring the laws of their liege are followed all throughout the realm." + yeke_jarquchi_custom_modifier: "$BULLET$[obedience_threshold|E]: [obedience_i]" + yeke_jarquchi_custom_modifier_range: "$yeke_jarquchi_custom_modifier$#P -1#! to #P -5#! (based on [aptitude|E])" + yeke_jarquchi_custom_modifier_terrible: "$yeke_jarquchi_custom_modifier$#P -1#!" + yeke_jarquchi_custom_modifier_poor: "$yeke_jarquchi_custom_modifier$#P -2#!" + yeke_jarquchi_custom_modifier_average: "$yeke_jarquchi_custom_modifier$#P -3#!" + yeke_jarquchi_custom_modifier_good: "$yeke_jarquchi_custom_modifier$#P -4#!" + yeke_jarquchi_custom_modifier_excellent: "$yeke_jarquchi_custom_modifier$#P -5#!" + court_position_jarquchi_obedience_modifier: "[GetCourtPositionType('yeke_jarquchi_court_position').GetName|U] [aptitude|E]" + yeke_jarquchi_culture_acceptance: "Blend Cultures" + yeke_jarquchi_culture_acceptance_desc: "This character is ensuring that all who live in the realm will leave in peace, irrelevant of their traditions and customs." + yeke_jarquchi_culture_acceptance_tt: "[cultural_acceptance|E] will be increased by [liege.Custom('GetAptitudeYekeJarquchiLoc')] between [liege.GetCulture.GetName] and other [cultures|E] in the [realm|E] every year #weak (max #V 50#!)#!" + yeke_jarquchi_aptitude: "[ROOT.Char.MakeScope.ScriptValue('yeke_jarquchi_aptitude_tooltip')|P0]" + yeke_jarquchi_missing_aptitude: "#P 2-10#! (based on [aptitude|E])" + yeke_jarquchi_culture_acceptance_trigger_tt: "All [counties|E] in the [realm|E] are [liege.GetCulture.GetName]" + culture_acceptance_desc_yeke_jarquchi: "[liege.GetName] promoted this [culture|E] in [liege.GetHerHis] [realm|E]" + yeke_jarquchi_validity_trigger_tt: "[diplomacy_i][diplomacy|E] is #high 12#! or above" + + foreign_emissary_court_position: "Foreign Emissary" + foreign_emissary_court_position_desc: "A $foreign_emissary_court_position$ is recruited from afar to impress their liege's court with exotic stories, and to act as a diplomat to neighboring leaders." + court_position_different_culture: "They are of a different [culture|E]" + foreign_emissary_culture_acceptance_tt: "[cultural_acceptance|E] will be increased by [liege.Custom('GetAptitudeForeignEmissaryLoc')] between [liege.GetCulture.GetName] and [tributary|E] [cultures|E] every year #weak (max #V 50#!)#!" + foreign_emissary_aptitude: "[ROOT.Char.MakeScope.ScriptValue('foreign_emissary_aptitude_tooltip')|P0]" + foreign_emissary_missing_aptitude: "#P 2-10#! (based on [aptitude|E])" + foreign_emissary_culture_acceptance: "Accommodate Tributaries" + foreign_emissary_culture_acceptance_desc: "This character will make certain that the tributaries will fall in line with their suzerain, with whatever means necessary." + culture_acceptance_desc_foreign_emissary: "[liege.GetName] accomodated [liege.GetHerHis] tributaries of this [culture|E]" + foreign_emissary_culture_acceptance_trigger_tt: "No [tributaries|E] of another [culture|E]" + + keeper_of_the_horses_court_position: "Keeper of the Horses" + keeper_of_the_horses_court_position_desc: "The $keeper_of_the_horses_court_position$ is a prestigious position in charge of their liege's steeds and stables." + +# TGP + court_position_confucian_education_trait: "[GetTrait('confucian_education').GetName( ROOT.Char )]" + + court_physician_celestial_imperial: "Palace Physician" + court_physician_celestial_imperial_desc: "The $court_physician_celestial_imperial$ is responsible for the health and well-being of the [court|E] they are in. They will treat disease and suture wounds to the best of their abilities." + court_physician_celestial: "Master Physician" + court_physician_celestial_desc: "The $court_physician_celestial$ is responsible for the health and well-being of the [court|E] they are in. They will treat disease and suture wounds to the best of their abilities." + court_astrologer_celestial_imperial: "Grand Astrologer" + court_astrologer_celestial_imperial_desc: "The $court_astrologer_celestial_imperial$ searches the skies to predict what fate may be upon us." + court_astrologer_celestial: "Diviner" + court_astrologer_celestial_desc: "The $court_astrologer_celestial$ searches the skies to predict what fate may be upon us." + travel_leader_celestial_imperial: "Clearer of the Way" + travel_leader_celestial_imperial_desc: "The $travel_leader_celestial_imperial$ assists you when traveling and takes charge of all itineraries. They aim to ensure you arrive at your destination safely and on-time." + travel_leader_celestial: "Forward Scout" + travel_leader_celestial_desc: "The $travel_leader_celestial$ assists you when traveling and takes charge of all itineraries. They aim to ensure you arrive at your destination safely and on-time." + antiquarian_celestial: "Keeper of Treasures" + antiquarian_celestial_desc: "The $antiquarian_celestial$ is responsible for the upkeep, care, and procurement of artifacts." + seneschal_celestial: "Chief Administrator" + seneschal_celestial_desc: "The $seneschal_celestial$ serves an important role in the day-to-day life of the royal household, administering the servants and keeping everything running smoothly." + court_tutor_celestial: "Erudite Instructor" + court_tutor_celestial_desc: "The $court_tutor_celestial$ is in charge of the [education|E] of all children at court, and their skill will influence how much they influence the students. Children can still have individual [guardians|E]." + chief_eunuch_celestial_imperial: "Palace Attendant" + chief_eunuch_celestial_imperial_desc: "The $chief_eunuch_celestial_imperial$ is a trusted servant responsible for the eunuchs at court. Not much goes on that they don't hear about, both among the servants and the royals." + chief_eunuch_celestial: "Eunuch Attendant" + chief_eunuch_celestial_desc: "The $chief_eunuch_celestial$ is a trusted servant responsible for the eunuchs at court. Not much goes on that they don't hear about, both among the servants and the royals." + master_of_horse_celestial_imperial: "Prefect of the Stables" + master_of_horse_celestial_imperial_desc: "The $master_of_horse_celestial_imperial$ is responsible for their Liege's majestic steeds and stables. They have their work cut out for them since a well-kept horse is a boon both on the battlefield and on the road." + master_of_horse_celestial: "Stablemaster" + master_of_horse_celestial_desc: "The $master_of_horse_celestial$ is responsible for their Liege's majestic steeds and stables. They have their work cut out for them since a well-kept horse is a boon both on the battlefield and on the road." + master_of_hunt_celestial: "Supervisor of Hunts" + master_of_hunt_celestial_desc: "The $master_of_hunt_celestial$ is responsible for any hunting parties that members of their Liege's court arrange. They are also in charge of the kennels and the dogs within it." + cave_hermit_celestial: "Sagacious Recluse" + cave_hermit_celestial_desc: "The $cave_hermit_celestial$ is someone that will inhabit your castle grounds and entertain your guests with prophecies and riddles. Some say they may be actual mystics." + court_gardener_celestial_imperial: "Chief Gardener" + court_gardener_celestial_imperial_desc: "The $court_gardener_celestial_imperial$ is responsible for the well-being of the gardens belonging to their liege, pouring time and skill into making them truly flourish." + court_gardener_celestial: "Gardener" + court_gardener_celestial_desc: "The $court_gardener_celestial$ is responsible for the well-being of the gardens belonging to their liege, pouring time and skill into making them truly flourish." + chronicler_celestial_imperial: "Grand Scribe" + chronicler_celestial_imperial_desc: "The $chronicler_celestial_imperial$ is tasked with dedicating the deeds of their employer to paper." + chronicler_celestial: "Recorder" + chronicler_celestial_desc: "The $chronicler_celestial$ is tasked with dedicating the deeds of their employer to paper." + champion_celestial_imperial: "Tiger-Brave Gentleman" + champion_celestial_imperial_desc: "A $champion_celestial_imperial$ is a skilled and deadly fighter that can represent their Liege in duels." + champion_celestial: "Tiger-Brave Soldier" + champion_celestial_desc: "A $champion_celestial$ is a skilled and deadly fighter that can represent their Liege in duels." + court_brewmaster_celestial: "Wine Steward" + court_brewmaster_celestial_desc: "The $court_brewmaster_celestial$ is a representative chosen to interact directly with the brewers of the realm, to ensure the liege can get their hands on the best of brews." + lady_in_waiting_celestial_imperial: "Palace Lady" + lady_in_waiting_celestial_imperial_desc: "A $lady_in_waiting_celestial_imperial$ is an assistant and companion to a Queen or Empress, attending to her every need and fulfilling every whim." + lady_in_waiting_celestial: "Chambermaid" + lady_in_waiting_celestial_desc: "A $lady_in_waiting_celestial$ is an assistant and companion to a Queen or Empress, attending to her every need and fulfilling every whim." + royal_architect_celestial: "Master Craftsman" + royal_architect_celestial_desc: "The $royal_architect_celestial$ oversees any prestigious building projects within the realm; not a brick is laid, nor a second spent, without their express permission." + court_poet_celestial: "Poet Laureate" + court_poet_celestial_desc: "The $court_poet_celestial$ is a connoisseur of words and verse, providing their Liege and all at court with entertainment, intellectual stimulation, and emotional experiences." + court_musician_celestial_imperial: "Master of Music" + court_musician_celestial_imperial_desc: "A $court_musician_celestial_imperial$ is an artist who sings and plays instruments to entertain their Liege and the court." + court_musician_celestial: "Musician" + court_musician_celestial_desc: "A $court_musician_celestial$ is an artist who sings and plays instruments to entertain their Liege and the court." + bodyguard_celestial_imperial: "Imperial Guardsman" + bodyguard_celestial_imperial_desc: "A $bodyguard_celestial_imperial$ is the final line of defense against any and all attackers. Where their charge goes they follow, and they will not hesitate to put themselves in the way of any danger that might be lurking out there." + bodyguard_celestial: "Household Guardsman" + bodyguard_celestial_desc: "A $bodyguard_celestial$ is the final line of defense against any and all attackers. Where their charge goes they follow, and they will not hesitate to put themselves in the way of any danger that might be lurking out there." + court_artificer_celestial_imperial: "Palace Artisan" + court_artificer_celestial_imperial_desc: "A $court_artificer_celestial_imperial$ is someone who's proven themselves able to craft great things. While they mostly lull around in your court, the hope is for inspiration to strike once more." + court_artificer_celestial: "Artisan" + court_artificer_celestial_desc: "A $court_artificer_celestial$ is someone who's proven themselves able to craft great things. While they mostly lull around in your court, the hope is for inspiration to strike once more." + + grand_preceptor_court_position: "Grand Preceptor" + grand_preceptor_court_position_desc: "The $grand_preceptor_court_position$'s is the moral pillar of their court, their duty to serve as a beacon of righteousness for all others to admire and emulate." + grand_preceptor_court_position_task_instill_righteousness: "Imbue with Moral Righteousness" + grand_preceptor_court_position_task_instill_righteousness_desc: "The $grand_preceptor_court_position$ will apply themselves to the moral cultivation of their liege." + grand_preceptor_court_position_task_propagate_civic_virtue: "Propagate Civic Virtue" + grand_preceptor_court_position_task_propagate_civic_virtue_desc: "The $grand_preceptor_court_position$ will take a leading role in the propagation of moral virtue among the general population." + grand_preceptor_court_position_task_exalt_imperial_deeds: "Exalt Imperial Deeds" + grand_preceptor_court_position_task_exalt_imperial_deeds_desc: "As $grand_preceptor_court_position$, this character's words carry immense moral authority, and many are those willing to accept their statements as truth." + + grand_preceptor_powerfuL_family_score_desc: "$grand_preceptor_court_position$" + + grand_guardian_court_position: "Grand Guardian" + grand_guardian_court_position_desc: "The $grand_guardian_court_position$ is the sword and shield of the realm, revered for their martial experience and strategic insight." + grand_guardian_court_position_task_guard_the_capital: "Guard the Capital" + grand_guardian_court_position_task_guard_the_capital_desc: "The $grand_guardian_court_position$ will take charge of the protection of the imperial capital's security." + grand_guardian_court_position_task_shield_the_realm: "Shield the Realm" + grand_guardian_court_position_task_shield_the_realm_desc: "The $grand_guardian_court_position$ will apply their formidable strategic skills to the defense of the realm as a whole." + grand_guardian_court_position_task_instill_martial_discipline: "Instill Martial Discipline" + grand_guardian_court_position_task_instill_martial_discipline_desc: "The $grand_guardian_court_position$ will endeavor to instill the accumulated lessons of their distinguished career on those who lack the privilege of experience." + grand_guardian_guard_the_capital_modifier: "Protected by the Grand Guardian" + MODIFIER_DEFINITION_VALUE_GRAND_GUARDIAN_APTITUDE: " \t#weak Increase per $grand_guardian_court_position$ [aptitude|E] level#!" + + grand_guardian_powerfuL_family_score_desc: "$grand_guardian_court_position$" + + grand_mentor_court_position: "Grand Mentor" + grand_mentor_court_position_desc: "The $grand_mentor_court_position$ attends to the edification of the ruling family, and is tasked with the weighty duty of ensuring that the next generation lives up to the august examples of their forebears." + + grand_mentor_court_position_task_edify_heirs: "Instruct Imperial Heirs" + grand_mentor_court_position_task_edify_heirs_desc: "The $grand_mentor_court_position$ will dedicate their days to the diligent cultivation of the next generation." + grand_mentor_edify_heirs_tt: "Every month, members of the ruling [house|E] who are [courtiers|E] or [direct_vassals|E] of the [liege|E] may gain [diplomacy_i][stewardship_i][learning_i][martial_i][skills|E], [GetTrait('governor').GetName( GetPlayer )] or [GetTrait('confucian_education').GetName( GetPlayer )] [trait_level_track_xp|E]" + grand_mentor_edify_heirs_fallback: "Every month, members of the ruling [house|E] who are [courtiers|E] or [direct_vassals|E] of the [liege|E] may gain [diplomacy_i][stewardship_i][learning_i][martial_i][skills|E], [GetTrait('governor').GetName( GetPlayer )] or [GetTrait('confucian_education').GetName( GetPlayer )] [trait_level_track_xp|E]" + + grand_mentor_court_position_task_teach_liege: "Edify the Emperor" + grand_mentor_court_position_task_teach_liege_desc: "The $grand_mentor_court_position$ will exclusively attend to the edification of their liege." + grand_mentor_teach_liege_tt: "Every month, the [liege|E] may gain [diplomacy_i][stewardship_i][learning_i][martial_i][skills|E], [GetTrait('governor').GetName( GetPlayer )] or [GetTrait('confucian_education').GetName( GetPlayer )] [trait_level_track_xp|E]" + grand_mentor_teach_liege_fallback: "Every month, the [liege|E] may gain [diplomacy_i][stewardship_i][learning_i][martial_i][skills|E], [GetTrait('governor').GetName( GetPlayer )] or [GetTrait('confucian_education').GetName( GetPlayer )] [trait_level_track_xp|E]" + + grand_mentor_court_position_task_train_officials: "Cultivate Meritorious Officials" + grand_mentor_court_position_task_train_officials_desc: "The $grand_mentor_court_position$ will see to it that the officials of the realm possess skills in equal measure to their wisdom and virtue." + grand_mentor_train_officials_tt: "Every month, a [court_position|E] holder or [direct_vassal|E] may gain [diplomacy_i][stewardship_i][learning_i][martial_i][skills|E], [GetTrait('governor').GetName( GetPlayer )] or [GetTrait('confucian_education').GetName( GetPlayer )] [trait_level_track_xp|E], or [merit|E]" + grand_mentor_train_officials_fallback: "Every month, a [court_position|E] holder or [direct_vassal|E] may gain [diplomacy_i][stewardship_i][learning_i][martial_i][skills|E], [GetTrait('governor').GetName( GetPlayer )] or [GetTrait('confucian_education').GetName( GetPlayer )] [trait_level_track_xp|E], or [merit|E]" + + grand_mentor_mentoring_title: "Mentoring [target_character.GetFullNameNoTooltip]" + grand_mentor_mentoring_notification_desc: "[ROOT.Char.GetShortUIName|U] have improved [target_character.GetTitledFirstNamePossessive] skills" + + grand_mentor_powerfuL_family_score_desc: "$grand_mentor_court_position$" + + fire_dragon_engineer_court_position: "Fire Dragon Engineer" + fire_dragon_engineer_court_position_desc: "The $fire_dragon_engineer_court_position$ is a master of firearms, furnishing troops with formidable flame-belching instruments of war." + fire_dragon_engineer_court_position_forge_fire_dragons: "Forge Fire Dragons" + fire_dragon_engineer_court_position_forge_fire_dragons_desc: "The $fire_dragon_engineer_court_position$ will focus their energies on the forging of firearms, keeping an abundant arsenal ever at the ready." + fire_dragon_engineer_court_position_command_artillery: "Command Artillery" + fire_dragon_engineer_court_position_command_artillery_desc: "The $fire_dragon_engineer_court_position$ will personally oversee the deployment and employment of their instruments of destruction on the battlefield." + + keeper_of_the_harem_court_position: "Keeper of the Harem" + keeper_of_the_harem_court_position_desc: "The $keeper_of_the_harem_court_position$ occupies a position of no small importance in the imperial harem, supervising everything from the concubines' garments to the auspicious scheduling of imperial intercourse." + + keeper_of_the_harem_court_position_task_maintain_decorum: "Maintain Harem Decorum" + keeper_of_the_harem_court_position_task_maintain_decorum_desc: "The $keeper_of_the_harem_court_position$ will focus on suppressing the venomous intrigues of the harem and shielding it from the untoward attentions of the outside world." + keeper_of_the_harem_maintaining_decorum.tt: "The $keeper_of_the_harem_court_position$ will significantly impede [schemes|E] targeting members of the harem." + + keeper_of_the_harem_court_position_task_attend_to_wellness: "Attend to Concubines' Wellness" + keeper_of_the_harem_court_position_task_attend_to_wellness_desc: "The $keeper_of_the_harem_court_position$ will pay special attention to the health and well-being of the harem, treating the ill and easing their burdens." + keeper_of_the_harem_attend_to_wellness.tt: "The $keeper_of_the_harem_court_position$ will look for and tend to an ill member of the harem every month, alleviating their stress and the symptoms that ail them." + + keeper_of_the_harem_court_position_task_select_palace_beauties: "Select Palace Beauties" + keeper_of_the_harem_court_position_task_select_palace_beauties_desc: "The $keeper_of_the_harem_court_position$ will periodically review the composition of the harem, gracefully retiring the aged and childless while recruiting talented and fair substitutes." + keeper_of_the_harem_select_palace_beauties.tt: "Every year, the $keeper_of_the_harem_court_position$ will potentially retire one aged and childless concubine and recruit one new concubine to the harem." + + court_guru_court_position: "Guru" + court_guru_court_position_desc: "A guru serves as both counselor and sage, advising rulers on earthly concerns and sacred truths." + guru_teach_learning: "Enlighten the Mind" + guru_teach_learning_desc: "The guru shares sacred texts and scholarly wisdom to sharpen their liege's intellect." + guru_teach_diplomacy: "Refine the Tongue" + guru_teach_diplomacy_desc: "The guru instructs in courtly speech, measured silence, and the art of graceful persuasion." + guru_teach_intrigue: "Sharpen the Senses" + guru_teach_intrigue_desc: "Through parables and subtle games, the guru trains the ruler to see hidden motives and deceive with poise." + + court_brahmin_court_position: "Court Brahmin" + court_brahmin_court_position_desc: "A venerable priest found in Hindu and Buddhist courts alike, the Court Brahmin is responsible for performing rituals, overseeing ceremonies, and promoting the legitimacy of the ruler." + court_brahmin_court_position_task_increase_tribute: "Increase Tribute" + court_brahmin_court_position_task_increase_tribute_desc: "This character will diligently tend to amplifying the flow of wealth from tributary to suzerain." + + khlon_glan_court_position: "Khlon Glan" + khlon_glan_court_position_desc: "The Khlon Glan is a high-ranking official, in charge of managing the realm's storehouses and military supplies." + khlon_glan_assist_provisioning: "Develop Capital" + khlon_glan_assist_provisioning_desc: "This character is focusing on improving the Mandala capital." + + favored_minister_court_position: "Favored Minister" + favored_minister_court_position_desc: "The $favored_minister_court_position$ is the chosen favorite [councillor|E] of a [celestial|E] [son_of_heaven|E] and is granted the freedom to run their ministry as they wish." + favored_minister_employee_custom_desc: "[personal_movement_power|E]: [movement_power_i][EmptyScope.ScriptValue('favored_minister_movement_power_bonus_value')|+=0%]" + favored_minister_desc: "[GetCourtPositionType( 'favored_minister_court_position' ).GetName()]" + + keeper_of_the_horses_validity_trigger_tt: "[prowess_i][prowess|E] is #high 12#! or above" + + minister_bureaucrat_court_position: "Department Aide" + minister_bureaucrat_court_position_desc: "Within the upper echelons of the celestial government, a large array of bureaucrats is required. Hand-picked by the head of each department, they ensure everything runs smoothly." + minister_bureaucrat_court_position_mod_desc: "$EFFECT_LIST_BULLET$The Aide improves various [ministry|E] related tasks, such as [great_projects|E] (based on [aptitude|E])"