diff --git a/common/activities/activity_types/camp_party.txt b/common/activities/activity_types/camp_party.txt deleted file mode 100644 index 83db329eb..000000000 --- a/common/activities/activity_types/camp_party.txt +++ /dev/null @@ -1,885 +0,0 @@ -activity_camp_party = { - is_shown = { - has_ep3_dlc_trigger = yes - has_government = landless_adventurer_government - is_adult = yes - } - - can_start_showing_failures_only = { - NOT = { is_activity_type_on_cooldown = activity_camp_party } - is_available = yes - } - - is_valid = { - scope:host = { - is_alive = yes - is_imprisoned = no - has_government = landless_adventurer_government - is_incapable = no - } - } - - on_invalidated = { - invalidation_incapable_effect = yes - invalidation_imprisoned_effect = yes - invalidation_nobody_present_effect = yes - invalidation_host_isolated_effect = yes - } - - on_host_death = { - activity_try_use_new_host_effect = yes - } - - 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 = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - 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 = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - 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 = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - 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 = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - 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 - - apa_passive_religious_learning_host - apa_passive_religious_learning_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 - } - - add = activity_general_ai_will_do_value - } - - 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_hegemony - add = -125 - desc = ACTIVITY_GUEST_LANDLESS_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 - ################### - - header_background = "gfx/interface/illustrations/activity_header_backgrounds/activity_camp_party.dds" - - #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/chariot_race.txt b/common/activities/activity_types/chariot_race.txt index 9bb6b794e..8538f77c5 100644 --- a/common/activities/activity_types/chariot_race.txt +++ b/common/activities/activity_types/chariot_race.txt @@ -32,6 +32,25 @@ invalidation_imprisoned_effect = yes invalidation_nobody_present_effect = yes invalidation_host_isolated_effect = yes + # Refund wagers on invalidation + if = { + limit = { + NOT = { has_current_phase = chariot_race_phase_ceremony } + } + every_guest_subset = { + name = spectators + limit = { + is_alive = yes + has_variable = wager_value + } + send_interface_toast = { + type = event_toast_effect_neutral + title = cancel_wager_effect_tt + left_icon = scope:host + add_short_term_gold = var:wager_value + } + } + } chariot_race_remove_variables_effect = yes } @@ -278,13 +297,13 @@ add = { desc = chariot_entertainment_bad add = { - value = 20 + value = 13 desc = chariot_entertainment_bad } add = { - value = 20 + value = 13 multiply = activity_cost_scale_by_era - subtract = 20 + subtract = 13 desc = activity_cost_scale_by_era_desc } } @@ -309,13 +328,13 @@ add = { desc = chariot_entertainment_normal add = { - value = 50 + value = 33 desc = chariot_entertainment_normal } add = { - value = 20 + value = 13 multiply = activity_cost_scale_by_era - subtract = 20 + subtract = 13 desc = activity_cost_scale_by_era_desc } } @@ -341,13 +360,13 @@ add = { desc = chariot_entertainment_good add = { - value = 100 + value = 67 desc = chariot_entertainment_good } add = { - value = 20 + value = 13 multiply = activity_cost_scale_by_era - subtract = 20 + subtract = 13 desc = activity_cost_scale_by_era_desc } } @@ -618,6 +637,7 @@ 2 = activity_invite_rule_extended_family 2 = activity_invite_rule_guests 1 = activity_invite_rule_landless_adventurers + 1 = activity_invite_rule_merchants } rules = { @@ -826,11 +846,7 @@ trigger = { scope:host.location != scope:activity.activity_location scope:host.location = { - terrain = farmlands - OR = { - terrain = terraced_hills - has_building_or_higher = paddy_fields_01 - } + has_rice_fields_district = yes } } texture = "gfx/interface/illustrations/event_scenes/tgp_rice_fields.dds" @@ -1648,19 +1664,7 @@ } } - 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 - } + scripted_animation = horse_camel_activity_travel_animation } chariot_race_honorary_guest_traveling = { @@ -1681,13 +1685,7 @@ } } - scripted_animation = { - triggered_animation = { - trigger = { scope:character = { has_trait = impatient } } - animation = { jockey_gallop } - } - animation = jockey_walk - } + scripted_animation = horse_camel_activity_travel_animation } chariot_race_honorary_guest = { diff --git a/common/activities/activity_types/coronation.txt b/common/activities/activity_types/coronation.txt index 237c8c9e6..e882666cc 100644 --- a/common/activities/activity_types/coronation.txt +++ b/common/activities/activity_types/coronation.txt @@ -54,15 +54,7 @@ coronation_anointment_authority_available_trigger = yes NOT = { scope:coronation_anointment_authority ?= this } } - custom_tooltip = { - text = activity_coronation_not_approved_anointment - scope:coronation_anointment_authority = { - is_target_in_variable_list = { - name = supported_anointments - target = root - } - } - } + coronation_anointment_approved_trigger = yes scope:coronation_anointment_authority ?= { #custom_tooltip = { # text = activity_coronation_hof_no_anointment_situation @@ -95,6 +87,26 @@ } NOT = { has_trait = excommunicated } } + + trigger_if = { + limit = { + is_ai = yes + highest_held_title_tier >= tier_empire + OR = { + has_realm_law = crowned_king + AND = { + rite = { rite_has_doctrine = doctrine_imperial_anointment } + coronation_anointment_authority_available_trigger = yes + } + } + } + coronation_anointment_authority_available_trigger = yes + coronation_anointment_approved_trigger = yes + scope:coronation_anointment_authority ?= { + is_available_allow_travelling = yes + NOT = { pam_the_christian_church_no_anointment_trigger = { RULER = root } } + } + } } is_location_valid = { @@ -612,6 +624,13 @@ } add = -90 } + if = { + limit = { + coronation_anointment_authority_available_trigger = yes + coronation_anointment_approved_trigger = no + } + multiply = 0 + } } } } @@ -706,7 +725,7 @@ value = coronation_medium_ceremony_value add = coronation_medium_ceremony_realm_size_cost multiply = activity_cost_scale_by_era - multiply = 0.5 + multiply = -0.5 desc = coronation_discount_reg } } @@ -775,7 +794,7 @@ value = coronation_medium_ceremony_treasury_value add = coronation_medium_ceremony_realm_size_cost multiply = activity_cost_scale_by_era - multiply = 0.5 + multiply = -0.5 desc = coronation_discount_reg } } @@ -911,7 +930,7 @@ value = coronation_large_ceremony_value add = coronation_large_ceremony_realm_size_cost multiply = activity_cost_scale_by_era - multiply = 0.5 + multiply = -0.5 desc = coronation_discount_reg } } @@ -980,7 +999,7 @@ value = coronation_large_ceremony_treasury_value add = coronation_large_ceremony_realm_size_cost multiply = activity_cost_scale_by_era - multiply = 0.5 + multiply = -0.5 desc = coronation_discount_reg } } @@ -1091,7 +1110,7 @@ trigger_if = { limit = { exists = scope:special_option - pam_vows_of_poverty_premium_activity_option_valid_trigger = no + pam_vows_of_poverty_premium_activity_option_valid_trigger = yes } NOT = { scope:special_option = flag:coronation_type_anointment } } @@ -1166,7 +1185,7 @@ value = coronation_medium_feast_value add = coronation_medium_feast_realm_size_cost multiply = activity_cost_scale_by_era - multiply = 0.5 + multiply = -0.5 desc = coronation_discount_reg } } @@ -1235,7 +1254,7 @@ value = coronation_medium_feast_treasury_value add = coronation_medium_feast_realm_size_cost multiply = activity_cost_scale_by_era - multiply = 0.5 + multiply = -0.5 desc = coronation_discount_reg } } @@ -1373,7 +1392,7 @@ value = coronation_large_feast_value add = coronation_large_feast_realm_size_cost multiply = activity_cost_scale_by_era - multiply = 0.5 + multiply = -0.5 desc = coronation_discount_reg } } @@ -1442,7 +1461,7 @@ value = coronation_large_feast_treasury_value add = coronation_large_feast_realm_size_cost multiply = activity_cost_scale_by_era - multiply = 0.5 + multiply = -0.5 desc = coronation_discount_reg } } @@ -1562,6 +1581,13 @@ desc = activity_coronation_holy_site_province } + triggered_desc = { + trigger = { + has_building_or_higher = royal_chapel_1 + } + desc = activity_coronation_royal_chapel_province + } + triggered_desc = { trigger = { has_province_modifier = coronation_ancient_tradition_modifier @@ -1625,6 +1651,12 @@ } add = 20 } + if = { + limit = { + has_building_or_higher = royal_chapel_1 + } + add = 20 + } if = { limit = { has_province_modifier = coronation_ancient_tradition_modifier @@ -2256,6 +2288,10 @@ is_adult = yes in_diplomatic_range = scope:host is_pool_guest = no + NOR = { + government_has_flag = government_is_merchant + is_at_war_with = scope:host + } } guest_join_chance = { @@ -2388,6 +2424,15 @@ add = 5 } } + if = { + limit = { + activity_location = { has_building_or_higher = royal_chapel_1 } + } + change_variable = { + name = activity_special_type_progression + add = 5 + } + } if = { limit = { activity_location = { has_province_modifier = coronation_ancient_tradition_modifier } @@ -2951,9 +2996,42 @@ } } } + #Guelphs & Ghibellines + if = { + limit = { + has_title = title:e_hre + is_ghibelline_trigger = yes + faith = { religious_head_title ?= title:k_papal_state } + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + scope:activity.var:officiator = { save_scope_as = gg_coronator } + if = { + limit = { + scope:gg_coronator = { pam_is_antipope_trigger = yes } + } + gg_untargeted_catalyst_effect = { CATALYST = catalyst_gg_emperor_crowned_by_antipope } + } + else_if = { + limit = { + faith.religious_head ?= scope:gg_coronator + } + gg_reconciliation_catalyst_effect = { + ACTOR = scope:gg_coronator + RECIPIENT = root + CATALYST = catalyst_gg_emperor_crowned_by_pope + ONCE_A_YEAR = no + } + } + } } remove_variable = coronation_primary_title remove_variable = hide_make_primary_title + remove_variable = coronation_discount random_knight = { limit = { can_unlock_accolade_attribute_trigger = { @@ -3246,19 +3324,7 @@ } } - 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 - } + scripted_animation = horse_camel_activity_travel_animation } # Find a family member/spouse/heir @@ -4291,11 +4357,7 @@ } } scope:host.location = { - terrain = farmlands - OR = { - terrain = terraced_hills - has_building_or_higher = paddy_fields_01 - } + has_rice_fields_district = yes } } texture = "gfx/interface/illustrations/event_scenes/tgp_rice_fields.dds" diff --git a/common/activities/activity_types/ecumenical_council.txt b/common/activities/activity_types/ecumenical_council.txt index 20b4ed788..08aa67423 100644 --- a/common/activities/activity_types/ecumenical_council.txt +++ b/common/activities/activity_types/ecumenical_council.txt @@ -4,6 +4,8 @@ activity_group_type = grand + #activity_group_type = grand #TODO_PAM TIT-67883 Make into grand activity when the code allows it + is_shown = { has_pam_dlc_trigger = yes can_hold_ecumenical_council_trigger = yes @@ -143,10 +145,10 @@ barony ?= { is_holy_site_of = scope:host.faith } county.holder.faith ?= scope:host.faith } - AND = { # Grand Cathedral of our faith - county.holder.faith ?= scope:host.faith - has_cathedral_great_project_building_trigger = yes - } + # AND = { # Cathedral Great Project TODO_PAM Make the scripted trigger and add all the Cathedral GP templates + # county.faith ?= scope:host.faith + # county = { has_cathedral_great_project_building_trigger = yes } + # } AND = { # Large Religious centers of our faith county.faith ?= scope:host.faith is_religious_studies_location = yes @@ -168,7 +170,7 @@ trigger = { OR = { is_religious_studies_location = yes - has_cathedral_great_project_building_trigger = yes + # barony.county = { has_cathedral_great_project_building_trigger = yes } } } desc = activity_ecumenical_council_cathedral_province @@ -316,10 +318,7 @@ } if = { limit = { - OR = { - is_religious_studies_location = yes - has_cathedral_great_project_building_trigger = yes - } + is_religious_studies_location = yes } add = { value = 25 @@ -372,6 +371,7 @@ } } + # Used to show a rough minimum or expected cost at all to plan this ui_predicted_cost = { treasury_or_gold = { if = { @@ -398,6 +398,10 @@ special_option_category = special_type + ################### + # OPTIONS + ################### + options = { special_type = { # Tenet/Doctrinal council @@ -920,11 +924,13 @@ } } + #TODO_PAM new intents are vague placeholders, they need to mention actual mechanics that they're tied into host_intents = { intents = { spiritual_intent_host fervor_intent murder_attendee_intent befriend_attendee_intent } default = spiritual_intent_host } + #TODO_PAM new intents are vague placeholders, they need to mention actual mechanics that they're tied into guest_intents = { intents = { spiritual_intent fervor_intent clerical_appointment_intent alliance_intent murder_attendee_intent befriend_attendee_intent } default = spiritual_intent @@ -959,6 +965,7 @@ } wait_time_before_start = { + # Fixed duration, because it is an open activity months = ecumenical_council_wait_time_before_start_months } @@ -1137,11 +1144,7 @@ trigger = { scope:host.location != scope:activity.activity_location scope:host.location = { - terrain = farmlands - OR = { - terrain = terraced_hills - has_building_or_higher = paddy_fields_01 - } + has_rice_fields_district = yes } } texture = "gfx/interface/illustrations/event_scenes/tgp_rice_fields.dds" @@ -1559,73 +1562,71 @@ environment = "environment_indian_holy_site" ambience = "event:/DLC/EP2/SFX/Events/Backgrounds/evn_background_jungle" } - background = { #Western generic holy site, gothic + background = { #Western Christian - Gothic exterior trigger = { scope:activity ?= { has_current_phase = ecumenical_council_phase_summons - activity_location ?= { - NOT = { - religion ?= { is_in_family = rf_pagan } - } - } - activity_host ?= { - rite = { - rite_has_doctrine = special_doctrine_is_western_christian_faith - } - pam_church_event_background_is_grand_western_trigger = yes - } + activity_host = { pam_is_western_christian_trigger = yes } } - current_year >= 900 + current_year >= 1130 } 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" + ambience = "event:/SFX/Events/Backgrounds/temple_christian" } - background = { #Western generic holy site, mediterranean + background = { #Western Christian - Mediterranean or urban Romanesque exterior trigger = { scope:activity ?= { has_current_phase = ecumenical_council_phase_summons - activity_location ?= { - NOT = { - religion ?= { is_in_family = rf_pagan } - } - } - activity_host ?= { - rite = { - rite_has_doctrine = special_doctrine_is_western_christian_faith - } - OR = { - pam_church_event_background_is_grand_western_pre_gothic_trigger = yes - AND = { - pam_church_event_background_is_developed_trigger = yes - scope:activity.activity_location = { pam_church_background_location_is_mediterranean_or_urban_trigger = yes } - } - } - } + activity_host = { pam_is_western_christian_trigger = yes } + activity_location = { pam_church_background_location_is_mediterranean_or_urban_trigger = yes } } current_year >= 900 + current_year < 1130 } texture = "gfx/interface/illustrations/event_scenes/pam_romanesque_church_exterior.dds" environment = "environment_pam_romanesque_church_exterior" ambience = "event:/DLC/CE3/SFX/Events/romanesque_church_exterior" #AUDIO CE3 } + background = { #Western Christian - Green Romanesque exterior + trigger = { + scope:activity ?= { + has_current_phase = ecumenical_council_phase_summons + activity_host = { pam_is_western_christian_trigger = yes } + } + current_year >= 900 + current_year < 1130 + } + texture = "gfx/interface/illustrations/event_scenes/ep2_holysite_western.dds" + environment = "environment_western_holy_site" + ambience = "event:/SFX/Events/Backgrounds/temple_christian" + } + background = { #Western Christian - Pre-Romanesque exterior + trigger = { + scope:activity ?= { + has_current_phase = ecumenical_council_phase_summons + activity_host = { pam_is_western_christian_trigger = yes } + } + current_year < 900 + } + texture = "gfx/interface/illustrations/event_scenes/pam_pre-romanesque_church_exterior.dds" + environment = "environment_pam_preromanesque_church_exterior" + ambience = "event:/DLC/CE3/SFX/Events/pre-romanesque_church_exterior" #AUDIO CE3 + } background = { #Western generic holy site trigger = { scope:activity ?= { has_current_phase = ecumenical_council_phase_summons - activity_location ?= { + activity_location = { + OR = { + culture ?= { has_graphical_western_culture_group_trigger = yes } + steppe_building_gfx_use_western_trigger = yes + } NOT = { religion ?= { is_in_family = rf_pagan } } } - activity_host ?= { - rite = { - rite_has_doctrine = special_doctrine_is_western_christian_faith - } - pam_church_event_background_is_developed_trigger = yes - } } - current_year >= 900 } texture = "gfx/interface/illustrations/event_scenes/ep2_holysite_western.dds" environment = "environment_western_holy_site" @@ -1635,13 +1636,8 @@ trigger = { scope:activity ?= { has_current_phase = ecumenical_council_phase_summons - activity_location ?= { - county.title_province ?= { - has_holding_type = tribal_holding - } - NOT = { - has_holding_type = church_holding - } + activity_location.county.title_province ?= { + has_holding_type = tribal_holding } } } @@ -1649,16 +1645,13 @@ environment = "environment_event_garden" ambience = "event:/DLC/FP1/SFX/Events/event_temple" } - background = { #Pre-Romanesque Western generic holy site... and fallback + background = { # Fallback trigger = { - scope:activity ?= { - has_current_phase = ecumenical_council_phase_summons - activity_host.faith.religion = religion:christianity_religion - } + scope:activity ?= { has_current_phase = ecumenical_council_phase_summons } } - texture = "gfx/interface/illustrations/event_scenes/pam_pre-romanesque_church_exterior.dds" - environment = "environment_pam_preromanesque_church_exterior" - ambience = "event:/DLC/CE3/SFX/Events/pre-romanesque_church_exterior" #AUDIO CE3 + texture = "gfx/interface/illustrations/event_scenes/ep2_holysite_western.dds" + environment = "environment_bp2_courtyard" + ambience = "event:/DLC/FP2/SFX/Events/courtyard" } ## Debates -- Temple Interior @@ -1760,18 +1753,7 @@ environment = "environment_mpo_temple_steppe" ambience = "event:/DLC/CE2/Events/Event_Images/mpo_temple_steppe" } - background = { #Christian - Grand Cathedral (Western pre-Gothic) - trigger = { - scope:activity ?= { - has_current_phase_any_debate_trigger = yes - activity_host = { pam_church_event_background_is_grand_western_pre_gothic_trigger = yes } - } - } - texture = "gfx/interface/illustrations/event_scenes/church.dds" - environment = "environment_event_church" - ambience = "event:/SFX/Events/Backgrounds/temple_christian" - } - background = { #Christian - Grand Cathedral, Gothic + background = { #Christian - Grand Cathedral trigger = { scope:activity ?= { has_current_phase_any_debate_trigger = yes @@ -1779,7 +1761,7 @@ } } texture = "gfx/interface/illustrations/event_scenes/pam_gothic_cathedral_interior.dds" - environment = "environment_pam_gothic_cathedral_interior" + environment = "environment_event_church" # TODO_PAM placeholder environment, replace with bespoke church environment ambience = "event:/DLC/CE3/SFX/Events/gothic_cathedral_interior" } background = { # Christian - Grand Cathedral Eastern (Hagia Sophia) @@ -1804,21 +1786,19 @@ } } texture = "gfx/interface/illustrations/event_scenes/pam_romanesque_church_interior.dds" - environment = "environment_pam_romanesque_church_interior" + environment = "environment_event_church" # TODO_PAM placeholder environment, replace with bespoke church environment ambience = "event:/DLC/CE3/SFX/Events/romanesque_church_interior" } background = { #General Christian trigger = { - scope:activity ?= { + scope:activity ?= { has_current_phase_any_debate_trigger = yes - activity_host = { - faith = { religion = religion:christianity_religion } - } + scope:host = { religion = religion:christianity_religion } } } - texture = "gfx/interface/illustrations/event_scenes/pam_simple_church_western_interior.dds" - environment = "environment_pam_simple_church_western_interior" - ambience = "event:/DLC/CE3/SFX/Events/simple_western_church_interior" + texture = "gfx/interface/illustrations/event_scenes/church.dds" + environment = "environment_event_church" + ambience = "event:/SFX/Events/Backgrounds/temple_christian" } background = { #Norse generic holy site trigger = { @@ -1917,19 +1897,7 @@ } } } - 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 - } + scripted_animation = horse_camel_activity_travel_animation } player_guest = { camera = camera_event_center @@ -1977,157 +1945,8 @@ } } } - 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 - } + scripted_animation = horse_camel_activity_travel_animation } - clergy_guest_travelling = { - camera = camera_activity_horse - - effect = { - if = { - limit = { - scope:host.location = scope:activity.activity_location - } - ordered_attending_character = { - limit = { - is_clergy = yes - this != scope:host - location != scope:activity.activity_location - } - order_by = { - value = 1 - add = { - value = highest_held_title_tier - multiply = 15 - } - } - 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 - } - } - # Clerical guests stand to the host's right (list before host, matching coronation/feast) - clergy_guest_arrived = { - camera = camera_body_right - - effect = { - if = { - limit = { - scope:host.location = scope:activity.activity_location - } - ordered_attending_character = { - limit = { - is_clergy = yes - this != scope:host - location = scope:activity.activity_location - } - order_by = { - value = 1 - add = { - value = highest_held_title_tier - multiply = 15 - } - } - add_to_list = characters - } - } - } - scripted_animation = ecumenical_council_clergy_guest_animation_alt - } - clergy_guest = { - camera = camera_body_right - - effect = { - if = { - limit = { - scope:host.location = scope:activity.activity_location - } - ordered_attending_character = { - limit = { - is_clergy = yes - this != scope:host - location = scope:activity.activity_location - } - order_by = { - value = 1 - add = { - value = highest_held_title_tier - multiply = 15 - } - } - check_range_bounds = no - position = 1 - add_to_list = characters - } - } - } - scripted_animation = ecumenical_council_clergy_guest_animation - } - host = { - camera = camera_body - effect = { - if = { - limit = { scope:host = { location = scope:activity.activity_location } } - } - scope:host ?= { add_to_list = characters } - } - scripted_animation = ecumenical_council_host_animation - } - travel_host = { - camera = camera_event_horse_left - - effect = { - if = { - limit = { - NOT = { - 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 - } - } - # Lay guests stand to the host's left non_clergy_guest_arrived = { camera = camera_body_left_slight @@ -2160,6 +1979,117 @@ } scripted_animation = ecumenical_council_lay_guest_animation_alt } + host = { + camera = camera_body + effect = { + if = { + limit = { scope:host = { location = scope:activity.activity_location } } + } + scope:host ?= { add_to_list = characters } + } + scripted_animation = ecumenical_council_host_animation + } + travel_host = { + camera = camera_event_horse_left + + effect = { + if = { + limit = { + NOT = { + scope:host.location = scope:activity.activity_location + } + } + scope:host = { + add_to_list = characters + } + } + } + + scripted_animation = horse_camel_activity_travel_animation + } + clergy_guest_arrived = { + camera = camera_body_right + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + ordered_attending_character = { + limit = { + is_clergy = yes + this != scope:host + location = scope:activity.activity_location + } + order_by = { + value = 1 + add = { + value = highest_held_title_tier + multiply = 15 + } + } + add_to_list = characters + } + } + } + scripted_animation = ecumenical_council_clergy_guest_animation_alt + } + clergy_guest_travelling = { + camera = camera_activity_horse + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + ordered_attending_character = { + limit = { + is_clergy = yes + this != scope:host + location != scope:activity.activity_location + } + order_by = { + value = 1 + add = { + value = highest_held_title_tier + multiply = 15 + } + } + add_to_list = characters + } + } + } + scripted_animation = horse_camel_activity_travel_animation + } + clergy_guest = { + camera = camera_body_right + + effect = { + if = { + limit = { + scope:host.location = scope:activity.activity_location + } + ordered_attending_character = { + limit = { + is_clergy = yes + this != scope:host + location = scope:activity.activity_location + } + order_by = { + value = 1 + add = { + value = highest_held_title_tier + multiply = 15 + } + } + check_range_bounds = no + position = 1 + add_to_list = characters + } + } + } + scripted_animation = ecumenical_council_clergy_guest_animation + } non_clergy_guest = { camera = camera_body_left diff --git a/common/activities/activity_types/feast.txt b/common/activities/activity_types/feast.txt index c654c687b..8a2c870b4 100644 --- a/common/activities/activity_types/feast.txt +++ b/common/activities/activity_types/feast.txt @@ -9,8 +9,7 @@ activity_feast = { is_shown = { - is_landed_or_landless_administrative_or_theocratic = yes - highest_held_title_tier > tier_barony + can_host_feasts_trigger = yes trigger_if = { limit = { is_ai = yes @@ -31,6 +30,7 @@ activity_feast = { limit = { highest_held_title_tier = tier_county government_is_japanese_trigger = no + NOT = { government_has_flag = government_is_merchant } } ai_sociability >= 100 } @@ -40,19 +40,17 @@ activity_feast = { can_start_showing_failures_only = { NOT = { is_activity_type_on_cooldown = activity_feast } - is_physically_able_adult = yes + is_available_adult = yes } is_valid = { scope:host = { is_physically_able_adult = yes - is_landed_or_landless_administrative_or_theocratic = yes + can_host_feasts_trigger = yes } # If no one shows up trigger_if = { - limit = { - is_current_phase_active = yes - } + limit = { is_current_phase_active = yes } has_attending_activity_guests = yes } } @@ -236,30 +234,11 @@ activity_feast = { } # ++ / double plus good triggered_desc = { - trigger = { has_building_or_higher = farm_estates_01 } - desc = activity_feast_province_desc_farm_estates - } - triggered_desc = { - trigger = { has_building_or_higher = paddy_fields_01 } - desc = activity_feast_province_desc_paddy_fields + trigger = { has_building_or_higher = royal_great_hall_1 } + desc = activity_feast_province_desc_royal_great_hall } + # + / 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 @@ -306,30 +285,12 @@ activity_feast = { } # Double good / ++ if = { - limit = { has_building_or_higher = farm_estates_01 } - add = 50 - } - if = { - limit = { has_building_or_higher = paddy_fields_01 } + limit = { has_building_or_higher = royal_great_hall_1 } 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 } @@ -696,7 +657,10 @@ activity_feast = { is_ai = yes has_character_flag = feast_ai_override } - add = 10000 + add = { + value = 10000 + desc = "feast_ai_override" + } } } @@ -740,6 +704,7 @@ activity_feast = { 4 = activity_invite_rule_guests 1 = activity_invite_spouses 1 = activity_invite_rule_landless_adventurers_restricted_range_opinion + 1 = activity_invite_rule_merchants_restricted_range } } @@ -750,13 +715,15 @@ activity_feast = { } host_intents = { - intents = { reduce_stress_intent murder_attendee_intent woo_attendee_intent befriend_attendee_intent spread_legend_intent legitimacy_intent spread_personal_tenet_intent praise_the_gods_intent } + intents = { reduce_stress_intent schmooze_intent murder_attendee_intent woo_attendee_intent befriend_attendee_intent spread_legend_intent legitimacy_intent spread_personal_tenet_intent praise_the_gods_intent } default = reduce_stress_intent + player_defaults = { schmooze_intent 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 spread_personal_tenet_intent praise_the_gods_intent } + intents = { reduce_stress_intent schmooze_intent murder_attendee_intent woo_attendee_intent befriend_attendee_intent banquet_mischief_intent spread_legend_intent legitimacy_intent spread_personal_tenet_intent praise_the_gods_intent } default = reduce_stress_intent + player_defaults = { schmooze_intent reduce_stress_intent } } guest_join_chance = { @@ -784,10 +751,10 @@ activity_feast = { any_active_accolade = { accolade_parameter = acclaimed_knight_feast_wedding_invite_acceptance_bonus } - } - add = accolade_feast_wedding_invite_acceptance_value + } + add = accolade_feast_wedding_invite_acceptance_value desc = acclaimed_knight_feast_wedding_invite_acceptance_bonus_tt - } + } } special_guests = { @@ -802,30 +769,32 @@ activity_feast = { 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 } + scope:host = { is_ai = yes } + } + trigger_if = { # Pick adventurers first! + limit = { + scope:host = { has_character_flag = feast_ai_override } + } + reverse_has_opinion_modifier = { + modifier = laamp_used_contact_opinion_special + target = scope:host } } - OR = { - is_vassal_of = scope:host - target_is_vassal_or_below = scope:host - has_relation_friend = scope:host - has_relation_lover = scope:host + trigger_else = { + OR = { + is_vassal_of = scope:host + target_is_vassal_or_below = scope:host + has_relation_friend = scope:host + has_relation_lover = scope:host + scope:host.liege = this + scope:host.suzerain ?= this + AND = { # Merchants can pick each other + is_landless_merchant = yes + scope:host = { is_landless_merchant = yes } + } + } } } } @@ -1042,6 +1011,11 @@ activity_feast = { } } + if = { + limit = { government_has_flag = government_is_merchant } + multiply = 0.5 + } + if = { limit = { has_variable = mpo_nerge_1060_free_feast } multiply = { @@ -1057,6 +1031,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } } treasury = { # Make sure this matches the gold cost above if = { @@ -1087,6 +1070,15 @@ activity_feast = { desc = mpo_nerge_1060_free_feast_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = gdp_feast_popular_opinion_feast_discount + desc = feast_cost_discount_public_opinion + } + } } piety = { @@ -1234,11 +1226,7 @@ activity_feast = { } } scope:host.location = { - terrain = farmlands - OR = { - terrain = terraced_hills - has_building_or_higher = paddy_fields_01 - } + has_rice_fields_district = yes } } texture = "gfx/interface/illustrations/event_scenes/tgp_rice_fields.dds" @@ -2383,13 +2371,7 @@ activity_feast = { } } - scripted_animation = { - triggered_animation = { - trigger = { scope:character = { has_trait = impatient } } - animation = { jockey_gallop } - } - animation = jockey_walk - } + scripted_animation = horse_camel_activity_travel_animation } honorary_guest_traveling_murder = { @@ -2410,13 +2392,7 @@ activity_feast = { } } - scripted_animation = { - triggered_animation = { - trigger = { scope:character = { has_trait = impatient } } - animation = { jockey_gallop } - } - animation = jockey_walk - } + scripted_animation = horse_camel_activity_travel_animation } honorary_guest_murder = { # Both regular and murder @@ -2471,13 +2447,7 @@ activity_feast = { } } - scripted_animation = { - triggered_animation = { - trigger = { scope:character = { has_trait = impatient } } - animation = { jockey_gallop } - } - animation = jockey_walk - } + scripted_animation = horse_camel_activity_travel_animation } honorary_guest_regular = { @@ -2959,7 +2929,10 @@ activity_feast = { is_ai = yes has_character_flag = feast_ai_override } - add = 100 + add = { + value = 100 + desc = "feast_ai_override" + } } } } @@ -3038,6 +3011,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } if = { limit = { has_variable = mpo_nerge_1060_free_feast } multiply = { @@ -3072,6 +3054,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } if = { limit = { has_variable = mpo_nerge_1060_free_feast } multiply = { @@ -3085,6 +3076,7 @@ activity_feast = { is_shown = { has_dlc_feature = tours_and_tournaments + NOT = { government_has_flag = government_is_merchant } } is_valid = { @@ -3357,6 +3349,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } } } treasury = { # Make sure this matches the gold cost above @@ -3384,6 +3385,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } } } piety = { @@ -3408,6 +3418,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } } } barter_goods = { @@ -3432,6 +3451,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } } } } @@ -3482,6 +3510,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } } } treasury = { @@ -3509,6 +3546,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } } } piety = { @@ -3533,6 +3579,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } } } barter_goods = { @@ -3557,6 +3612,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } } } } @@ -3629,6 +3693,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } } } treasury = { # Make sure this matches the gold cost above @@ -3656,6 +3729,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } } } @@ -3681,6 +3763,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } if = { limit = { has_variable = mpo_nerge_1060_free_feast } @@ -3714,6 +3805,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } if = { limit = { has_variable = mpo_nerge_1060_free_feast } @@ -3772,6 +3872,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } } } treasury = { @@ -3799,6 +3908,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } } } piety = { @@ -3823,6 +3941,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } } } @@ -3848,6 +3975,15 @@ activity_feast = { desc = pam_sf_free_feast_discount_desc } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + multiply = { + value = 0 + desc = feast_cost_discount_public_opinion + } + } } } } @@ -3914,19 +4050,19 @@ activity_feast = { add = { desc = feast_wine_limited add = { - value = 10 + value = 7 desc = feast_wine_limited } add = { - value = 10 + value = 7 multiply = activity_cost_scale_by_tier - subtract = 10 + subtract = 7 desc = activity_cost_scale_by_tier_desc } add = { - value = 10 + value = 7 multiply = activity_cost_scale_by_era - subtract = 10 + subtract = 7 desc = activity_cost_scale_by_era_desc } if = { @@ -3936,16 +4072,16 @@ activity_feast = { } } subtract = { - value = 10 + value = 7 add = { - value = 10 + value = 7 multiply = activity_cost_scale_by_tier - subtract = 10 + subtract = 7 } add = { - value = 10 + value = 7 multiply = activity_cost_scale_by_era - subtract = 10 + subtract = 7 } multiply = law_legacy_cost_reduction_mult desc = law_legacy_1_name @@ -3971,19 +4107,19 @@ activity_feast = { add = { desc = feast_wine_limited add = { - value = 10 + value = 7 desc = feast_wine_limited } add = { - value = 10 + value = 7 multiply = activity_cost_scale_by_tier - subtract = 10 + subtract = 7 desc = activity_cost_scale_by_tier_desc } add = { - value = 10 + value = 7 multiply = activity_cost_scale_by_era - subtract = 10 + subtract = 7 desc = activity_cost_scale_by_era_desc } if = { @@ -3993,16 +4129,16 @@ activity_feast = { } } subtract = { - value = 10 + value = 7 add = { - value = 10 + value = 7 multiply = activity_cost_scale_by_tier - subtract = 10 + subtract = 7 } add = { - value = 10 + value = 7 multiply = activity_cost_scale_by_era - subtract = 10 + subtract = 7 } multiply = law_legacy_cost_reduction_mult desc = law_legacy_1_name @@ -4063,19 +4199,19 @@ activity_feast = { add = { desc = feast_wine_normal add = { - value = 35 + value = 23 desc = feast_wine_normal } add = { - value = 35 + value = 23 multiply = activity_cost_scale_by_tier - subtract = 35 + subtract = 23 desc = activity_cost_scale_by_tier_desc } add = { - value = 35 + value = 23 multiply = activity_cost_scale_by_era - subtract = 35 + subtract = 23 desc = activity_cost_scale_by_era_desc } if = { @@ -4085,16 +4221,16 @@ activity_feast = { } } subtract = { - value = 35 + value = 23 add = { - value = 35 + value = 23 multiply = activity_cost_scale_by_tier - subtract = 35 + subtract = 23 } add = { - value = 35 + value = 23 multiply = activity_cost_scale_by_era - subtract = 35 + subtract = 23 } multiply = law_legacy_cost_reduction_mult desc = law_legacy_1_name @@ -4120,19 +4256,19 @@ activity_feast = { add = { desc = feast_wine_normal add = { - value = 35 + value = 23 desc = feast_wine_normal } add = { - value = 35 + value = 23 multiply = activity_cost_scale_by_tier - subtract = 35 + subtract = 23 desc = activity_cost_scale_by_tier_desc } add = { - value = 35 + value = 23 multiply = activity_cost_scale_by_era - subtract = 35 + subtract = 23 desc = activity_cost_scale_by_era_desc } if = { @@ -4142,16 +4278,16 @@ activity_feast = { } } subtract = { - value = 35 + value = 23 add = { - value = 35 + value = 23 multiply = activity_cost_scale_by_tier - subtract = 35 + subtract = 23 } add = { - value = 35 + value = 23 multiply = activity_cost_scale_by_era - subtract = 35 + subtract = 23 } multiply = law_legacy_cost_reduction_mult desc = law_legacy_1_name @@ -4207,19 +4343,19 @@ activity_feast = { add = { desc = feast_wine_extensive add = { - value = 90 + value = 60 desc = feast_wine_extensive } add = { - value = 90 + value = 60 multiply = activity_cost_scale_by_tier - subtract = 90 + subtract = 60 desc = activity_cost_scale_by_tier_desc } add = { - value = 90 + value = 60 multiply = activity_cost_scale_by_era - subtract = 90 + subtract = 60 desc = activity_cost_scale_by_era_desc } if = { @@ -4229,16 +4365,16 @@ activity_feast = { } } subtract = { - value = 90 + value = 60 add = { - value = 90 + value = 60 multiply = activity_cost_scale_by_tier - subtract = 90 + subtract = 60 } add = { - value = 90 + value = 60 multiply = activity_cost_scale_by_era - subtract = 90 + subtract = 60 } multiply = law_legacy_cost_reduction_mult desc = law_legacy_1_name @@ -4264,19 +4400,19 @@ activity_feast = { add = { desc = feast_wine_extensive add = { - value = 90 + value = 60 desc = feast_wine_extensive } add = { - value = 90 + value = 60 multiply = activity_cost_scale_by_tier - subtract = 90 + subtract = 60 desc = activity_cost_scale_by_tier_desc } add = { - value = 90 + value = 60 multiply = activity_cost_scale_by_era - subtract = 90 + subtract = 60 desc = activity_cost_scale_by_era_desc } if = { @@ -4286,16 +4422,16 @@ activity_feast = { } } subtract = { - value = 90 + value = 60 add = { - value = 90 + value = 60 multiply = activity_cost_scale_by_tier - subtract = 90 + subtract = 60 } add = { - value = 90 + value = 60 multiply = activity_cost_scale_by_era - subtract = 90 + subtract = 60 } multiply = law_legacy_cost_reduction_mult desc = law_legacy_1_name @@ -4665,64 +4801,6 @@ activity_feast = { # 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 = { @@ -4732,6 +4810,15 @@ activity_feast = { desc = activity_feast_province_desc_leisure_palace } } + ## Household + ### Great Hall & Kitchens + if = { + limit = { has_building_or_higher = royal_great_hall_1 } + add = { + value = @weight_up_ai_select_province_medium + desc = activity_feast_province_desc_royal_great_hall + } + } ## Special ### Doge's Palace if = { @@ -4887,6 +4974,12 @@ activity_feast = { VAL = 1 } } + if = { + limit = { + has_character_modifier = gdp_guild_sponsored_feast_modifier + } + remove_character_modifier = gdp_guild_sponsored_feast_modifier + } } set_variable = { name = host_var @@ -5189,6 +5282,11 @@ activity_feast = { # } # Struggle Catalysts -# fp3_struggle_catalysts_for_activities_effect = yes + fp3_struggle_catalysts_for_activities_effect = yes + + # GDP Associate promise + scope:activity.activity_host = { + gdp_merchant_associate_promise_completed_effect = { TYPE = flag:activity } + } } } diff --git a/common/activities/activity_types/funeral.txt b/common/activities/activity_types/funeral.txt index 0ced02be8..0093d6fbe 100644 --- a/common/activities/activity_types/funeral.txt +++ b/common/activities/activity_types/funeral.txt @@ -124,7 +124,7 @@ activity_funeral = { is_single_location = yes - province_filter = realm + province_filter = domicile_realm ai_province_filter = capital max_route_deviation_mult = 2.0 @@ -170,6 +170,12 @@ activity_funeral = { } desc = activity_funeral_holy_site } + triggered_desc = { + trigger = { + has_building_or_higher = royal_mausoleum_1 + } + desc = activity_funeral_royal_mausoleum + } # Things your religion values triggered_desc = { trigger = { @@ -227,6 +233,12 @@ activity_funeral = { } add = 50 } + if = { # Royal Mausoleum + limit = { + has_building_or_higher = royal_mausoleum_1 + } + add = 50 + } # Things your religion values if = { limit = { @@ -543,6 +555,7 @@ activity_funeral = { 4 = activity_invite_rule_guests 1 = activity_invite_spouses 1 = activity_invite_rule_landless_adventurers_restricted_range + 1 = activity_invite_rule_merchants_restricted_range } } @@ -696,21 +709,18 @@ activity_funeral = { 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 = { # Ceremony - mid-range (Normal) option cost + value = 7 add = { - value = 45 + value = 7 multiply = activity_cost_scale_by_tier + subtract = 7 } add = { - value = 45 + value = 7 multiply = activity_cost_scale_by_era + subtract = 7 } - # 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 = { @@ -747,9 +757,9 @@ activity_funeral = { add = { value = funeral_activity_cost add = { - value = feast_activity_cost + value = funeral_activity_cost multiply = activity_cost_scale_by_era - subtract = feast_activity_cost + subtract = funeral_activity_cost } } multiply = estate_cheaper_funeral_cost_value @@ -839,11 +849,7 @@ activity_funeral = { trigger = { scope:host.location != scope:activity.activity_location scope:host.location = { - terrain = farmlands - OR = { - terrain = terraced_hills - has_building_or_higher = paddy_fields_01 - } + has_rice_fields_district = yes } } texture = "gfx/interface/illustrations/event_scenes/tgp_rice_fields.dds" @@ -1202,13 +1208,7 @@ activity_funeral = { } } - scripted_animation = { - triggered_animation = { - trigger = { scope:character = { has_trait = impatient } } - animation = { jockey_gallop } - } - animation = jockey_walk - } + scripted_animation = horse_camel_activity_travel_animation } guest = { @@ -1342,19 +1342,19 @@ activity_funeral = { value = 0 desc = funeral_ceremony_normal add = { - value = 10 + value = 7 desc = funeral_ceremony_normal } add = { - value = 10 + value = 7 multiply = activity_cost_scale_by_tier - subtract = 10 + subtract = 7 desc = activity_cost_scale_by_tier_desc } add = { - value = 10 + value = 7 multiply = activity_cost_scale_by_era - subtract = 10 + subtract = 7 desc = activity_cost_scale_by_era_desc } if = { @@ -1364,16 +1364,16 @@ activity_funeral = { } } subtract = { - value = 10 + value = 7 add = { - value = 10 + value = 7 multiply = activity_cost_scale_by_tier - subtract = 10 + subtract = 7 } add = { - value = 10 + value = 7 multiply = activity_cost_scale_by_era - subtract = 10 + subtract = 7 } multiply = law_legacy_cost_reduction_mult desc = law_legacy_1_name @@ -1416,19 +1416,19 @@ activity_funeral = { value = 0 desc = funeral_ceremony_good add = { - value = 35 + value = 23 desc = funeral_ceremony_good } add = { - value = 35 + value = 23 multiply = activity_cost_scale_by_tier - subtract = 35 + subtract = 23 desc = activity_cost_scale_by_tier_desc } add = { - value = 35 + value = 23 multiply = activity_cost_scale_by_era - subtract = 35 + subtract = 23 desc = activity_cost_scale_by_era_desc } if = { @@ -1438,16 +1438,16 @@ activity_funeral = { } } subtract = { - value = 35 + value = 23 add = { - value = 35 + value = 23 multiply = activity_cost_scale_by_tier - subtract = 35 + subtract = 23 } add = { - value = 35 + value = 23 multiply = activity_cost_scale_by_era - subtract = 35 + subtract = 23 } multiply = law_legacy_cost_reduction_mult desc = law_legacy_1_name diff --git a/common/activities/activity_types/hike.txt b/common/activities/activity_types/hike.txt index 989208dd7..40de1cc26 100644 --- a/common/activities/activity_types/hike.txt +++ b/common/activities/activity_types/hike.txt @@ -29,7 +29,8 @@ limit = { scope:host = { is_ai = no - is_landless_adventurer = no + is_landed = yes + is_landless_ruler = no } } custom_tooltip = { @@ -46,10 +47,8 @@ limit = { scope:host = { is_ai = no - OR = { - has_government = landless_adventurer_government - is_landed = no - } + is_landed = no + is_landless_ruler = yes } } custom_tooltip = { @@ -438,7 +437,7 @@ cost = { gold = { add = { - value = 35 + value = 23 if = { limit = { has_perk = journey_planner_perk @@ -658,11 +657,7 @@ #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 - } + has_rice_fields_district = yes } } texture = "gfx/interface/illustrations/event_scenes/tgp_rice_fields.dds" @@ -1019,19 +1014,7 @@ } } - 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 - } + scripted_animation = horse_camel_activity_travel_animation } guest = { diff --git a/common/activities/activity_types/hunt.txt b/common/activities/activity_types/hunt.txt index 43003c34c..81ddc5b98 100644 --- a/common/activities/activity_types/hunt.txt +++ b/common/activities/activity_types/hunt.txt @@ -38,9 +38,7 @@ is_available_adult = yes can_hunt_trigger = yes trigger_if = { - limit = { - has_government = landless_adventurer_government - } + limit = { has_government = landless_adventurer_government } custom_tooltip = { text = adventurer_3_courtiers any_courtier = { @@ -51,11 +49,17 @@ } } trigger_if = { - limit = { - government_has_flag = government_is_nomadic - } + limit = { government_has_flag = government_is_nomadic } is_landed = yes } + trigger_if = { + limit = { government_has_flag = government_is_merchant } + custom_tooltip = { + text = merchant_hunt_need_permission + exists = suzerain + var:merchant_hunt_permission ?= suzerain + } + } } is_valid = { @@ -585,19 +589,11 @@ } # 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 = { # Attendants - mid-range (Search Parties) option cost + value = domicile.miniscule_herd_value # Search Parties Cost } - 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 + add = { # Party Size - mid-range (Reasonable Party) option cost + value = domicile.miniscule_herd_value # Reasonable Party Cost } if = { @@ -672,25 +668,17 @@ } # Options - add = { # Attendants - value = 0 # Local Game Keepers Cost - add = 10 # Search Parties Cost - add = 35 # Flushing Gangs Cost + add = { # Attendants - mid-range (Search Parties) option cost + value = 7 # Search Parties 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 + add = { # Party Size - mid-range (Reasonable Party) option cost + value = 7 # Reasonable 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 = { @@ -754,25 +742,17 @@ } # Options - add = { # Attendants - value = 0 # Local Game Keepers Cost - add = 10 # Search Parties Cost - add = 35 # Flushing Gangs Cost + add = { # Attendants - mid-range (Search Parties) option cost + value = 7 # Search Parties 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 + add = { # Party Size - mid-range (Reasonable Party) option cost + value = 7 # Reasonable 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 = { @@ -841,25 +821,17 @@ } # Options - add = { # Attendants - value = 0 # Local Game Keepers Cost - add = 10 # Search Parties Cost - add = 35 # Flushing Gangs Cost + add = { # Attendants - mid-range (Search Parties) option cost + value = 7 # Search Parties 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 + add = { # Party Size - mid-range (Reasonable Party) option cost + value = 7 # Reasonable 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 = { @@ -1432,13 +1404,7 @@ } 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_host_desc_trait triggered_desc = { trigger = { has_dlc_feature = accolades @@ -1484,13 +1450,7 @@ } 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_host_desc_trait desc = activity_hunt_guest_desc_accolade } @@ -1655,18 +1615,11 @@ } triggered_desc = { trigger = { - has_building = royal_forest_03 + has_building = royal_forest_05 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 @@ -1740,21 +1693,6 @@ } 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 @@ -1773,19 +1711,14 @@ } triggered_desc = { trigger = { - has_building = royal_forest_02 + OR = { + has_building = royal_forest_03 + has_building = royal_forest_04 + } 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 @@ -1807,23 +1740,6 @@ } 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 @@ -1836,18 +1752,20 @@ # + / plus good triggered_desc = { trigger = { - has_building = royal_forest_01 + OR = { + has_building = royal_forest_01 + has_building = royal_forest_02 + } 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 } + has_building_or_higher = knights_stables_1 NOT = { scope:special_option ?= flag:hunt_type_nerge } } - desc = activity_hunt_province_desc_hunting_grounds_minor + desc = activity_hunt_province_desc_royal_stables } triggered_desc = { trigger = { @@ -1950,15 +1868,6 @@ 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 } @@ -1973,14 +1882,6 @@ } 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 @@ -2109,11 +2010,7 @@ trigger = { scope:host.location != scope:activity.activity_location scope:host.location = { - terrain = farmlands - OR = { - terrain = terraced_hills - has_building_or_higher = paddy_fields_01 - } + has_rice_fields_district = yes } } texture = "gfx/interface/illustrations/event_scenes/tgp_rice_fields.dds" @@ -2892,13 +2789,7 @@ } } - scripted_animation = { - triggered_animation = { - trigger = { scope:character = { has_trait = impatient } } - animation = { jockey_gallop } - } - animation = jockey_walk - } + scripted_animation = horse_camel_activity_travel_animation } host = { # Nerge @@ -4015,8 +3906,11 @@ limit = { has_dlc_feature = advanced_activities } pam_vows_of_poverty_premium_activity_option_valid_trigger = yes } - can_make_expensive_purchase_trigger = { - PRICE = root.hunt_normal_option_cost + trigger_if = { + limit = { hunt_option_costs_gold_trigger = yes } + can_make_expensive_purchase_trigger = { + PRICE = root.hunt_normal_option_cost + } } } @@ -4075,21 +3969,7 @@ } gold = { if = { - limit = { - OR = { - government_has_flag = government_is_nomadic - has_character_flag = free_hunt - AND = { - has_character_flag = free_falconry - scope:special_option ?= flag:hunt_type_falconry - } - government_has_flag = government_is_mandala - AND = { - house ?= { has_house_aspiration_parameter = hunts_costs_treasury } - has_treasury = yes - } - } - } + limit = { hunt_option_costs_gold_trigger = no } value = 0 } else = { @@ -4247,8 +4127,11 @@ is_valid = { pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - can_make_expensive_purchase_trigger = { - PRICE = root.hunt_good_option_cost + trigger_if = { + limit = { hunt_option_costs_gold_trigger = yes } + can_make_expensive_purchase_trigger = { + PRICE = root.hunt_good_option_cost + } } } @@ -4307,21 +4190,7 @@ } gold = { if = { - limit = { - OR = { - government_has_flag = government_is_nomadic - has_character_flag = free_hunt - AND = { - has_character_flag = free_falconry - scope:special_option ?= flag:hunt_type_falconry - } - government_has_flag = government_is_mandala - AND = { - house ?= { has_house_aspiration_parameter = hunts_costs_treasury } - has_treasury = yes - } - } - } + limit = { hunt_option_costs_gold_trigger = no } value = 0 } else = { @@ -5360,6 +5229,7 @@ 4 = activity_invite_rule_courtiers 4 = activity_invite_rule_fellow_vassals 1 = activity_invite_rule_landless_adventurers_restricted_range + 1 = activity_invite_rule_merchants_restricted_range } } @@ -5380,15 +5250,15 @@ } 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 spread_personal_tenet_intent } + intents = { reduce_stress_intent slay_beast_intent schmooze_intent murder_attendee_intent woo_attendee_intent befriend_attendee_intent successful_nerge_intent dreadful_nerge_intent impose_obedience_intent spread_personal_tenet_intent } default = reduce_stress_intent - player_defaults = { successful_nerge_intent reduce_stress_intent slay_beast_intent } + player_defaults = { schmooze_intent 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 spread_personal_tenet_intent } + intents = { reduce_stress_intent slay_beast_intent schmooze_intent murder_attendee_intent woo_attendee_intent befriend_attendee_intent successful_nerge_intent dreadful_nerge_intent spread_personal_tenet_intent } default = reduce_stress_intent - player_defaults = { successful_nerge_intent reduce_stress_intent slay_beast_intent } + player_defaults = { schmooze_intent successful_nerge_intent reduce_stress_intent slay_beast_intent } } guest_join_chance = { @@ -5529,6 +5399,8 @@ } remove_character_flag = free_falconry } + # If hosted with permission, reset permission + remove_variable = merchant_hunt_permission } } allow_zero_guest_invites = yes @@ -5589,9 +5461,7 @@ this = scope:host has_government = landless_adventurer_government } - trigger_event = { - id = hunt.1337 - } + trigger_event = hunt.1337 } if = { limit = { @@ -5719,5 +5589,10 @@ } } } + + # GDP Associate promise + scope:activity.activity_host = { + gdp_merchant_associate_promise_completed_effect = { TYPE = flag:activity } + } } } diff --git a/common/activities/activity_types/imperial_examination.txt b/common/activities/activity_types/imperial_examination.txt deleted file mode 100644 index f3240a4ed..000000000 --- a/common/activities/activity_types/imperial_examination.txt +++ /dev/null @@ -1,2216 +0,0 @@ -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 - } - is_in_activity = no - } - 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 - } - } - } - invalidation_imprisoned_effect = yes - invalidation_incapable_effect = yes - invalidation_unlanded_effect = yes - invalidation_nobody_present_effect = yes - invalidation_host_isolated_effect = yes - } - - 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 - - # it's necessary for AI run their empire... - # add = activity_general_ai_will_do_value - - #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 = erudite } - add = { - value = 50 - desc = erudite - } - } - } - } - 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 = { - default = { - has_personal_tenet_flag = tenet_vows_of_poverty_humble_host - } - #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 = { - is_valid = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - } - #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 = { - is_valid = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - } - default = { - NOT = { has_personal_tenet_flag = tenet_vows_of_poverty_humble_host } - } - #Don't really need a cost, you pay in decreased legitimacy reward - ai_will_do = { - value = 25 - } - } - imperial_examination_passing_grade_extreme = { - is_valid = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - } - # 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 } - } - } - - on_phase_active_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 = { - scope:activity = { - progress_activity_phase_after = { days = 1 } - } - # 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 - } - } - } - else_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 - } - } - - 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 } - } - #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 - } - } - - on_phase_active_activity = { - progress_activity_phase_after = { days = imperial_examination_prep_days } - #Refresh the scoreboard - palace_examination_scoreboard_setup_effect = yes - } - - 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 Military 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 = { - 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 - has_none_of_variables = { - name = passed_palace_exam - name = 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 - ################### - - header_background = "gfx/interface/illustrations/activity_header_backgrounds/activity_imperial_examination.dds" - - # 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 deleted file mode 100644 index fc71abe62..000000000 --- a/common/activities/activity_types/inspection.txt +++ /dev/null @@ -1,1239 +0,0 @@ -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 - OR = { - has_perk = local_inspection_perk - government_has_mechanic = administrative - rite = { rite_has_parameter = inspections_unlocked_and_costs_piety } - } - is_landed = yes - trigger_if = { # Small AI's pace themselves more - limit = { - is_ai = yes - } - sub_realm_size > 1 - } - ai_activity_war_check = yes - ai_activity_coronation_check = yes - } - - 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 = { - # TGP/EP3 - trigger_if = { #I have both TGP/EP3 and BP3 - limit = { - has_bp3_dlc_trigger = yes - } - custom_tooltip = { - text = neither_local_inspection_perk_nor_merit - OR = { - has_perk = local_inspection_perk - government_has_mechanic = administrative - rite = { rite_has_parameter = inspections_unlocked_and_costs_piety } - } - } - } - trigger_else = { #I have only TGP/EP3 - I am required to have a bureaucratic government form (i.e. admin based). - custom_tooltip = { - text = neither_local_inspection_perk_nor_merit - OR = { - government_has_mechanic = administrative - rite = { rite_has_parameter = inspections_unlocked_and_costs_piety } - } - } - } - } - - is_available = yes - is_landed = yes - } - - is_valid = { - scope:host = { - is_physically_able = yes - } - } - - 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 - invalidation_host_isolated_effect = yes - } - - on_complete = { - if = { - limit = { this = scope:host } - pam_vows_of_poverty_host_completion_piety_effect = yes - } - } - - 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 = { - rite = { rite_has_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 = { - rite = { rite_has_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 = { - rite = { rite_has_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 = { - rite = { rite_has_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 = { - rite = { rite_has_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 = { - rite = { rite_has_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 = { - is_valid = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - } - 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 = { - is_valid = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - } - 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 - } - - add = activity_general_ai_will_do_value - } - - 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 - ################### - - header_background = "gfx/interface/illustrations/activity_header_backgrounds/activity_survey.dds" - - # 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 = { - activity_host = { 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/pilgrimage.txt b/common/activities/activity_types/pilgrimage.txt index 804a94718..c94228bde 100644 --- a/common/activities/activity_types/pilgrimage.txt +++ b/common/activities/activity_types/pilgrimage.txt @@ -1020,6 +1020,12 @@ # Ensure that we never drop to 0 min = 1 } + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_1 } + } + multiply = ep2_activities_legacy_1_pilgrimages_discount_value + } add = { # Base cost, scaled by era value = pilgrimage_base_cost @@ -1027,16 +1033,11 @@ } # Options - add = { # Pomp Option + add = { # Pomp Option value = 0 # Appropriate Cost - add = -10 # Humble Cost - add = 50 # Ceremonial Cost - add = 100 # Throng 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 = 4 } if = { @@ -1260,6 +1261,12 @@ # Ensure that we never drop to 0 min = 1 } + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_1 } + } + multiply = ep2_activities_legacy_1_pilgrimages_discount_value + } add = { # Base cost, scaled by era value = pilgrimage_base_cost @@ -1267,16 +1274,11 @@ } # Options - add = { # Pomp Option + add = { # Pomp Option value = 0 # Appropriate Cost - add = -10 # Humble Cost - add = 50 # Ceremonial Cost - add = 100 # Throng 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 = 4 } if = { @@ -1745,19 +1747,19 @@ subtract = { desc = pilgrimage_cost_pomp_ceremonial add = { - value = 10 + value = 7 desc = pilgrimage_cost_pomp_ceremonial } add = { - value = 10 + value = 7 multiply = activity_cost_scale_by_tier - subtract = 10 + subtract = 7 desc = activity_cost_scale_by_tier_desc } add = { - value = 10 + value = 7 multiply = activity_cost_scale_by_era - subtract = 10 + subtract = 7 desc = activity_cost_scale_by_era_desc } } @@ -1777,19 +1779,19 @@ subtract = { desc = pilgrimage_cost_pomp_ceremonial add = { - value = 10 + value = 7 desc = pilgrimage_cost_pomp_ceremonial } add = { - value = 10 + value = 7 multiply = activity_cost_scale_by_tier - subtract = 10 + subtract = 7 desc = activity_cost_scale_by_tier_desc } add = { - value = 10 + value = 7 multiply = activity_cost_scale_by_era - subtract = 10 + subtract = 7 desc = activity_cost_scale_by_era_desc } } @@ -1857,19 +1859,19 @@ add = { desc = pilgrimage_cost_pomp_ceremonial add = { - value = 50 + value = 33 desc = pilgrimage_cost_pomp_ceremonial } add = { - value = 50 + value = 33 multiply = activity_cost_scale_by_tier - subtract = 50 + subtract = 33 desc = activity_cost_scale_by_tier_desc } add = { - value = 50 + value = 33 multiply = activity_cost_scale_by_era - subtract = 50 + subtract = 33 desc = activity_cost_scale_by_era_desc } if = { @@ -1877,7 +1879,7 @@ dynasty ?= { has_dynasty_perk = ep2_activities_legacy_1 } } subtract = { - value = 50 + value = 33 multiply = ep2_activities_legacy_1_pilgrimages_discount_value desc = ep2_activities_legacy_track } @@ -1918,19 +1920,19 @@ add = { desc = pilgrimage_cost_pomp_ceremonial add = { - value = 50 + value = 33 desc = pilgrimage_cost_pomp_ceremonial } add = { - value = 50 + value = 33 multiply = activity_cost_scale_by_tier - subtract = 50 + subtract = 33 desc = activity_cost_scale_by_tier_desc } add = { - value = 50 + value = 33 multiply = activity_cost_scale_by_era - subtract = 50 + subtract = 33 desc = activity_cost_scale_by_era_desc } if = { @@ -1938,7 +1940,7 @@ dynasty ?= { has_dynasty_perk = ep2_activities_legacy_1 } } subtract = { - value = 50 + value = 33 multiply = ep2_activities_legacy_1_pilgrimages_discount_value desc = ep2_activities_legacy_track } @@ -2005,19 +2007,19 @@ add = { desc = pilgrimage_cost_pomp_throng add = { - value = 100 + value = 67 desc = pilgrimage_cost_pomp_throng } add = { - value = 100 + value = 67 multiply = activity_cost_scale_by_tier - subtract = 100 + subtract = 67 desc = activity_cost_scale_by_tier_desc } add = { - value = 100 + value = 67 multiply = activity_cost_scale_by_era - subtract = 100 + subtract = 67 desc = activity_cost_scale_by_era_desc } if = { @@ -2025,7 +2027,7 @@ dynasty ?= { has_dynasty_perk = ep2_activities_legacy_1 } } subtract = { - value = 100 + value = 67 multiply = ep2_activities_legacy_1_pilgrimages_discount_value desc = ep2_activities_legacy_track } @@ -2066,19 +2068,19 @@ add = { desc = pilgrimage_cost_pomp_throng add = { - value = 100 + value = 67 desc = pilgrimage_cost_pomp_throng } add = { - value = 100 + value = 67 multiply = activity_cost_scale_by_tier - subtract = 100 + subtract = 67 desc = activity_cost_scale_by_tier_desc } add = { - value = 100 + value = 67 multiply = activity_cost_scale_by_era - subtract = 100 + subtract = 67 desc = activity_cost_scale_by_era_desc } if = { @@ -2086,7 +2088,7 @@ dynasty ?= { has_dynasty_perk = ep2_activities_legacy_1 } } subtract = { - value = 100 + value = 67 multiply = ep2_activities_legacy_1_pilgrimages_discount_value desc = ep2_activities_legacy_track } @@ -2260,6 +2262,15 @@ desc = pam_sf_pilgrimage_funded_discount_desc } } + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_1 } + } + multiply = { + value = ep2_activities_legacy_1_pilgrimages_discount_value + desc = ep2_activities_legacy_track + } + } } } @@ -2377,6 +2388,15 @@ desc = pam_sf_pilgrimage_funded_discount_desc } } + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_1 } + } + multiply = { + value = ep2_activities_legacy_1_pilgrimages_discount_value + desc = ep2_activities_legacy_track + } + } } } @@ -3266,11 +3286,7 @@ trigger = { scope:host.location != scope:activity.activity_location scope:host.location = { - terrain = farmlands - OR = { - terrain = terraced_hills - has_building_or_higher = paddy_fields_01 - } + has_rice_fields_district = yes } } texture = "gfx/interface/illustrations/event_scenes/tgp_rice_fields.dds" @@ -3866,9 +3882,7 @@ } } - scripted_animation = { - animation = jockey_walk - } + scripted_animation = horse_camel_activity_travel_animation } pilgrim = { # Travel @@ -3887,9 +3901,7 @@ } } - scripted_animation = { - animation = jockey_walk - } + scripted_animation = horse_camel_activity_travel_animation } host = { @@ -3945,13 +3957,7 @@ } } } - scripted_animation = { - triggered_animation = { - trigger = { scope:character = { has_trait = impatient } } - animation = { jockey_gallop } - } - animation = jockey_walk - } + scripted_animation = horse_camel_activity_travel_animation } pilgrim = { @@ -4052,9 +4058,7 @@ } } - scripted_animation = { - animation = jockey_walk - } + scripted_animation = horse_camel_activity_travel_animation } pilgrim = { # Travel @@ -4081,9 +4085,7 @@ } } - scripted_animation = { - animation = jockey_walk - } + scripted_animation = horse_camel_activity_travel_animation } } } diff --git a/common/activities/activity_types/playdate.txt b/common/activities/activity_types/playdate.txt deleted file mode 100644 index 638b282db..000000000 --- a/common/activities/activity_types/playdate.txt +++ /dev/null @@ -1,927 +0,0 @@ -activity_playdate = { - is_shown = { - highest_held_title_tier > tier_barony - trigger_if = { - trigger_if = { # Throttle Counts - limit = { - is_ai = yes - highest_held_title_tier = tier_county - } - ai_sociability >= 100 - } - } - is_adult = no - ai_activity_war_check = yes - ai_activity_coronation_check = yes - } - - can_start_showing_failures_only = { - NOT = { is_activity_type_on_cooldown = activity_playdate } - is_available = yes - age >= 4 - age < less_than_two_years_to_adulthood_value #Consistency! - trigger_if = { - limit = { - highest_held_title_tier = tier_county - liege = root - } - highest_held_title_tier >= tier_county - } - is_landed_or_landless_administrative_or_theocratic = yes - } - - is_valid = { - scope:host = { - is_physically_able = yes - is_landed_or_landless_administrative_or_theocratic = 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 - } - } - else_if = { # No one shows up - limit = { - has_attending_activity_guests = no - } - scope:host = { - trigger_event = playdate.2003 - } - } - else = { - invalidation_unlanded_non_nf_effect = yes - invalidation_incapable_effect = yes - invalidation_host_isolated_effect = yes - } - } - - 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 - pam_vows_of_poverty_host_completion_piety_effect = yes - } - else = { - trigger_event = playdate.9002 - } - } - } - } - - wait_time_before_start = { days = 7 } - max_guest_arrival_delay_time = { months = 5 } - - - ################### - # 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 - } - add = activity_general_ai_will_do_value - } - - 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 - ################### - - header_background = "gfx/interface/illustrations/activity_header_backgrounds/activity_playdate.dds" - - # 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 deleted file mode 100644 index c60950043..000000000 --- a/common/activities/activity_types/tour.txt +++ /dev/null @@ -1,4203 +0,0 @@ -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 } - ai_activity_coronation_check = yes - } - - 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 - is_physically_able = yes - is_in_civil_war = no - } - } - - on_invalidated = { - # use list so can't simply use scripted effects here - # 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 - } - } - 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 = { - variable = tour_vassals_to_visit - trigger_event = activity_system.0331 - } - } - else_if = { - limit = { - scope:host = { is_imprisoned = yes } - } - scope:activity = { - activity_type = { save_scope_as = activity_type } - } - scope:host = { trigger_event = activity_system.0550 } - every_in_list = { - variable = tour_vassals_to_visit - trigger_event = activity_system.0551 - } - } - # 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 - highest_held_title_tier >= tier_county - } - } - 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 - } - add = activity_general_ai_will_do_value - 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 = { - OR = { - has_treasury = no - government_has_flag = government_is_theocracy - } - } - 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 - NOT = { government_has_flag = government_is_theocracy } - } - 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 = { - OR = { - has_treasury = no - government_has_flag = government_is_theocracy - } - } - # 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 - NOT = { government_has_flag = government_is_theocracy } - } - # 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 = { - default = { - has_personal_tenet_flag = tenet_vows_of_poverty_humble_host - } - cost = { - gold = { - value = 0 - if = { - limit = { - OR = { - has_treasury = no - government_has_flag = government_is_theocracy - } - } - 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 - NOT = { government_has_flag = government_is_theocracy } - } - 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 = { - NOT = { has_personal_tenet_flag = tenet_vows_of_poverty_humble_host } - } - 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 = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - custom_tooltip = { - text = more_than_5_courtiers - any_courtier_or_guest = { count > 5 } - } - } - - ai_will_do = { - value = 50 - } - - cost = { - gold = { - value = 0 - if = { - limit = { - OR = { - has_treasury = no - government_has_flag = government_is_theocracy - } - } - 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 - NOT = { government_has_flag = government_is_theocracy } - } - 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 = { - OR = { - has_treasury = no - government_has_flag = government_is_theocracy - } - } - 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 - NOT = { government_has_flag = government_is_theocracy } - } - 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 = { - default = { - has_personal_tenet_flag = tenet_vows_of_poverty_humble_host - } - cost = { - gold = { - value = 0 - if = { - limit = { - OR = { - has_treasury = no - government_has_flag = government_is_theocracy - } - } - 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 - NOT = { government_has_flag = government_is_theocracy } - } - 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 = { - is_valid = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - } - default = { - NOT = { has_personal_tenet_flag = tenet_vows_of_poverty_humble_host } - } - cost = { - gold = { - value = 0 - if = { - limit = { - OR = { - has_treasury = no - government_has_flag = government_is_theocracy - } - } - 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 - NOT = { government_has_flag = government_is_theocracy } - } - 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 = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - 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 = { - OR = { - has_treasury = no - government_has_flag = government_is_theocracy - } - } - 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 - NOT = { government_has_flag = government_is_theocracy } - } - 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 = { - OR = { - has_treasury = no - government_has_flag = government_is_theocracy - } - } - 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 - NOT = { government_has_flag = government_is_theocracy } - } - 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 = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - 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 = { - OR = { - has_treasury = no - government_has_flag = government_is_theocracy - } - } - 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 - NOT = { government_has_flag = government_is_theocracy } - } - 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 = { - OR = { - has_treasury = no - government_has_flag = government_is_theocracy - } - } - 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 - NOT = { government_has_flag = government_is_theocracy } - } - 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 = { - OR = { - has_treasury = no - government_has_flag = government_is_theocracy - } - } - 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 - NOT = { government_has_flag = government_is_theocracy } - } - 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 = { - OR = { - has_treasury = no - government_has_flag = government_is_theocracy - } - } - 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 - NOT = { government_has_flag = government_is_theocracy } - } - 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 - modifier = { - is_acclaimed = yes - add = 20 - desc = ACTIVITY_GUEST_ACCLAIMED_KNIGHT_REASON - } - } - - 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 - - apa_passive_religious_learning_host apa_passive_religious_learning_guest - } - 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 - } - } - random_knight = { - limit = { - can_unlock_accolade_attribute_trigger = { - ATTRIBUTE = reeve - } - } - weight = { - base = -10 - modifier = { - add = stewardship - factor = 1.5 - } - modifier = { - add = 10 - is_acclaimed = yes - } - modifier = { - add = 10 - involved_activity ?= scope:activity - } - } - save_scope_as = accolade_knight - liege = { - save_scope_as = accolade_liege - set_variable = { - name = accolade_progress - value = 0 - } - send_interface_message = { - type = msg_accolade_eligibility - title = accolade_reeve_unlock.t - left_icon = scope:accolade_knight - right_icon = scope:accolade_liege - custom_tooltip = accolade_reeve_unlock.tt - scope:accolade_knight = { - set_variable = { - name = reeve_attribute_unlock - 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" - - ################### - # GRAPHICS - ################### - - header_background = "gfx/interface/illustrations/activity_header_backgrounds/activity_tour.dds" - - # 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 deleted file mode 100644 index f5bf0df56..000000000 --- a/common/activities/activity_types/wedding.txt +++ /dev/null @@ -1,4120 +0,0 @@ -activity_wedding = { - is_shown = { - highest_held_title_tier > tier_barony - is_landed_or_landless_administrative_or_theocratic = yes - # DLC locked - has_dlc_feature = tours_and_tournaments - has_dlc_feature = advanced_activities - ai_activity_war_check = yes - ai_activity_coronation_check = yes - } - - 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 } - NOT = { any_invited_activity = {} } - } - var:promised_grand_wedding_marriage_countdown.betrothed = { - is_valid_grand_wedding_special_guest_trigger = { OTHER_SPOUSE = root.var:promised_grand_wedding_marriage_countdown } - NOT = { any_invited_activity = {} } - } - } - } - } - - # 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 - } - is_bloody_wedding = yes - } - } - } - # 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_or_theocratic = yes - # The new host being only a baron will invalidate - highest_held_title_tier >= tier_county - # Incapable host will invalidate - is_physically_able = 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 - is_bloody_wedding = yes - death_reason = death_bloody_wedding - } - } - } - } - } - - 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 - } - } - } - - # player can't be spouse_2 but can be other attandee! - if = { - limit = { - scope:activity = { - has_variable = wedding_invalidated_said_no - } - scope:spouse_1 ?= { is_alive = yes } - } - scope:spouse_1 = { trigger_event = ep2_wedding.0152 } - scope:activity = { - every_attending_character = { - limit = { - NOR = { - scope:spouse_1 ?= this - scope:spouse_2 ?= this - } - } - trigger_event = ep2_wedding.0153 - } - } - } - - # 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 - } - } - - # The new host doesn't meet the tier requirements - else_if = { - limit = { - scope:host = { - OR = { - highest_held_title_tier < tier_county - is_landed_or_landless_administrative_or_theocratic = no - } - } - } - 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 - } - #you're not in a murder wedding - OR = { - is_bloody_wedding = no - scope:activity.var:spouse_2_var ?= { - NOT = { death_reason = death_bloody_wedding } - } - } - } - } - } - 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 - } - } - } - - # to check in correct order and reuse effects - else = { - invalidation_host_or_special_guest_isolated_effect = yes - invalidation_nobody_present_effect = yes - if = { - limit = { - scope:activity = { - NOT = { has_variable = invalidation_effect_set } - } - } - # Emergency Invalidation: one of the spouses is not coming for some reason - 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 } - 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.0997 - } - } - } - else = { - scope:activity = { - every_attending_character = { - trigger_event = ep2_wedding.0998 - } - } - } - } - scope:host = { - clean_grand_wedding_betrothal_variables = yes - } - } - #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 = { var:officiant ?= { is_alive = yes } } - var: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 - } - } - - scope:host = { - clean_grand_wedding_betrothal_variables = yes - } - } - - 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 = { - scope:host.player_heir ?= { - OR = { - involved_activity ?= scope:activity - AND = { - location = scope:activity.activity_location - is_available_allow_travelling = yes - NOT = { exists = involved_activity } - } - } - } - scope:host = { - NOR = { - this = scope:spouse_1 - this = scope:spouse_2 - } - } - } - scope:host.player_heir = { - save_scope_as = new_host - if = { - limit = { NOT = { exists = involved_activity } } - add_to_activity = scope:activity - } - } - } - else_if = { - limit = { - scope:spouse_1 = { is_landed_or_landless_administrative_or_theocratic = yes } - } - scope:spouse_1 = { save_scope_as = new_host } - } - else_if = { - limit = { - scope:spouse_2 = { is_landed_or_landless_administrative_or_theocratic = yes } - } - scope:spouse_2 = { save_scope_as = new_host } - } - # Otherwise, spouse_1 takes over (and invalidate at once) - 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 = activity_general_ai_will_do_value - - 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" - } - } - #Kizuki Taisha - if = { - limit = { has_building = izumo_taisha_01 } - add = { - value = 30 - desc = "Kizuki Taisha" - } - } - } - - 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 - } - #Kizuki Taisha - if = { - limit = { has_building = izumo_taisha_01 } - add = 30 - } - } - - 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 = { has_building = izumo_taisha_01 } - desc = province_desc_wedding_izumo_taisha - } - 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 spread_personal_tenet_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 = { - default = { - has_personal_tenet_flag = tenet_vows_of_poverty_humble_host - } - # 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 = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - } - default = { - NOT = { has_personal_tenet_flag = tenet_vows_of_poverty_humble_host } - } - # 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 = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - } - # 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 = { - default = { - has_personal_tenet_flag = tenet_vows_of_poverty_humble_host - } - # 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 = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - } - default = { - NOT = { has_personal_tenet_flag = tenet_vows_of_poverty_humble_host } - } - # 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 = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - } - # 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 = { - default = { - has_personal_tenet_flag = tenet_vows_of_poverty_humble_host - } - # 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 = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - } - default = { - NOT = { has_personal_tenet_flag = tenet_vows_of_poverty_humble_host } - } - # 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 = { - pam_vows_of_poverty_premium_activity_option_valid_trigger = yes - } - # 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 } - if = { - limit = { this = scope: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 - } - } - wedding_assign_officiant_effect = yes - } - - # 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 = { - is_bloody_wedding = yes - } - - if = { #if you have the wedding night kill we progress to that - limit = { - var:bloody_wedding_murder ?= flag:spouse - } - 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 = { - is_bloody_wedding = no - scope:host = { var:bloody_wedding_murder ?= flag:spouse } - } - } - 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 = { - is_bloody_wedding = yes - } - if = { - limit = { - scope:host = scope:activity.special_guest:spouse_1 #if you're the spouse - scope:host = { var:bloody_wedding_murder ?= flag:spouse } #and you've chosen to kill them during the wedding night - } - scope:host = { trigger_event = ep2_wedding.3060 } - } - } - # For a regular wedding - else = { - # Fires only for the spouses - if = { - limit = { - 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 and host - else = { - 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 - 2 = activity_invite_rule_clergy - 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 spread_personal_tenet_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 spread_personal_tenet_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 - activity_guest_clergy_shared_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 - desc = acclaimed_knight_feast_wedding_invite_acceptance_bonus_tt - } - } - - 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 apa_passive_religious_learning_host apa_passive_religious_learning_guest apa_pam_spread_tenet_host apa_pam_spread_tenet_guest apa_pam_mendicant_preachers_conversion } - 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 - NOT = { is_close_family_or_spouse_trigger = { CHARACTER = scope:host } } - } - } - } - 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 = { - is_bloody_wedding = yes - scope:activity = { - 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 = { - is_successful_bloody_wedding = yes - } - 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 - } - if = { - limit = { - this = scope:host - } - random_knight = { - limit = { - can_unlock_accolade_attribute_trigger = { - ATTRIBUTE = politicker - } - } - weight = { - base = 1 - modifier = { - add = 50 - is_acclaimed = yes - } - modifier = { - add = 50 - involved_activity ?= scope:activity - } - } - save_scope_as = accolade_knight - liege = { - save_scope_as = accolade_liege - set_variable = { - name = accolade_progress - value = 0 - } - send_interface_message = { - type = msg_accolade_eligibility - title = accolade_politicker_unlock.t_wedding - left_icon = scope:accolade_knight - right_icon = scope:accolade_liege - custom_tooltip = accolade_politicker_unlock.tt - scope:accolade_knight = { - set_variable = { - name = politicker_attribute_unlock - value = yes - } - } - } - } - } - } - # Rewards for Bloody Weddings given out in event ep2_wedding.0955 - - # Rewards for Normal Weddings - if = { - limit = { - is_bloody_wedding = no - } - 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 - is_successful_bloody_wedding = yes - } - set_global_variable = { - name = finished_black_dinner_achievement - value = yes - } - } - } - } - # Free the officiant! - if = { - limit = { has_character_flag = officiant } - if = { - limit = { has_character_flag = need_priest_outfit } - remove_character_flag = need_priest_outfit - } - 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" - - ################### - # GRAPHICS - ################### - - header_background = "gfx/interface/illustrations/activity_header_backgrounds/activity_wedding.dds" - - # 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 = { - 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 = { 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 - } - } - } -}