From 15a5108e230e6b6740048c59605969554a1dbf5f Mon Sep 17 00:00:00 2001 From: Heidesommer Date: Sat, 25 Apr 2026 03:54:05 -0400 Subject: [PATCH] Alignment --- common/accolade_names/00_accolade_names.txt | 5 + .../activities/activity_types/coronation.txt | 2135 +- common/activities/activity_types/feast.txt | 87 +- common/activities/activity_types/funeral.txt | 2 +- common/activities/activity_types/hike.txt | 33 +- common/activities/activity_types/hunt.txt | 130 +- .../activities/activity_types/pilgrimage.txt | 101 +- common/activities/activity_types/playdate.txt | 2 +- common/activities/activity_types/tour.txt | 51 +- common/activities/activity_types/wedding.txt | 362 +- common/casus_belli_types/00_religious_war.txt | 31 +- common/casus_belli_types/07_ep3_wars.txt | 200 +- common/character_interactions/00_alliance.txt | 5 +- .../00_ce1_interactions.txt | 2 +- .../00_character_interactions.txt | 36 +- .../00_culture_interactions.txt | 11 +- .../00_diarch_interactions.txt | 291 +- .../00_invite_agent_to_scheme.txt | 94 + .../00_marriage_interactions.txt | 698 +- .../00_modifiy_vassal_contract.txt | 177 +- .../00_prison_interactions.txt | 1519 +- .../00_religious_interactions.txt | 48 +- .../00_scheme_interactions.txt | 6 +- .../00_tradition_interactions.txt | 30 +- .../00_tribal_interactions.txt | 62 +- .../00_tributary_interactions.txt | 46 +- .../00_vassal_interactions.txt | 31 +- common/character_interactions/00_war.txt | 4 +- .../03_fp2_interactions.txt | 110 +- .../06_ep3_laamp_interactions.txt | 80 +- .../09_mpo_interactions.txt | 104 +- .../tgp_tribute_mission_interactions.txt | 3 +- common/council_tasks/00_chancellor_tasks.txt | 24 +- common/culture/eras/00_culture_eras.txt | 131 - .../culture/innovations/tgp_innovations.txt | 12 +- common/culture/name_equivalency/00_names.txt | 4 +- .../traditions/00_realm_traditions.txt | 229 +- .../traditions/00_societal_traditions.txt | 1 + .../culture/traditions/03_fp3_traditions.txt | 1 + .../00_government_custom_loc.txt | 16 +- .../00_greeting_custom_loc.txt | 2 +- .../00_ruler_transition_loc.txt | 39 +- .../05_bp2_custom_loc.txt | 6 + .../tgp_custom_loc.txt | 10 +- .../00_major_decisions_east_europe.txt | 6 +- common/decisions/10_religious_decisions.txt | 22 +- common/decisions/80_major_decisions_roman.txt | 33 +- .../dlc_decisions/03_fp2_decisions.txt | 233 +- common/defines/00_defines.txt | 58 +- .../domiciles/buildings/00_camp_buildings.txt | 49 +- .../buildings/00_chinese_estate_buildings.txt | 164 +- .../domiciles/buildings/00_yurt_buildings.txt | 548 +- .../buildings/10_japanese_manor_buildings.txt | 349 +- common/factions/00_factions.txt | 142 +- common/game_concepts/00_game_concepts.txt | 31 +- common/governments/00_government_types.txt | 95 +- common/laws/00_succession_laws.txt | 34 +- common/laws/01_title_succession_laws.txt | 19 +- common/laws/_laws.info | 5 +- .../men_at_arms_types/_men_at_arms_types.info | 1 + .../00_definitions.txt | 56 +- common/modifiers/00_province_modifiers.txt | 6 +- common/on_action/army_on_actions.txt | 195 +- common/on_action/death.txt | 83 +- common/on_action/dlc/mpo/mpo_on_actions_2.txt | 34 +- common/on_action/game_start.txt | 222 +- common/on_action/title_on_actions.txt | 566 +- common/on_action/travel_on_actions.txt | 204 +- .../scheme_types/learn_language_scheme.txt | 3 + common/script_values/00_culture_values.txt | 43 +- .../script_values/00_men_at_arms_values.txt | 4 + common/script_values/02_religion_values.txt | 8 +- .../script_values/04_ep2_wedding_values.txt | 2 +- common/script_values/07_ep3_values.txt | 635 +- .../00_court_character_templates.txt | 7 + .../00_court_position_templates.txt | 1 + ...0_fund_inspiration_character_templates.txt | 3 + .../00_hold_court_character_templates.txt | 9 + .../00_knight_templates.txt | 3 + .../00_mystic_templates.txt | 5 + .../00_officials_templates.txt | 3 + .../00_peasant_leader_templates.txt | 2 + .../00_physician_character_template.txt | 3 + ..._pool_repopulation_character_templates.txt | 3 +- .../00_priest_character_template.txt | 4 + .../00_saharan_nomad_template.txt | 1 + .../00_scholar_template.txt | 4 + .../00_scripted_character_templates.txt | 1 + .../00_soldier_character_templates.txt | 12 + .../00_terrain_specialist_templates.txt | 8 + .../01_bp1_filippa_character_templates.txt | 6 + .../01_ep1_character_templates.txt | 3 +- .../01_fp1_character_templates.txt | 7 + .../01_tgp_japan_character_templates.txt | 2 + .../03_fp2_character_templates.txt | 8 + .../04_ep2_accolade_character_templates.txt | 2823 +- .../04_ep2_character_templates.txt | 16 + .../04_ep2_character_templates_james.txt | 1 + .../04_ep2_james_character_templates.txt | 1 + .../04_fp3_character_templates.txt | 8 +- .../05_bp2_character_templates.txt | 4 + .../07_ep3_character_templates.txt | 4 + .../09_mpo_character_templates.txt | 2 + .../tgp_character_templates.txt | 77 +- .../scripted_effects/00_faction_effects.txt | 1 + .../00_major_decisions_scripted_effects.txt | 13 +- .../00_mongol_invasion_effects.txt | 2 +- .../07_dlc_ep3_scripted_effects.txt | 990 +- .../09_dlc_mpo_scripted_effects.txt | 731 +- .../tgp_debate_scripted_effects.txt | 18 +- ..._imperial_examination_scripted_effects.txt | 113 +- .../tgp_mandala_scripted_effects.txt | 181 +- .../tgp_tribute_mission_scripted_effects.txt | 4 +- .../00_building_requirement_triggers.txt | 55 +- .../00_clothing_triggers.txt | 95 +- .../00_councillor_triggers.txt | 104 +- .../00_government_triggers.txt | 12 +- .../00_illustration_triggers.txt | 7 +- .../scripted_triggers/00_laamp_triggers.txt | 30 +- .../00_marriage_triggers.txt | 121 +- .../00_relation_triggers.txt | 46 +- .../00_religious_triggers.txt | 2 +- .../00_scripted_rule_triggers.txt | 4 +- .../00_war_and_peace_triggers.txt | 20 +- .../02_ep1_scripted_triggers.txt | 10 +- .../03_fp2_scripted_triggers.txt | 25 +- common/scripted_triggers/07_ep3_triggers.txt | 89 +- .../09_mpo_greatest_of_khans_triggers.txt | 1 + .../10_ach_scripted_triggers.txt | 58 +- common/scripted_triggers/10_tgp_triggers.txt | 295 +- .../mpo_scripted_triggers.txt | 308 +- .../10_tgp_dynastic_cycle_catalysts.txt | 1 + .../00_situation_group_types.txt | 4 + .../situation/situations/the_great_steppe.txt | 4 +- .../contracts/_subject_contracts.info | 2 +- .../contracts/administrative.txt | 7 +- .../subject_contracts/contracts/celestial.txt | 12 +- .../contracts/meritocratic.txt | 3 + .../task_contracts/laamp_base_contracts.txt | 12 +- .../task_contracts/laamp_extra_contracts.txt | 5 + .../laamp_transport_contracts.txt | 20 +- .../tgp_natural_disaster_contracts.txt | 2 + common/traits/00_traits.txt | 516 +- events/_events.info | 313 +- events/accolade_events.txt | 739 - .../coronation_activity/coronation_events.txt | 97 +- .../coronation_events_1.txt | 1048 +- .../coronation_events_6.txt | 1297 +- .../hold_court_events_general.txt | 114 +- .../pilgrimage_activity/pilgrimage_events.txt | 48 +- .../tour_grounds_events_chad.txt | 6 +- .../tour_phase_cultural_festival.txt | 34 +- .../tour_activity/tour_travel_events.txt | 9 +- .../artifacts/historical_artifacts_events.txt | 239 +- events/birth_events.txt | 22 +- events/bp1_dan_events.txt | 8 +- events/court_events/01_ep3_court_events_3.txt | 49 +- events/court_events/court_events_general.txt | 48 +- .../court_events/court_events_general_1.txt | 10 +- events/court_maintenance_events.txt | 8 +- .../decisions_events/east_europe_events.txt | 36 +- .../iberia_north_africa_events.txt | 6 + .../mpo_greatest_of_khans_events.txt | 6 +- .../roman_restoration_events.txt | 6 + events/dlc/ach/ach_coronation_events.txt | 48 +- events/dlc/ach/ach_maintenance_events.txt | 4 +- events/dlc/bp3/bp3_journey_events.txt | 1 - events/dlc/bp3/bp3_survey_events.txt | 40 +- events/dlc/ce1/epidemic_events.txt | 30 +- events/dlc/ce1/legend_events.txt | 98 +- events/dlc/ce1/legend_spread_events_nick.txt | 6 +- events/dlc/ce1/physician_epidemic_events.txt | 2 + events/dlc/ep1/ep1_court_position_events.txt | 6 +- events/dlc/ep1/ep1_flavor_events.txt | 3 +- .../dlc/ep1/ep1_fund_inspiration_events.txt | 46 +- events/dlc/ep2/ep2_accolade_events.txt | 5 +- events/dlc/ep2/ep2_tournament_events.txt | 29242 ++++++++-------- .../ep2_bloody_wedding_events.txt | 62 +- .../ep2/wedding_events/ep2_wedding_events.txt | 412 +- .../ep2_wedding_events_ewan.txt | 24 +- events/dlc/ep3/ep3_contract_events.txt | 73 +- events/dlc/ep3/ep3_decisions_events.txt | 91 +- events/dlc/ep3/ep3_emperor_yearly_2.txt | 324 +- events/dlc/ep3/ep3_emperor_yearly_8.txt | 6 + events/dlc/ep3/ep3_governor_yearly_3.txt | 83 +- events/dlc/ep3/ep3_interactions_events.txt | 142 +- events/dlc/ep3/ep3_laamp_decision_events.txt | 368 +- events/dlc/ep3/ep3_laamp_events.txt | 48 +- events/dlc/ep3/ep3_laamp_events_8.txt | 7 + events/dlc/ep3/ep3_laamp_flavor_oltner.txt | 1 + .../dlc/ep3/ep3_laamp_flavour_ewan_events.txt | 535 +- .../dlc/ep3/ep3_roman_restoration_events.txt | 16 +- .../ep3_story_cycle_admin_eunuch_events.txt | 2 + ...ep3_story_cycle_grand_ambitions_events.txt | 1 + ...ory_cycle_harrying_of_the_north_events.txt | 118 +- .../ep3_story_cycle_violet_poet_events.txt | 4 + events/dlc/ep3/ep3_wedding_events.txt | 20 +- events/dlc/fp1/fp1_jomsvikings_events.txt | 16 +- events/dlc/fp1/fp1_major_decision_events.txt | 140 +- events/dlc/fp1/fp1_other_decision_events.txt | 16 +- events/dlc/fp1/fp1_shieldmaiden_events.txt | 2 +- events/dlc/fp1/fp1_trade_events.txt | 15 +- events/dlc/fp1/fp1_yearly_events.txt | 34 +- events/dlc/fp1/fp1_yearly_events_oltner.txt | 4 +- events/dlc/fp2/fp2_lyonese_monk_events.txt | 6 + events/dlc/fp2/fp2_other_decision_events.txt | 5 +- events/dlc/fp2/fp2_struggle_events.txt | 52 +- events/dlc/fp2/fp2_yearly_events.txt | 711 +- .../dlc/fp3/fp3_dynasty_decision_events.txt | 2 +- events/dlc/fp3/fp3_heritage_events.txt | 2 +- events/dlc/fp3/fp3_misc_decision_events.txt | 2 +- .../dlc/fp3/fp3_religious_decision_events.txt | 2 +- .../fp3/fp3_tax_collector_flavor_events.txt | 11 +- events/dlc/fp3/fp3_yearly_events_eren.txt | 3 + .../dlc/fp3/fp3_yearly_events_ola_batch_1.txt | 11 +- events/dlc/mpo/mpo_decisions_events.txt | 247 +- events/dlc/mpo/mpo_events_ariana.txt | 31 +- events/dlc/mpo/mpo_flavor_events_settled.txt | 5 +- events/dlc/mpo/mpo_jamukha_flavor_events.txt | 2 +- events/dlc/mpo/mpo_migration_events.txt | 2 - .../dlc/mpo/mpo_migration_travel_events.txt | 8 + events/dlc/mpo/mpo_nomad_events_1.txt | 95 +- events/dlc/mpo/mpo_nomads_flavour_events.txt | 15 +- .../mpo_story_cycle_temujin_flavor_events.txt | 2 +- events/error_suppression_events.txt | 26 +- events/game_rule_events.txt | 6 +- events/global_religion_events.txt | 10 +- events/harm_events.txt | 1 + events/health_events.txt | 809 +- events/jester_stress_relief_events.txt | 5 +- .../learning_medicine_events.txt | 35 +- .../martial_authority_events.txt | 47 +- .../martial_chivalry_events.txt | 1 + .../martial_strategy_events.txt | 3 +- events/pregnancy_events.txt | 141 +- events/religion_events/holy_order_events.txt | 49 +- .../religion_events/local_shrine_events.txt | 20 +- .../religious_decision_events.txt | 61 +- .../religious_interaction_events.txt | 107 +- .../court_scheme_ongoing_events.txt | 5 +- .../governor_contract_events.txt | 69 + events/single_combat_events.txt | 13 +- .../mpo_the_great_steppe_events.txt | 7 +- events/title_events.txt | 91 +- events/travel_events/travel_events_james.txt | 25 +- events/witch_events.txt | 97 +- events/yearly_events/bp1_yearly_james.txt | 24 +- events/yearly_events/court_yearly_events.txt | 25 +- history/provinces/e_finland.txt | 4 +- map_data/definition.csv | 2 +- 250 files changed, 31104 insertions(+), 25806 deletions(-) diff --git a/common/accolade_names/00_accolade_names.txt b/common/accolade_names/00_accolade_names.txt index cb8ea8af..c2ea1f4d 100644 --- a/common/accolade_names/00_accolade_names.txt +++ b/common/accolade_names/00_accolade_names.txt @@ -2056,6 +2056,8 @@ accolade_leader_of_the_lieges_maa = { has_innovation = innovation_sarawit has_innovation = innovation_legionnaires has_cultural_parameter = unlock_maa_skoutatoi + has_cultural_parameter = unlock_zhanmadao + has_cultural_parameter = unlock_burenjia } } } @@ -2088,6 +2090,9 @@ accolade_leader_of_the_lieges_maa = { has_cultural_parameter = unlock_maa_monaspa has_innovation = innovation_valets has_cultural_parameter = unlock_maa_conrois + has_cultural_parameter = unlock_maa_cataphract_archers + has_innovation = innovation_tiefutu + has_cultural_parameter = unlock_maa_black_armor_cavalry } } diff --git a/common/activities/activity_types/coronation.txt b/common/activities/activity_types/coronation.txt index b0db9208..8b685678 100644 --- a/common/activities/activity_types/coronation.txt +++ b/common/activities/activity_types/coronation.txt @@ -63,6 +63,52 @@ } } } + # In realms with Ceremonial Lieges, only independent Ceremonial Lieges may hold a Coronation + trigger_if = { + limit = { tgp_realm_has_ceremonial_liege_trigger = yes } + custom_tooltip = { + text = tgp_ceremonial_liege_coronation_trigger + tgp_has_ceremonial_liege_title_trigger = yes + } + } + + trigger_if = { + limit = { + highest_held_title_tier >= tier_empire + faith = { + has_doctrine = doctrine_spiritual_head + has_doctrine = doctrine_imperial_anointment + } + } + faith.religious_head ?= { + save_temporary_scope_as = hof_temp + } + trigger_if = { + limit = { + exists = scope:hof_temp + } + scope:hof_temp = { + custom_description = { + text = HOF_is_ai_tt + is_ai = yes + } + is_available_allow_travelling = yes + } + } + trigger_else = { + custom_description = { + text = HOF_DOESNT_EXIST + exists = scope:hof_temp + } + } + NOT = { has_trait = excommunicated } + trigger_if = { + limit = { + is_ai = no + } + piety_level >= 2 + } + } } is_location_valid = { @@ -70,8 +116,8 @@ trigger_if = { # If it is an anointment, it must happen within the HoF's lands if they hold a holy site limit = { scope:special_option ?= flag:coronation_type_anointment - scope:host.faith.religious_head ?= { - is_landed = yes + scope:host.faith.religious_head ?= { + is_landed = yes faith = { any_holy_site = { barony.holder = { @@ -110,7 +156,7 @@ } } #head of faith has no holy site - scope:host.faith.religious_head ?= { + scope:host.faith.religious_head ?= { OR = { is_landed = no NOT = { @@ -172,134 +218,7 @@ limit = { has_treasury = no } - add = { - value = base_coronation_cost - desc = CORONATION_BASE_COST - } - if = { - limit = { - highest_held_title_tier >= tier_empire - } - add = { - value = 30 - add = { - value = 30 - multiply = activity_cost_scale_by_era - subtract = 30 - } - desc = coronation_empire_req - } - } - #The bigger your realm, the more it costs - if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_empire - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.125 - desc = coronation_realm_size_desc - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.25 - desc = coronation_realm_size_desc - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier = tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.5 - desc = coronation_realm_size_desc - } - } - - #Government types - if = { - limit = { - government_has_flag = government_is_tribal - } - multiply = 0.66 - desc = coronation_tribal_req - } - if = { - limit = { - government_has_flag = government_is_nomadic - } - multiply = 0.1 - desc = coronation_nomadic_reg - } - - #AI discounts - 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 - } - else_if = { - limit = { - is_ai = yes - } - multiply = 0.75 - } - if = { - limit = { - exists = primary_title - primary_title.title_held_years >= 5 - is_ai = yes - } - multiply = 0.5 - } - if = { - limit = { - is_ai = yes - exists = primary_title - OR = { - has_trait = conqueror - has_trait = greatest_of_khans - primary_title.title_held_years >= 10 - } - } - multiply = 0 - } - } - else = { - value = 0 + value = coronation_cost } } } @@ -309,246 +228,18 @@ limit = { has_treasury = yes } - add = { - value = base_coronation_cost - desc = CORONATION_BASE_COST - } - if = { - limit = { - highest_held_title_tier >= tier_empire - } - add = { - value = 30 - add = { - value = 30 - multiply = activity_cost_scale_by_era - subtract = 30 - } - desc = coronation_empire_req - } - } - #The bigger your realm, the more it costs - if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_empire - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.125 - desc = coronation_realm_size_desc - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.25 - desc = coronation_realm_size_desc - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier = tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.5 - desc = coronation_realm_size_desc - } - } - - #Government types - if = { - limit = { - government_has_flag = government_is_tribal - } - multiply = 0.66 - desc = coronation_tribal_req - } - if = { - limit = { - government_has_flag = government_is_nomadic - } - multiply = 0.1 - desc = coronation_nomadic_reg - } - - #AI discounts - 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 - } - else_if = { - limit = { - is_ai = yes - } - multiply = 0.75 - } - if = { - limit = { - exists = primary_title - primary_title.title_held_years >= 5 - is_ai = yes - } - multiply = 0.5 - } - if = { - limit = { - is_ai = yes - exists = primary_title - OR = { - has_trait = conqueror - has_trait = greatest_of_khans - primary_title.title_held_years >= 10 - } - } - multiply = 0 - } - } - else = { - value = 0 + add = coronation_cost } } } herd = { - if = { - limit = { - government_has_flag = government_is_nomadic - } - add = { - value = domicile.medium_herd_value - min = 200 - desc = CORONATION_BASE_COST - } - } - if = { - limit = { - confederation ?= { has_cohesion_level_parameter = any_member_activity_cost_reduced } - } - multiply = { - value = 0.9 - desc = CB_COHESION_PARAMETER_DISCOUNT - } - } - if = { - limit = { - highest_held_title_tier >= tier_empire - government_has_flag = government_is_nomadic - } - add = { - value = domicile.minor_herd_value - min = 200 - desc = coronation_empire_req - } - } - #The bigger your realm, the more it costs - if = { - limit = { - government_has_flag = government_is_nomadic - realm_size >= 1 - highest_held_title_tier > tier_empire - } - add = { - value = realm_size - multiply = 2 - desc = coronation_realm_size_desc - } - } - else_if = { - limit = { - government_has_flag = government_is_nomadic - realm_size >= 1 - highest_held_title_tier = tier_empire - } - add = { - value = realm_size - multiply = 4 - desc = coronation_realm_size_desc - } - } - else_if = { - limit = { - government_has_flag = government_is_nomadic - realm_size >= 1 - highest_held_title_tier < tier_empire - } - add = { - value = realm_size - multiply = 6 - desc = coronation_realm_size_desc - } - } - - #AI discounts - 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 - } - else_if = { - limit = { - is_ai = yes - } - multiply = 0.75 - } - if = { - limit = { - exists = primary_title - primary_title.title_held_years >= 5 - is_ai = yes - } - multiply = 0.5 - } - if = { - limit = { - is_ai = yes - exists = primary_title - OR = { - has_trait = conqueror - has_trait = greatest_of_khans - primary_title.title_held_years >= 10 + add = { + if = { + limit = { + government_has_flag = government_is_nomadic } + value = coronation_cost_herd } - multiply = 0 } } } @@ -597,7 +288,16 @@ var:coronation_primary_title ?= primary_title text = coronation_cancelled_wrong_primary_title_desc } - } + } + + # In realms with Ceremonial Lieges, only independent Ceremonial Lieges may hold a Coronation + trigger_if = { + limit = { tgp_realm_has_ceremonial_liege_trigger = yes } + custom_tooltip = { + text = tgp_ceremonial_liege_coronation_trigger + tgp_has_ceremonial_liege_title_trigger = yes + } + } } } @@ -624,11 +324,26 @@ trigger_event = activity_system.0330 } every_attending_character = { - limit = { NOT = { this = scope:host } } + limit = { this != scope:host } trigger_event = activity_system.0331 } } - + + #Host has different primary title + if = { + limit = { + scope:host = { + has_variable = coronation_primary_title + NOT = { + var:coronation_primary_title = primary_title + } + } + } + every_attending_character = { + limit = { this != scope:host } + trigger_event = coronation_events.0401 + } + } # Host becomes unlanded if = { @@ -655,7 +370,7 @@ } every_attending_character = { limit = { - NOT = { this = scope:host } + this != scope:host } trigger_event = ach_maintenance_events.0100 } @@ -672,7 +387,7 @@ } every_attending_character = { limit = { - NOT = { this = scope:host } + this != scope:host } trigger_event = ach_maintenance_events.0101 } @@ -680,7 +395,7 @@ } # No one shows up - if = { + if = { limit = { has_attending_activity_guests = no } @@ -742,12 +457,10 @@ } scope:host = { remove_character_flag = no_coronation_events + remove_variable = coronation_primary_title + remove_variable = hide_make_primary_title } } - scope:host = { - remove_variable = coronation_primary_title - remove_variable = hide_make_primary_title - } var:officiator ?= { remove_character_flag = coronation_officiator } @@ -760,340 +473,32 @@ ui_predicted_cost = { gold = { add = { - add = { - value = base_coronation_cost - desc = CORONATION_BASE_COST - } if = { limit = { - highest_held_title_tier >= tier_empire - } - add = { - value = 30 - add = { - value = 30 - multiply = activity_cost_scale_by_era - subtract = 30 - } - desc = coronation_empire_req - } - } - #The bigger your realm, the more it costs - if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_empire - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.125 - desc = coronation_realm_size_desc - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.25 - desc = coronation_realm_size_desc - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier = tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.5 - desc = coronation_realm_size_desc - } - } - #Government types - if = { - limit = { - government_has_flag = government_is_tribal - } - multiply = 0.66 - desc = coronation_tribal_req - } - if = { - limit = { - government_has_flag = government_is_nomadic - } - multiply = 0.1 - desc = coronation_nomadic_reg - } - - #Medium ceremony cost - add = { - value = coronation_medium_ceremony_value - add = { - value = coronation_medium_ceremony_value - multiply = activity_cost_scale_by_era - subtract = coronation_medium_ceremony_value - } - #The bigger your realm, the more it costs - if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_empire - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.05 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.1 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier = tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.15 - } - } - if = { - limit = { - has_variable = coronation_discount - } - multiply = 0.5 - } - if = { - limit = { - OR = { - government_has_flag = government_is_nomadic - government_has_flag = government_is_tribal - } - } - multiply = 0.66 - } - } - #Medium feast cost - add = { - value = coronation_medium_feast_value - add = { - value = coronation_medium_feast_value - multiply = activity_cost_scale_by_era - subtract = coronation_medium_feast_value - } - #The bigger your realm, the more it costs - if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_empire - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.1 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.15 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier = tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.2 - } - } - if = { - limit = { - has_variable = coronation_discount - } - multiply = 0.5 - } - if = { - limit = { - OR = { - government_has_flag = government_is_nomadic - government_has_flag = government_is_tribal - } - } - multiply = 0.66 + has_treasury = no } + add = coronation_cost } } - if = { - limit = { - confederation ?= { has_cohesion_level_parameter = any_member_activity_cost_reduced } - } - multiply = { - value = 0.9 - desc = CB_COHESION_PARAMETER_DISCOUNT + } + treasury = { + add = { + if = { + limit = { + has_treasury = yes + } + add = coronation_cost } } } herd = { - if = { - limit = { - government_has_flag = government_is_nomadic - } - add = { - value = domicile.medium_herd_value - min = 200 - desc = CORONATION_BASE_COST - } - } - if = { - limit = { - highest_held_title_tier >= tier_empire - government_has_flag = government_is_nomadic - } - add = { - value = domicile.minor_herd_value - min = 200 - desc = coronation_empire_req - } - } - #The bigger your realm, the more it costs - if = { - limit = { - government_has_flag = government_is_nomadic - realm_size >= 1 - highest_held_title_tier > tier_empire - } - add = { - value = realm_size - multiply = 2 - desc = coronation_realm_size_desc - } - } - else_if = { - limit = { - government_has_flag = government_is_nomadic - realm_size >= 1 - highest_held_title_tier = tier_empire - } - add = { - value = realm_size - multiply = 4 - desc = coronation_realm_size_desc - } - } - else_if = { - limit = { - government_has_flag = government_is_nomadic - realm_size >= 1 - highest_held_title_tier < tier_empire - } - add = { - value = realm_size - multiply = 6 - desc = coronation_realm_size_desc - } - } - - #AI discounts - 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 - } - else_if = { - limit = { - is_ai = yes - } - multiply = 0.75 - } - if = { - limit = { - exists = primary_title - primary_title.title_held_years >= 5 - is_ai = yes - } - multiply = 0.5 - } - if = { - limit = { - is_ai = yes - exists = primary_title - OR = { - has_trait = conqueror - has_trait = greatest_of_khans - primary_title.title_held_years >= 10 + add = { + if = { + limit = { + government_has_flag = government_is_nomadic } + value = coronation_cost_herd } - multiply = 0 } } } @@ -1164,19 +569,8 @@ name = supported_anointments target = root } - is_alive = yes - is_imprisoned = no + is_available_allow_travelling = yes is_ai = yes - has_contagious_deadly_disease_trigger = no - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = homage_liege_scope - has_character_flag = meditation_character_flag - has_character_flag = petition_liege_character_flag - } - } NOT = { has_any_bad_relationship_with_character_trigger = { CHARACTER = root } } @@ -1225,24 +619,11 @@ exists = scope:hof_temp } scope:hof_temp = { - is_alive = yes - is_imprisoned = no + is_available_allow_travelling = yes custom_description = { text = HOF_is_ai_tt is_ai = yes } - has_contagious_deadly_disease_trigger = no - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - is_travelling = yes - exists = involved_activity - has_variable = homage_liege_scope - has_character_flag = meditation_character_flag - has_character_flag = local_shrine_rite - has_character_flag = petition_liege_character_flag - } - } } } trigger_else = { @@ -1257,8 +638,8 @@ limit = { is_ai = no } - piety_level >= 2 - } + piety_level >= 2 + } } ai_will_do = { @@ -1271,7 +652,7 @@ AND = { exists = faith.religious_head faith.religious_head ?= { has_any_bad_relationship_with_character_trigger = { CHARACTER = root } } - } + } } add = -90 } @@ -1330,72 +711,43 @@ OR = { highest_held_title_tier >= tier_empire coronation_has_proper_artifact_trigger = yes - } + } } cost = { gold = { - value = { + add = { if = { limit = { has_treasury = no } - value = coronation_medium_ceremony_value add = { value = coronation_medium_ceremony_value - multiply = activity_cost_scale_by_era - subtract = coronation_medium_ceremony_value + desc = coronation_medium_ceremony } #The bigger your realm, the more it costs - if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_empire - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.05 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.1 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier = tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.15 + add = coronation_medium_ceremony_realm_size_cost + + add = { + value = coronation_medium_ceremony_value + add = coronation_medium_ceremony_realm_size_cost + multiply = { + value = activity_cost_scale_by_era + subtract = 1 } + desc = activity_cost_scale_by_era_desc } + if = { limit = { has_variable = coronation_discount } - multiply = 0.5 + add = { + value = coronation_medium_ceremony_value + add = coronation_medium_ceremony_realm_size_cost + multiply = activity_cost_scale_by_era + multiply = 0.5 + desc = coronation_discount_reg + } } if = { limit = { @@ -1404,47 +756,27 @@ government_has_flag = government_is_tribal } } - multiply = 0.66 - } - if = { - limit = { - is_ai = yes - #Go for the cheap option if you poor - monthly_character_income > 0 - } - multiply = coronation_amenity_ai_discount_value - } - if = { - limit = { - OR = { - has_trait = conqueror - has_trait = greatest_of_khans + add = { + value = coronation_medium_ceremony_value + add = coronation_medium_ceremony_realm_size_cost + multiply = activity_cost_scale_by_era + if = { + limit = { + has_variable = coronation_discount + } + multiply = 0.5 } + multiply = -0.34 + desc = coronation_tribal_nomadic_reg + } + } + if = { + limit = { is_ai = yes } - multiply = 0.1 + multiply = coronation_option_cost_ai_factor } desc = coronation_medium_ceremony - if = { - limit = { - exists = primary_title - primary_title.title_held_years >= 5 - is_ai = yes - } - multiply = 0.5 - } - if = { - limit = { - is_ai = yes - exists = primary_title - OR = { - has_trait = conqueror - has_trait = greatest_of_khans - primary_title.title_held_years >= 10 - } - } - multiply = 0.1 - } } else = { value = 0 @@ -1452,68 +784,39 @@ } } treasury = { #Make sure this matches the gold cost above - value = { + add = { if = { limit = { has_treasury = yes } - value = coronation_medium_ceremony_treasury_value add = { value = coronation_medium_ceremony_treasury_value - multiply = activity_cost_scale_by_era - subtract = coronation_medium_ceremony_treasury_value + desc = coronation_medium_ceremony } #The bigger your realm, the more it costs - if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_empire - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.05 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.1 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier = tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.15 + add = coronation_medium_ceremony_realm_size_cost + + add = { + value = coronation_medium_ceremony_treasury_value + add = coronation_medium_ceremony_realm_size_cost + multiply = { + value = activity_cost_scale_by_era + subtract = 1 } + desc = activity_cost_scale_by_era_desc } + if = { limit = { has_variable = coronation_discount } - multiply = 0.5 + add = { + value = coronation_medium_ceremony_treasury_value + add = coronation_medium_ceremony_realm_size_cost + multiply = activity_cost_scale_by_era + multiply = 0.5 + desc = coronation_discount_reg + } } if = { limit = { @@ -1522,47 +825,27 @@ government_has_flag = government_is_tribal } } - multiply = 0.66 - } - if = { - limit = { - is_ai = yes - #Go for the cheap option if you poor - monthly_character_income > 0 - } - multiply = coronation_amenity_ai_discount_value - } - if = { - limit = { - OR = { - has_trait = conqueror - has_trait = greatest_of_khans + add = { + value = coronation_medium_ceremony_treasury_value + add = coronation_medium_ceremony_realm_size_cost + multiply = activity_cost_scale_by_era + if = { + limit = { + has_variable = coronation_discount + } + multiply = 0.5 } + multiply = -0.34 + desc = coronation_tribal_nomadic_reg + } + } + if = { + limit = { is_ai = yes } - multiply = 0.1 + multiply = coronation_option_cost_ai_factor } desc = coronation_medium_ceremony - if = { - limit = { - exists = primary_title - primary_title.title_held_years >= 5 - is_ai = yes - } - multiply = 0.5 - } - if = { - limit = { - is_ai = yes - exists = primary_title - OR = { - has_trait = conqueror - has_trait = greatest_of_khans - primary_title.title_held_years >= 10 - } - } - multiply = 0.1 - } } else = { value = 0 @@ -1631,68 +914,39 @@ coronation_large_ceremony = { cost = { gold = { - value = { + add = { if = { limit = { has_treasury = no } - value = coronation_large_ceremony_value add = { value = coronation_large_ceremony_value - multiply = activity_cost_scale_by_era - subtract = coronation_large_ceremony_value + desc = coronation_large_ceremony } #The bigger your realm, the more it costs - if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_empire - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.15 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.2 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier = tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.3 + add = coronation_large_ceremony_realm_size_cost + + add = { + value = coronation_large_ceremony_value + add = coronation_large_ceremony_realm_size_cost + multiply = { + value = activity_cost_scale_by_era + subtract = 1 } + desc = activity_cost_scale_by_era_desc } + if = { limit = { has_variable = coronation_discount } - multiply = 0.5 + add = { + value = coronation_large_ceremony_value + add = coronation_large_ceremony_realm_size_cost + multiply = activity_cost_scale_by_era + multiply = 0.5 + desc = coronation_discount_reg + } } if = { limit = { @@ -1701,97 +955,67 @@ government_has_flag = government_is_tribal } } - multiply = 0.66 - } - if = { - limit = { - is_ai = yes - #Go for the cheap option if you poor - monthly_character_income > 0 - } - multiply = coronation_amenity_ai_discount_value - } - if = { - limit = { - OR = { - has_trait = conqueror - has_trait = greatest_of_khans + add = { + value = coronation_large_ceremony_value + add = coronation_large_ceremony_realm_size_cost + multiply = activity_cost_scale_by_era + if = { + limit = { + has_variable = coronation_discount + } + multiply = 0.5 } + multiply = -0.34 + desc = coronation_tribal_nomadic_reg + } + } + if = { + limit = { is_ai = yes } - multiply = 0.25 + multiply = coronation_option_cost_ai_factor } - desc = coronation_medium_ceremony + desc = coronation_large_ceremony } else = { value = 0 } } - } - treasury = { - value = { + treasury = { #Make sure this matches the gold cost above + add = { if = { limit = { has_treasury = yes } - value = coronation_large_ceremony_treasury_value add = { value = coronation_large_ceremony_treasury_value - multiply = activity_cost_scale_by_era - subtract = coronation_large_ceremony_treasury_value + desc = coronation_large_ceremony } #The bigger your realm, the more it costs - if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_empire - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.15 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.2 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier = tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.3 + add = coronation_large_ceremony_realm_size_cost + + add = { + value = coronation_large_ceremony_treasury_value + add = coronation_large_ceremony_realm_size_cost + multiply = { + value = activity_cost_scale_by_era + subtract = 1 } + desc = activity_cost_scale_by_era_desc } + if = { limit = { has_variable = coronation_discount } - multiply = 0.5 + add = { + value = coronation_large_ceremony_treasury_value + add = coronation_large_ceremony_realm_size_cost + multiply = activity_cost_scale_by_era + multiply = 0.5 + desc = coronation_discount_reg + } } if = { limit = { @@ -1800,27 +1024,27 @@ government_has_flag = government_is_tribal } } - multiply = 0.66 - } - if = { - limit = { - is_ai = yes - #Go for the cheap option if you poor - monthly_character_income > 0 - } - multiply = coronation_amenity_ai_discount_value - } - if = { - limit = { - OR = { - has_trait = conqueror - has_trait = greatest_of_khans + add = { + value = coronation_large_ceremony_treasury_value + add = coronation_large_ceremony_realm_size_cost + multiply = activity_cost_scale_by_era + if = { + limit = { + has_variable = coronation_discount + } + multiply = 0.5 } + multiply = -0.34 + desc = coronation_tribal_nomadic_reg + } + } + if = { + limit = { is_ai = yes } - multiply = 0.25 + multiply = coronation_option_cost_ai_factor } - desc = coronation_medium_ceremony + desc = coronation_large_ceremony } else = { value = 0 @@ -1943,61 +1167,38 @@ } cost = { gold = { - value = { + add = { if = { limit = { has_treasury = no } - value = coronation_medium_feast_value add = { value = coronation_medium_feast_value - multiply = activity_cost_scale_by_era - subtract = coronation_medium_feast_value + desc = ceremony_feast_type_regular } #The bigger your realm, the more it costs + add = coronation_medium_feast_realm_size_cost + + add = { + value = coronation_medium_feast_value + add = coronation_medium_feast_realm_size_cost + multiply = { + value = activity_cost_scale_by_era + subtract = 1 + } + desc = activity_cost_scale_by_era_desc + } + if = { limit = { - realm_size >= 1 - highest_held_title_tier > tier_empire + has_variable = coronation_discount } add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.1 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.15 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier = tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.2 + value = coronation_medium_feast_value + add = coronation_medium_feast_realm_size_cost + multiply = activity_cost_scale_by_era + multiply = 0.5 + desc = coronation_discount_reg } } if = { @@ -2007,115 +1208,66 @@ government_has_flag = government_is_tribal } } - multiply = 0.66 - } - if = { - limit = { - has_variable = coronation_discount - } - multiply = 0.5 - } - if = { - limit = { - is_ai = yes - #Go for the cheap option if you poor - monthly_character_income > 0 - } - multiply = coronation_amenity_ai_discount_value - } - if = { - limit = { - OR = { - has_trait = conqueror - has_trait = greatest_of_khans + add = { + value = coronation_medium_feast_value + add = coronation_medium_feast_realm_size_cost + multiply = activity_cost_scale_by_era + if = { + limit = { + has_variable = coronation_discount + } + multiply = 0.5 } + multiply = -0.34 + desc = coronation_tribal_nomadic_reg + } + } + if = { + limit = { is_ai = yes } - multiply = 0.1 + multiply = coronation_option_cost_ai_factor } desc = ceremony_feast_type_regular - if = { - limit = { - exists = primary_title - primary_title.title_held_years >= 5 - is_ai = yes - } - multiply = 0.5 - } - if = { - limit = { - is_ai = yes - exists = primary_title - OR = { - has_trait = conqueror - has_trait = greatest_of_khans - primary_title.title_held_years >= 10 - } - } - multiply = 0.1 - } } else = { value = 0 } } } - treasury = { - value = { + treasury = { #Make sure this matches the gold cost above + add = { if = { limit = { has_treasury = yes } - value = coronation_medium_feast_treasury_value add = { value = coronation_medium_feast_treasury_value - multiply = activity_cost_scale_by_era - subtract = coronation_medium_feast_treasury_value + desc = ceremony_feast_type_regular } #The bigger your realm, the more it costs + add = coronation_medium_feast_realm_size_cost + + add = { + value = coronation_medium_feast_treasury_value + add = coronation_medium_feast_realm_size_cost + multiply = { + value = activity_cost_scale_by_era + subtract = 1 + } + desc = activity_cost_scale_by_era_desc + } + if = { limit = { - realm_size >= 1 - highest_held_title_tier > tier_empire + has_variable = coronation_discount } add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.1 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.15 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier = tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.2 + value = coronation_medium_feast_treasury_value + add = coronation_medium_feast_realm_size_cost + multiply = activity_cost_scale_by_era + multiply = 0.5 + desc = coronation_discount_reg } } if = { @@ -2125,53 +1277,27 @@ government_has_flag = government_is_tribal } } - multiply = 0.66 - } - if = { - limit = { - has_variable = coronation_discount - } - multiply = 0.5 - } - if = { - limit = { - is_ai = yes - #Go for the cheap option if you poor - monthly_character_income > 0 - } - multiply = coronation_amenity_ai_discount_value - } - if = { - limit = { - OR = { - has_trait = conqueror - has_trait = greatest_of_khans + add = { + value = coronation_medium_feast_treasury_value + add = coronation_medium_feast_realm_size_cost + multiply = activity_cost_scale_by_era + if = { + limit = { + has_variable = coronation_discount + } + multiply = 0.5 } + multiply = -0.34 + desc = coronation_tribal_nomadic_reg + } + } + if = { + limit = { is_ai = yes } - multiply = 0.1 + multiply = coronation_option_cost_ai_factor } desc = ceremony_feast_type_regular - if = { - limit = { - exists = primary_title - primary_title.title_held_years >= 5 - is_ai = yes - } - multiply = 0.5 - } - if = { - limit = { - is_ai = yes - exists = primary_title - OR = { - has_trait = conqueror - has_trait = greatest_of_khans - primary_title.title_held_years >= 10 - } - } - multiply = 0.1 - } } else = { value = 0 @@ -2247,68 +1373,39 @@ ceremony_feast_type_lavish = { cost = { gold = { - value = { + add = { if = { limit = { has_treasury = no } - value = coronation_large_feast_value add = { value = coronation_large_feast_value - multiply = activity_cost_scale_by_era - subtract = coronation_large_feast_value + desc = ceremony_feast_type_lavish } #The bigger your realm, the more it costs - if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_empire - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.3 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.45 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier = tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.6 + add = coronation_large_feast_realm_size_cost + + add = { + value = coronation_large_feast_value + add = coronation_large_feast_realm_size_cost + multiply = { + value = activity_cost_scale_by_era + subtract = 1 } + desc = activity_cost_scale_by_era_desc } + if = { limit = { has_variable = coronation_discount } - multiply = 0.5 + add = { + value = coronation_large_feast_value + add = coronation_large_feast_realm_size_cost + multiply = activity_cost_scale_by_era + multiply = 0.5 + desc = coronation_discount_reg + } } if = { limit = { @@ -2317,25 +1414,25 @@ government_has_flag = government_is_tribal } } - multiply = 0.66 - } - if = { - limit = { - is_ai = yes - #Go for the cheap option if you poor - monthly_character_income > 0 - } - multiply = coronation_amenity_ai_discount_value - } - if = { - limit = { - OR = { - has_trait = conqueror - has_trait = greatest_of_khans + add = { + value = coronation_large_feast_value + add = coronation_large_feast_realm_size_cost + multiply = activity_cost_scale_by_era + if = { + limit = { + has_variable = coronation_discount + } + multiply = 0.5 } + multiply = -0.34 + desc = coronation_tribal_nomadic_reg + } + } + if = { + limit = { is_ai = yes } - multiply = 0.25 + multiply = coronation_option_cost_ai_factor } desc = ceremony_feast_type_lavish } @@ -2344,69 +1441,40 @@ } } } - treasury = { - value = { + treasury = { #Make sure this matches the gold cost above + add = { if = { limit = { has_treasury = yes } - value = coronation_large_feast_treasury_value add = { value = coronation_large_feast_treasury_value - multiply = activity_cost_scale_by_era - subtract = coronation_large_feast_treasury_value + desc = ceremony_feast_type_lavish } #The bigger your realm, the more it costs - if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_empire - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.3 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier > tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.45 - } - } - else_if = { - limit = { - realm_size >= 1 - highest_held_title_tier = tier_kingdom - } - add = { - value = realm_size - add = { - value = realm_size - multiply = activity_cost_scale_by_era - subtract = realm_size - } - multiply = 0.6 + add = coronation_large_feast_realm_size_cost + + add = { + value = coronation_large_feast_treasury_value + add = coronation_large_feast_realm_size_cost + multiply = { + value = activity_cost_scale_by_era + subtract = 1 } + desc = activity_cost_scale_by_era_desc } + if = { limit = { has_variable = coronation_discount } - multiply = 0.5 + add = { + value = coronation_large_feast_treasury_value + add = coronation_large_feast_realm_size_cost + multiply = activity_cost_scale_by_era + multiply = 0.5 + desc = coronation_discount_reg + } } if = { limit = { @@ -2415,25 +1483,25 @@ government_has_flag = government_is_tribal } } - multiply = 0.66 - } - if = { - limit = { - is_ai = yes - #Go for the cheap option if you poor - monthly_character_income > 0 - } - multiply = coronation_amenity_ai_discount_value - } - if = { - limit = { - OR = { - has_trait = conqueror - has_trait = greatest_of_khans + add = { + value = coronation_large_feast_treasury_value + add = coronation_large_feast_realm_size_cost + multiply = activity_cost_scale_by_era + if = { + limit = { + has_variable = coronation_discount + } + multiply = 0.5 } + multiply = -0.34 + desc = coronation_tribal_nomadic_reg + } + } + if = { + limit = { is_ai = yes } - multiply = 0.25 + multiply = coronation_option_cost_ai_factor } desc = ceremony_feast_type_lavish } @@ -2554,7 +1622,7 @@ province_filter = holy_sites_realm ai_province_filter = holy_sites_realm - max_guest_arrival_delay_time = { months = 8 } + max_guest_arrival_delay_time = { months = 5 } ai_check_interval = 6 @@ -2727,7 +1795,7 @@ scope:activity = { trigger_if = { limit = { - has_variable_list = blocked_from_detractors + has_variable_list = blocked_from_detractors } NOT = { is_target_in_variable_list = { @@ -2811,8 +1879,8 @@ value >= 20 } } - - NOT = { this = scope:host } + + this != scope:host scope:activity = { trigger_if = { limit = { @@ -3021,7 +2089,7 @@ } } } - + on_weekly_pulse = { if = { #host limit = { @@ -3032,7 +2100,7 @@ } else_if = { #major supporter/detractor guest and players limit = { - NOT = { this = scope:host } + this != scope:host } trigger_event = { on_action = coronation_first_phase_guest_events } } @@ -3046,8 +2114,8 @@ on_enter_phase = { if = { - limit = { - this = scope:host + limit = { + this = scope:host has_multiple_players = no } scope:activity = { progress_activity_phase_after = { days = 3 } } @@ -3077,20 +2145,20 @@ on_enter_phase = { scope:activity = { progress_activity_phase_after = { days = 3 } } } - + on_phase_active = { # Intro event for the phase trigger_event = coronation_events.0210 if = { limit = { this = scope:host } - scope:activity = { progress_activity_phase_after = { weeks = 6 } } + scope:activity = { progress_activity_phase_after = { weeks = 3 } } trigger_event = { #Coronation ending events id = coronation_events.0310 - days = 41 + days = 20 } } } - + on_weekly_pulse = { if = { limit = { @@ -3098,15 +2166,12 @@ } trigger_event = { on_action = coronation_third_phase_host_events } } - else_if = { - limit = { - NOT = { this = scope:host } - } + else = { trigger_event = { on_action = coronation_third_phase_guest_events } } } - on_end = { + on_end = { } } } @@ -3128,17 +2193,17 @@ # Feast APAs excellent_food impressed_courtly_vassal hook_trusting_guest leftover_food_giveaway virtuous_feast noble_privileges good_kitty good_puppy antiquarian_admires_artifact jester_entertained_guests apa_executioner 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 # Tournament APAs - tournament_prayed_temple tournament_host_gifted + tournament_prayed_temple tournament_host_gifted # Pilgrimage APAs apa_overcome_with_emotion apa_comet_sighted apa_good_omen # Playdate APAs - apa_joked_together apa_sang_nice_song apa_had_charming_convo + apa_joked_together apa_sang_nice_song apa_had_charming_convo # Hunt APAs hunt_dog_bond hunt_poetic_inspiration # Wedding APAs dynasty_blessing cultural_acceptance royal_gift gossip_with_guests contact_network admired_venue knight_praised poetry_performance music_performance floral_exhibit spouse_impressed # Journey APAs - apa_child_learns_something apa_scribe_makes_notes apa_spotted_by_locals apa_spouse_learns_something apa_ate_local_food apa_entourage_stops_pickpocket + apa_child_learns_something apa_scribe_makes_notes apa_spotted_by_locals apa_spouse_learns_something apa_ate_local_food apa_entourage_stops_pickpocket # Coronation APAs loyalty_pledge nobles_cheer regalia_impresses_attendees supporters_bond detractors_bond befriend_loyalists supporter_stresses_detractor praised_king_together bonded_over_help beautiful_choir_song heir_diplomacy_boost heir_stewardship_boost heir_learning_boost # General Actions @@ -3174,8 +2239,8 @@ 2 = activity_invite_rule_lovers 2 = activity_invite_rule_potential_lovers 1 = activity_invite_rule_hof - - # MP + + # MP 6 = activity_invite_mp } defaults = { @@ -3230,6 +2295,11 @@ add = -1000 desc = coronation_pope_not_anointment } + modifier = { + is_acclaimed = yes + add = 20 + desc = ACTIVITY_GUEST_ACCLAIMED_KNIGHT_REASON + } #Lieges, suzerains and tributaries are a bit more likely to attend modifier = { any_vassal = { @@ -3300,8 +2370,8 @@ name = hide_make_primary_title value = 1 } - } - + } + # Activity Province scope:activity = { if = { @@ -3672,9 +2742,9 @@ value = scope:host.faith.religious_head } } - } + } } - + on_enter_passive_state = { scope:activity = { if = { @@ -3706,7 +2776,7 @@ on_complete = { var:officiator ?= { remove_character_flag = coronation_officiator - } + } if = { limit = { this = scope:host @@ -3871,12 +2941,104 @@ } remove_variable = coronation_primary_title remove_variable = hide_make_primary_title + random_knight = { + limit = { + can_unlock_accolade_attribute_trigger = { + ATTRIBUTE = politicker + } + } + weight = { + base = -10 + modifier = { + add = diplomacy + 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_politicker_unlock.t_coronation + 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 + } + } + } + } + } + hidden_effect = { + accolades_activity_complete_coronation_glory_effect = yes + } + scope:activity.activity_location = { + if = { + limit = { + exists = scope:activity.var:activity_special_type_progression + scope:activity.var:activity_special_type_progression >= 50 + } + if = { + limit = { + has_variable = coronation_tradition_location + } + change_variable = { + name = coronation_tradition_location + add = 1 + } + if = { + limit = { + var:coronation_tradition_location >= 15 + NOT = { has_province_modifier = coronation_ancient_tradition_modifier } + } + add_province_modifier = coronation_ancient_tradition_modifier + remove_province_modifier = coronation_long_tradition_modifier + } + else_if = { + limit = { + var:coronation_tradition_location >= 10 + var:coronation_tradition_location < 15 + NOT = { has_province_modifier = coronation_long_tradition_modifier } + } + add_province_modifier = coronation_long_tradition_modifier + remove_province_modifier = coronation_tradition_modifier + } + else_if = { + limit = { + var:coronation_tradition_location >= 5 + var:coronation_tradition_location < 10 + NOT = { has_province_modifier = coronation_tradition_modifier } + } + add_province_modifier = coronation_tradition_modifier + } + } + else = { + set_variable = { + name = coronation_tradition_location + value = 1 + } + } + } + } } if = { limit = { - NOT = { - this = scope:host - } + this != scope:host } create_character_memory = { type = witnessed_a_coronation_memory @@ -3885,58 +3047,61 @@ } } } - scope:activity.activity_location = { - if = { - limit = { - exists = scope:activity.var:activity_special_type_progression - scope:activity.var:activity_special_type_progression >= 50 - } - if = { - limit = { - has_variable = coronation_tradition_location - } - change_variable = { - name = coronation_tradition_location - add = 1 - } - if = { - limit = { - var:coronation_tradition_location >= 15 - NOT = { has_province_modifier = coronation_ancient_tradition_modifier } - } - add_province_modifier = coronation_ancient_tradition_modifier - remove_province_modifier = coronation_long_tradition_modifier - } - else_if = { - limit = { - var:coronation_tradition_location >= 10 - var:coronation_tradition_location < 15 - NOT = { has_province_modifier = coronation_long_tradition_modifier } - } - add_province_modifier = coronation_long_tradition_modifier - remove_province_modifier = coronation_tradition_modifier - } - else_if = { - limit = { - var:coronation_tradition_location >= 5 - var:coronation_tradition_location < 10 - NOT = { has_province_modifier = coronation_tradition_modifier } - } - add_province_modifier = coronation_tradition_modifier - } - } - else = { - set_variable = { - name = coronation_tradition_location - value = 1 - } - } - } - } # Struggle Catalysts fp3_struggle_catalysts_for_activities_effect = yes } + conclusion_description = { + first_valid = { + triggered_desc = { + trigger = { + coronation_proper_artifact_crown_trigger = yes + } + desc = coronation_conclusion_summary_desc_crown + } + desc = coronation_conclusion_summary_desc + } + + + #Number of supporters who gave their all to the oath + triggered_desc = { + trigger = { + scope:activity = { + has_variable = supporters_pledge_var + var:supporters_pledge_var > 1 + } + } + desc = coronation_supporters_pledge_total + } + triggered_desc = { + trigger = { + scope:activity = { + has_variable = supporters_pledge_var + var:supporters_pledge_var = 1 + } + } + desc = coronation_supporters_pledge_total_1 + } + #Number of detractors who scorned the oath of loyalty + triggered_desc = { + trigger = { + scope:activity = { + has_variable = detractors_scorned_pledge_var + var:detractors_scorned_pledge_var > 1 + } + } + desc = coronation_detractors_scorned_pledge_total + } + triggered_desc = { + trigger = { + scope:activity = { + has_variable = detractors_scorned_pledge_var + var:detractors_scorned_pledge_var = 1 + } + } + desc = coronation_detractors_scorned_pledge_total_1 + } + } ### Plugin widgets activity_window_widgets = { @@ -3950,7 +3115,7 @@ # Find an important character guest = { camera = camera_body_right - + effect = { if = { limit = { @@ -3972,9 +3137,7 @@ } limit = { location = scope:activity.activity_location - NOT = { - this = scope:host - } + this != scope:host } add_to_list = characters } @@ -3987,7 +3150,7 @@ # Find the officiant if they exist, otherwise an important character guest = { camera = camera_body_right - + effect = { if = { limit = { @@ -4006,9 +3169,7 @@ any_attending_character = { count >= 4 location = scope:activity.activity_location - NOT = { - this = scope:host - } + this != scope:host } } ordered_attending_character = { @@ -4028,9 +3189,7 @@ position = 3 limit = { location = scope:activity.activity_location - NOT = { - this = scope:host - } + this != scope:host } add_to_list = characters } @@ -4043,7 +3202,7 @@ # Host host = { camera = camera_body - + effect = { if = { limit = { @@ -4057,10 +3216,10 @@ scripted_animation = coronation_host_animation } - + travel_host = { camera = camera_event_horse_left - + effect = { if = { limit = { @@ -4092,7 +3251,7 @@ # Find a family member/spouse/heir guest = { camera = camera_body_left_slight - + effect = { if = { limit = { @@ -4115,7 +3274,7 @@ add = 25 } if = { - limit = { + limit = { this = scope:host.primary_spouse } add = 50 @@ -4129,8 +3288,8 @@ } limit = { location = scope:activity.activity_location - NOR = { - this = scope:host + NOR = { + this = scope:host scope:activity.var:officiator ?= this } } @@ -4145,20 +3304,18 @@ # Find an important member guest = { camera = camera_body_left - + effect = { if = { limit = { scope:host.location = scope:activity.activity_location - scope:activity = { - NOT = { has_current_phase = coronation_phase_coronation } + scope:activity = { + NOT = { has_current_phase = coronation_phase_coronation } } any_attending_character = { count >= 3 location = scope:activity.activity_location - NOT = { - this = scope:host - } + this != scope:host } } ordered_attending_character = { @@ -4178,9 +3335,7 @@ position = 2 limit = { location = scope:activity.activity_location - NOT = { - this = scope:host - } + this != scope:host } add_to_list = characters } @@ -4268,11 +3423,12 @@ } activity_location.culture ?= { OR = { - has_building_gfx = western_building_gfx - has_building_gfx = mediterranean_building_gfx - has_building_gfx = byzantine_building_gfx - has_building_gfx = norse_building_gfx - has_building_gfx = iberian_building_gfx + has_building_gfx = western_building_gfx + has_building_gfx = mediterranean_building_gfx + has_building_gfx = byzantine_building_gfx + has_building_gfx = caucasian_building_gfx + has_building_gfx = norse_building_gfx + has_building_gfx = iberian_building_gfx } } } @@ -4315,7 +3471,7 @@ } has_current_phase = coronation_phase_preparations } - + } texture = "gfx/interface/illustrations/event_scenes/market_east.dds" environment = "environment_event_market_east" @@ -4330,7 +3486,7 @@ } texture = "gfx/interface/illustrations/event_scenes/ep2_holysite_tribal.dds" environment = "environment_event_garden" - ambience = "event:/DLC/FP1/SFX/Events/event_temple" + ambience = "event:/DLC/FP1/SFX/Events/event_temple" } background = { #Constantinople trigger = { @@ -4341,7 +3497,7 @@ } 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" + ambience = "event:/DLC/EP3/SFX/Events/Event_Images/ep3_evn_eventimage_constantinople" } background = { #FP2 trigger = { @@ -4356,8 +3512,8 @@ } } texture = "gfx/interface/illustrations/event_scenes/fp2_courtyard.dds" - environment = "environment_event_fp2_courtyard" - ambience = "event:/DLC/FP2/SFX/Events/courtyard" + environment = "environment_event_fp2_courtyard" + ambience = "event:/DLC/FP2/SFX/Events/courtyard" } background = { #Mandala shrine trigger = { @@ -4367,7 +3523,7 @@ culture = { has_building_gfx = southeast_asian_building_gfx } steppe_building_gfx_use_southeast_asian_trigger = yes } - + } has_current_phase = coronation_phase_preparations } @@ -4389,7 +3545,7 @@ } } texture = "gfx/interface/illustrations/event_scenes/bp1_courtyard_indian.dds" - environment = "environment_event_bp1_courtyard_indian" + environment = "environment_event_bp1_courtyard_indian" ambience = "event:/SFX/Events/Backgrounds/castle_courtyard_western" } background = { #MENA Courtyard @@ -4433,7 +3589,7 @@ } texture = "gfx/interface/illustrations/event_scenes/bp2_courtyard.dds" environment = "environment_bp2_courtyard" - ambience = "event:/DLC/FP2/SFX/Events/courtyard" + ambience = "event:/DLC/FP2/SFX/Events/courtyard" } # Ceremony - Throne Room Pictures @@ -4517,7 +3673,7 @@ AND = { primary_title = title:e_byzantium title:c_byzantion = { - any_de_jure_top_liege = { this = root } + any_de_jure_top_liege = { this = root } } } } @@ -4527,7 +3683,7 @@ } texture = "gfx/interface/illustrations/event_scenes/ep3_byzantine_throne_room.dds" environment = "environment_ep3_byzantine_throne_room" - ambience = "event:/DLC/EP3/SFX/Events/Event_Images/ep3_evn_eventimage_byzantine_throne_room" + ambience = "event:/DLC/EP3/SFX/Events/Event_Images/ep3_evn_eventimage_byzantine_throne_room" } background = { # TGP Japan trigger = { @@ -4579,7 +3735,7 @@ } texture = "gfx/interface/illustrations/event_scenes/fp3_throneroom.dds" environment = "environment_event_temple" - ambience = "event:/SFX/Events/Backgrounds/throneroom_middleeastern_african" + ambience = "event:/SFX/Events/Backgrounds/throneroom_middleeastern_african" } background = { #Iberia trigger = { @@ -4596,7 +3752,7 @@ } texture = "gfx/interface/illustrations/event_scenes/fp2_throneroom.dds" environment = "environment_event_fp2_throneroom" - ambience = "event:/DLC/FP2/SFX/Events/throneroom" + ambience = "event:/DLC/FP2/SFX/Events/throneroom" } background = { #Norse Non-Tribal trigger = { @@ -4616,7 +3772,7 @@ background = { #MENA trigger = { scope:activity ?= { - activity_location = { + activity_location = { NOT = { has_holding_type = church_holding } OR = { steppe_building_gfx_use_mena_trigger = yes @@ -4679,21 +3835,21 @@ } # Ceremony - Church Pictures - + background = { # FP3 trigger = { - scope:activity ?= { + scope:activity ?= { has_current_phase = coronation_phase_coronation } scope:host.religion = religion:zoroastrianism_religion } texture = "gfx/interface/illustrations/event_scenes/fp3_temple.dds" environment = "environment_event_fp3_temple" - ambience = "event:/SFX/Events/Backgrounds/temple_generic" + ambience = "event:/SFX/Events/Backgrounds/temple_generic" } background = { trigger = { - scope:activity ?= { + scope:activity ?= { has_current_phase = coronation_phase_coronation OR = { #Coronation in nomadic holding @@ -4730,12 +3886,12 @@ } } texture = "gfx/interface/illustrations/event_scenes/mpo_temple_steppe.dds" - environment = "environment_mpo_temple_steppe" + environment = "environment_mpo_temple_steppe" ambience = "event:/DLC/CE2/Events/Event_Images/mpo_temple_steppe" } background = { # EP3 - Hagia Sophia for Byzantium trigger = { - scope:activity ?= { + scope:activity ?= { has_current_phase = coronation_phase_coronation } scope:host = { @@ -4744,11 +3900,11 @@ } texture = "gfx/interface/illustrations/event_scenes/ep3_hagia_sophia.dds" environment = "environment_ep3_hagia_sophia" - ambience = "event:/DLC/EP3/SFX/Events/Event_Images/ep3_evn_eventimage_hagia_sophia" + ambience = "event:/DLC/EP3/SFX/Events/Event_Images/ep3_evn_eventimage_hagia_sophia" } background = { # FP2 trigger = { - scope:activity ?= { + scope:activity ?= { has_current_phase = coronation_phase_coronation OR = { activity_location.culture ?= { has_building_gfx = iberian_building_gfx } @@ -4758,11 +3914,11 @@ } texture = "gfx/interface/illustrations/event_scenes/fp2_temple.dds" environment = "environment_event_fp2_temple" - ambience = "event:/DLC/FP2/SFX/Events/temple" + ambience = "event:/DLC/FP2/SFX/Events/temple" } background = { #Orthodox holy site trigger = { - scope:activity ?= { + scope:activity ?= { has_current_phase = coronation_phase_coronation } scope:host = { @@ -4791,7 +3947,7 @@ } background = { #Western holy site trigger = { - scope:activity ?= { + scope:activity ?= { has_current_phase = coronation_phase_coronation activity_location = { OR = { @@ -4810,7 +3966,7 @@ } background = { #Generic christian church trigger = { - scope:activity ?= { + scope:activity ?= { has_current_phase = coronation_phase_coronation } scope:host = { religion = religion:christianity_religion } @@ -4821,7 +3977,7 @@ } background = { trigger = { - scope:activity ?= { + scope:activity ?= { has_current_phase = coronation_phase_coronation } scope:host = { @@ -4829,12 +3985,12 @@ } } texture = "gfx/interface/illustrations/event_scenes/ep2_holysite_mena.dds" - environment = "environment_generic_holy_site_mena" + environment = "environment_generic_holy_site_mena" ambience = "event:/DLC/EP2/SFX/Events/Backgrounds/evn_background_holysite_mena" } background = { # FP1 trigger = { - scope:activity ?= { + scope:activity ?= { has_current_phase = coronation_phase_coronation } scope:host = { religion = religion:germanic_religion } @@ -4887,7 +4043,7 @@ } background = { # generic tribal trigger = { - scope:activity ?= { + scope:activity ?= { has_current_phase = coronation_phase_coronation } scope:host = { @@ -4904,7 +4060,7 @@ } background = { trigger = { - scope:activity ?= { + scope:activity ?= { has_current_phase = coronation_phase_coronation } } @@ -4932,9 +4088,14 @@ } background = { # EP3 trigger = { - scope:activity ?= { - has_current_phase = coronation_phase_feast - activity_location.culture = { has_building_gfx = byzantine_building_gfx } + scope:activity ?= { + has_current_phase = coronation_phase_feast + activity_location.culture = { + OR = { + has_building_gfx = byzantine_building_gfx + has_building_gfx = caucasian_building_gfx + } + } } } texture = "gfx/interface/illustrations/event_scenes/ep3_feast_byzantine.dds" @@ -4943,8 +4104,8 @@ } background = { # FP1 trigger = { - scope:activity ?= { - has_current_phase = coronation_phase_feast + scope:activity ?= { + has_current_phase = coronation_phase_feast OR = { AND = { activity_location.culture ?= { has_building_gfx = western_building_gfx } @@ -4954,7 +4115,7 @@ } activity_location.culture = { has_building_gfx = norse_building_gfx } } - + } } texture = "gfx/interface/illustrations/event_scenes/fp1_viking_feast.dds" @@ -4963,7 +4124,7 @@ } background = { trigger = { - scope:activity ?= { + scope:activity ?= { has_current_phase = coronation_phase_feast activity_location = { OR = { @@ -4979,8 +4140,8 @@ } background = { trigger = { - scope:activity ?= { - has_current_phase = coronation_phase_feast + scope:activity ?= { + has_current_phase = coronation_phase_feast activity_location.culture = { has_building_gfx = african_building_gfx } } } @@ -4990,8 +4151,8 @@ } background = { #East Asian trigger = { - scope:activity ?= { - has_current_phase = coronation_phase_feast + scope:activity ?= { + has_current_phase = coronation_phase_feast activity_location = { OR = { culture = { has_graphical_east_asia_culture_group_trigger = yes } @@ -5006,11 +4167,11 @@ } background = { trigger = { - scope:activity ?= { - has_current_phase = coronation_phase_feast + scope:activity ?= { + has_current_phase = coronation_phase_feast activity_location = { OR = { - steppe_building_gfx_use_mena_trigger = yes + steppe_building_gfx_use_mena_trigger = yes culture ?= { OR = { has_building_gfx = arabic_group_building_gfx @@ -5031,7 +4192,7 @@ background = { #East Asia trigger = { scope:activity ?= { - has_current_phase = coronation_phase_feast + has_current_phase = coronation_phase_feast } activity_location.culture = { has_graphical_east_asia_culture_group_trigger = yes } } @@ -5041,8 +4202,8 @@ } background = { #fallback Western trigger = { - scope:activity ?= { - has_current_phase = coronation_phase_feast + scope:activity ?= { + has_current_phase = coronation_phase_feast } } texture = "gfx/interface/illustrations/event_scenes/feast.dds" @@ -5147,7 +4308,7 @@ environment = "environment_tgp_farm_asia" ambience = "event:/DLC/EP4/SFX/Events/Event_Backgrounds/tgp_farm_asia" } - + background = { # Farmland, settled trigger = { OR = { @@ -5510,7 +4671,7 @@ } } texture = "gfx/interface/illustrations/event_scenes/bp1_wetlands.dds" - environment = "environment_event_bp1_wetlands" + environment = "environment_event_bp1_wetlands" ambience = "event:/SFX/Events/Backgrounds/deciduous_forest_day" } diff --git a/common/activities/activity_types/feast.txt b/common/activities/activity_types/feast.txt index e6a531af..48627fca 100644 --- a/common/activities/activity_types/feast.txt +++ b/common/activities/activity_types/feast.txt @@ -26,7 +26,7 @@ activity_feast = { has_character_flag = feasts_a_lot short_term_gold >= feast_activity_cost AND = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } short_term_treasury >= feast_activity_cost } } @@ -447,8 +447,8 @@ activity_feast = { } if = { limit = { - house ?= { has_house_power_parameter = feasts_costs_treasury } - short_term_treasury >= hunt_activity_base_cost + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } + short_term_treasury >= feast_activity_cost short_term_treasury >= major_gold_value } add = { @@ -985,7 +985,7 @@ activity_feast = { } government_has_flag = government_is_mandala AND = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } government_allows = barter @@ -1008,7 +1008,7 @@ activity_feast = { limit = { OR = { NAND = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } AND = { @@ -1067,7 +1067,7 @@ activity_feast = { OR = { government_has_flag = government_is_mandala AND = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } government_allows = barter @@ -1091,7 +1091,7 @@ activity_feast = { if = { limit = { NAND = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } } @@ -3021,7 +3021,7 @@ activity_feast = { has_character_flag = feast_ai_override } AND = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } } @@ -3044,7 +3044,7 @@ activity_feast = { limit = { OR = { NAND = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } AND = { @@ -3311,7 +3311,7 @@ activity_feast = { } government_has_flag = government_is_mandala AND = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } government_allows = barter @@ -3328,7 +3328,7 @@ activity_feast = { limit = { OR = { NAND = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } AND = { @@ -3405,7 +3405,7 @@ activity_feast = { } government_has_flag = government_is_mandala AND = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } government_allows = barter @@ -3422,7 +3422,7 @@ activity_feast = { limit = { OR = { NAND = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } AND = { @@ -3510,7 +3510,7 @@ activity_feast = { } government_has_flag = government_is_mandala AND = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } government_allows = barter @@ -3527,7 +3527,7 @@ activity_feast = { limit = { OR = { NAND = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } AND = { @@ -3622,7 +3622,7 @@ activity_feast = { } government_has_flag = government_is_mandala AND = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } government_allows = barter @@ -3639,7 +3639,7 @@ activity_feast = { limit = { OR = { NAND = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } AND = { @@ -3741,7 +3741,7 @@ activity_feast = { gold = { if = { limit = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } value = 0 @@ -3801,7 +3801,7 @@ activity_feast = { treasury = { # Make sure this matches the gold cost above if = { limit = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } add = { @@ -3887,7 +3887,7 @@ activity_feast = { gold = { if = { limit = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } value = 0 @@ -3947,7 +3947,7 @@ activity_feast = { treasury = { # Make sure this matches the gold cost above if = { limit = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } add = { @@ -4028,7 +4028,7 @@ activity_feast = { gold = { if = { limit = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } value = 0 @@ -4088,7 +4088,7 @@ activity_feast = { treasury = { # Make sure this matches the gold cost above if = { limit = { - house ?= { has_house_power_parameter = feasts_costs_treasury } + house ?= { has_house_aspiration_parameter = feasts_costs_treasury } has_treasury = yes } add = { @@ -4164,7 +4164,7 @@ activity_feast = { # PHASES ################### - max_guest_arrival_delay_time = { months = 8 } + max_guest_arrival_delay_time = { months = 5 } phases = { # Meal. @@ -4874,6 +4874,45 @@ activity_feast = { limit = { has_character_modifier = mpo_si_slaughtered_animals } remove_character_modifier = mpo_si_slaughtered_animals } + random_knight = { + limit = { + can_unlock_accolade_attribute_trigger = { + ATTRIBUTE = master_of_revels + } + } + 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_master_of_revels_unlock.t_feast + left_icon = scope:accolade_knight + right_icon = scope:accolade_liege + custom_tooltip = accolade_master_of_revels_unlock.tt + scope:accolade_knight = { + set_variable = { + name = master_of_revels_attribute_unlock + value = yes + } + } + } + } + } } # Conclusion event for guests else = { diff --git a/common/activities/activity_types/funeral.txt b/common/activities/activity_types/funeral.txt index 1ce7790a..d9100c35 100644 --- a/common/activities/activity_types/funeral.txt +++ b/common/activities/activity_types/funeral.txt @@ -1461,7 +1461,7 @@ activity_funeral = { # PHASES ################### - max_guest_arrival_delay_time = { months = 8 } + max_guest_arrival_delay_time = { months = 5 } phases = { # Mingling and socialising diff --git a/common/activities/activity_types/hike.txt b/common/activities/activity_types/hike.txt index de4bb5b8..78a87ff7 100644 --- a/common/activities/activity_types/hike.txt +++ b/common/activities/activity_types/hike.txt @@ -37,6 +37,23 @@ is_location_valid = { trigger_if = { + limit = { + scope:host = { + is_ai = no + is_landless_adventurer = no + } + } + custom_tooltip = { + text = hike_province_requirement_landed + county_controller ?= { + OR = { + target_is_liege_or_above = scope:host + this = scope:host + } + } + } + } + trigger_else_if = { limit = { scope:host = { is_ai = no @@ -62,22 +79,6 @@ } } } - trigger_else_if = { - limit = { - scope:host = { - is_ai = no - is_landless_adventurer = no - } - } - custom_tooltip = { - text = hike_province_requirement_landed - scope:host = { - any_realm_province = { - this = root - } - } - } - } trigger_else = { always = yes } diff --git a/common/activities/activity_types/hunt.txt b/common/activities/activity_types/hunt.txt index f76f96f2..ea33ed00 100644 --- a/common/activities/activity_types/hunt.txt +++ b/common/activities/activity_types/hunt.txt @@ -17,7 +17,7 @@ ai_has_warlike_personality = yes } AND = { - house ?= { has_house_power_parameter = hunts_costs_treasury } + house ?= { has_house_aspiration_parameter = hunts_costs_treasury } short_term_treasury >= hunt_activity_base_cost } government_has_flag = government_is_nomadic @@ -305,7 +305,7 @@ has_character_flag = free_hunt government_has_flag = government_is_mandala AND = { - house ?= { has_house_power_parameter = hunts_costs_treasury } + house ?= { has_house_aspiration_parameter = hunts_costs_treasury } has_treasury = yes } AND = { @@ -424,7 +424,7 @@ treasury = { # Make sure this matches the gold cost above if = { limit = { - house ?= { has_house_power_parameter = hunts_costs_treasury } + house ?= { has_house_aspiration_parameter = hunts_costs_treasury } has_treasury = yes } add = { @@ -711,7 +711,7 @@ } government_has_flag = government_is_mandala AND = { - house ?= { has_house_power_parameter = hunts_costs_treasury } + house ?= { has_house_aspiration_parameter = hunts_costs_treasury } has_treasury = yes } } @@ -798,7 +798,7 @@ treasury = { # Make sure this matches the gold cost above if = { limit = { - house ?= { has_house_power_parameter = hunts_costs_treasury } + house ?= { has_house_aspiration_parameter = hunts_costs_treasury } has_treasury = yes } add = { # Base cost, scaled by era @@ -1360,7 +1360,7 @@ } if = { limit = { - house ?= { has_house_power_parameter = hunts_costs_treasury } + house ?= { has_house_aspiration_parameter = hunts_costs_treasury } has_treasury = yes short_term_treasury >= hunt_activity_base_cost short_term_treasury >= major_gold_value @@ -1508,11 +1508,9 @@ limit = { any_held_title = { tier = tier_county - any_county_province = { - any_province_epidemic = { - count >= 1 - outbreak_intensity < apocalyptic - } + any_county_province_epidemic = { + count >= 1 + outbreak_intensity < apocalyptic } } would_follow_social_distancing_value >= -1 @@ -1525,11 +1523,9 @@ else_if = { limit = { any_realm_county = { - any_county_province = { - any_province_epidemic = { - count >= 1 - outbreak_intensity < apocalyptic - } + any_county_province_epidemic = { + count >= 1 + outbreak_intensity < apocalyptic } } would_follow_social_distancing_value >= -1 @@ -1543,11 +1539,9 @@ limit = { any_held_title = { tier = tier_county - any_county_province = { - any_province_epidemic = { - count >= 1 - outbreak_intensity = apocalyptic - } + any_county_province_epidemic = { + count >= 1 + outbreak_intensity = apocalyptic } } } @@ -1560,11 +1554,9 @@ limit = { any_held_title = { tier = tier_county - any_county_province = { - any_province_epidemic = { - count >= 1 - outbreak_intensity = apocalyptic - } + any_county_province_epidemic = { + count >= 1 + outbreak_intensity = apocalyptic } } } @@ -1839,6 +1831,13 @@ } desc = activity_hunt_province_desc_rainbow_mountains_major } + triggered_desc = { + trigger = { + has_building_or_higher = chocolate_hills_01 + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_chocolate_hills_major + } triggered_desc = { trigger = { has_building_or_higher = visegrad_castle_01 @@ -1846,6 +1845,17 @@ } desc = activity_hunt_province_desc_visegrad_castle_01_major } + triggered_desc = { + trigger = { + county = { + any_county_province = { + has_building_or_higher = legendary_hunting_lodge + } + } + NOT = { scope:special_option ?= flag:hunt_type_nerge } + } + desc = activity_hunt_province_desc_legendary_hunting_lodge + } triggered_desc = { trigger = { OR = { @@ -3742,7 +3752,7 @@ } government_has_flag = government_is_mandala AND = { - house ?= { has_house_power_parameter = hunts_costs_treasury } + house ?= { has_house_aspiration_parameter = hunts_costs_treasury } has_treasury = yes } } @@ -3794,7 +3804,7 @@ treasury = { # Make sure this matches the gold cost above if = { limit = { - house ?= { has_house_power_parameter = hunts_costs_treasury } + house ?= { has_house_aspiration_parameter = hunts_costs_treasury } has_treasury = yes } add = { @@ -4213,7 +4223,7 @@ } government_has_flag = government_is_mandala AND = { - house ?= { has_house_power_parameter = hunts_costs_treasury } + house ?= { has_house_aspiration_parameter = hunts_costs_treasury } has_treasury = yes } } @@ -4254,7 +4264,7 @@ treasury = { # Make sure this matches the gold cost above if = { limit = { - house ?= { has_house_power_parameter = hunts_costs_treasury } + house ?= { has_house_aspiration_parameter = hunts_costs_treasury } has_treasury = yes } add = { @@ -4444,7 +4454,7 @@ } government_has_flag = government_is_mandala AND = { - house ?= { has_house_power_parameter = hunts_costs_treasury } + house ?= { has_house_aspiration_parameter = hunts_costs_treasury } has_treasury = yes } } @@ -4485,7 +4495,7 @@ treasury = { # Make sure this matches the gold cost above if = { limit = { - house ?= { has_house_power_parameter = hunts_costs_treasury } + house ?= { has_house_aspiration_parameter = hunts_costs_treasury } has_treasury = yes } add = { @@ -4735,7 +4745,7 @@ } government_has_flag = government_is_mandala AND = { - house ?= { has_house_power_parameter = hunts_costs_treasury } + house ?= { has_house_aspiration_parameter = hunts_costs_treasury } has_treasury = yes } } @@ -4776,7 +4786,7 @@ treasury = { # Make sure this matches the gold cost above if = { limit = { - house ?= { has_house_power_parameter = hunts_costs_treasury } + house ?= { has_house_aspiration_parameter = hunts_costs_treasury } has_treasury = yes } add = { @@ -4951,7 +4961,7 @@ } government_has_flag = government_is_mandala AND = { - house ?= { has_house_power_parameter = hunts_costs_treasury } + house ?= { has_house_aspiration_parameter = hunts_costs_treasury } has_treasury = yes } } @@ -4992,7 +5002,7 @@ treasury = { # Make sure this matches the gold cost above if = { limit = { - house ?= { has_house_power_parameter = hunts_costs_treasury } + house ?= { has_house_aspiration_parameter = hunts_costs_treasury } has_treasury = yes } add = { @@ -5123,7 +5133,7 @@ # PHASES ################### - max_guest_arrival_delay_time = { months = 8 } + max_guest_arrival_delay_time = { months = 5 } phases = { hunt_phase = { @@ -5247,7 +5257,7 @@ # House aspiration - gain merit if = { limit = { - house ?= { has_house_power_parameter = hunts_provides_merit } + house ?= { has_house_aspiration_parameter = hunts_provides_merit } } scope:activity = { add_activity_log_entry = { @@ -5785,5 +5795,49 @@ } } } + if = { + limit = { + this = scope:host + } + random_knight = { + limit = { + can_unlock_accolade_attribute_trigger = { + ATTRIBUTE = huntsmaster + } + } + 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_huntsmaster_unlock.t + left_icon = scope:accolade_knight + right_icon = scope:accolade_liege + custom_tooltip = accolade_huntsmaster_unlock.tt + scope:accolade_knight = { + set_variable = { + name = huntsmaster_attribute_unlock + value = yes + } + } + } + } + } + } } } diff --git a/common/activities/activity_types/pilgrimage.txt b/common/activities/activity_types/pilgrimage.txt index 282f2edb..86f3baa0 100644 --- a/common/activities/activity_types/pilgrimage.txt +++ b/common/activities/activity_types/pilgrimage.txt @@ -78,6 +78,7 @@ limit = { faith = { has_doctrine_parameter = mandatory_hajj } capital_province.barony ?= title:b_makka + is_landless_adventurer = no } custom_tooltip = { text = activity_pilgrimage.is_location_valid.capital_is_mecca @@ -126,7 +127,10 @@ #Invalidate flag, until/unless this is fixed in code NOT = { has_variable = pilgrimage_invalidated_illness } #Don't change your capital to be the holy site destination - capital_province.barony != scope:activity.activity_location.barony + trigger_if = { + limit = { is_landless_adventurer = no } + capital_province.barony != scope:activity.activity_location.barony + } } # Converting mid-pilgrimage is a big no-no. scope:activity = { @@ -252,10 +256,15 @@ } } } - #You can't pilgrimage to your own capital - custom_tooltip = { - text = activity_pilgrimage.is_location_valid.capital_is_holy_site - scope:host.capital_province != root + #You can't pilgrimage to your own capital - Except for if you are an adventurer because then you travel around all the time anyway + trigger_if = { + limit = { + scope:host = { is_landless_adventurer = no } + } + custom_tooltip = { + text = activity_pilgrimage.is_location_valid.capital_is_holy_site + scope:host.capital_province != root + } } # If you are supposed to be the realm's reserve ruler, then you can't take a multi-year foreign trip. @@ -266,10 +275,14 @@ custom_tooltip = { text = activity_pilgrimage.serving_diarch county.holder = { - any_liege_or_above = { this = scope:host.liege } + OR = { + any_liege_or_above = { this = scope:host.liege } + this = scope:host.liege + } } } } + trigger_if = { limit = { scope:host = { @@ -852,13 +865,13 @@ gold = { add = { add = { - value = root.pilgrimage_base_cost + value = pilgrimage_base_cost desc = pilgrimage_base_cost } add = { - value = root.pilgrimage_base_cost + value = pilgrimage_base_cost multiply = activity_cost_scale_by_era - subtract = root.pilgrimage_base_cost + subtract = pilgrimage_base_cost desc = activity_cost_scale_by_era_desc } if = { @@ -889,7 +902,7 @@ dynasty ?= { has_dynasty_perk = ep2_activities_legacy_1 } } subtract = { - value = root.pilgrimage_base_cost + value = pilgrimage_base_cost multiply = ep2_activities_legacy_1_pilgrimages_discount_value desc = ep2_activities_legacy_track } @@ -922,7 +935,7 @@ #House Aspiration Humility if = { limit = { - house ?= { has_house_power_parameter = humility_pilgrimage_discount } + house ?= { has_house_aspiration_parameter = humility_pilgrimage_discount } } multiply = { value = 0.75 @@ -1015,6 +1028,12 @@ } min = minor_gold_value } + if = { + limit = { + has_title = title:e_minister_of_revenue + } + multiply = 0.85 + } } } @@ -1163,7 +1182,7 @@ dynasty ?= { has_dynasty_perk = ep2_activities_legacy_1 } } subtract = { - value = root.pilgrimage_base_cost + value = pilgrimage_base_cost multiply = ep2_activities_legacy_1_pilgrimages_discount_value desc = ep2_activities_legacy_track } @@ -1220,6 +1239,12 @@ divide = 5 ceiling = yes multiply = 5 + if = { + limit = { + has_title = title:e_minister_of_revenue + } + multiply = 0.85 + } } } @@ -1362,6 +1387,7 @@ NAND = { exists = capital_province capital_province.barony = title:b_makka + is_landless_adventurer = no } } } @@ -1906,6 +1932,34 @@ add = 1 } } + + # Bonus wandering XP from travel_events_bp3.95 + if = { + limit = { + has_variable_list = holy_site_dreams + is_target_in_variable_list = { + name = holy_site_dreams + target = root.location.barony + } + } + send_interface_message = { + type = send_interface_message_good + title = travel_events_bp3.95.t + left_icon = root + + if = { + limit = { + has_lifestyle = wanderer_lifestyle + } + add_wanderer_lifestyle_xp = 500 + } + stress_impact = { + base = major_stress_impact_loss + zealous = medium_stress_impact_loss + } + add_piety = major_piety_gain + } + } #Arrival events - where Pilgrims gain their Pilgrim trait #We have the Obligatory option selected - we skip the destination events @@ -2041,6 +2095,10 @@ can_be_activity_guest = { age > 5 + OR = { + faith.religion = scope:host.faith.religion + current_travel_plan ?= { travel_plan_owner = scope:host } #When people join you on the way there. + } } max_guests = 30 @@ -2846,7 +2904,11 @@ trigger = { scope:host = { faith.religion = { - is_in_family = rf_eastern + OR = { + is_in_family = rf_eastern + is_in_family = rf_sinitic + this = religion:shintoism_religion + } } culture = { has_graphical_east_asia_culture_group_trigger = yes @@ -2863,6 +2925,19 @@ environment = "environment_ep3_holysite_orthodox" ambience = "event:/DLC/EP3/SFX/Events/Event_Images/ep3_evn_eventimage_orthodox_holy_site" } + background = { + trigger = { + activity_location.culture = { + OR = { + has_graphical_mena_culture_group_trigger = yes + has_graphical_iranian_culture_group_trigger = yes + } + } + } + texture = "gfx/interface/illustrations/event_scenes/ep2_holysite_mena.dds" + environment = "environment_generic_holy_site_mena" + ambience = "event:/SFX/Events/Backgrounds/town_market_middleeastern_day" + } background = { trigger = { activity_location.culture = { has_graphical_mena_culture_group_trigger = yes } diff --git a/common/activities/activity_types/playdate.txt b/common/activities/activity_types/playdate.txt index 288049cf..0d789f94 100644 --- a/common/activities/activity_types/playdate.txt +++ b/common/activities/activity_types/playdate.txt @@ -271,7 +271,7 @@ } wait_time_before_start = { days = 7 } - max_guest_arrival_delay_time = { months = 8 } + max_guest_arrival_delay_time = { months = 5 } ################### diff --git a/common/activities/activity_types/tour.txt b/common/activities/activity_types/tour.txt index fd873ac5..b9fd71b6 100644 --- a/common/activities/activity_types/tour.txt +++ b/common/activities/activity_types/tour.txt @@ -228,6 +228,7 @@ limit = { any_vassal = { count >= 5 + highest_held_title_tier >= tier_county } } desc = "I have many vassals" @@ -2747,7 +2748,12 @@ base_activity_modifier = yes # Scripted Modifiers - activity_guest_shared_ai_accept_modifier = yes + activity_guest_shared_ai_accept_modifier = yes + modifier = { + is_acclaimed = yes + add = 20 + desc = ACTIVITY_GUEST_ACCLAIMED_KNIGHT_REASON + } } travel_entourage_selection = { @@ -3335,6 +3341,49 @@ 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 + } + } + } + } + } } } } diff --git a/common/activities/activity_types/wedding.txt b/common/activities/activity_types/wedding.txt index 8c9ee4a0..e814fc55 100644 --- a/common/activities/activity_types/wedding.txt +++ b/common/activities/activity_types/wedding.txt @@ -45,9 +45,11 @@ #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 = {} } } } } @@ -71,12 +73,7 @@ scope:activity.var:spouse_2_var = { is_alive = no } - scope:activity = { #you're in a murder wedding - has_activity_option = { - category = special_type - option = wedding_type_bloody - } - } + is_bloody_wedding = yes } } } @@ -92,10 +89,7 @@ } scope:host = { # The host becoming unlanded will invalidate - OR = { - is_landed_or_landless_administrative = yes - has_government = landless_minority_government - } + is_landed_or_landless_administrative = yes # The new host being only a baron will invalidate highest_held_title_tier >= tier_county # Incapable host will invalidate @@ -135,12 +129,7 @@ is_ai = no AND = { is_alive = no - scope:activity = { #you're in a murder wedding - has_activity_option = { - category = special_type - option = wedding_type_bloody - } - } + is_bloody_wedding = yes } } } @@ -167,7 +156,7 @@ if = { limit = { - scope:host = { has_trait = incapable } + scope:host = { is_physically_able = no } } scope:activity = { activity_type = { save_scope_as = activity_type } @@ -187,8 +176,7 @@ scope:activity = { has_variable = wedding_invalidated_said_no } - exists = scope:spouse_1 - scope:spouse_1 = { is_alive = yes } + scope:spouse_1 ?= { is_alive = yes } } scope:spouse_1 = { trigger_event = ep2_wedding.0152 } } @@ -257,12 +245,8 @@ scope:activity.var:spouse_2_var ?= { is_alive = no } - scope:activity = { #you're not in a murder wedding - has_activity_option = { - category = special_type - option = wedding_type_normal - } - } + #you're not in a murder wedding + is_bloody_wedding = no } } } @@ -495,8 +479,8 @@ } if = { - limit = { exists = scope:officiant } - scope:officiant = { + limit = { var:officiant ?= { is_alive = yes } } + var:officiant = { if = { limit = { has_character_flag = need_priest_outfit } remove_character_flag = need_priest_outfit @@ -514,6 +498,9 @@ } } + scope:host = { + clean_grand_wedding_betrothal_variables = yes + } } on_host_death = { @@ -522,9 +509,15 @@ # Make the player heir the new host if attending (unless it was the host's wedding!) if = { limit = { - exists = scope:host.player_heir - scope:host.player_heir = { - involved_activity = scope:activity + scope:host.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 = { @@ -533,9 +526,27 @@ } } } - scope:host.player_heir = { save_scope_as = new_host } + scope:host.player_heir = { + save_scope_as = new_host + if = { + limit = { NOT = { exists = involved_activity } } + add_to_activity = scope:activity + } + } } - # Otherwise, spouse_1 takes over + else_if = { + limit = { + scope:spouse_1 = { is_landed_or_landless_administrative = yes } + } + scope:spouse_1 = { save_scope_as = new_host } + } + else_if = { + limit = { + scope:spouse_2 = { is_landed_or_landless_administrative = 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 } } @@ -633,6 +644,14 @@ desc = "Holy Site" } } + #Kizuki Taisha + if = { + limit = { has_building = izumo_taisha_01 } + add = { + value = 30 + desc = "Kizuki Taisha" + } + } } max_province_icons = 5 @@ -680,6 +699,11 @@ limit = { barony = { is_holy_site_of = scope:host.faith } } add = 75 } + #Kizuki Taisha + if = { + limit = { has_building = izumo_taisha_01 } + add = 30 + } } province_description = { @@ -715,6 +739,10 @@ 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 @@ -2005,105 +2033,32 @@ scope:host = { trigger_event = ep2_wedding.0101 } } else = { trigger_event = ep2_wedding.0100 } - # Accolade stuff if = { - limit = { - this = scope:host - any_active_accolade = { - accolade_parameter = accolade_party_fertility - } - } - add_character_modifier = { - modifier = accolade_charmer_party_modifier - } - } - if = { - limit = { - this = scope:host - any_active_accolade = { - accolade_parameter = accolade_party_fertility_high - } - } - add_character_modifier = { - modifier = accolade_charmer_party_high_modifier - } - } - if = { - limit = { - exists = scope:host.faith.religious_head - scope:host.faith.religious_head = { - NOR = { - this = scope:activity.special_guest:spouse_1 - this = scope:activity.special_guest:spouse_2 + limit = { this = scope:host } + # Accolade stuff + if = { + limit = { + any_active_accolade = { + accolade_parameter = accolade_party_fertility } } - scope:activity = { - any_attending_character = { - this = scope:host.faith.religious_head - } + add_character_modifier = { + modifier = accolade_charmer_party_modifier } } - scope:host.faith.religious_head = { save_scope_as = officiant } - } - else_if = { - limit = { - scope:host != scope:activity.special_guest:spouse_1 - } - scope:host = { save_scope_as = officiant } - } - else_if = { - limit = { - exists = scope:host.cp:councillor_court_chaplain - scope:activity = { - any_attending_character = { - this = scope:host.cp:councillor_court_chaplain - } - } - } - scope:host.cp:councillor_court_chaplain = { save_scope_as = officiant } - } - else_if = { - limit = { - NOT = { scope:host.faith = { has_doctrine = doctrine_theocracy_lay_clergy } } - } if = { limit = { - NOT = { - scope:activity = { - any_attending_character = { - is_ai = no - } - } - } - any_pool_character = { - province = scope:activity.activity_location - is_physically_able_ai_adult = yes - faith = scope:host.faith - can_be_clergy_due_to_gender_trigger = yes + any_active_accolade = { + accolade_parameter = accolade_party_fertility_high } } - random_pool_character = { - province = scope:activity.activity_location - limit = { - is_physically_able_ai_adult = yes - faith = scope:host.faith - can_be_clergy_due_to_gender_trigger = yes - } - save_scope_as = officiant - } - } - else = { - create_character = { - template = priest_character_template - dynasty = none - location = scope:host.location - save_scope_as = officiant + add_character_modifier = { + modifier = accolade_charmer_party_high_modifier } } + wedding_assign_officiant_effect = yes } - scope:officiant ?= { - add_character_flag = officiant - } + # Fires the conclusion events for every attendee, and advance to next phase, with a delay of 2 months trigger_event = { on_action = wedding_ceremony_ending_event_pulse @@ -2145,17 +2100,12 @@ if = { limit = { - scope:activity = { - has_activity_option = { - category = special_type - option = wedding_type_bloody - } - } + is_bloody_wedding = yes } if = { #if you have the wedding night kill we progress to that limit = { - has_variable = bloody_wedding_murder_spouse_var + var:bloody_wedding_murder ?= flag:spouse } scope:activity = { progress_activity_phase_after = { months = 2 } } } @@ -2210,13 +2160,8 @@ if = { limit = { OR = { - scope:activity = { - has_activity_option = { - category = special_type - option = wedding_type_normal - } - } - scope:host = { has_variable = bloody_wedding_murder_spouse_var } + is_bloody_wedding = no + scope:host = { var:bloody_wedding_murder ?= flag:spouse } } } trigger_event = ep2_wedding.0300 @@ -2231,58 +2176,35 @@ # Bloody Wedding only has a murder event, no regular wnight if = { limit = { - scope:activity = { - has_activity_option = { - category = special_type - option = wedding_type_bloody - } - } + is_bloody_wedding = yes } if = { limit = { scope:host = scope:activity.special_guest:spouse_1 #if you're the spouse - scope:host = { has_variable = bloody_wedding_murder_spouse_var } #and you've chosen to kill them during the wedding night + scope:host = { 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 - # Fires only for the spouses - if = { - limit = { - OR = { - scope:activity = { - has_activity_option = { - category = special_type - option = wedding_type_normal - } + else = { + # Fires only for the spouses + if = { + limit = { + OR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 } - scope:host = { has_variable = bloody_wedding_backed_down_var } } - OR = { - root = scope:activity.special_guest:spouse_1 - root = scope:activity.special_guest:spouse_2 + trigger_event = { + on_action = wedding_wnight_spouse_event_pulse } } - 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 } } } - # Fires for the guests - else_if = { - limit = { - OR = { - scope:activity = { - has_activity_option = { - category = special_type - option = wedding_type_normal - } - } - scope:host = { has_variable = bloody_wedding_backed_down_var } - } - } - trigger_event = { on_action = wedding_wnight_ongoing_event_pulse } - } } ai_will_do = { @@ -2813,11 +2735,8 @@ # Remove the wedding reward for Bloody Weddings if = { limit = { + is_bloody_wedding = yes scope:activity = { - has_activity_option = { - category = special_type - option = wedding_type_bloody - } activity_location.county = { has_county_modifier = ruler_married_here_county_modifier } @@ -2830,19 +2749,7 @@ # Clean up for murder host / guests if = { limit = { - scope:activity = { - has_activity_option = { - category = special_type - option = wedding_type_bloody - } - } - scope:host = { - #You haven't failed/backed down - NOR = { - has_variable = bloody_wedding_backed_down_var - has_variable = bloody_murder_fail - } - } + is_successful_bloody_wedding = yes } scope:activity.special_guest:spouse_1 = { save_scope_as = spouse_1 @@ -2888,21 +2795,56 @@ } 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 = { - OR = { - scope:activity = { - has_activity_option = { - category = special_type - option = wedding_type_normal - } - } - scope:host = { has_variable = bloody_wedding_backed_down_var } #you've backed down from a Red Wedding - } + is_bloody_wedding = no } if = { limit = { @@ -3007,16 +2949,7 @@ limit = { exists = global_var:started_black_dinner_achievement is_ai = no - scope:activity = { - has_activity_option = { - category = special_type - option = wedding_type_bloody - } - } - NOR = { - has_variable = bloody_murder_fail - has_variable = bloody_wedding_backed_down_var - } + is_successful_bloody_wedding = yes } set_global_variable = { name = finished_black_dinner_achievement @@ -3027,17 +2960,12 @@ } # Free the officiant! if = { - limit = { exists = scope:officiant } - scope:officiant = { - if = { - limit = { has_character_flag = need_priest_outfit } - remove_character_flag = need_priest_outfit - } - if = { - limit = { has_character_flag = officiant } - remove_character_flag = officiant - } + limit = { has_character_flag = officiant } + if = { + limit = { has_character_flag = need_priest_outfit } + remove_character_flag = need_priest_outfit } + remove_character_flag = officiant } } diff --git a/common/casus_belli_types/00_religious_war.txt b/common/casus_belli_types/00_religious_war.txt index 84e68189..fdb368ad 100644 --- a/common/casus_belli_types/00_religious_war.txt +++ b/common/casus_belli_types/00_religious_war.txt @@ -116,6 +116,12 @@ # Filter for struggles trigger_if = { limit = { + scope:attacker = { + any_character_struggle = { + involvement = involved + is_struggle_type = iberian_struggle + } + } scope:defender = { any_character_struggle = { involvement = involved @@ -559,8 +565,10 @@ religious_war = { # Additional requirements to the defines in 00_casus_belli_groups.txt allowed_for_character = { scope:attacker.faith = { - NOT = { has_doctrine_parameter = unreformed } - NOT = { has_doctrine_parameter = holy_wars_forbidden } + NOR = { + has_doctrine_parameter = unreformed + has_doctrine_parameter = holy_wars_forbidden + } } NOR = { government_has_flag = government_is_nomadic @@ -679,6 +687,12 @@ religious_war = { # Filter for struggles trigger_if = { limit = { + scope:attacker = { + any_character_struggle = { + involvement = involved + is_struggle_type = iberian_struggle + } + } scope:defender = { any_character_struggle = { involvement = involved @@ -689,7 +703,6 @@ religious_war = { are_holy_wars_disabled_in_struggle_phase_trigger = yes } are_holy_wars_disabled_by_struggle_conciliation_trigger = no # Disabled against other involved faiths in FP2 Conciliation ending - } should_invalidate = { @@ -1275,6 +1288,12 @@ major_religious_war = { # Filter for struggles trigger_if = { limit = { + scope:attacker = { + any_character_struggle = { + involvement = involved + is_struggle_type = iberian_struggle + } + } scope:defender = { any_character_struggle = { involvement = involved @@ -4043,9 +4062,6 @@ directed_great_holy_war = { } } } - scope:attacker.religious_head = { - piety_level >= 2 - } religion = { exists = var:variable_ghw_unlocked } #Activated by event for every religion. } } @@ -4126,9 +4142,6 @@ directed_great_holy_war = { pledge_attacker = scope:attacker } } - scope:attacker.religious_head = { - add_piety_level = -1 - } } scope:attacker.faith.great_holy_war = { every_pledged_attacker = { #Add Beneficiary automatically on victory of direct GHW for any attacker that doesn't have one already. diff --git a/common/casus_belli_types/07_ep3_wars.txt b/common/casus_belli_types/07_ep3_wars.txt index dab2715d..50ed6580 100644 --- a/common/casus_belli_types/07_ep3_wars.txt +++ b/common/casus_belli_types/07_ep3_wars.txt @@ -355,13 +355,6 @@ ## Seizing control so things *vaguely* work. custom_tooltip = fp1_varangian_adventurer_conquest.summaries.control_rebate scope:attacker = { trigger_event = fp1_varangian_adventures.0001 } - ## And giving them a gold bounty to keep them afloat. - scope:attacker = { - add_gold = { - value = varangian_adventures_bounty_amount_value - multiply = 0.5 #Half it for counties - } - } # Finally, general cleanup. ep3_become_landed_cleanup_effect = yes # Prestige Progress for the Attacker @@ -938,13 +931,6 @@ ep3_laamp_adventurer_duchy_invasion = { ## Seizing control so things *vaguely* work. custom_tooltip = fp1_varangian_adventurer_conquest.summaries.control_rebate scope:attacker = { trigger_event = fp1_varangian_adventures.0001 } - ## And giving them a gold bounty to keep them afloat. - scope:attacker = { - add_gold = { - value = varangian_adventures_bounty_amount_value - multiply = 0.5 #Half it for counties - } - } # Finally, general cleanup. ep3_become_landed_cleanup_effect = yes # Prestige Progress for the Attacker @@ -1533,13 +1519,6 @@ ep3_laamp_adventurer_kingdom_invasion = { ## Seizing control so things *vaguely* work. custom_tooltip = fp1_varangian_adventurer_conquest.summaries.control_rebate scope:attacker = { trigger_event = fp1_varangian_adventures.0001 } - ## And giving them a gold bounty to keep them afloat. - scope:attacker = { - add_gold = { - value = varangian_adventures_bounty_amount_value - multiply = 0.5 #Half it for counties - } - } # Finally, general cleanup. ep3_become_landed_cleanup_effect = yes # Prestige Progress for the Attacker @@ -3729,7 +3708,7 @@ imperial_expedition_cb = { allowed_for_character = { top_liege != this - liege ?= { has_diarchy_parameter = unlock_diarch_requests_military_expedition_interaction } + liege ?= { has_diarchy_active_parameter = unlock_diarch_requests_military_expedition_interaction } is_diarch_of_target = liege NOT = { government_has_flag = government_is_landless_adventurer @@ -4641,6 +4620,14 @@ ep3_roman_empire_border_war = { } is_ai = no } + top_liege = { + NOR = { + any_owned_story = { + type = ep3_story_cycle_restoring_rome + } + is_roman_emperor_excluding_byzantium_trigger = yes + } + } } allowed_for_character_display_regardless = { @@ -5137,6 +5124,7 @@ ep3_laamp_apprehend_adventurer_cb = { } } every_character_artifact = { + limit = { NOT = { has_variable = artifact_prevent_transfer } } set_owner = { target = scope:defender history = { @@ -5966,6 +5954,44 @@ ep3_laamp_peasant_war = { } remove_variable = number_rebel_reinforcements } + if = { + limit = { + has_variable = ep3_laamp_peasant_war_remain_laamp + variable_list_size = { + name = war_met_peasant_leaders_list + value <= 0 + } + } + ordered_in_list = { + variable = war_supported_counties_list + order_by = development_level + save_scope_as = new_capital + } + create_character = { + location = scope:new_capital.title_province + template = peasant_faction_leader_template + faith = scope:new_capital.faith + culture = scope:new_capital.culture + gender_female_chance = { + if = { + limit = { scope:new_capital.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { scope:new_capital.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } + } + save_scope_as = peasant_leader + } + add_to_variable_list = { + name = war_met_peasant_leaders_list + target = scope:peasant_leader + } + } } } @@ -5993,7 +6019,7 @@ ep3_laamp_peasant_war = { involvement = involved activate_struggle_catalyst = { catalyst = catalyst_populist_uprise - character = this + character = scope:defender } } } @@ -6004,16 +6030,24 @@ ep3_laamp_peasant_war = { first_valid = { triggered_desc = { trigger = { - scope:attacker = { is_local_player = yes } + scope:attacker = { + is_local_player = yes + has_variable = ep3_laamp_peasant_war_remain_laamp + } } - desc = county_conquest_cb_victory_desc_attacker + desc = county_conquest_cb_victory_desc_remain_laamp } - desc = county_conquest_cb_victory_desc + desc = county_conquest_cb_victory_desc_attacker } } on_victory = { scope:attacker = { + ordered_in_list = { + variable = war_supported_counties_list + order_by = development_level + save_scope_as = new_capital + } primary_title = { save_scope_as = old_title } @@ -6023,6 +6057,46 @@ ep3_laamp_peasant_war = { #swap the peasant trait for the better one remove_trait = peasant_leader add_trait = populist_leader + if = { + limit = { + has_variable = ep3_laamp_peasant_war_remain_laamp + } + random_in_list = { + variable = war_met_peasant_leaders_list + limit = { + this != scope:attacker + } + save_scope_as = peasant_leader + } + if = { + limit = { + NOT = { exists = scope:peasant_leader } + } + create_character = { + location = scope:new_capital.title_province + template = peasant_faction_leader_template + faith = scope:new_capital.faith + culture = scope:new_capital.culture + gender_female_chance = { + if = { + limit = { scope:new_capital.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { scope:new_capital.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } + } + save_scope_as = peasant_leader + } + } + } + else = { + save_scope_as = peasant_leader + } } # Set up titles in the new realm. # Determine potential breakaways @@ -6050,18 +6124,18 @@ ep3_laamp_peasant_war = { if = { limit = { OR = { - scope:attacker.faith = { + scope:peasant_leader.faith = { faith_hostility_level_comparison = { prev.holder.faith >= scope:defender.faith } } holder = scope:defender holder.primary_title.tier >= scope:target.tier - scope:attacker = { has_claim_on = scope:title_temp } + scope:peasant_leader = { has_claim_on = scope:title_temp } } } - add_to_temporary_list = titles_taken + add_to_list = titles_taken } else = { - holder = { add_to_temporary_list = vassals_taken } + holder = { add_to_list = vassals_taken } } } } @@ -6069,7 +6143,7 @@ ep3_laamp_peasant_war = { every_in_list = { list = titles_taken change_title_holder = { - holder = scope:attacker + holder = scope:peasant_leader change = scope:change take_baronies = yes } @@ -6078,20 +6152,13 @@ ep3_laamp_peasant_war = { every_in_list = { list = vassals_taken change_liege = { - liege = scope:attacker + liege = scope:peasant_leader change = scope:change } } } resolve_title_and_vassal_change = scope:change ## Grab the best county to be the capital - scope:attacker = { - ordered_in_list = { - variable = war_supported_counties_list - order_by = development_level - save_scope_as = new_capital - } - } scope:new_capital = { duchy = { save_scope_as = new_capital_duchy @@ -6110,7 +6177,7 @@ ep3_laamp_peasant_war = { } scope:new_title = { change_title_holder = { - holder = scope:attacker + holder = scope:peasant_leader change = scope:change } } @@ -6118,30 +6185,21 @@ ep3_laamp_peasant_war = { #make the new title look like your landless adventurer title hidden_effect = { scope:new_title = { - set_de_jure_liege_title = scope:new_capital.title_province.empire set_coa = scope:old_title set_color_from_title = scope:new_capital set_capital_county = scope:new_capital } } - scope:attacker = { - #stop being a landless adventurer - destroy_laamp_effect = { ADVENTURER = scope:attacker } - #set new capital - set_realm_capital = scope:new_capital - #increase county control and remove all county corruption modifiers - every_in_list = { - variable = war_supported_counties_list - change_county_control = 100 - remove_every_county_corruption_modifier_effect = yes - add_county_modifier = { - modifier = ep3_peasant_leader_modifier - years = 10 + + scope:peasant_leader = { + if = { + limit = { + has_variable = ep3_laamp_peasant_war_remain_laamp } + #stop being a landless adventurer + destroy_laamp_effect = { ADVENTURER = scope:attacker } + return_home = yes } - clear_variable_list = war_supported_counties_list - clear_variable_list = war_met_peasant_leaders_list - return_home = yes } scope:defender = { # Legitimacy effect @@ -6175,7 +6233,29 @@ ep3_laamp_peasant_war = { } } } - + scope:attacker = { + #increase county control and remove all county corruption modifiers + every_in_list = { + variable = war_supported_counties_list + if = { + limit = { + scope:attacker = { + has_variable = ep3_laamp_peasant_war_remain_laamp + } + } + custom_tooltip = taken_county_remain_laamp + } + change_county_control = 100 + remove_every_county_corruption_modifier_effect = yes + add_county_modifier = { + modifier = ep3_peasant_leader_modifier + years = 10 + } + } + clear_variable_list = war_supported_counties_list + clear_variable_list = war_met_peasant_leaders_list + remove_variable = ep3_laamp_peasant_war_remain_laamp + } # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold laamp_as_mercenary_payout_tooltip_effect = yes } @@ -6202,6 +6282,7 @@ ep3_laamp_peasant_war = { #clear all variable lists, you only get one chance! clear_variable_list = war_supported_counties_list clear_variable_list = war_met_peasant_leaders_list + remove_variable = ep3_laamp_peasant_war_remain_laamp stress_impact = { ambitious = medium_stress_impact_gain arrogant = medium_stress_impact_gain @@ -6240,6 +6321,7 @@ ep3_laamp_peasant_war = { #clear all variable lists, you only get one chance! clear_variable_list = war_supported_counties_list clear_variable_list = war_met_peasant_leaders_list + remove_variable = ep3_laamp_peasant_war_remain_laamp #lose the trait, because you didn't win remove_trait = peasant_leader } @@ -6333,7 +6415,7 @@ admin_barbarian_conquest_cb = { } } } - target_titles = all + target_titles = neighbor_land_or_water target_title_tier = duchy target_de_jure_regions_above = yes ignore_effect = change_title_holder diff --git a/common/character_interactions/00_alliance.txt b/common/character_interactions/00_alliance.txt index d2fdf175..2dacf5d7 100644 --- a/common/character_interactions/00_alliance.txt +++ b/common/character_interactions/00_alliance.txt @@ -3760,7 +3760,7 @@ join_war_interaction = { } scope:recipient = { show_as_tooltip = { - if = { + if = { # if war leader is AI, will directly increase friendship for contributing limit = { is_ai = yes } @@ -3770,7 +3770,7 @@ join_war_interaction = { REASON = friend_alliance } } - else = { + else = { # otherwise will create potential friendship hidden_effect = { #To nudge friendship if = { limit = { @@ -4058,6 +4058,7 @@ join_vassal_war_interaction = { } any_in_list = { list = target_titles + tier <= tier_duchy count = 1 } diff --git a/common/character_interactions/00_ce1_interactions.txt b/common/character_interactions/00_ce1_interactions.txt index 07a3d1d2..975583e1 100644 --- a/common/character_interactions/00_ce1_interactions.txt +++ b/common/character_interactions/00_ce1_interactions.txt @@ -36,7 +36,7 @@ ce1_ask_to_promote_legend_interaction = { scope:recipient.dynasty = scope:actor.dynasty scope:recipient = { knows_language_of_culture = scope:actor.culture } scope:actor = { - has_friendly_relationship_with_character_trigger = { CHARACTER = scope:recipient } + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:recipient } } scope:recipient = { any_character_to_title_neighboring_county = { diff --git a/common/character_interactions/00_character_interactions.txt b/common/character_interactions/00_character_interactions.txt index e765cb72..0ce12166 100644 --- a/common/character_interactions/00_character_interactions.txt +++ b/common/character_interactions/00_character_interactions.txt @@ -650,7 +650,14 @@ offer_vassalization_interaction = { character_is_realm_neighbor = scope:recipient } } - scope:recipient.capital_province = { squared_distance = { target = scope:actor.capital_province value < 200000 } } + scope:recipient = { + # landless ruler count as within realm + trigger_if = { + limit = { is_landed = no } + NOT = { capital_county.holder = { target_is_same_character_or_above = scope:actor } } + } + capital_province = { squared_distance = { target = scope:actor.capital_province value < 200000 } } + } } add = -250 } @@ -662,7 +669,14 @@ offer_vassalization_interaction = { character_is_realm_neighbor = scope:recipient } } - scope:recipient.capital_province = { squared_distance = { target = scope:actor.capital_province value >= 200000 } } + scope:recipient = { + # landless ruler count as within realm + trigger_if = { + limit = { is_landed = no } + NOT = { capital_county.holder = { target_is_same_character_or_above = scope:actor } } + } + capital_province = { squared_distance = { target = scope:actor.capital_province value >= 200000 } } + } } add = -500 } @@ -1530,8 +1544,13 @@ offer_fealty_interaction = { NOT = { any_neighboring_top_liege_realm_owner = { this = scope:recipient } } + # landless ruler count as within realm + trigger_if = { + limit = { is_landed = no } + NOT = { capital_county.holder = { target_is_same_character_or_above = scope:actor } } + } + capital_province = { squared_distance = { target = scope:recipient.capital_province value < 200000 } } } - scope:actor.capital_province = { squared_distance = { target = scope:recipient.capital_province value < 200000 } } } add = -15 } @@ -1542,14 +1561,13 @@ offer_fealty_interaction = { NOT = { any_neighboring_top_liege_realm_owner = { this = scope:recipient } } - } - trigger_if = { - limit = { - exists = scope:recipient.suzerain - scope:recipient.suzerain != scope:actor + # landless ruler count as within realm + trigger_if = { + limit = { is_landed = no } + NOT = { capital_county.holder = { target_is_same_character_or_above = scope:actor } } } + capital_province = { squared_distance = { target = scope:recipient.capital_province value >= 200000 } } } - scope:actor.capital_province = { squared_distance = { target = scope:recipient.capital_province value >= 200000 } } } add = -25 } diff --git a/common/character_interactions/00_culture_interactions.txt b/common/character_interactions/00_culture_interactions.txt index c71c6e77..e64ec67e 100644 --- a/common/character_interactions/00_culture_interactions.txt +++ b/common/character_interactions/00_culture_interactions.txt @@ -122,9 +122,7 @@ ai_cultural_hybridization_interaction = { sub_realm_size >= 4 is_physically_able_adult = yes is_at_war = no - NOT = { - has_game_rule = none_hybrid_culture_ai_frequency - } + game_rule_can_create_hybird_culture_trigger = yes } is_shown = { @@ -215,12 +213,7 @@ ai_cultural_hybridization_interaction = { factor = 0.2 has_game_rule = less_common_hybrid_culture_ai_frequency } - - modifier = { - factor = 0 - exists = global_var:has_ai_hybrid_event_cooldown - } - + modifier = { factor = 0 culture = { diff --git a/common/character_interactions/00_diarch_interactions.txt b/common/character_interactions/00_diarch_interactions.txt index 982256be..75d4fb2d 100644 --- a/common/character_interactions/00_diarch_interactions.txt +++ b/common/character_interactions/00_diarch_interactions.txt @@ -101,7 +101,7 @@ diarch_revoke_title_interaction = { scope:recipient.highest_held_title_tier >= tier_county } } - + is_valid = { # Here to correct for some dodgy inheritance situations. scope:actor != scope:intermediary @@ -157,7 +157,7 @@ diarch_revoke_title_interaction = { trigger_if = { limit = { scope:actor = { is_diarch = yes } - } + } # Diarchs must have unlocked the appropriate power. scope:actor.liege ?= { has_diarchy_active_parameter = unlock_diarch_revoke_title_interaction } } @@ -178,12 +178,12 @@ diarch_revoke_title_interaction = { } } } - + is_highlighted = { # Diarch revocations require a claim - this is uncommon, so we always highlight it. diarch_revocation_has_claim_check_trigger = yes } - + can_be_picked_title = { scope:target = { title_revocation_standard_can_pick_title_trigger = yes @@ -251,7 +251,7 @@ diarch_revoke_title_interaction = { hidden_effect = { scope:actor = { if = { - limit = { + limit = { is_landed_or_landless_administrative = no scope:intermediary != scope:recipient } @@ -732,10 +732,10 @@ diarch_retract_vassal_interaction = { can_send_despite_rejection = yes popup_on_receive = yes pause_on_receive = yes - + ai_min_reply_days = 4 ai_max_reply_days = 9 - + on_decline_summary = diarch_rebel_or_crime_summary.retract is_shown = { @@ -765,7 +765,7 @@ diarch_retract_vassal_interaction = { scope:recipient.highest_held_title_tier >= tier_duchy } } - + is_valid = { # Here to correct for some dodgy inheritance situations. scope:actor != scope:intermediary @@ -817,7 +817,7 @@ diarch_retract_vassal_interaction = { trigger_if = { limit = { scope:actor = { is_diarch = yes } - } + } # Diarchs must have unlocked the appropriate power. scope:actor.liege = { has_diarchy_active_parameter = unlock_diarch_retract_vassal_interaction } } @@ -826,7 +826,7 @@ diarch_retract_vassal_interaction = { scope:actor = { is_at_war_with = scope:actor.liege } } } - + cooldown = { years = 1 } cooldown_against_recipient = { years = 3 } @@ -876,7 +876,7 @@ diarch_retract_vassal_interaction = { extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" send_options_exclusive = no - + on_send = { scope:actor = { add_character_flag = { @@ -889,7 +889,7 @@ diarch_retract_vassal_interaction = { on_auto_accept = { scope:recipient = { trigger_event = char_interaction.0271 } } - + on_accept = { # Follow the standard flow for retraction. save_scope_value_as = { @@ -959,7 +959,7 @@ diarch_retract_vassal_interaction = { diarch_interaction_add_to_global_list_effect = { VARIABLE_LIST = di_track_retract_veto_intermediary_list } } } - + on_decline = { scope:actor = { # Tell them that the retraction ran into issues. @@ -1005,7 +1005,7 @@ diarch_retract_vassal_interaction = { diarch_interaction_add_to_global_list_effect = { VARIABLE_LIST = di_track_retract_decline_intermediary_list } } } - + auto_accept = { OR = { scope:recipient = { @@ -1051,7 +1051,7 @@ diarch_retract_vassal_interaction = { } ai_accept = { base = 0 # Try to make it 0 for most interactions - + # Hook used modifier = { add = 40 @@ -1071,7 +1071,7 @@ diarch_retract_vassal_interaction = { desc = AI_REFUSAL_IS_TREASON scope:actor = { has_realm_law_flag = vassal_refusal_is_treason } } - + ai_value_modifier = { who = scope:recipient ai_greed = { @@ -1111,7 +1111,7 @@ diarch_retract_vassal_interaction = { } } } - + modifier = { #Sub-Vassal is NOT De jure of current Vassal. add = 25 desc = AI_REFUSAL_IS_NOT_DE_JURE_LIEGE @@ -1199,7 +1199,7 @@ diarch_retract_vassal_interaction = { } } } - + # AI ai_targets = { ai_recipients = peer_vassals } ai_frequency_by_tier = { @@ -1210,7 +1210,7 @@ diarch_retract_vassal_interaction = { empire = 24 hegemony = 24 } - + ai_potential = { is_diarch = yes has_realm_law_flag = title_revocation_allowed @@ -1218,7 +1218,7 @@ diarch_retract_vassal_interaction = { # Loyal diarchs don't engage in skullduggery. diarch_loyalty < diarch_loyalty_visibly_loyal_threshold } - + ai_will_do = { # We're generally ruthless here. base = @ai_secondary_powers_base_value @@ -1441,7 +1441,7 @@ diarch_imprison_interaction = { trigger_if = { limit = { scope:actor = { is_diarch = yes } - } + } # Diarchs must have unlocked the appropriate power. scope:actor.liege = { has_diarchy_active_parameter = unlock_diarch_imprison_interaction } scope:actor.liege = { @@ -1468,7 +1468,7 @@ diarch_imprison_interaction = { } } } - + is_highlighted = { scope:recipient = { is_imprisoned = no } scope:actor = { has_imprisonment_reason = scope:recipient } @@ -1576,12 +1576,17 @@ diarch_imprison_interaction = { } on_decline = { - scope:actor = { - imprison_HoF_consequences_effect = yes + scope:actor = { + save_scope_as = use_strife_not_tyranny + imprison_HoF_consequences_effect = yes imprison_tyranny_effect = yes } # Do we want a war or an escape? scope:recipient = { + add_opinion = { + target = scope:actor + modifier = attempted_imprisonment_opinion + } # If target is count or higher, we want the option to start a war. if = { limit = { @@ -1599,6 +1604,11 @@ diarch_imprison_interaction = { diarch_declare_recipient_criminal_effect = yes } 50 = { + trigger = { + scope:actor = { + is_landed = yes # consistent with char_interaction.0283 + } + } show_chance = no desc = char_interaction.0263.result.war scope:recipient = { @@ -1743,7 +1753,7 @@ diarch_imprison_interaction = { } auto_accept = no - + ai_intermediary_accept = { # The AI should be inclined to trust their regent, at least a little. base = 0 @@ -2158,7 +2168,7 @@ diarch_imprison_interaction = { } } } - } + } } # Diarch (actor) offers to boost the CA/TA/IB of liege (recipient), taking on the costs and negatives themselves so that they can use their diarch powers. @@ -2234,7 +2244,7 @@ diarch_subsidise_crown_authority_interaction = { limit = { has_realm_law = crown_authority_2 } can_pass_law_ca3_trigger = yes } - + # If the liege is administrative, they have to be independent. trigger_if = { limit = { government_allows = administrative } @@ -2256,7 +2266,7 @@ diarch_subsidise_crown_authority_interaction = { multiply = subsidised_liege_authority_discount_value } } - + on_accept = { scope:actor = { send_interface_toast = { @@ -2294,7 +2304,7 @@ diarch_subsidise_crown_authority_interaction = { } } } - + ai_accept = { base = 0 @@ -2308,7 +2318,7 @@ diarch_subsidise_crown_authority_interaction = { auto_accept = { custom_description = { - text = auto_accept_interaction_ai + text = auto_accept_interaction_ai object = scope:recipient scope:recipient = { is_ai = yes @@ -2459,7 +2469,7 @@ diarch_adjust_bureaucracy_interaction = { localization = decrease_centralisation_name current_description = decrease_centralisation } - + on_send = { # Tell the AI to set their only send option. if = { @@ -2518,7 +2528,7 @@ diarch_adjust_bureaucracy_interaction = { } } } - + ai_accept = { base = -25 @@ -2645,7 +2655,7 @@ diarch_adjust_bureaucracy_interaction = { auto_accept = { custom_description = { - text = auto_accept_interaction_ai + text = auto_accept_interaction_ai object = scope:recipient scope:recipient = { is_ai = yes @@ -2751,9 +2761,9 @@ diarch_legal_meddling_interaction = { # ... who are appropriately landed. is_landed_or_landless_administrative = yes scope:recipient.highest_held_title_tier >= tier_county - } + } } - + is_valid_showing_failures_only = { # You can't claim a title from someone if you already have claims on all their titles. custom_tooltip = { @@ -2775,7 +2785,7 @@ diarch_legal_meddling_interaction = { trigger_if = { limit = { scope:actor = { is_diarch = yes } - } + } # Diarchs must have unlocked the appropriate power. scope:actor.liege = { has_diarchy_active_parameter = unlock_legal_meddling_interaction } } @@ -2807,7 +2817,7 @@ diarch_legal_meddling_interaction = { cooldown = { months = 6 } cooldown_against_recipient = { years = 3 } - + can_be_picked_title = { scope:target = { # Really anything you don't already have a claim on and which isn't special. @@ -3166,7 +3176,7 @@ diarch_syphon_treasury_interaction = { } } } - + is_valid_showing_failures_only = { # Make sure scope:recipient is the liege. custom_tooltip = { @@ -3194,7 +3204,7 @@ diarch_syphon_treasury_interaction = { trigger_if = { limit = { scope:actor = { is_diarch = yes } - } + } # Diarchs must have unlocked the appropriate power. scope:actor.liege = { has_diarchy_active_parameter = unlock_syphon_treasury_interaction } } @@ -3296,15 +3306,15 @@ diarch_syphon_treasury_interaction = { # Inform scope:actor what type of embezzlement they'll be pursuing. ## Very high stewardship characters syphon development growth from a few counties. if = { - limit = { + limit = { stewardship >= syphon_treasury_stewardship_very_high - NOT = { government_has_flag = government_is_nomadic } + NOT = { government_has_flag = government_is_nomadic } } custom_tooltip = diarch_syphon_treasury_interaction.tt.success.syphon_development_growth } ## Alternatively, herd for nomadic rulers else_if = { - limit = { + limit = { stewardship >= syphon_treasury_stewardship_very_high government_has_flag = government_is_nomadic } @@ -3399,27 +3409,27 @@ diarch_syphon_treasury_interaction = { ## Very high. if = { limit = { always = scope:diarch_syphon_treasury_sum_huge } - scope:recipient = { + scope:recipient = { domicile ?= { change_herd = monumental_herd_loss } } } ## High. else_if = { limit = { always = scope:diarch_syphon_treasury_sum_large } - scope:recipient = { + scope:recipient = { domicile ?= { change_herd = massive_herd_loss } } } ## Medium. else_if = { limit = { always = scope:diarch_syphon_treasury_sum_medium } - scope:recipient = { + scope:recipient = { domicile ?= { change_herd = major_herd_loss } } } ## Low. else = { - scope:recipient = { + scope:recipient = { domicile ?= { change_herd = medium_herd_loss } } } @@ -3830,7 +3840,7 @@ diarch_shift_privileges_interaction = { scope:recipient.highest_held_title_tier >= tier_county } } - + is_valid_showing_failures_only = { # Diarch must be able to act. diarch_cannot_be_disabled_trigger = { DIARCH = scope:actor } @@ -3850,7 +3860,7 @@ diarch_shift_privileges_interaction = { trigger_if = { limit = { scope:actor = { is_diarch = yes } - } + } # Diarchs must have unlocked the appropriate power. scope:actor.liege = { has_diarchy_active_parameter = unlock_shift_privileges_interaction } } @@ -4206,7 +4216,7 @@ diarch_request_imperial_expedition_interaction = { } } } - + # How much influence do we want to outlay on this? ## A cheapy amount. send_option = { @@ -4261,7 +4271,7 @@ diarch_request_imperial_expedition_interaction = { trigger_event = diarchy.8002 } } - + auto_accept = { scope:recipient = { trigger_if = { @@ -4600,7 +4610,7 @@ diarch_demand_despotate_interaction = { } } } - + # How much influence do we want to outlay on this? ## A cheapy amount. send_option = { @@ -4677,7 +4687,7 @@ diarch_demand_despotate_interaction = { trigger_event = diarchy.8032 } } - + auto_accept = { scope:recipient = { trigger_if = { @@ -5010,10 +5020,14 @@ diarch_coup_liege_interaction = { scope:recipient = scope:actor.liege } } - scope:recipient = { save_scope_as = secondary_recipient } + scope:recipient = { + save_scope_as = secondary_recipient + } } # Always make sure we're targeting your liege as the recipient for UX consistency. - scope:actor.liege = { save_scope_as = recipient } + scope:actor.liege = { + save_scope_as = recipient + } } is_shown = { @@ -5028,12 +5042,11 @@ diarch_coup_liege_interaction = { is_designated_diarch = yes } } - # Valid on vassals of your liege or your liege themselves. - ## More complex triggers don't generally work because redirect brings the interaction back to targeting the liege as scope:recipient, so we're left with this. - ### Don't try to improve it, it's not worth it, but if you _do_, then test your changes thoroughly. - #### When this breaks (which it does easily), it tends to mean the interaction shows up as valid against _every_ other character in diplomatic range. - OR = { - scope:recipient = scope:actor.liege + # secondary_recipient is always saved whenever you use it on anyone who isn't yourself or your liege, so we use this fact to validate it after the redirect, otherwise it will show up on every other ruler in the game + trigger_if = { + limit = { + exists = scope:secondary_recipient + } scope:secondary_recipient.liege ?= scope:actor.liege } } @@ -5072,7 +5085,7 @@ diarch_coup_liege_interaction = { trigger_if = { limit = { scope:actor = { is_diarch = yes } - } + } # Diarchs must have unlocked the appropriate power. scope:actor.liege ?= { has_diarchy_active_parameter = regents_can_try_to_overthrow_present_lieges } } @@ -5165,7 +5178,7 @@ diarch_coup_liege_interaction = { if = { limit = { exists = scope:secondary_recipient } scope:actor = { - # Scope:secondary_recipient joins your conspiracy. + # Scope:secondary_recipient joins your conspiracy. custom_tooltip = diarch_coup_liege_interaction.tt.secondary_recipient.joins_conspiracy ## Send a notification just for a bit of extra feedback. send_interface_toast = { @@ -5256,12 +5269,18 @@ diarch_coup_liege_interaction = { # Opinion. ## Of scope:actor. opinion_modifier = { + trigger = { + exists = scope:secondary_recipient # because the secondary_recipient hasn't been chosen when the interaction is initialized + } who = scope:secondary_recipient opinion_target = scope:actor multiplier = 1 } ## Of scope:recipient. opinion_modifier = { + trigger = { + exists = scope:secondary_recipient + } who = scope:secondary_recipient opinion_target = scope:recipient multiplier = -0.5 @@ -5269,6 +5288,9 @@ diarch_coup_liege_interaction = { # Personality. ## Values. ai_value_modifier = { + trigger = { + exists = scope:secondary_recipient + } who = scope:secondary_recipient ai_honor = -1 ai_boldness = 0.25 @@ -5278,68 +5300,69 @@ diarch_coup_liege_interaction = { modifier = { add = diarch_ai_desire_plus_3_value desc = diarch_coup_liege_interaction.tt.liege_has_loyalty_hook.tt.has_trait.disloyal - scope:secondary_recipient = { has_trait = disloyal } + scope:secondary_recipient ?= { has_trait = disloyal } } ### +++ Ambitious. modifier = { add = diarch_ai_desire_plus_3_value desc = diarch_coup_liege_interaction.tt.liege_has_loyalty_hook.tt.has_trait.ambitious - scope:secondary_recipient = { has_trait = ambitious } + scope:secondary_recipient ?= { has_trait = ambitious } } ### ++ Arbitrary. modifier = { add = diarch_ai_desire_plus_2_value desc = diarch_coup_liege_interaction.tt.liege_has_loyalty_hook.tt.has_trait.arbitrary - scope:secondary_recipient = { has_trait = arbitrary } + scope:secondary_recipient ?= { has_trait = arbitrary } } ### + Fickle. modifier = { add = diarch_ai_desire_plus_1_value desc = diarch_coup_liege_interaction.tt.liege_has_loyalty_hook.tt.has_trait.fickle - scope:secondary_recipient = { has_trait = fickle } + scope:secondary_recipient ?= { has_trait = fickle } } ### - Stubborn. modifier = { add = diarch_ai_desire_minus_1_value desc = diarch_coup_liege_interaction.tt.liege_has_loyalty_hook.tt.has_trait.stubborn - scope:secondary_recipient = { has_trait = stubborn } + scope:secondary_recipient ?= { has_trait = stubborn } } ### -- Just. modifier = { add = diarch_ai_desire_minus_2_value desc = diarch_coup_liege_interaction.tt.liege_has_loyalty_hook.tt.has_trait.just - scope:secondary_recipient = { has_trait = just } + scope:secondary_recipient ?= { has_trait = just } } ### --- Content. modifier = { add = diarch_ai_desire_minus_3_value desc = diarch_coup_liege_interaction.tt.liege_has_loyalty_hook.tt.has_trait.content - scope:secondary_recipient = { has_trait = content } + scope:secondary_recipient ?= { has_trait = content } } ### --- Loyal. modifier = { add = diarch_ai_desire_minus_3_value desc = diarch_coup_liege_interaction.tt.liege_has_loyalty_hook.tt.has_trait.loyal - scope:secondary_recipient = { has_trait = loyal } + scope:secondary_recipient ?= { has_trait = loyal } } # Hooks. ## Weak hooks are happy to have you in power. modifier = { add = 25 - scope:secondary_recipient = { has_weak_hook = scope:actor } + scope:secondary_recipient ?= { has_weak_hook = scope:actor } } ## Strong hooks are *very* happy to have you in power. modifier = { add = 75 - scope:secondary_recipient = { has_strong_hook = scope:actor } + scope:secondary_recipient ?= { has_strong_hook = scope:actor } } ## And conversely, don't want you to coup scope:recipient if they've already got a strong hook on them. modifier = { add = -100 - scope:secondary_recipient = { has_strong_hook = scope:recipient } + scope:secondary_recipient ?= { has_strong_hook = scope:recipient } } ## Loyalty hooks stop the AI signing up. modifier = { + exists = scope:secondary_recipient add = -1000 desc = diarch_coup_liege_interaction.tt.liege_has_loyalty_hook diarch_loyalty_due_to_hook_trigger = { @@ -5355,12 +5378,12 @@ diarch_coup_liege_interaction = { # Reduce the malus a little if also allied to scope:actor. if = { limit = { - scope:secondary_recipient = { is_allied_to = scope:actor } + scope:secondary_recipient ?= { is_allied_to = scope:actor } } add = 50 } } - scope:secondary_recipient = { is_allied_to = scope:recipient } + scope:secondary_recipient ?= { is_allied_to = scope:recipient } } ## Heirs don't generally want to betray scope:recipient, as they'll lose out. modifier = { @@ -5510,7 +5533,7 @@ mulct_vizier_interaction = { # Don't squeeze them too often. cooldown = { years = 10 } - + # Attempt Methods send_options_exclusive = yes ## Minimal. @@ -5643,7 +5666,7 @@ mulct_vizier_interaction = { diarch_interaction_add_to_global_list_effect = { VARIABLE_LIST = di_track_vizmulct_accept_recipient_list } } } - + auto_accept = yes # AI @@ -6499,8 +6522,8 @@ swing_scales_currency_interaction = { # Viziers give you more bang for your buck when swinging against 'em. # Perk check for Voyager perk if = { - limit = { - has_diarchy_active_parameter = lieges_swing_more_against_diarchs + limit = { + has_diarchy_active_parameter = lieges_swing_more_against_diarchs has_perk = power_at_home_perk is_travelling = yes } @@ -6513,7 +6536,7 @@ swing_scales_currency_interaction = { else_if = { limit = { OR = { - has_diarchy_active_parameter = lieges_swing_more_against_diarchs + has_diarchy_active_parameter = lieges_swing_more_against_diarchs AND = { has_perk = power_at_home_perk is_travelling = yes @@ -6562,8 +6585,8 @@ swing_scales_currency_interaction = { # Viziers give you more bang for your buck when swinging against 'em. # Perk check for Voyager perk if = { - limit = { - has_diarchy_active_parameter = lieges_swing_more_against_diarchs + limit = { + has_diarchy_active_parameter = lieges_swing_more_against_diarchs has_perk = power_at_home_perk is_travelling = yes } @@ -6576,7 +6599,7 @@ swing_scales_currency_interaction = { else_if = { limit = { OR = { - has_diarchy_active_parameter = lieges_swing_more_against_diarchs + has_diarchy_active_parameter = lieges_swing_more_against_diarchs AND = { has_perk = power_at_home_perk is_travelling = yes @@ -6872,7 +6895,7 @@ diarch_swing_scales_currency_interaction = { } cooldown = { years = 2 } - + cost = { influence = { if = { @@ -6996,9 +7019,11 @@ diarch_swing_scales_currency_interaction = { scope:actor.var:movement_power_individual >= decent_movement_power_value } is_shown = { + exists = scope:actor.var:movement_power_individual scope:actor = { government_has_flag = government_is_celestial is_diarch_of_target = scope:recipient + exists = var:movement_power_individual } scope:recipient = { government_has_flag = government_is_celestial } } @@ -7206,7 +7231,7 @@ diarch_entrench_regency_interaction = { # You must be able to act as diarch. diarch_cannot_be_disabled_trigger = { DIARCH = scope:actor } } - + on_accept = { scope:recipient = { # Tell scope:recipient what's up. @@ -7240,7 +7265,7 @@ diarch_entrench_regency_interaction = { diarch_interaction_add_to_global_list_effect = { VARIABLE_LIST = di_track_entrench_recipient_list } } } - + auto_accept = yes # AI @@ -7323,7 +7348,7 @@ diarch_regent_appoints_self_co_emperor_interaction = { } } } - + on_accept = { scope:recipient = { # Tell scope:recipient what's up. @@ -7361,7 +7386,7 @@ diarch_regent_appoints_self_co_emperor_interaction = { # Bit o'prestige for your hard work. scope:actor = { add_prestige = medium_prestige_gain } } - + auto_accept = yes # AI @@ -7413,7 +7438,7 @@ liege_dismiss_temporary_regency_interaction = { # Basic requirements must be fulfilled. scope:actor = { can_leave_diarchy_trigger = yes } } - + on_accept = { scope:actor = { # Tell scope:recipient what's up. @@ -7453,7 +7478,7 @@ liege_dismiss_temporary_regency_interaction = { diarch_interaction_add_to_global_list_effect = { VARIABLE_LIST = di_track_dismtemp_accept_recipient_list } } } - + auto_accept = yes # AI @@ -7622,8 +7647,8 @@ liege_dismiss_entrenched_regency_interaction = { current_description = diarchy_ending_gift_herd_desc is_shown = { # Can only pay herd if actor has herd to pay and recipient accepts herd as a currency - scope:actor = { government_has_flag = government_is_nomadic } - scope:recipient = { government_has_flag = government_is_nomadic } + scope:actor = { government_has_flag = government_is_nomadic } + scope:recipient = { government_has_flag = government_is_nomadic } } } @@ -8003,7 +8028,7 @@ liege_dismiss_entrenched_regency_interaction = { scope:diarchy_ending_gift_unnecessary = yes } } - + ai_accept = { # Diarchs don't *want* to agree, by default... base = 0 @@ -8327,7 +8352,7 @@ liege_dismiss_vizier_interaction = { } cooldown = { years = 5 } - + on_accept = { scope:actor = { # We've dismissed your vizier! @@ -8441,7 +8466,7 @@ liege_dismiss_vizier_interaction = { diarch_interaction_add_to_global_list_effect = { VARIABLE_LIST = di_track_dismviz_accept_recipient_list } } } - + auto_accept = yes # AI @@ -8580,7 +8605,7 @@ liege_dismiss_vizier_interaction = { declare_me_regent_interaction = { category = interaction_category_diarch icon = icon_declare_me_regent - filter_tags = { admin_liege rep_liege } + filter_tags = { admin_liege } desc = declare_me_regent_interaction_desc notification_text = DECLARE_ME_REGENT_PROPOSAL @@ -8987,7 +9012,7 @@ declare_me_regent_interaction = { } } } - # Events + # Events modifier = { add = 25 desc = tgp_power_undermined_modifier_tt @@ -9193,16 +9218,26 @@ appoint_vizier_interaction = { NOT = { has_diarchy_active_parameter = diarchy_is_vizierate } } # We perform this upon ourselves or our (probable) candidates. - scope:recipient = { - OR = { - this = scope:actor - is_courtier_of = scope:actor - AND = { - highest_held_title_tier = tier_barony - liege = scope:actor + trigger_if = { + limit = { + exists = scope:secondary_recipient + } + scope:secondary_recipient = { + is_valid_basic_candidate_for_vizier_trigger = yes + OR = { + is_courtier_of = scope:actor + AND = { + highest_held_title_tier = tier_barony + liege = scope:actor + } } } } + trigger_else = { + scope:recipient = { + this = scope:actor + } + } } is_valid_showing_failures_only = { @@ -9227,6 +9262,14 @@ appoint_vizier_interaction = { populate_recipient_list = { sort_vizier_candidates_to_list_effect = yes } + redirect = { + if = { + limit = { scope:recipient != scope:actor } + scope:recipient = { save_scope_as = secondary_recipient } + scope:actor = { save_scope_as = recipient } + } + } + cost = { prestige = major_prestige_value renown = { @@ -9379,7 +9422,7 @@ appoint_vizier_interaction = { custom_tooltip = appoint_vizier_interaction.tt.warning.vizier_replace_councillor } } - + # Object explorer logging. scope:actor = { diarch_interaction_set_or_update_global_variable_effect = { VARIABLE = di_track_appviz_accept } @@ -9400,11 +9443,11 @@ appoint_vizier_interaction = { empire = 120 hegemony = 120 } - + ai_potential = { government_has_flag = may_appoint_viziers } - + ai_will_do = { base = 0 @@ -9655,10 +9698,10 @@ appoint_junior_emperor_interaction = { } resolve_title_and_vassal_change = scope:change } - - - - + + + + # Object explorer logging. scope:actor = { diarch_interaction_set_or_update_global_variable_effect = { VARIABLE = di_track_appjunemp_accept } @@ -9679,7 +9722,7 @@ appoint_junior_emperor_interaction = { empire = 60 hegemony = 60 } - + ai_potential = { # Filter us down nice'n'tight. may_appoint_co_emperors_trigger = yes @@ -9692,7 +9735,7 @@ appoint_junior_emperor_interaction = { is_adult = no } } - + ai_will_do = { # The AI doesn't like doing this without good reason. base = -100 @@ -9714,7 +9757,7 @@ appoint_co_emperor_interaction = { if = { limit = { NOT = { - scope:secondary_recipient ?= { + scope:secondary_recipient ?= { valid_co_emperor_candidate_trigger = { LIEGE = scope:actor } } } @@ -9900,9 +9943,9 @@ appoint_co_emperor_interaction = { resolve_title_and_vassal_change = scope:change } - - - + + + # Object explorer logging. scope:actor = { diarch_interaction_set_or_update_global_variable_effect = { VARIABLE = di_track_appcoemp_accept } @@ -9924,7 +9967,7 @@ appoint_co_emperor_interaction = { empire = 60 hegemony = 60 } - + ai_potential = { # Filter us down nice'n'tight. may_appoint_co_emperors_trigger = yes @@ -9934,7 +9977,7 @@ appoint_co_emperor_interaction = { age >= 50 any_child = { is_adult = yes } } - + ai_will_do = { # The AI doesn't like doing this without good reason. base = -100 @@ -10108,9 +10151,9 @@ appoint_co_monarch_interaction = { resolve_title_and_vassal_change = scope:change } - - - + + + # Object explorer logging. scope:actor = { diarch_interaction_set_or_update_global_variable_effect = { VARIABLE = di_track_appcomon_accept } @@ -10131,7 +10174,7 @@ appoint_co_monarch_interaction = { empire = 120 hegemony = 120 } - + ai_potential = { # Filter us down nice'n'tight. may_appoint_co_monarchs_trigger = yes @@ -10141,7 +10184,7 @@ appoint_co_monarch_interaction = { age >= 50 any_child = { is_adult = yes } } - + ai_will_do = { # The AI doesn't like doing this without good reason. base = -100 diff --git a/common/character_interactions/00_invite_agent_to_scheme.txt b/common/character_interactions/00_invite_agent_to_scheme.txt index 2723d6ab..85688414 100644 --- a/common/character_interactions/00_invite_agent_to_scheme.txt +++ b/common/character_interactions/00_invite_agent_to_scheme.txt @@ -14,6 +14,8 @@ invite_agent_to_scheme_interaction = { always = scope:mandala_trickster always = scope:gift always = scope:gift_significant + always = scope:treasury + always = scope:treasury_significant always = scope:offer_hook always = scope:offer_hook_strong always = scope:hook @@ -45,6 +47,8 @@ invite_agent_to_scheme_interaction = { always = scope:mandala_trickster always = scope:gift always = scope:gift_significant + always = scope:treasury + always = scope:treasury_significant always = scope:offer_hook always = scope:offer_hook_strong always = scope:hook @@ -87,6 +91,22 @@ invite_agent_to_scheme_interaction = { } stress_impact = { greedy = medium_stress_impact_gain } } + # Treasury Bribe + if = { + limit = { always = scope:treasury } + pay_treasury_to_gold = { + value = bribe_value + target = scope:recipient + } + } + # Big Treasury Bribe + if = { + limit = { always = scope:treasury_significant } + pay_treasury_to_gold = { + value = greater_bribe_value + target = scope:recipient + } + } # Offer Hook if = { limit = { always = scope:offer_hook } @@ -449,6 +469,12 @@ invite_agent_to_scheme_interaction = { send_option = { flag = gift is_shown = { + NOT = { + scope:actor = { + has_treasury = yes + has_title = title:e_minister_censor + } + } # We don't show bribes for schemes where agents will always auto-accept or else deny. NAND = { scope:scheme = { is_scheme_category = contract } @@ -476,6 +502,12 @@ invite_agent_to_scheme_interaction = { send_option = { flag = gift_significant is_shown = { + NOT = { + scope:actor = { + has_treasury = yes + has_title = title:e_minister_censor + } + } # We don't show bribes for schemes where agents will always auto-accept or else deny. NAND = { scope:scheme = { is_scheme_category = contract } @@ -499,6 +531,68 @@ invite_agent_to_scheme_interaction = { } } } + ## Treasury + send_option = { + flag = treasury + is_shown = { + scope:actor = { + has_treasury = yes + has_title = title:e_minister_censor + } + # We don't show bribes for schemes where agents will always auto-accept or else deny. + NAND = { + scope:scheme = { is_scheme_category = contract } + scope:recipient = { is_courtier_of = scope:actor } + } + } + is_valid = { + scope:actor.treasury >= bribe_value + custom_tooltip = { + text = offer_gold.tt.cannot_offer_both_bribes + scope:treasury_significant = no + } + would_agent_accept_petty_bribes_against_target_trigger = yes + } + localization = SCHEME_AGENT_TREASURY_BRIBE + current_description = { + # Triggered desc so that we don't get a weird double tooltip. + triggered_desc = { + trigger = { scope:actor.treasury >= bribe_value } + desc = SCHEME_AGENT_TREASURY_BRIBE_VALID + } + } + } + ## Even more treasury + send_option = { + flag = treasury_significant + is_shown = { + scope:actor = { + has_treasury = yes + has_title = title:e_minister_censor + } + # We don't show bribes for schemes where agents will always auto-accept or else deny. + NAND = { + scope:scheme = { is_scheme_category = contract } + scope:recipient = { is_courtier_of = scope:actor } + } + } + is_valid = { + scope:actor.treasury >= greater_bribe_value + custom_tooltip = { + text = offer_gold.tt.cannot_offer_both_bribes + scope:treasury = no + } + would_agent_accept_petty_bribes_against_target_trigger = yes + } + localization = SCHEME_AGENT_TREASURY_SIGNIFICANT_BRIBE + current_description = { + # Triggered desc so that we don't get a weird double tooltip. + triggered_desc = { + trigger = { scope:actor.treasury >= greater_bribe_value } + desc = SCHEME_AGENT_TREASURY_SIGNIFICANT_VALID + } + } + } ## Offer a hook send_option = { flag = offer_hook diff --git a/common/character_interactions/00_marriage_interactions.txt b/common/character_interactions/00_marriage_interactions.txt index d32e7b30..bdd108ef 100644 --- a/common/character_interactions/00_marriage_interactions.txt +++ b/common/character_interactions/00_marriage_interactions.txt @@ -787,10 +787,7 @@ arrange_marriage_interaction = { custom_tooltip = { text = grand_wedding_already_promised_tt NOR = { - AND = { - has_variable = promised_grand_wedding_marriage_countdown - var:promised_grand_wedding_marriage_countdown = { is_alive = yes } - } + var:promised_grand_wedding_marriage_countdown ?= { is_alive = yes } has_variable = grand_wedding_promise_pending } } @@ -858,8 +855,7 @@ arrange_marriage_interaction = { } trigger_if = { limit = { - exists = scope:secondary_recipient.liege - scope:secondary_recipient.liege = { + scope:secondary_recipient.liege ?= { diarch = scope:secondary_recipient has_active_diarchy = yes } @@ -882,17 +878,15 @@ arrange_marriage_interaction = { flag = matrilineal localization = MATRILINEAL_OFFER is_shown = { - OR = { - NOT = { exists = scope:secondary_actor } - NOT = { exists = scope:secondary_recipient } - scope:secondary_actor = { sex_opposite_of = scope:secondary_recipient } + NAND = { + scope:secondary_actor ?= { is_male = yes } + scope:secondary_recipient ?= { is_male = yes } } } current_description = { triggered_desc = { trigger = { - exists = scope:secondary_actor - scope:secondary_actor = { + scope:secondary_actor ?= { betrothed = scope:secondary_recipient matrilinear_betrothal = yes } @@ -931,12 +925,16 @@ arrange_marriage_interaction = { } } } + # so they can use grand wedding... + NAND = { + scope:secondary_actor ?= { is_female = yes } + scope:secondary_recipient ?= { is_female = yes } + } } starts_enabled = { trigger_if = { limit = { - exists = scope:secondary_actor - scope:secondary_actor = { + scope:secondary_actor ?= { betrothed = scope:secondary_recipient } } @@ -946,8 +944,7 @@ arrange_marriage_interaction = { } trigger_else_if = { limit = { - exists = scope:secondary_actor - scope:actor = scope:secondary_actor + scope:secondary_actor ?= scope:actor scope:actor = { is_female = yes is_ai = no @@ -963,18 +960,20 @@ arrange_marriage_interaction = { } AND = { this = scope:recipient - exists = scope:secondary_recipient - scope:secondary_recipient = { + scope:secondary_recipient ?= { is_female = yes } faith = { has_doctrine = doctrine_gender_equal } } AND = { - exists = scope:secondary_actor - scope:actor = scope:secondary_actor + scope:secondary_actor ?= this is_female = yes is_ai = no } + AND = { + scope:secondary_actor ?= { is_female = yes } + scope:secondary_recipient ?= { is_female = yes } + } } } } @@ -1322,28 +1321,40 @@ marry_off_interaction = { #otherwise, populate with anyone eligible else = { scope:secondary_actor = { - every_opposite_sex_spouse_candidate = { add_to_list = characters } if = { - limit = { allowed_to_marry_same_sex_trigger = yes } - every_same_sex_spouse_candidate = { + limit = { + culture = { has_cultural_parameter = reduced_marriage_acceptance_distant_realms } + } + every_opposite_sex_spouse_candidate = { limit = { - scope:secondary_actor != this + top_liege.culture = scope:secondary_actor.top_liege.culture } add_to_list = characters } - } - } - # Cleanup list if insular culture - if = { - limit = { - scope:secondary_actor.culture = { has_cultural_parameter = reduced_marriage_acceptance_distant_realms } - } - every_in_list = { - list = characters - limit = { - NOT = { top_liege.culture = scope:secondary_actor.top_liege.culture } + if = { + limit = { allowed_to_marry_same_sex_trigger = yes } + every_same_sex_spouse_candidate = { + limit = { + scope:secondary_actor != this + top_liege.culture = scope:secondary_actor.top_liege.culture + } + add_to_list = characters + } + } + } + else = { + every_opposite_sex_spouse_candidate = { + add_to_list = characters + } + if = { + limit = { allowed_to_marry_same_sex_trigger = yes } + every_same_sex_spouse_candidate = { + limit = { + scope:secondary_actor != this + } + add_to_list = characters + } } - remove_from_list = characters } } } @@ -1674,6 +1685,12 @@ marry_off_interaction = { send_option = { flag = matrilineal localization = "MATRILINEAL_OFFER" + is_shown = { + NAND = { + scope:secondary_actor ?= { is_male = yes } + scope:secondary_recipient ?= { is_male = yes } + } + } starts_enabled = { scope:actor = { OR = { @@ -1681,18 +1698,28 @@ marry_off_interaction = { has_doctrine = doctrine_gender_female_dominated } AND = { - scope:secondary_actor = { is_female = yes } + scope:secondary_actor ?= { is_female = yes } faith = { has_doctrine = doctrine_gender_equal } } AND = { - exists = scope:secondary_actor - scope:actor = scope:secondary_actor + scope:secondary_actor ?= this is_female = yes is_ai = no } + AND = { + scope:secondary_actor ?= { is_female = yes } + scope:secondary_recipient ?= { is_female = yes } + } } } } + # so they can use grand wedding... + can_be_changed = { + NAND = { + scope:secondary_actor ?= { is_female = yes } + scope:secondary_recipient ?= { is_female = yes } + } + } } send_option = { @@ -1881,106 +1908,81 @@ break_betrothal_interaction = { is_shown = { OR = { - #Betrothed to betrothed - scope:actor.betrothed = scope:recipient - - #Actor breaking recipient's betrothal with their courtier/vassal child - scope:actor = { - any_courtier = { - is_ai = yes - is_betrothed = yes - betrothed = { this = scope:recipient } - OR = { - is_playable_character = no - any_parent = { this = scope:actor } - } - } + #Actor breaking their betrothal to recipient or recipient's courtier/vassal child + scope:actor.betrothed ?= { + break_betrothal_valid_target_trigger = { CHARACTER = scope:recipient } } #Actor breaking the betrothal of their courtier/vassal child scope:recipient = { - is_ai = yes - is_betrothed = yes - OR = { - AND = { - is_playable_character = no - liege = scope:actor - } - AND = { - is_child_of = scope:actor - NOT = { - matchmaker = { - is_parent_of = prev - this != scope:actor - } - } - OR = { - is_playable_character = no - target_is_liege_or_above = scope:actor - } - } - } - betrothed = { always = yes } + break_betrothal_valid_target_trigger = { CHARACTER = scope:actor } } - #Break recipient's betrothal with actor's vassal child/courtier - scope:recipient = { - is_betrothed = yes - betrothed = { - is_ai = yes - OR = { - AND = { - is_child_of = scope:actor - target_is_liege_or_above = scope:actor - NOT = { - matchmaker = { - is_parent_of = prev - this != scope:actor - } - } - } - AND = { - is_playable_character = no - liege = scope:actor - } - } - } - } - - #Actor breaking their betrothal to recipient's courtier/vassal child - AND = { - scope:actor = { is_betrothed = yes } - scope:recipient = { - OR = { - #Check for courtiers - any_courtier = { - is_betrothed = yes - betrothed = scope:actor - liege = scope:recipient - } - #Check for vassal children - any_child = { - is_betrothed = yes - betrothed = scope:actor - OR = { - is_playable_character = no - target_is_liege_or_above = scope:recipient - } - NOT = { - matchmaker = { - is_parent_of = prev - this != scope:actor - } - } - } - } - } + #Break recipient's betrothal with actor, or actor's vassal child/courtier + scope:recipient.betrothed ?= { + break_betrothal_valid_target_trigger = { CHARACTER = scope:actor } } } } - is_valid = { + populate_actor_list = { + # breaking your own betrothal to recipient or their courtier or unplayable child + if = { + limit = { + betrothed ?= { + break_betrothal_valid_target_trigger = { CHARACTER = scope:recipient } + } + } + add_to_list = characters + } + scope:recipient = { + if = { + limit = { + betrothed ?= { + is_ai = yes + break_betrothal_valid_target_trigger = { CHARACTER = scope:actor } + } + } + add_to_list = characters + } + } + every_courtier = { + limit = { + is_ai = yes + is_betrothed = yes + betrothed ?= { + break_betrothal_valid_target_trigger = { CHARACTER = scope:recipient } + } + OR = { + is_playable_character = no + any_parent = { this = scope:actor } + } + } + add_to_list = characters + } + } + redirect = { + # secondary_actor is the one under actor's control, could be actor + if = { + limit = { + scope:actor.betrothed ?= { + break_betrothal_valid_target_trigger = { CHARACTER = scope:recipient } + } + } + scope:actor = { save_scope_as = secondary_actor } + } + else_if = { + limit = { + scope:recipient = { + break_betrothal_valid_target_trigger = { CHARACTER = scope:actor } + } + } + scope:recipient = { save_scope_as = secondary_actor } + } + else = { + scope:recipient.betrothed ?= { save_scope_as = secondary_actor } + } } is_valid_showing_failures_only = { @@ -1991,28 +1993,8 @@ break_betrothal_interaction = { object = scope:recipient trigger_if = { limit = { - exists = scope:recipient.betrothed - OR = { - scope:recipient.betrothed = scope:actor - scope:recipient.betrothed = { - is_ai = yes - OR = { - AND = { - is_child_of = scope:actor - target_is_liege_or_above = scope:actor - NOT = { - matchmaker = { - is_parent_of = prev - this != scope:actor - } - } - } - AND = { - is_playable_character = no - liege = scope:actor - } - } - } + scope:recipient.betrothed ?= { + break_betrothal_valid_target_trigger = { CHARACTER = scope:actor } } exists = scope:recipient.var:hook_used_for_betrothal } @@ -2027,28 +2009,8 @@ break_betrothal_interaction = { object = scope:recipient trigger_if = { limit = { - exists = scope:recipient.betrothed - OR = { - scope:recipient = scope:actor - scope:recipient = { - is_ai = yes - OR = { - AND = { - is_child_of = scope:actor - target_is_liege_or_above = scope:actor - NOT = { - matchmaker = { - is_parent_of = prev - this != scope:actor - } - } - } - AND = { - is_playable_character = no - liege = scope:actor - } - } - } + scope:recipient.betrothed ?= { + break_betrothal_valid_target_trigger = { CHARACTER = scope:actor } } exists = scope:recipient.betrothed.var:hook_used_for_betrothal } @@ -2071,8 +2033,7 @@ break_betrothal_interaction = { is_betrothed = yes betrothed = scope:actor liege = scope:recipient - exists = var:hook_used_for_betrothal - var:hook_used_for_betrothal = { + var:hook_used_for_betrothal ?= { this = scope:actor } } @@ -2090,8 +2051,7 @@ break_betrothal_interaction = { this != scope:actor } } - exists = var:hook_used_for_betrothal - var:hook_used_for_betrothal = { + var:hook_used_for_betrothal ?= { this = scope:actor } } @@ -2109,7 +2069,7 @@ break_betrothal_interaction = { limit = { OR = { scope:recipient = { has_been_promised_grand_wedding = yes } - scope:recipient.betrothed = { has_been_promised_grand_wedding = yes } + scope:recipient.betrothed ?= { has_been_promised_grand_wedding = yes } } } NOR = { @@ -2138,43 +2098,10 @@ break_betrothal_interaction = { on_accept = { #Identifies the "injured party" - scope:recipient = { - if = { - limit = { matchmaker = scope:actor } - betrothed = { save_scope_as = rejected_betrothed } - save_scope_as = rejecting_betrothed - } - else_if = { - limit = { - OR = { - #Check for courtiers - any_courtier = { - is_betrothed = yes - is_ai = yes - betrothed = scope:actor - liege = scope:recipient - } - #Check for vassal children - any_child = { - is_betrothed = yes - is_ai = yes - betrothed = scope:actor - target_is_liege_or_above = scope:recipient - } - } - } - scope:actor.betrothed = { - save_scope_as = rejected_betrothed - } - scope:actor = { - save_scope_as = rejecting_betrothed - } - } - - else = { - save_scope_as = rejected_betrothed - betrothed = { save_scope_as = rejecting_betrothed } - } + # rejected_betrothed NEVER actor + scope:secondary_actor = { + save_scope_as = rejecting_betrothed + betrothed = { save_scope_as = rejected_betrothed } } # If it was a Grand Wedding, find the host @@ -2211,19 +2138,8 @@ break_betrothal_interaction = { if = { limit = { #Only if you had no reason to break the betrothal - scope:rejected_betrothed = { is_eunuch_trigger = no } - scope:rejecting_betrothed = { is_eunuch_trigger = no } + has_proper_reason_to_break_betrothal_trigger = no NOR = { - scope:rejected_betrothed = { has_trait_with_flag = can_not_marry } - scope:rejecting_betrothed = { has_trait_with_flag = can_not_marry } - scope:rejected_betrothed = { - allowed_to_marry_same_sex_trigger = no - sex_same_as = scope:rejecting_betrothed - } - scope:rejecting_betrothed = { - allowed_to_marry_same_sex_trigger = no - sex_same_as = scope:rejected_betrothed - } # Prestige loss for Grand Weddings is handled below in the specific effect scope:rejecting_betrothed = { has_been_promised_grand_wedding = yes } scope:rejected_betrothed = { has_been_promised_grand_wedding = yes } @@ -2231,41 +2147,25 @@ break_betrothal_interaction = { } #Prestige penalty if = { + limit = { + OR = { + scope:rejected_betrothed = { highest_held_title_tier > tier_empire } + scope:rejected_betrothal_owner = { highest_held_title_tier > tier_empire } + } + #Only applied for relevant characters + cost_prestige_for_break_betrothal_trigger = yes + } + scope:actor = { add_prestige = monumental_prestige_loss } + } + + else_if = { limit = { OR = { scope:rejected_betrothed = { highest_held_title_tier = tier_empire } scope:rejected_betrothal_owner = { highest_held_title_tier = tier_empire } } #Only applied for relevant characters - OR = { - scope:rejected_betrothed = { - OR = { - is_close_family_of = scope:actor - AND = { - exists = dynasty - exists = scope:actor.dynasty - dynasty = scope:actor.dynasty - } - } - } - scope:rejecting_betrothed = { - OR = { - is_close_family_of = scope:actor - AND = { - exists = dynasty - exists = scope:actor.dynasty - dynasty = scope:actor.dynasty - } - } - } - scope:actor = { - yields_alliance = { - candidate = scope:rejecting_betrothed - target = scope:rejected_betrothal_owner - target_candidate = scope:rejected_betrothed - } - } - } + cost_prestige_for_break_betrothal_trigger = yes } scope:actor = { add_prestige = massive_prestige_loss } } @@ -2277,35 +2177,7 @@ break_betrothal_interaction = { scope:rejected_betrothal_owner = { highest_held_title_tier = tier_kingdom } } #Only applied for relevant characters - OR = { - scope:rejected_betrothed = { - OR = { - is_close_family_of = scope:actor - AND = { - exists = dynasty - exists = scope:actor.dynasty - dynasty = scope:actor.dynasty - } - } - } - scope:rejecting_betrothed = { - OR = { - is_close_family_of = scope:actor - AND = { - exists = dynasty - exists = scope:actor.dynasty - dynasty = scope:actor.dynasty - } - } - } - scope:actor = { - yields_alliance = { - candidate = scope:rejecting_betrothed - target = scope:rejected_betrothal_owner - target_candidate = scope:rejected_betrothed - } - } - } + cost_prestige_for_break_betrothal_trigger = yes } scope:actor = { add_prestige = major_prestige_loss } } @@ -2317,35 +2189,7 @@ break_betrothal_interaction = { scope:rejected_betrothal_owner = { highest_held_title_tier = tier_duchy } } #Only applied for relevant characters - OR = { - scope:rejected_betrothed = { - OR = { - is_close_family_of = scope:actor - AND = { - exists = dynasty - exists = scope:actor.dynasty - dynasty = scope:actor.dynasty - } - } - } - scope:rejecting_betrothed = { - OR = { - is_close_family_of = scope:actor - AND = { - exists = dynasty - exists = scope:actor.dynasty - dynasty = scope:actor.dynasty - } - } - } - scope:actor = { - yields_alliance = { - candidate = scope:rejecting_betrothed - target = scope:rejected_betrothal_owner - target_candidate = scope:rejected_betrothed - } - } - } + cost_prestige_for_break_betrothal_trigger = yes } scope:actor = { add_prestige = medium_prestige_loss } } @@ -2357,35 +2201,7 @@ break_betrothal_interaction = { scope:rejected_betrothal_owner = { highest_held_title_tier = tier_county } } #Only applied for relevant characters - OR = { - scope:rejected_betrothed = { - OR = { - is_close_family_of = scope:actor - AND = { - exists = dynasty - exists = scope:actor.dynasty - dynasty = scope:actor.dynasty - } - } - } - scope:rejecting_betrothed = { - OR = { - is_close_family_of = scope:actor - AND = { - exists = dynasty - exists = scope:actor.dynasty - dynasty = scope:actor.dynasty - } - } - } - scope:actor = { - yields_alliance = { - candidate = scope:rejecting_betrothed - target = scope:rejected_betrothal_owner - target_candidate = scope:rejected_betrothed - } - } - } + cost_prestige_for_break_betrothal_trigger = yes } scope:actor = { add_prestige = minor_prestige_loss } } @@ -2397,35 +2213,7 @@ break_betrothal_interaction = { scope:rejected_betrothal_owner = { highest_held_title_tier = tier_barony } } #Only applied for relevant characters - OR = { - scope:rejected_betrothed = { - OR = { - is_close_family_of = scope:actor - AND = { - exists = dynasty - exists = scope:actor.dynasty - dynasty = scope:actor.dynasty - } - } - } - scope:rejecting_betrothed = { - OR = { - is_close_family_of = scope:actor - AND = { - exists = dynasty - exists = scope:actor.dynasty - dynasty = scope:actor.dynasty - } - } - } - scope:actor = { - yields_alliance = { - candidate = scope:rejecting_betrothed - target = scope:rejected_betrothal_owner - target_candidate = scope:rejected_betrothed - } - } - } + cost_prestige_for_break_betrothal_trigger = yes } scope:actor = { add_prestige = miniscule_prestige_loss } } @@ -2437,20 +2225,7 @@ break_betrothal_interaction = { if = { limit = { # There is no forced reason for breaking the betrothal - scope:rejected_betrothed = { is_eunuch_trigger = no } - scope:rejecting_betrothed = { is_eunuch_trigger = no } - NOR = { - scope:rejected_betrothed = { has_trait_with_flag = can_not_marry } - scope:rejecting_betrothed = { has_trait_with_flag = can_not_marry } - scope:rejecting_betrothed = { - allowed_to_marry_same_sex_trigger = no - sex_same_as = scope:rejected_betrothed - } - scope:rejected_betrothed = { - allowed_to_marry_same_sex_trigger = no - sex_same_as = scope:rejecting_betrothed - } - } + has_proper_reason_to_break_betrothal_trigger = no # A Grand Wedding was promised OR = { scope:rejecting_betrothed = { @@ -2462,33 +2237,18 @@ break_betrothal_interaction = { } } scope:actor = { break_grand_wedding_betrothal_effect = yes } - scope:rejected_betrothed = { trigger_event = marriage_interaction.0001 } } ###################################### # Opinion hits & notification events # ###################################### #Personal opinion hit for the rejected_betrothed - else_if = { - limit = { scope:rejected_betrothed != scope:actor } - scope:rejected_betrothed = { - if = { - limit = { - is_eunuch_trigger = no - scope:rejecting_betrothed = { is_eunuch_trigger = no } - NOR = { - has_trait_with_flag = can_not_marry - scope:rejecting_betrothed = { has_trait_with_flag = can_not_marry } - scope:rejecting_betrothed = { - allowed_to_marry_same_sex_trigger = no - sex_same_as = scope:rejected_betrothed - } - AND = { - allowed_to_marry_same_sex_trigger = no - sex_same_as = scope:rejecting_betrothed - } - } - } + else = { + if = { + limit = { + has_proper_reason_to_break_betrothal_trigger = no + } + scope:rejected_betrothed = { show_as_tooltip = { add_opinion = { target = scope:actor @@ -2496,58 +2256,12 @@ break_betrothal_interaction = { } } } - - hidden_effect = { trigger_event = marriage_interaction.0001 } - } - } - else = { - hidden_effect = { - scope:rejecting_betrothed = { - break_betrothal = scope:rejected_betrothed - } - } - } - - #Personal opinion hit for the rejected_betrothal_owner - if = { - limit = { - NOR = { - scope:rejected_betrothed = { - this = scope:rejected_betrothal_owner - } - scope:actor = { - this = scope:rejected_betrothal_owner - } - scope:actor = { - this = scope:rejected_betrothed - } - } - } - scope:rejected_betrothal_owner = { if = { limit = { - scope:rejected_betrothed = { is_eunuch_trigger = no } - scope:rejecting_betrothed = { is_eunuch_trigger = no } - NOR = { - scope:rejected_betrothed = { has_trait_with_flag = can_not_marry } - scope:rejecting_betrothed = { has_trait_with_flag = can_not_marry } - scope:rejected_betrothed = { - allowed_to_marry_same_sex_trigger = no - sex_same_as = scope:rejecting_betrothed - } - scope:rejecting_betrothed = { - allowed_to_marry_same_sex_trigger = no - sex_same_as = scope:rejected_betrothed - } - } + scope:actor != scope:rejected_betrothal_owner + scope:rejected_betrothal_owner != scope:rejected_betrothed } - if = { - limit = { - NOR = { - scope:rejected_betrothed = { has_been_promised_grand_wedding = yes } - scope:rejecting_betrothed = { has_been_promised_grand_wedding = yes } - } - } + scope:rejected_betrothal_owner = { show_as_tooltip = { add_opinion = { target = scope:actor @@ -2556,27 +2270,26 @@ break_betrothal_interaction = { } } } - - hidden_effect = { trigger_event = marriage_interaction.0001 } + } + if = { + limit = { + scope:actor != scope:rejected_betrothal_owner + } + scope:rejected_betrothal_owner = { trigger_event = marriage_interaction.0001 } + } + else = { + hidden_effect = { + scope:rejecting_betrothed = { + break_betrothal = scope:rejected_betrothed + } + } } } + #Personal opinion hit for other relative if = { limit = { - scope:rejected_betrothed = { is_eunuch_trigger = no } - scope:rejecting_betrothed = { is_eunuch_trigger = no } - NOR = { - scope:rejected_betrothed = { has_trait_with_flag = can_not_marry } - scope:rejecting_betrothed = { has_trait_with_flag = can_not_marry } - scope:rejected_betrothed = { - allowed_to_marry_same_sex_trigger = no - sex_same_as = scope:rejecting_betrothed - } - scope:rejecting_betrothed = { - allowed_to_marry_same_sex_trigger = no - sex_same_as = scope:rejected_betrothed - } - } + has_proper_reason_to_break_betrothal_trigger = no } #Opinion hit for close relatives of the rejected_betrothed (that are not rejected_betrothed_owner) if = { @@ -2630,10 +2343,8 @@ break_betrothal_interaction = { #Opinion hit for close relatives of the rejecting_betrothed (that are not also close relatives to rejected_betrothed) if = { limit = { - NOR = { - scope:rejecting_betrothed = scope:actor - scope:rejected_betrothed = scope:actor - } + scope:rejecting_betrothed != scope:actor + scope:rejected_betrothed != scope:actor scope:rejecting_betrothed = { any_close_or_extended_family_member = { NOR = { @@ -2656,13 +2367,13 @@ break_betrothal_interaction = { every_close_or_extended_family_member = { limit = { NOR = { - this = scope:rejected_betrothal_owner is_close_or_extended_family_of = scope:rejected_betrothed + this = scope:rejected_betrothal_owner this = scope:rejected_betrothed + this = scope:actor } } custom = all_family_members - add_opinion = { target = scope:actor modifier = broke_betrothal_grand_wedding_opinion @@ -2679,6 +2390,7 @@ break_betrothal_interaction = { is_close_or_extended_family_of = scope:rejected_betrothed this = scope:rejected_betrothal_owner this = scope:rejected_betrothed + this = scope:actor } } custom = all_family_members @@ -2693,17 +2405,17 @@ break_betrothal_interaction = { } scope:actor = { - # Was the marriage of relevence to the player? + # Was the marriage of relevence to the player? if = { limit = { scope:rejecting_betrothed = { - is_player_heir_of = scope:actor + is_child_of = scope:actor } } hidden_effect = { send_interface_toast = { type = msg_break_betrothal_player_heir - title = msg_break_betrothal + title = msg_break_betrothal_player_heir left_icon = scope:rejecting_betrothed right_icon = scope:rejected_betrothed custom_tooltip = break_betrothal_hook_toast_desc @@ -2728,15 +2440,13 @@ break_betrothal_interaction = { #Was the marriage promised to a vassal? if = { limit = { - exists = var:promised_to_marry_1 - var:promised_to_marry_1 = { + var:promised_to_marry_1 ?= { this = scope:rejected_betrothed any_parent = { is_vassal_of = scope:actor } } - exists = var:promised_to_marry_2 - var:promised_to_marry_2 = { + var:promised_to_marry_2 ?= { this = scope:rejecting_betrothed is_close_family_of = scope:actor } @@ -3218,10 +2928,7 @@ offer_concubine = { is_shown = { scope:actor != scope:recipient scope:actor = { - OR = { - culture = { has_cultural_tradition = tradition_concubines } - faith = { has_doctrine = doctrine_concubines } - } + allowed_more_concubines = yes } scope:recipient = { #NOT = { government_has_flag = government_is_true_herder } @@ -3637,10 +3344,7 @@ offer_concubine = { has_trait = greedy ai_greed > very_high_positive_ai_value } - OR = { - culture = { has_cultural_tradition = tradition_concubines } - faith = { has_doctrine = doctrine_concubines } - } + allowed_concubines = yes } ai_will_do = { @@ -3877,7 +3581,7 @@ dismiss_concubine_interaction = { scope:actor = { custom_tooltip = { NOT = { - var:family_widow_forbidden_divorce ?= scope:target + var:family_widow_forbidden_divorce ?= scope:recipient } text = BOUND_TO_FAMILY_WIDOW } @@ -4010,7 +3714,7 @@ divorce_character_interaction = { scope:actor = { custom_tooltip = { NOT = { - var:family_widow_forbidden_divorce ?= scope:target + var:family_widow_forbidden_divorce ?= scope:recipient } text = BOUND_TO_FAMILY_WIDOW } @@ -4151,7 +3855,7 @@ divorce_character_house_head_interaction = { scope:actor = { custom_tooltip = { NOT = { - var:family_widow_forbidden_divorce ?= scope:target + var:family_widow_forbidden_divorce ?= scope:recipient } text = BOUND_TO_FAMILY_WIDOW } @@ -4951,7 +4655,7 @@ divorce_character_dynast_request_interaction = { scope:actor = { custom_tooltip = { NOT = { - var:family_widow_forbidden_divorce ?= scope:target + var:family_widow_forbidden_divorce ?= scope:recipient } text = BOUND_TO_FAMILY_WIDOW } @@ -5131,7 +4835,7 @@ divorce_character_dynast_request_rel_head_interaction = { scope:actor = { custom_tooltip = { NOT = { - var:family_widow_forbidden_divorce ?= scope:target + var:family_widow_forbidden_divorce ?= scope:recipient } text = BOUND_TO_FAMILY_WIDOW } diff --git a/common/character_interactions/00_modifiy_vassal_contract.txt b/common/character_interactions/00_modifiy_vassal_contract.txt index 74386696..fbe7988a 100644 --- a/common/character_interactions/00_modifiy_vassal_contract.txt +++ b/common/character_interactions/00_modifiy_vassal_contract.txt @@ -15,7 +15,8 @@ is_shown = { scope:recipient = { this != scope:actor - liege ?= scope:actor # this excludes tributary contracts by default + liege = scope:actor + is_tributary = no # this excludes tributary contracts by default is_ruler = yes vassal_contract_has_modifiable_obligations = yes NOT = { government_allows = administrative } @@ -30,7 +31,7 @@ can_send = { #Mandala gets special treatment trigger_if = { - limit = { + limit = { scope:actor = { government_has_flag = government_is_mandala } } custom_tooltip = { @@ -339,12 +340,14 @@ vassal_modify_vassal_contract_interaction = { is_shown = { scope:recipient = { - top_liege != this + liege = scope:actor this != scope:actor - liege ?= scope:actor # this excludes tributary contracts by default + is_tributary = no # this excludes tributary contracts by default vassal_contract_has_modifiable_obligations = yes - NOT = { government_allows = administrative } - NOT = { government_has_flag = government_is_nomadic } + NOR = { + government_allows = administrative + government_has_flag = government_is_nomadic + } } } @@ -355,7 +358,7 @@ vassal_modify_vassal_contract_interaction = { can_send = { #Mandala gets special treatment trigger_if = { - limit = { + limit = { scope:recipient = { government_has_flag = government_is_mandala } } custom_tooltip = { @@ -595,10 +598,11 @@ ai_only_liege_modify_vassal_contract_interaction = { } scope:recipient = { this != scope:actor + liege = scope:actor NOT = { has_strong_hook = scope:actor } - liege ?= scope:actor # this excludes tributary contracts by default + is_tributary = no # this excludes tributary contracts by default is_ruler = yes vassal_contract_can_be_modified_trigger = yes does_ai_liege_in_vassal_contract_desire_obligation_change = yes @@ -634,7 +638,7 @@ ai_only_liege_modify_vassal_contract_interaction = { ai_targets = { ai_recipients = vassals } - + ai_frequency_by_tier = { barony = 0 county = 12 @@ -683,10 +687,11 @@ ai_only_liege_modify_vassal_contract_admin_province_interaction = { } scope:recipient = { this != scope:actor + liege = scope:actor + is_tributary = no NOT = { has_strong_hook = scope:actor } - liege ?= scope:actor # this excludes tributary contracts by default is_ruler = yes government_has_flag = government_uses_admin_province_obligations @@ -748,10 +753,11 @@ ai_only_vassal_modify_vassal_contract_interaction = { has_usable_hook = scope:recipient vassal_contract_can_be_modified_trigger = yes does_ai_vassal_in_vassal_contract_desire_obligation_change = yes + is_tributary = no # this excludes tributary contracts by default + liege = scope:recipient } scope:recipient = { this != scope:actor - liege ?= scope:actor # this excludes tributary contracts by default is_ruler = yes NOT = { has_strong_hook = scope:actor @@ -824,11 +830,12 @@ admin_liege_modify_vassal_contract_interaction = { is_shown = { scope:recipient = { this != scope:actor + liege = scope:actor OR = { is_landed = yes is_councillor_of = scope:actor.top_liege } - liege ?= scope:actor # this excludes tributary contracts by default + is_tributary = no # this excludes tributary contracts by default is_ruler = yes vassal_contract_has_modifiable_obligations = yes government_allows = administrative @@ -989,7 +996,7 @@ admin_liege_modify_vassal_contract_interaction = { type = msg_vassal_contract_change title = modify_vassal_contract_interaction_notification right_icon = scope:recipient - + scope:recipient = { hidden_effect = { set_variable = { @@ -1010,14 +1017,13 @@ admin_liege_modify_vassal_contract_interaction = { type = scope:obligation.vassal_contract_type level = scope:obligation } - + # Update the succession law for celestial province types if applicable - That way, we don't have to wait until the current law invalidates. if = { limit = { government_has_flag = government_is_celestial scope:obligation.vassal_contract_type = vassal_contract:celestial_provinces } - if = { limit = { OR = { @@ -1040,6 +1046,51 @@ admin_liege_modify_vassal_contract_interaction = { add_realm_law_skip_effects = celestial_appointment_succession_law } } + # Update the succession law for meritocratic province types if applicable - That way, we don't have to wait until the current law invalidates. + else_if = { + limit = { + government_has_flag = government_is_meritocratic + scope:obligation.vassal_contract_type = vassal_contract:meritocratic_provinces + } + if = { + limit = { + vassal_contract_has_flag = meritocratic_province_military + NOT = { has_realm_law = meritocratic_military_appointment_succession_law } + } + add_realm_law_skip_effects = meritocratic_military_appointment_succession_law + } + else_if = { + limit = { + OR = { + vassal_contract_has_flag = meritocratic_province_standard + vassal_contract_has_flag = meritocratic_province_industrial + } + NOT = { has_realm_law = meritocratic_appointment_succession_law } + } + add_realm_law_skip_effects = meritocratic_appointment_succession_law + } + } + # Update the succession law for japanese province types if applicable - That way, we don't have to wait until the current law invalidates. + else_if = { + limit = { + government_has_flag = government_is_japanese_administrative + scope:obligation.vassal_contract_type = vassal_contract:japan_administrative_provinces + } + if = { + limit = { + NOT = { vassal_contract_has_flag = japan_administrative_military_appointment } + NOT = { has_realm_law = japanese_appointment_succession_law } + } + add_realm_law_skip_effects = japanese_appointment_succession_law + } + else_if = { + limit = { + vassal_contract_has_flag = japan_administrative_military_appointment + NOT = { has_realm_law = japanese_military_appointment_succession_law } + } + add_realm_law_skip_effects = japanese_military_appointment_succession_law + } + } } } } @@ -1060,7 +1111,7 @@ admin_vassal_modify_vassal_contract_interaction = { common_interaction = yes icon = icon_contract_modification_single - filter_tags = { admin_liege rep_liege } + filter_tags = { admin_liege } send_name = "admin_vassal_modify_vassal_contract_interaction_send" desc = admin_vassal_modify_vassal_contract_interaction_desc @@ -1069,7 +1120,8 @@ admin_vassal_modify_vassal_contract_interaction = { scope:actor = { top_liege != this this != scope:recipient - liege ?= scope:recipient # this excludes tributary contracts by default + liege = scope:recipient + is_tributary = no # this excludes tributary contracts by default vassal_contract_has_modifiable_obligations = yes government_allows = administrative tgp_is_ceremonial_liege_trigger = no @@ -1205,14 +1257,14 @@ admin_vassal_modify_vassal_contract_interaction = { type = scope:obligation.vassal_contract_type level = scope:obligation } - + # Update the succession law for celestial province types if applicable - That way, we don't have to wait until the current law invalidates. if = { limit = { government_has_flag = government_is_celestial scope:obligation.vassal_contract_type = vassal_contract:celestial_provinces } - + if = { limit = { OR = { @@ -1235,6 +1287,51 @@ admin_vassal_modify_vassal_contract_interaction = { add_realm_law_skip_effects = celestial_appointment_succession_law } } + # Update the succession law for meritocratic province types if applicable - That way, we don't have to wait until the current law invalidates. + else_if = { + limit = { + government_has_flag = government_is_meritocratic + scope:obligation.vassal_contract_type = vassal_contract:meritocratic_provinces + } + if = { + limit = { + vassal_contract_has_flag = meritocratic_province_military + NOT = { has_realm_law = meritocratic_military_appointment_succession_law } + } + add_realm_law_skip_effects = meritocratic_military_appointment_succession_law + } + else_if = { + limit = { + OR = { + vassal_contract_has_flag = meritocratic_province_standard + vassal_contract_has_flag = meritocratic_province_industrial + } + NOT = { has_realm_law = meritocratic_appointment_succession_law } + } + add_realm_law_skip_effects = meritocratic_appointment_succession_law + } + } + # Update the succession law for japanese province types if applicable - That way, we don't have to wait until the current law invalidates. + else_if = { + limit = { + government_has_flag = government_is_japanese_administrative + scope:obligation.vassal_contract_type = vassal_contract:japan_administrative_provinces + } + if = { + limit = { + NOT = { vassal_contract_has_flag = japan_administrative_military_appointment } + NOT = { has_realm_law = japanese_appointment_succession_law } + } + add_realm_law_skip_effects = japanese_appointment_succession_law + } + else_if = { + limit = { + vassal_contract_has_flag = japan_administrative_military_appointment + NOT = { has_realm_law = japanese_military_appointment_succession_law } + } + add_realm_law_skip_effects = japanese_military_appointment_succession_law + } + } } } } @@ -1427,8 +1524,9 @@ nomad_liege_modify_vassal_contract_interaction = { is_shown = { scope:recipient = { - NOT = { this = scope:actor } - liege ?= scope:actor # this excludes tributary contracts by default + this != scope:actor + liege = scope:actor + is_tributary = no # this excludes tributary contracts by default is_ruler = yes vassal_contract_has_modifiable_obligations = yes government_has_flag = government_is_nomadic @@ -1647,7 +1745,7 @@ nomad_liege_modify_vassal_contract_interaction = { # Additional Flavor Titles scope:recipient = { additional_flavor_check_effect = yes } } - + send_option = { is_valid = { scope:actor = { @@ -1674,7 +1772,7 @@ nomad_vassal_modify_vassal_contract_interaction = { send_name = "nomad_vassal_modify_vassal_contract_interaction_send" desc = nomad_vassal_modify_vassal_contract_interaction_desc - + redirect = { # need to reverse the role for the UI to work properly scope:recipient = { @@ -1692,8 +1790,9 @@ nomad_vassal_modify_vassal_contract_interaction = { is_shown = { scope:recipient = { is_independent_ruler = no - NOT = { this = scope:actor } - liege ?= scope:actor # this excludes tributary contracts by default + this != scope:actor + liege = scope:actor + is_tributary = no # this excludes tributary contracts by default vassal_contract_has_modifiable_obligations = yes government_has_flag = government_is_nomadic } @@ -1874,7 +1973,7 @@ suzerain_modify_tributary_contract_interaction = { scope:recipient = { is_tributary_of = scope:actor # excludes vassals by default subject_contract_has_modifiable_obligations = yes - NOT = { government_has_flag = government_is_true_herder } + NOT = { government_has_flag = government_is_herder } } } @@ -1885,7 +1984,7 @@ suzerain_modify_tributary_contract_interaction = { can_send = { #Mandala gets special treatment trigger_if = { - limit = { + limit = { scope:actor = { government_has_flag = government_is_mandala } } custom_tooltip = { @@ -2025,7 +2124,7 @@ suzerain_modify_tributary_contract_interaction = { add_piety = major_piety_loss } else = { add_prestige = medium_prestige_loss } - + scope:recipient = { add_opinion = { modifier = outraged_opinion @@ -2121,7 +2220,7 @@ subject_modify_tributary_contract_interaction = { can_send = { #Mandala gets special treatment trigger_if = { - limit = { + limit = { scope:recipient = { government_has_flag = government_is_mandala } } custom_tooltip = { @@ -2136,9 +2235,9 @@ subject_modify_tributary_contract_interaction = { trigger_if = { limit = { scope:hook = no } # no cost trigger_if = { - limit = { subject_standing < 0 } # this means we don't use subject standing + limit = { subject_standing < 0 } # this means we don't use subject standing trigger_if = { - limit = { + limit = { government_has_flag = government_is_nomadic scope:recipient = { government_has_flag = government_is_nomadic } } @@ -2193,9 +2292,9 @@ subject_modify_tributary_contract_interaction = { trigger_if = { limit = { scope:hook = no } # no cost trigger_if = { - limit = { subject_standing < 0 } # this means we don't use subject standing + limit = { subject_standing < 0 } # this means we don't use subject standing trigger_if = { - limit = { + limit = { government_has_flag = government_is_nomadic scope:recipient = { government_has_flag = government_is_nomadic } } @@ -2235,9 +2334,9 @@ subject_modify_tributary_contract_interaction = { } else = { if = { - limit = { subject_standing < 0 } # this means we don't use subject standing + limit = { subject_standing < 0 } # this means we don't use subject standing if = { - limit = { + limit = { government_has_flag = government_is_nomadic scope:recipient = { government_has_flag = government_is_nomadic } } @@ -2363,14 +2462,14 @@ subject_modify_tributary_contract_interaction = { add = scope:new_value multiply = -20 #Overlord favoring options have a negative score if = { # the Chinese Emperor cares less since they get tribute through missions as well - limit = { + limit = { scope:new_value < 0 - scope:actor = { + scope:actor = { OR = { has_subject_contract_group = tributary_celestial has_subject_contract_group = tributary_hegemonic } - } + } } multiply = 0.5 } @@ -2406,7 +2505,7 @@ ai_only_hegemonic_tributary_modify_tributary_contract_interaction = { scope:actor = { if = { # if the subject has a Seal of Investiture, they will always ask for an Investiture Privilege if they can - limit = { + limit = { any_character_artifact = { OR = { artifact_type = seal_of_investiture diff --git a/common/character_interactions/00_prison_interactions.txt b/common/character_interactions/00_prison_interactions.txt index 499e303b..ce82cc74 100644 --- a/common/character_interactions/00_prison_interactions.txt +++ b/common/character_interactions/00_prison_interactions.txt @@ -226,7 +226,7 @@ } scope:recipient = { NOT = { is_courtier_of = scope:actor } - } + } } value = { value = 0 @@ -259,7 +259,7 @@ on_accept = { scope:actor = { if = { - limit = { + limit = { has_title = title:e_minister_of_justice } if = { @@ -436,281 +436,281 @@ on_decline = { if = { limit = { - scope:recipient = { - has_government = landless_adventurer_government - reverse_has_opinion_modifier = { - target = scope:actor - modifier = eviction_ignored_opinion - } - } - } - scope:recipient = { - if = { - limit = { current_military_strength >= ep3_interactions_events_0500_troops_count_value } - start_war = { - cb = ep3_laamp_apprehend_adventurer_cb - target = scope:actor - } - } - else = { - # Remove them immediately. - remove_laamp_from_exiled_county_automatically_effect = { - PROVINCE = scope:recipient.location - LAAMP = scope:recipient - } - } - } - } - else = { - scope:actor = { - imprison_HoF_consequences_effect = yes - imprison_tyranny_effect = yes - } - scope:recipient = { - #If target is count or higher, start war. - if = { - limit = { - is_playable_character = yes - primary_title.tier > tier_barony - } - if = { - limit = { - is_a_faction_member = yes - liege = scope:actor - joined_faction = { - faction_target = scope:actor - NOT = { faction_is_type = populist_faction } - } - } - joined_faction = { - save_scope_as = retaliating_faction # For loc - imprisonment_retribution_start_faction_war_if_valid = yes - } - hidden_effect = { - if = { - limit = { NOT = { exists = joined_faction.faction_war } } - war_for_imprison_effect = yes - } - } - } - else = { - war_for_imprison_effect = yes - } - } - #If target is a baron or unlanded, have them escape. - else = { - if = { #To block them from being instantly rehired - limit = { - is_councillor_of = scope:actor - can_be_fired_from_council_trigger = { COURT_OWNER = scope:actor } - } - set_variable = { - name = escaped_imprisonment_from - value = scope:actor - years = 20 - } - } - imprison_court_chaplain_consequences_effect = yes - if = { - limit = { - is_landed_or_landless_administrative = yes - } - depose_effect = { DEPOSER = scope:actor } - } - else_if = { - limit = { - is_hostage = yes - warden = scope:actor - } - save_scope_as = imprison_failure - save_scope_as = hostage - warden = { save_scope_as = warden } - home_court = { save_scope_as = home_court } - scope:warden = { trigger_event = bp2_hostage_system.0400 } - scope:home_court = { trigger_event = bp2_hostage_system.0401 } - return_hostage = yes - } - else_if = { - limit = { - is_landed_or_landless_administrative = no - trigger_if = { - limit = { - is_councillor = yes - } - can_be_fired_from_council_trigger = { COURT_OWNER = scope:recipient.liege } - } - trigger_if = { - limit = { - exists = scope:actor.faith.religious_head - } - scope:actor.faith.religious_head != scope:recipient - } - } - select_and_move_to_pool_effect = yes - } - add_opinion = { - target = scope:actor - modifier = attempted_imprisonment_opinion - } - } - } - - if = { - limit = { - scope:actor = { has_realm_law_flag = vassal_refusal_is_treason } - } scope:actor = { - add_opinion = { - target = scope:recipient - modifier = treasonous_imprison_refusal - } + NOT = { has_title = title:e_minister_of_justice } } } - } - - #Remove them as guardian/ward for any courtier (feedback given in char_interaction.0230) - scope:actor = { - if = { - limit = { - any_courtier = { - has_relation_guardian = scope:recipient - } - } - every_courtier = { - limit = { - has_relation_guardian = scope:recipient - } - save_scope_as = ward - scope:recipient = { remove_relation_ward = scope:ward } - - scope:ward = { - if = { - limit = { - host != liege - } - return_to_court = yes - } - guardian_remove_opinion_effect = { - GUARDIAN = scope:recipient - WARD = this - WARD_LIEGE = scope:actor - } - } - - add_to_list = ward_children - } - } - if = { - limit = { - any_courtier = { - has_relation_ward = scope:recipient - } - } - random_courtier = { - limit = { - has_relation_ward = scope:recipient - } - save_scope_as = guardian - scope:guardian = { remove_relation_ward = scope:recipient } - - scope:guardian = { - if = { - limit = { - host != liege - } - return_to_court = yes - } - guardian_remove_opinion_effect = { - GUARDIAN = this - WARD = scope:recipient - WARD_LIEGE = scope:actor - } - } - - add_to_list = guardian_list - } - - hidden_effect = { - scope:guardian = { - send_interface_message = { - type = event_childhood_neutral - title = remove_guardian_interaction_notification - left_icon = scope:recipient - right_icon = scope:guardian - remove_guardian_effect = { - GUARDIAN = scope:guardian - WARD = scope:recipient - RETURN_WARD = yes - HIDE_OPINION = no - } - } - } - } - } - } - - scope:actor = { if = { limit = { scope:recipient = { - OR = { - is_playable_character = no - AND = { - is_playable_character = yes - primary_title.tier = tier_barony + has_government = landless_adventurer_government + } + } + scope:recipient = { + if = { + limit = { current_military_strength >= ep3_interactions_events_0500_troops_count_value } + start_war = { + cb = ep3_laamp_apprehend_adventurer_cb + target = scope:actor + } + } + else = { + # Remove them immediately. + remove_laamp_from_exiled_county_automatically_effect = { + PROVINCE = scope:recipient.location + LAAMP = scope:recipient + } + } + } + } + else = { + scope:actor = { + imprison_HoF_consequences_effect = yes + imprison_tyranny_effect = yes + } + scope:recipient = { + #If target is count or higher, start war. + if = { + limit = { + is_playable_character = yes + primary_title.tier > tier_barony + } + if = { + limit = { + is_a_faction_member = yes + liege = scope:actor + joined_faction = { + faction_target = scope:actor + NOT = { faction_is_type = populist_faction } + } + } + joined_faction = { + save_scope_as = retaliating_faction # For loc + imprisonment_retribution_start_faction_war_if_valid = yes + } + hidden_effect = { + if = { + limit = { NOT = { exists = joined_faction.faction_war } } + war_for_imprison_effect = yes + } + } + } + else = { + war_for_imprison_effect = yes + } + } + #If target is a baron or unlanded, have them escape. + else = { + if = { #To block them from being instantly rehired + limit = { + is_councillor_of = scope:actor + can_be_fired_from_council_trigger = { COURT_OWNER = scope:actor } + } + set_variable = { + name = escaped_imprisonment_from + value = scope:actor + years = 20 + } + } + imprison_court_chaplain_consequences_effect = yes + if = { + limit = { + is_landed_or_landless_administrative = yes + } + depose_effect = { DEPOSER = scope:actor } + } + else_if = { + limit = { + is_hostage = yes + warden = scope:actor + } + save_scope_as = imprison_failure + save_scope_as = hostage + warden = { save_scope_as = warden } + home_court = { save_scope_as = home_court } + scope:warden = { trigger_event = bp2_hostage_system.0400 } + scope:home_court = { trigger_event = bp2_hostage_system.0401 } + return_hostage = yes + } + else_if = { + limit = { + is_landed_or_landless_administrative = no + trigger_if = { + limit = { + is_councillor = yes + } + can_be_fired_from_council_trigger = { COURT_OWNER = scope:recipient.liege } + } + trigger_if = { + limit = { + exists = scope:actor.faith.religious_head + } + scope:actor.faith.religious_head != scope:recipient + } + } + select_and_move_to_pool_effect = yes + } + add_opinion = { + target = scope:actor + modifier = attempted_imprisonment_opinion + } + } + } + + if = { + limit = { + scope:actor = { has_realm_law_flag = vassal_refusal_is_treason } + } + scope:actor = { + add_opinion = { + target = scope:recipient + modifier = treasonous_imprison_refusal + } + } + } + } + + #Remove them as guardian/ward for any courtier (feedback given in char_interaction.0230) + scope:actor = { + if = { + limit = { + any_courtier = { + has_relation_guardian = scope:recipient + } + } + every_courtier = { + limit = { + has_relation_guardian = scope:recipient + } + save_scope_as = ward + scope:recipient = { remove_relation_ward = scope:ward } + + scope:ward = { + if = { + limit = { + host != liege + } + return_to_court = yes + } + guardian_remove_opinion_effect = { + GUARDIAN = scope:recipient + WARD = this + WARD_LIEGE = scope:actor + } + } + + add_to_list = ward_children + } + } + if = { + limit = { + any_courtier = { + has_relation_ward = scope:recipient + } + } + random_courtier = { + limit = { + has_relation_ward = scope:recipient + } + save_scope_as = guardian + scope:guardian = { remove_relation_ward = scope:recipient } + + scope:guardian = { + if = { + limit = { + host != liege + } + return_to_court = yes + } + guardian_remove_opinion_effect = { + GUARDIAN = this + WARD = scope:recipient + WARD_LIEGE = scope:actor + } + } + + add_to_list = guardian_list + } + + hidden_effect = { + scope:guardian = { + send_interface_message = { + type = event_childhood_neutral + title = remove_guardian_interaction_notification + left_icon = scope:recipient + right_icon = scope:guardian + remove_guardian_effect = { + GUARDIAN = scope:guardian + WARD = scope:recipient + RETURN_WARD = yes + HIDE_OPINION = no + } } } } } - trigger_event = char_interaction.0230 - } - } - - if = { - limit = { - scope:actor = { has_character_flag = flag_hostile_actions_disabled_delay } - } - scope:actor = { remove_character_flag = flag_hostile_actions_disabled_delay } - } - - # If we're a clan this interaction affects unity - if = { # If you don't have an imprisonment reason, and the target is landed, you lose more unity - limit = { - NOT = { - scope:actor = { has_imprisonment_reason = scope:recipient } + if = { + limit = { + scope:recipient = { + OR = { + is_playable_character = no + AND = { + is_playable_character = yes + primary_title.tier = tier_barony + } + } + } + } + trigger_event = char_interaction.0230 } - scope:recipient = { is_landed_or_landless_administrative = yes } - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = major_unity_loss - DESC = clan_unity_imprison.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - else_if = { # If you don't have an imprisonment reason, and the target is unlanded, you lose slightly less unity - limit = { - NOT = { - scope:actor = { has_imprisonment_reason = scope:recipient } + + if = { + limit = { + has_character_flag = flag_hostile_actions_disabled_delay + } + remove_character_flag = flag_hostile_actions_disabled_delay } - scope:recipient = { is_landed_or_landless_administrative = no } } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = medium_unity_loss - DESC = clan_unity_imprison.desc - REVERSE_NON_HOUSE_TARGET = no + + # If we're a clan this interaction affects unity + if = { # If you don't have an imprisonment reason, and the target is landed, you lose more unity + limit = { + NOT = { + scope:actor = { has_imprisonment_reason = scope:recipient } + } + scope:recipient = { is_landed_or_landless_administrative = yes } + } + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = major_unity_loss + DESC = clan_unity_imprison.desc + REVERSE_NON_HOUSE_TARGET = no + } } - } - else = { # If you have a valid reason, you lose only a tiny bit of unity (criminal or not, they are still family) - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = miniscule_unity_loss - DESC = clan_unity_imprison.desc - REVERSE_NON_HOUSE_TARGET = no + else_if = { # If you don't have an imprisonment reason, and the target is unlanded, you lose slightly less unity + limit = { + NOT = { + scope:actor = { has_imprisonment_reason = scope:recipient } + } + scope:recipient = { is_landed_or_landless_administrative = no } + } + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_loss + DESC = clan_unity_imprison.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + else = { # If you have a valid reason, you lose only a tiny bit of unity (criminal or not, they are still family) + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = miniscule_unity_loss + DESC = clan_unity_imprison.desc + REVERSE_NON_HOUSE_TARGET = no + } } } } @@ -737,7 +737,7 @@ any_held_title = { is_noble_family_title = yes } - } + } } custom_description = { text = noble_family_head_cannot_refuse_your_power @@ -1072,7 +1072,7 @@ ai_recipients = courtiers chance = 0.25 } - + ai_frequency_by_tier = { barony = 0 county = 36 @@ -1096,7 +1096,7 @@ has_imprisonment_reason = scope:recipient } } - + modifier = { # More likely to imprison criminal Soryo's if Ritsuryo add = 200 scope:actor = { @@ -1107,7 +1107,7 @@ government_has_flag = government_is_japan_feudal } } - + modifier = { # Even more imprisonment reason if you are a danger to the Kampaku add = 400 scope:actor = { @@ -1482,6 +1482,19 @@ } } + modifier = { # Expel first, even if they criminals + factor = 0 + scope:actor = { + NOT = { + has_opinion_modifier = { + target = scope:recipient + modifier = eviction_ignored_opinion + } + } + } + scope:recipient = { government_has_flag = government_is_landless_adventurer } + } + evaluate_action_decreasing_house_unity = { VALUE = 100 } @@ -1536,16 +1549,14 @@ move_to_dungeon_interaction = { } trigger_event = prison_notification.1001 custom_tooltip = MOVE_PRISONER_TO_DUNGEON - scope:recipient = { - every_close_or_extended_family_member = { - custom = all_family_members - limit = { - scope:actor != this - } - add_opinion = { - modifier = family_moved_to_dungeon_opinion - target = scope:actor - } + every_close_or_extended_family_member = { + custom = all_family_members + limit = { + scope:actor != this + } + add_opinion = { + modifier = family_moved_to_dungeon_opinion + target = scope:actor } } } @@ -1667,16 +1678,14 @@ move_to_house_arrest_interaction = { trigger_event = prison_notification.1002 } custom_tooltip = MOVE_PRISONER_TO_HOUSE_ARREST - scope:recipient = { - every_close_or_extended_family_member = { - custom = all_family_members - limit = { - scope:actor != this - } - add_opinion = { - modifier = moved_to_house_arrest_opinion - target = scope:actor - } + every_close_or_extended_family_member = { + custom = all_family_members + limit = { + scope:actor != this + } + add_opinion = { + modifier = moved_to_house_arrest_opinion + target = scope:actor } } } @@ -1745,12 +1754,9 @@ ransom_interaction = { is_valid_showing_failures_only = { trigger_if = { - limit = { - scope:invalid = yes - } + limit = { scope:invalid = yes } always = no } - scope:secondary_recipient = { custom_description = { text = "currently_being_tortured" @@ -1764,20 +1770,7 @@ ransom_interaction = { custom_tooltip = { text = is_currently_being_purged_tt scope:secondary_recipient = { - NOT = { - has_character_flag = is_currently_being_purged - } - } - } - } - - cost = { - influence = { - value = 0 - if = { - limit = { scope:influence_send_option = yes } - add = scope:actor.medium_influence_value - desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION + NOT = { has_character_flag = is_currently_being_purged } } } } @@ -2021,7 +2014,7 @@ ransom_interaction = { } send_option = { # EP3 Influence - is_shown = { # Actor must have a government that uses influence + is_shown = { # Actor must have a government that uses influence trigger_if = { # in the mass action ransom we only want to do it for gold limit = { exists = scope:mass_action } scope:mass_action = no @@ -2033,6 +2026,8 @@ ransom_interaction = { is_valid = { # Actor has enough influence scope:actor = { influence >= medium_influence_value } + # Recipient wants your influence + scope:recipient = { government_has_flag = government_has_influence } # Both characters are within the same top realm custom_tooltip = { text = not_same_realm_tt @@ -2040,12 +2035,12 @@ ransom_interaction = { } } flag = influence_send_option - localization = TRADE_INFLUENCE_FOR_BETTER_AI_ACCEPTANCE + localization = DEMAND_INFLUENCE_AI_ACCEPTANCE } - + # MPO Herd send_option = { - is_shown = { # Actor must have a government that uses Herd + is_shown = { # Actor must have a government that uses Herd scope:actor = { government_has_flag = government_is_nomadic exists = domicile @@ -2059,7 +2054,7 @@ ransom_interaction = { } is_valid = { # Recipient has enough Herd - scope:recipient = { domicile.herd >= domicile.medium_herd_value } + scope:recipient = { domicile.herd >= scope:recipient.ransom_herd_value } } flag = herd_send_option localization = RANSOM_HERD_OPTION @@ -2069,7 +2064,7 @@ ransom_interaction = { EXTORTIONATE_RANSOM_COST = scope:secondary_recipient.increased_ransom_cost_value RANSOM_COST = scope:secondary_recipient.ransom_cost_value CURRENT_GOLD = scope:recipient.gold - RANSOM_HERD_COST = ransom_herd_value_recipient + RANSOM_HERD_COST = scope:recipient.ransom_herd_value } ai_accept = { @@ -2379,9 +2374,7 @@ pay_ransom_interaction = { scope:recipient = { save_scope_as = secondary_recipient if = { - limit = { - exists = imprisoner - } + limit = { exists = imprisoner } imprisoner = { save_scope_as = recipient } } } @@ -2389,17 +2382,6 @@ pay_ransom_interaction = { desc = pay_ransom_interaction_desc - cost = { - influence = { - value = 0 - if = { - limit = { scope:influence_send_option = yes } - add = scope:actor.medium_influence_value - desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION - } - } - } - greeting = positive notification_text = PAY_RANSOM_PROPOSAL @@ -2893,7 +2875,7 @@ pay_ransom_interaction = { } send_option = { # EP3 Influence - is_shown = { # Actor must have a government that uses influence + is_shown = { # Actor must have a government that uses influence scope:actor = { government_has_flag = government_has_influence } @@ -2901,6 +2883,8 @@ pay_ransom_interaction = { is_valid = { # Actor has enough influence scope:actor = { influence >= medium_influence_value } + # Recipient has enough influence + scope:recipient = { government_has_flag = government_has_influence } # Both characters are within the same top realm custom_tooltip = { text = not_same_realm_tt @@ -2908,11 +2892,11 @@ pay_ransom_interaction = { } } flag = influence_send_option - localization = TRADE_INFLUENCE_FOR_BETTER_AI_ACCEPTANCE + localization = DEMAND_INFLUENCE_AI_ACCEPTANCE } - + send_option = { # MPO Herd - is_shown = { # Actor must have a government that uses Herd + is_shown = { # Actor must have a government that uses Herd scope:actor = { government_has_flag = government_is_nomadic exists = domicile @@ -2926,7 +2910,7 @@ pay_ransom_interaction = { } is_valid = { # Actor has enough Herd - scope:actor = { domicile.herd >= domicile.medium_herd_value } + scope:actor = { domicile.herd >= scope:actor.ransom_herd_value } } flag = herd_send_option localization = PAY_FOR_BETTER_AI_ACCEPTANCE @@ -2954,7 +2938,7 @@ pay_ransom_interaction = { EXTORTIONATE_RANSOM_COST = scope:secondary_recipient.increased_ransom_cost_value RANSOM_COST = scope:secondary_recipient.ransom_cost_value CURRENT_GOLD = scope:actor.gold - RANSOM_HERD_COST = ransom_herd_value_actor + RANSOM_HERD_COST = scope:actor.ransom_herd_value } ai_accept = { @@ -3099,7 +3083,7 @@ pay_ransom_interaction = { scope:influence_send_option = yes desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION } - + modifier = { add = 25 scope:herd_send_option = yes @@ -3501,9 +3485,7 @@ ransom_me_interaction = { } is_shown = { - scope:actor = { - is_imprisoned_by = scope:recipient - } + scope:actor = { is_imprisoned_by = scope:recipient } } is_valid_showing_failures_only = { @@ -3646,17 +3628,6 @@ ransom_me_interaction = { } } - cost = { - influence = { - value = 0 - if = { - limit = { scope:influence_send_option = yes } - add = scope:actor.medium_influence_value - desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION - } - } - } - send_option = { is_shown = { exists = scope:recipient @@ -3708,9 +3679,7 @@ ransom_me_interaction = { } } is_valid = { - scope:actor = { - gold >= ransom_cost - } + scope:actor = { gold >= ransom_cost } } flag = gold localization = "RANSOM_GOLD_OPTION" @@ -3719,14 +3688,11 @@ ransom_me_interaction = { # If you don't have what they're worth, pay me what you have! send_option = { is_shown = { - exists = scope:recipient - scope:recipient = { + scope:recipient ?= { OR = { is_lowborn = yes NOT = { - dynasty = { - has_dynasty_perk = fp1_pillage_legacy_3 - } + dynasty = { has_dynasty_perk = fp1_pillage_legacy_3 } } } } @@ -3753,7 +3719,7 @@ ransom_me_interaction = { } send_option = { # EP3 Influence - is_shown = { # Actor must have a government that uses influence + is_shown = { # Actor must have a government that uses influence scope:actor = { government_has_flag = government_has_influence } @@ -3761,6 +3727,8 @@ ransom_me_interaction = { is_valid = { # Actor has enough influence scope:actor = { influence >= medium_influence_value } + # Recipient wants your influence + scope:recipient = { government_has_flag = government_has_influence } # Both characters are within the same top realm custom_tooltip = { text = not_same_realm_tt @@ -3768,11 +3736,11 @@ ransom_me_interaction = { } } flag = influence_send_option - localization = TRADE_INFLUENCE_FOR_BETTER_AI_ACCEPTANCE + localization = DEMAND_INFLUENCE_AI_ACCEPTANCE } - + send_option = { # MPO Herd - is_shown = { # Actor must have a government that uses Herd + is_shown = { # Actor must have a government that uses Herd scope:actor = { government_has_flag = government_is_nomadic exists = domicile @@ -3785,7 +3753,7 @@ ransom_me_interaction = { } is_valid = { # Actor has enough Herd - scope:actor = { domicile.herd >= domicile.medium_herd_value } + scope:actor = { domicile.herd >= ransom_herd_value } } flag = herd_send_option localization = PAY_FOR_BETTER_AI_ACCEPTANCE @@ -3812,7 +3780,7 @@ ransom_me_interaction = { EXTORTIONATE_RANSOM_COST = scope:actor.increased_ransom_cost_value RANSOM_COST = scope:actor.ransom_cost_value CURRENT_GOLD = scope:actor.gold - RANSOM_HERD_COST = ransom_herd_value_actor + RANSOM_HERD_COST = scope:actor.ransom_herd_value } ai_accept = { @@ -3960,7 +3928,7 @@ ransom_me_interaction = { scope:influence_send_option = yes desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION } - + modifier = { add = 25 scope:herd_send_option = yes @@ -4138,6 +4106,8 @@ release_from_prison_interaction = { scope:disfigure = no scope:blind = no scope:castrate = no + scope:demand_admin = no + scope:gain_hook = no } desc = RELEASE_PRISONER_OFFER } @@ -4185,6 +4155,16 @@ release_from_prison_interaction = { limit = { scope:recipient = { is_imprisoned_by = scope:actor } } scope:recipient = { + if = { + limit = { + is_imprisoned = yes + # Release is handled in follow-up events + scope:disfigure = no + scope:blind = no + scope:castrate = no + } + release_from_prison = yes + } # Demand Conversion if = { limit = { scope:demand_conversion = yes } @@ -4273,6 +4253,7 @@ release_from_prison_interaction = { has_any_artifact = yes } every_character_artifact = { + limit = { NOT = { has_variable = artifact_prevent_transfer } } set_owner = { target = scope:actor history = { @@ -4658,6 +4639,68 @@ release_from_prison_interaction = { target = scope:actor } } + hidden_effect = { + random = { # chance of inspiring a knight to become eligible for idealist accolade + chance = 2 + modifier = { + factor = accolade_progress # scales with accolade progress + } + modifier = { # must have an eligible knight + NOT = { + any_knight = { + can_unlock_accolade_attribute_trigger = { + ATTRIBUTE = idealist + } + } + } + factor = 0 + } + set_variable = { + name = accolade_progress + value = 0 + } + random_knight = { + limit = { + can_unlock_accolade_attribute_trigger = { + ATTRIBUTE = idealist + } + } + weight = { + base = 1 + modifier = { + add = 50 + is_acclaimed = yes + } + modifier = { + add = 50 + has_trait = compassionate + } + modifier = { + add = 30 + has_trait = just + } + modifier = { + add = 30 + has_trait = zealous + } + } + save_scope_as = idealist + } + send_interface_message = { + type = msg_accolade_eligibility + title = accolade_idealist_unlock.t + left_icon = scope:idealist + right_icon = scope:recipient + custom_tooltip = accolade_idealist_unlock.tt + scope:idealist = { + set_variable = { + name = idealist_attribute_unlock + value = yes + } + } + } + } + } } house ?= { change_house_relation_effect = { @@ -4724,17 +4767,15 @@ release_from_prison_interaction = { SECOND = scope:recipient } any_character_struggle = { - involvement = involved - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + activate_struggle_catalyst_secondary_character_involvement_either_trigger = { CATALYST = catalyst_release_supporter_detractor CHAR = scope:recipient } } } every_character_struggle = { - involvement = involved limit = { - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + activate_struggle_catalyst_secondary_character_involvement_either_trigger = { CATALYST = catalyst_release_supporter_detractor CHAR = scope:recipient } @@ -4787,11 +4828,18 @@ release_from_prison_interaction = { } } } - else = { + else_if = { + limit = { + scope:disfigure = no + scope:blind = no + scope:castrate = no + } scope:actor = { trigger_event = char_interaction.0160 } } + else = { #do nothing as rest is handled in follow-up events + } # If a child was imprisoned due to yearly_4021 they'll come back to say hi if = { @@ -4827,17 +4875,6 @@ release_from_prison_interaction = { remove_variable = marked_for_revenge_in_event_yearly_4021 } } - - if = { - limit = { - is_imprisoned = yes - # Release is handled in follow-up events - scope:disfigure = no - scope:blind = no - scope:castrate = no - } - release_from_prison = yes - } } # FP3 - If prisoner is important for war @@ -5495,7 +5532,7 @@ release_from_prison_interaction = { add = -20 desc = "RECIPIENT_IS_AMBITIOUS" } - + # Demand conversion modifier = { trigger = { @@ -5747,7 +5784,7 @@ release_from_prison_interaction = { NOR = { has_trait = one_eyed has_trait = infirm - age > 60 # I.e. they have poor eyesight already + has_trait = clouded_eyes } } desc = "BLIND_NEGATIVE_REASON" @@ -5759,7 +5796,7 @@ release_from_prison_interaction = { OR = { has_trait = one_eyed has_trait = infirm - age > 60 # I.e. they have poor eyesight already + has_trait = clouded_eyes } } desc = "BLIND_NEGATIVE_REASON" @@ -6826,17 +6863,15 @@ execute_prisoner_interaction = { limit = { scope:recipient = { is_important_or_vip_struggle_character = yes } any_character_struggle = { - involvement = involved - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + activate_struggle_catalyst_secondary_character_involvement_either_trigger = { CATALYST = catalyst_execute_important CHAR = scope:recipient } } } every_character_struggle = { - involvement = involved limit = { - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + activate_struggle_catalyst_secondary_character_involvement_either_trigger = { CATALYST = catalyst_execute_important CHAR = scope:recipient } @@ -6857,9 +6892,8 @@ execute_prisoner_interaction = { if = { limit = { scope:recipient = { has_trait = fp3_struggle_detractor } - any_character_struggle = { - involvement = involved - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + struggle:persian_struggle = { + activate_struggle_catalyst_secondary_character_involvement_either_trigger = { CATALYST = catalyst_execute_detractor CHAR = scope:recipient } @@ -6868,7 +6902,7 @@ execute_prisoner_interaction = { every_character_struggle = { involvement = involved limit = { - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + activate_struggle_catalyst_secondary_character_involvement_either_trigger = { CATALYST = catalyst_execute_detractor CHAR = scope:recipient } @@ -6885,7 +6919,7 @@ execute_prisoner_interaction = { scope:recipient = { has_trait = fp3_struggle_supporter } any_character_struggle = { involvement = involved - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + activate_struggle_catalyst_secondary_character_involvement_either_trigger = { CATALYST = catalyst_execute_supporter CHAR = scope:recipient } @@ -6894,7 +6928,7 @@ execute_prisoner_interaction = { every_character_struggle = { involvement = involved limit = { - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + activate_struggle_catalyst_secondary_character_involvement_either_trigger = { CATALYST = catalyst_execute_supporter CHAR = scope:recipient } @@ -7512,7 +7546,7 @@ castrate_interaction = { has_variable = emulating_byz_punishment_var } } - + # If they're our partner emperor, we should use the maiming interaction instead. liege_should_systematically_maim_co_ruler_trigger = no } @@ -7987,6 +8021,11 @@ systematically_maim_character_interaction = { send_option = { flag = maim_castrate + is_shown = { + scope:actor.culture = { + has_cultural_parameter = can_castrate_prisoners + } + } is_valid = { scope:recipient = { NOR = { @@ -8000,6 +8039,11 @@ systematically_maim_character_interaction = { } send_option = { flag = maim_blind + is_shown = { + scope:actor.culture = { + has_cultural_parameter = can_blind_prisoners + } + } is_valid = { scope:recipient = { NOT = { has_trait = blind } @@ -8011,6 +8055,11 @@ systematically_maim_character_interaction = { } send_option = { flag = maim_face + is_shown = { + scope:actor.culture = { + has_cultural_parameter = can_blind_prisoners + } + } is_valid = { scope:recipient = { NOT = { has_trait = disfigured } @@ -8039,6 +8088,263 @@ systematically_maim_character_interaction = { localization = maim_arm_name current_description = maim_arm } + send_option = { + flag = renounce_claims + localization = RELEASE_RENOUNCE_CLAIMS + is_shown = { + custom_description = { + text = "release_renounce_claims" + subject = scope:recipient + scope:recipient = { + any_claim = { + explicit = yes + save_temporary_scope_as = temp_claim + OR = { + holder = scope:actor + AND = { + NOT = { prev = { target_is_liege_or_above = scope:actor } } + trigger_if = { + limit = { + exists = holder + } + holder = { target_is_liege_or_above = scope:actor } + } + } + scope:actor = { + any_held_title = { + is_de_jure_liege_or_above_target = scope:temp_claim + } + } + } + } + } + } + } + current_description = { + desc = RELEASE_RENOUNCE_CLAIMS_DESC + } + } + + send_option = { + flag = banish + localization = "RELEASE_BANISH" + is_shown = { + trigger_if = { + limit = { + scope:actor = { is_ai = yes } + } + scope:recipient = { + OR = { + AND = { + is_playable_character = no + is_ruler = no + gold > scope:actor.gold + gold > scope:actor.medium_gold_value + scope:actor.ai_greed > low_negative_ai_value + } + AND = { + is_playable_character = no + is_ruler = no + gold > 0 + scope:actor = { + has_banish_reason = scope:recipient + } + } + AND = { + is_playable_character = no + is_ruler = no + gold > 100 + scope:actor.ai_greed >= high_positive_ai_value + } + AND = { + scope:actor = { + has_banish_reason = scope:recipient + } + scope:actor = { + opinion = { + target = scope:recipient + value <= medium_negative_opinion + } + } + } + } + } + } + trigger_if = { + limit = { + scope:recipient = { + is_playable_character = yes + } + } + scope:recipient = { + is_vassal_of = scope:actor + } + } + trigger_else = { + scope:recipient = { + is_courtier_of = scope:actor + } + } + NOT = { + scope:recipient = { + is_spouse_of = scope:actor + } + } + } + } + + send_option = { + flag = take_vows + localization = "RELEASE_TAKE_VOWS" + is_shown = { + scope:actor = { take_vows_available_trigger = yes } + } + is_valid = { + #Handle AI + trigger_if = { + limit = { + scope:actor = { is_ai = yes } + } + #We're AI and Byzantium + trigger_if = { + limit = { + scope:actor = { + culture = { has_cultural_pillar = heritage_byzantine } + } + } + scope:recipient = { + is_ai = yes #Not gonna depose player characters, for now + OR = { + is_close_or_extended_family_of = scope:actor + is_vassal_or_below_of = scope:actor #Weigh this for Byz AI in the modifiers below + has_relation_rival = scope:actor + is_courtier_of = scope:actor + } + NOT = { + is_heir_of = scope:actor + } + } + #Get rid of rivals despite potentially liking them + trigger_if = { + limit = { + scope:recipient = { has_relation_rival = scope:actor } + } + always = yes + } + #Only get rid of family members if we dislike them + trigger_else = { + scope:actor = { + opinion = { + target = scope:recipient + value <= medium_negative_opinion + } + } + } + } + #We're not Byzantium but plain AI + trigger_else = { + scope:recipient = { + is_ai = yes #Not gonna depose player characters, for now + is_close_or_extended_family_of = scope:actor + NOT = { + is_heir_of = scope:actor + } + } + scope:actor = { + opinion = { + target = scope:recipient + value <= medium_negative_opinion + } + } + custom_description = { + text = "release_vows_invalid_not_your_court" + object = scope:recipient + subject = scope:actor + scope:recipient = { is_courtier_of = scope:actor } + } + } + } + #Enhanced Take the Vows for Byzantium players -- who do we want to boot to a monastery far, far away? + trigger_else_if = { + limit = { + scope:actor = { + culture = { has_cultural_pillar = heritage_byzantine } + } + } + scope:recipient = { + is_ai = yes #Not gonna depose player characters, for now + custom_description = { + text = "release_byz_vows_invalid" + object = scope:recipient + subject = scope:actor + OR = { + is_close_or_extended_family_of = scope:actor + is_vassal_or_below_of = scope:actor + has_relation_rival = scope:actor + is_courtier_of = scope:actor + } + } + } + } + #Otherwise standard procedure Take the Vows requirements + trigger_else = { + scope:recipient = { + is_ai = yes #Not gonna depose player characters, for now + } + scope:actor = { is_close_or_extended_family_of = scope:recipient } #Triggering I_AM_NOT instead of CHARACTER_IS_NOT makes the tooltip look less cursed + custom_description = { + text = "release_vows_invalid_not_your_court" + object = scope:recipient + subject = scope:actor + scope:recipient = { is_courtier_of = scope:actor } + } + + } + scope:recipient = { + age >= 10 + NOR = { + has_trait = excommunicated + has_trait = devoted + has_trait = incapable + } + #Do they have the "wrong" marriage type? + NOR = { + custom_description = { + text = is_married_matrilineally + subject = scope:recipient + any_spouse = { + is_female = yes + matrilinear_marriage = yes + } + } + custom_description = { + text = is_married_patrilineally + subject = scope:recipient + any_spouse = { + is_male = yes + patrilinear_marriage = yes + } + } + custom_description = { + text = matrilinear_betrothal + subject = scope:recipient + betrothed ?= { + is_female = yes + matrilinear_betrothal = yes + } + } + custom_description = { + text = patrilinear_betrothal + subject = scope:recipient + betrothed ?= { + is_male = yes + patrilinear_betrothal = yes + } + } + } + } + } + } on_accept = { scope:recipient = { @@ -8060,172 +8366,317 @@ systematically_maim_character_interaction = { } # Let the enchoppening begin. - ## Castrate. - if = { - limit = { scope:maim_castrate = yes } - show_as_tooltip = { + switch = { + trigger = yes + ## Castrate. + scope:maim_castrate = { + show_as_tooltip = { + scope:recipient = { + if = { + limit = { + age < 12 + } + ep3_child_castration_effect = yes + } + else = { + ep3_youth_castration_effect = yes + } + release_from_prison = yes + } + } + torture_blind_castrate_disfigure_opinion_effect = { VERB = castrated } + scope:actor = { + clear_designated_heir = yes + trigger_event = { + id = prison.1025 + days = 1 + } + } + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = major_unity_loss + DESC = clan_unity_abelarding.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + ## Blind. + scope:maim_blind = { + show_as_tooltip = { + scope:recipient = { + add_trait = blind + release_from_prison = yes + } + } + torture_blind_castrate_disfigure_opinion_effect = { VERB = blinded } + scope:actor = { + clear_designated_heir = yes + # Merciful Blindings + if = { + limit = { + culture = { has_cultural_parameter = merciful_blinding } + OR = { + has_execute_reason = scope:recipient + has_banish_reason = scope:recipient + } + } + add_piety = medium_piety_gain + } + trigger_event = { + id = prison.1020 + days = 1 + } + } + # If actor's culture has Merciful Blindings, they lose less unity. + if = { + limit = { + scope:actor.culture = { has_cultural_parameter = merciful_blinding } + } + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_loss + DESC = clan_unity_blinding.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + else = { + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_loss + DESC = clan_unity_blinding.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + } + ## Disfigure. + scope:maim_face = { + show_as_tooltip = { + scope:recipient = { + add_trait = disfigured + release_from_prison = yes + } + } + torture_blind_castrate_disfigure_opinion_effect = { VERB = disfigured } + scope:actor = { + clear_designated_heir = yes + trigger_event = { + id = prison.1030 + days = 1 + } + } + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = major_unity_loss + DESC = clan_unity_maimed.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + ## Take off an arm. + scope:maim_arm = { + show_as_tooltip = { + scope:recipient = { + apply_maimed_trait_and_modifier_effect = yes + release_from_prison = yes + } + } + torture_blind_castrate_disfigure_opinion_effect = { VERB = maimed } + scope:actor = { + clear_designated_heir = yes + save_scope_value_as = { + name = maim_type + value = flag:arm + } + trigger_event = { + id = prison.1041 + days = 1 + } + } + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = major_unity_loss + DESC = clan_unity_maimed.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + ## Take off a leg. + scope:maim_leg = { + show_as_tooltip = { + scope:recipient = { + add_trait = one_legged + release_from_prison = yes + } + } + torture_blind_castrate_disfigure_opinion_effect = { VERB = maimed } + scope:actor = { + clear_designated_heir = yes + save_scope_value_as = { + name = maim_type + value = flag:leg + } + trigger_event = { + id = prison.1041 + days = 1 + } + } + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = major_unity_loss + DESC = clan_unity_maimed.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + # Banish Landed Character + scope:banish = { scope:recipient = { if = { limit = { - age < 12 + is_landed_or_landless_administrative = yes + } + banish_effect = { BANISHER = scope:actor } + if = { + limit = { + NOT = { + scope:actor = { + has_banish_reason = scope:recipient + } + } + } + scope:actor = { add_tyranny = banishment_tyranny_gain } } - ep3_child_castration_effect = yes } - else = { - ep3_youth_castration_effect = yes + # Banish Unlanded Character + else_if = { + limit = { + is_landless_adventurer = no + is_pool_character = no # It is possible for them to end up in the pool between the interaction being sent, and it being accepted + } + if = { + limit = { + gold > 0 + NOR = { + has_character_flag = realm_priest + has_character_flag = was_bookmaker + } + } + pay_short_term_gold = { target = scope:actor gold = scope:recipient.gold } + } + if = { + limit = { + has_any_artifact = yes + } + every_character_artifact = { + limit = { NOT = { has_variable = artifact_prevent_transfer } } + set_owner = { + target = scope:actor + history = { + location = scope:recipient.location + actor = scope:recipient + recipient = scope:actor + type = stolen + } + } + scope:actor = { + if = { + limit = { + NOT = { has_variable = stolen_artifact } + } + set_variable = { + name = stolen_artifact + value = 1 + } + } + else = { + change_variable = { + name = stolen_artifact + add = 1 + } + } + } + } + } + banish = yes + } + # 'Banish' Pool Character + else_if = { + limit = { + is_playable_character = no + is_pool_character = yes # They'll just leave for the pool + } + if = { + limit = { + gold > 0 + } + pay_short_term_gold = { target = scope:actor gold = scope:recipient.gold } + } + } + add_opinion = { + modifier = banished_me + target = scope:actor } release_from_prison = yes } } - torture_blind_castrate_disfigure_opinion_effect = { VERB = castrated } - scope:actor = { - clear_designated_heir = yes - trigger_event = { - id = prison.1025 - days = 1 - } - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = major_unity_loss - DESC = clan_unity_abelarding.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - ## Blind. - if = { - limit = { scope:maim_blind = yes } - show_as_tooltip = { + # Renounce Claims + scope:renounce_claims = { scope:recipient = { - add_trait = blind + add_opinion = { + modifier = demanded_claim_renouncement + target = scope:actor + } release_from_prison = yes + every_claim = { + explicit = yes + limit = { + save_temporary_scope_as = temp_claim + OR = { + holder = scope:actor + AND = { + exists = holder + NOT = { prev = { target_is_liege_or_above = scope:actor } } + holder = { target_is_liege_or_above = scope:actor } + } + scope:actor = { + any_held_title = { + is_de_jure_liege_or_above_target = scope:temp_claim + } + } + } + } + scope:recipient = { remove_claim = prev } + } } } - torture_blind_castrate_disfigure_opinion_effect = { VERB = blinded } - scope:actor = { - clear_designated_heir = yes - # Merciful Blindings + # Take Vows + scope:take_vows = { + send_child_to_clergy_effect = yes + #Does Byzan go hay-wire with deposing vassals? if = { limit = { - culture = { has_cultural_parameter = merciful_blinding } - OR = { - has_execute_reason = scope:recipient - has_banish_reason = scope:recipient + scope:actor = { + is_ai = yes + culture = { has_cultural_pillar = heritage_byzantine } } } - add_piety = medium_piety_gain + debug_log = debug_ai_byzan_forced_vows_on_prison_release + debug_log_scopes = yes } - trigger_event = { - id = prison.1020 - days = 1 + #Does the AI in general go haywire with deposing prisoners? + else_if = { + limit = { + scope:actor = { is_ai = yes } + } + debug_log = debug_ai_forced_vows_on_prison_release + debug_log_scopes = yes } - } - # If actor's culture has Merciful Blindings, they lose less unity. - if = { - limit = { - scope:actor.culture = { has_cultural_parameter = merciful_blinding } - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = minor_unity_loss - DESC = clan_unity_blinding.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - else = { - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = medium_unity_loss - DESC = clan_unity_blinding.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - } - ## Disfigure. - if = { - limit = { scope:maim_face = yes } - show_as_tooltip = { scope:recipient = { - add_trait = disfigured release_from_prison = yes } } - torture_blind_castrate_disfigure_opinion_effect = { VERB = disfigured } - scope:actor = { - clear_designated_heir = yes - trigger_event = { - id = prison.1030 - days = 1 - } - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = major_unity_loss - DESC = clan_unity_maimed.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - ## Take off an arm. - if = { - limit = { scope:maim_arm = yes } - show_as_tooltip = { - scope:recipient = { - apply_maimed_trait_and_modifier_effect = yes - release_from_prison = yes - } - } - torture_blind_castrate_disfigure_opinion_effect = { VERB = maimed } - scope:actor = { - clear_designated_heir = yes - save_scope_value_as = { - name = maim_type - value = flag:arm - } - trigger_event = { - id = prison.1041 - days = 1 - } - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = major_unity_loss - DESC = clan_unity_maimed.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - ## Take off a leg. - if = { - limit = { scope:maim_leg = yes } - show_as_tooltip = { - scope:recipient = { - add_trait = one_legged - release_from_prison = yes - } - } - torture_blind_castrate_disfigure_opinion_effect = { VERB = maimed } - scope:actor = { - clear_designated_heir = yes - save_scope_value_as = { - name = maim_type - value = flag:leg - } - trigger_event = { - id = prison.1041 - days = 1 - } - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = major_unity_loss - DESC = clan_unity_maimed.desc - REVERSE_NON_HOUSE_TARGET = no - } } } diff --git a/common/character_interactions/00_religious_interactions.txt b/common/character_interactions/00_religious_interactions.txt index 239dac97..352a4053 100644 --- a/common/character_interactions/00_religious_interactions.txt +++ b/common/character_interactions/00_religious_interactions.txt @@ -2234,7 +2234,7 @@ seek_indulgences_interaction = { trigger_if = { limit = { has_trait = kinslayer_3 - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_3 GENDER_CHARACTER = scope:actor } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:kinslayer_3 GENDER_CHARACTER = scope:actor } } gold >= seek_indulgences_major_criminal_trait_value } @@ -2243,19 +2243,19 @@ seek_indulgences_interaction = { OR = { AND = { has_trait = kinslayer_2 - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_2 GENDER_CHARACTER = scope:actor } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:kinslayer_2 GENDER_CHARACTER = scope:actor } } AND = { has_trait = witch - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = witch GENDER_CHARACTER = scope:actor } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:witch GENDER_CHARACTER = scope:actor } } AND = { has_trait = deviant - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = deviant GENDER_CHARACTER = scope:actor } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:deviant GENDER_CHARACTER = scope:actor } } AND = { has_trait = sodomite - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = sodomite GENDER_CHARACTER = scope:actor } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:sodomite GENDER_CHARACTER = scope:actor } } } } @@ -2266,15 +2266,15 @@ seek_indulgences_interaction = { OR = { AND = { has_trait = kinslayer_1 - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_1 GENDER_CHARACTER = scope:actor } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:kinslayer_1 GENDER_CHARACTER = scope:actor } } AND = { has_trait = fornicator - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = fornicator GENDER_CHARACTER = scope:actor } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:fornicator GENDER_CHARACTER = scope:actor } } AND = { has_trait = adulterer - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = adulterer GENDER_CHARACTER = scope:actor } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:adulterer GENDER_CHARACTER = scope:actor } } } } @@ -4089,7 +4089,7 @@ take_vows_interaction = { if = { limit = { house = { - has_house_power_parameter = humility_take_the_vows_bonus + has_house_aspiration_parameter = humility_take_the_vows_bonus } } add_piety_experience = 100 @@ -5426,11 +5426,11 @@ hof_ask_for_gold_interaction = { OR = { AND = { has_trait = fornicator - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = fornicator GENDER_CHARACTER = scope:actor } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:fornicator GENDER_CHARACTER = scope:actor } } AND = { has_trait = adulterer - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = adulterer GENDER_CHARACTER = scope:actor } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:adulterer GENDER_CHARACTER = scope:actor } } } } @@ -5460,15 +5460,15 @@ hof_ask_for_gold_interaction = { OR = { AND = { has_trait = kinslayer_1 - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_1 GENDER_CHARACTER = scope:actor } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:kinslayer_1 GENDER_CHARACTER = scope:actor } } AND = { has_trait = kinslayer_2 - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_2 GENDER_CHARACTER = scope:actor } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:kinslayer_2 GENDER_CHARACTER = scope:actor } } AND = { has_trait = kinslayer_3 - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_3 GENDER_CHARACTER = scope:actor } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:kinslayer_3 GENDER_CHARACTER = scope:actor } } } } @@ -6255,11 +6255,11 @@ hof_ask_for_claim_interaction = { OR = { AND = { has_trait = fornicator - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = fornicator GENDER_CHARACTER = scope:actor } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:fornicator GENDER_CHARACTER = scope:actor } } AND = { has_trait = adulterer - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = adulterer GENDER_CHARACTER = scope:actor } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:adulterer GENDER_CHARACTER = scope:actor } } } } @@ -6272,11 +6272,11 @@ hof_ask_for_claim_interaction = { OR = { AND = { has_trait = fornicator - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = fornicator GENDER_CHARACTER = scope:secondary_recipient } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:fornicator GENDER_CHARACTER = scope:secondary_recipient } } AND = { has_trait = adulterer - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = adulterer GENDER_CHARACTER = scope:secondary_recipient } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:adulterer GENDER_CHARACTER = scope:secondary_recipient } } } } @@ -6323,15 +6323,15 @@ hof_ask_for_claim_interaction = { OR = { AND = { has_trait = kinslayer_1 - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_1 GENDER_CHARACTER = scope:actor } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:kinslayer_1 GENDER_CHARACTER = scope:actor } } AND = { has_trait = kinslayer_2 - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_2 GENDER_CHARACTER = scope:actor } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:kinslayer_2 GENDER_CHARACTER = scope:actor } } AND = { has_trait = kinslayer_3 - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_3 GENDER_CHARACTER = scope:actor } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:kinslayer_3 GENDER_CHARACTER = scope:actor } } } } @@ -6344,15 +6344,15 @@ hof_ask_for_claim_interaction = { OR = { AND = { has_trait = kinslayer_1 - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_1 GENDER_CHARACTER = scope:secondary_recipient } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:kinslayer_1 GENDER_CHARACTER = scope:secondary_recipient } } AND = { has_trait = kinslayer_2 - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_2 GENDER_CHARACTER = scope:secondary_recipient } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:kinslayer_2 GENDER_CHARACTER = scope:secondary_recipient } } AND = { has_trait = kinslayer_3 - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_3 GENDER_CHARACTER = scope:secondary_recipient } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = trait:kinslayer_3 GENDER_CHARACTER = scope:secondary_recipient } } } } diff --git a/common/character_interactions/00_scheme_interactions.txt b/common/character_interactions/00_scheme_interactions.txt index 226b87ca..5e505b0e 100644 --- a/common/character_interactions/00_scheme_interactions.txt +++ b/common/character_interactions/00_scheme_interactions.txt @@ -738,7 +738,7 @@ befriend_interaction = { involvement = involved has_struggle_phase_parameter = struggle_unlocks_befriend_schemes_for_everyone } - house ?= { has_house_power_parameter = aspect_of_serenity } + house ?= { has_house_aspiration_parameter = aspect_of_serenity } } NOR = { has_trait = shy @@ -903,7 +903,7 @@ befriend_interaction = { factor = 25 OR = { has_focus = diplomacy_family_focus - house ?= { has_house_power_parameter = aspect_of_serenity } + house ?= { has_house_aspiration_parameter = aspect_of_serenity } } } @@ -1388,7 +1388,7 @@ seduce_interaction = { } } - modifier = { # Try to avoid agressive seduction unless you're geared for it + modifier = { # Try to avoid aggressive seduction unless you're geared for it add = -10 scope:actor = { NOR = { diff --git a/common/character_interactions/00_tradition_interactions.txt b/common/character_interactions/00_tradition_interactions.txt index 5eb44c8f..3872424e 100644 --- a/common/character_interactions/00_tradition_interactions.txt +++ b/common/character_interactions/00_tradition_interactions.txt @@ -416,31 +416,19 @@ appoint_podesta_interaction = { } resolve_title_and_vassal_change = scope:change } - } - } - else = { - scope:recipient = { - show_as_tooltip = { - change_government = republic_government - create_title_and_vassal_change = { - type = returned - save_scope_as = change - add_claim_on_loss = no + every_vassal = { + limit = { + government_has_flag = government_is_republic } - every_vassal = { - limit = { - government_has_flag = government_is_republic - } - every_held_title = { - change_title_holder = { - holder = scope:recipient - change = scope:change - take_baronies = yes - } + every_held_title = { + change_title_holder = { + holder = scope:recipient + change = scope:change + take_baronies = yes } } - resolve_title_and_vassal_change = scope:change } + resolve_title_and_vassal_change = scope:change } } } diff --git a/common/character_interactions/00_tribal_interactions.txt b/common/character_interactions/00_tribal_interactions.txt index ed8efab9..17e51d45 100644 --- a/common/character_interactions/00_tribal_interactions.txt +++ b/common/character_interactions/00_tribal_interactions.txt @@ -182,27 +182,23 @@ } } - if = { - limit = { - scope:target = { + scope:target ?= { + if = { + limit = { title_province = { geographical_region = geographical_region:mpo_region_permafrost } } - } - if = { - limit = { - scope:target = { has_county_modifier = mpo_siberian_permafrost_modifier } + if = { + limit = { has_county_modifier = mpo_siberian_permafrost_modifier } + remove_county_modifier = mpo_siberian_permafrost_modifier } - scope:target = { remove_county_modifier = mpo_siberian_permafrost_modifier } - } - else_if = { - limit = { - scope:target = { has_county_modifier = mpo_siberian_permafrost_modifier_bad } + else_if = { + limit = { has_county_modifier = mpo_siberian_permafrost_modifier_bad } + remove_county_modifier = mpo_siberian_permafrost_modifier_bad } - scope:target = { remove_county_modifier = mpo_siberian_permafrost_modifier_bad } - } - } + } + } } } } @@ -364,29 +360,7 @@ tribalize_holding_interaction = { scope:target.title_province = { set_holding_type = tribal_holding } - } - - if = { - limit = { - scope:target = { - title_province = { - geographical_region = geographical_region:mpo_region_permafrost - } - } - } - if = { - limit = { - scope:target = { has_county_modifier = mpo_siberian_permafrost_modifier } - } - scope:target = { remove_county_modifier = mpo_siberian_permafrost_modifier } - } - else_if = { - limit = { - scope:target = { has_county_modifier = mpo_siberian_permafrost_modifier_bad } - } - scope:target = { remove_county_modifier = mpo_siberian_permafrost_modifier_bad } - } - } + } } } } @@ -847,7 +821,7 @@ turn_subject_into_mandala_interaction = { scope:actor = { is_at_war = no } custom_tooltip = { text = cannot_take_overt_hostile_actions_against_diarch.tt - NOT = { scope:recipient ?= scope:actor.diarch } + NOT = { scope:actor.diarch ?= scope:recipient } } custom_tooltip = { text = head_of_faith_unable_to_change_government_desc @@ -938,6 +912,16 @@ turn_subject_into_mandala_interaction = { scope:recipient = { highest_held_title_tier >= tier_kingdom } gold >= 2000 } + modifier = { + scope:recipient.capital_county.title_province = { + NOR = { + has_holding_type = temple_citadel_holding + has_holding_type = church_holding + has_holding_type = castle_holding + } + } + factor = 0 + } } ai_accept = { diff --git a/common/character_interactions/00_tributary_interactions.txt b/common/character_interactions/00_tributary_interactions.txt index d926656f..424ac93f 100644 --- a/common/character_interactions/00_tributary_interactions.txt +++ b/common/character_interactions/00_tributary_interactions.txt @@ -12,13 +12,6 @@ become_tributary_interaction = { desc = become_tributary_interaction_desc is_shown = { - scope:actor = { - trigger_if = { - limit = { is_ai = yes } - current_military_strength < scope:recipient.one_and_a_half_times_current_military_strength - primary_title.tier < scope:recipient.primary_title.tier - } - } scope:recipient = { is_independent_ruler = yes # while it's possible for tributaries to have their own tributaries, it should not be possible to create a tributary relationship with a non-independent ruler NOR = { @@ -28,6 +21,13 @@ become_tributary_interaction = { } can_have_tributaries_trigger = yes } + scope:actor = { + trigger_if = { + limit = { is_ai = yes } + current_military_strength < scope:recipient.one_and_a_half_times_current_military_strength + primary_title.tier < scope:recipient.primary_title.tier + } + } } is_valid_showing_failures_only = { @@ -76,22 +76,6 @@ become_tributary_interaction = { is_confederation_member = no is_at_war = no } - trigger_if = { - limit = { scope:recipient = title:h_china.holder } - scope:actor = { - custom_tooltip = { - text = neighbor_is_china - is_tributary = no - is_independent_ruler = yes - OR = { - has_variable = wants_to_become_tributary_of_china - any_neighboring_and_across_water_top_liege_realm_owner = { - primary_title = title:h_china - } - } - } - } - } } needs_confirmation = { @@ -1289,8 +1273,7 @@ demand_tributary_interaction = { scope:recipient = { NOT = { any_neighboring_top_suzerain_realm_owner = { - exists = this - NOT = { this = scope:actor } + this != scope:actor } } NOT = { @@ -2020,6 +2003,7 @@ release_tributary_interaction = { add_truce_both_ways = { character = scope:actor years = 5 + override = yes name = TRUCE_TRIBUTARY_STOPPED } add_opinion = { @@ -2170,7 +2154,7 @@ exact_tribute_interaction = { ai_max_reply_days = 9 can_send_despite_rejection = yes popup_on_receive = yes - common_interaction = yes + common_interaction = no interface_priority = 4 @@ -2228,9 +2212,7 @@ exact_tribute_interaction = { is_tributary = no custom_tooltip = { text = exact_tribute_interaction_hegemony_not_neighbor_tt - any_neighboring_and_across_water_top_liege_realm_owner = { - this = scope:actor - } + any_neighboring_realm_with_tributaries_owner = { this = scope:actor } } } } @@ -2432,9 +2414,7 @@ exact_tribute_interaction = { GIVER = scope:recipient CHARACTER = scope:actor } - is_adult = yes - has_any_disease_trigger = no - has_easily_mocked_physical_attribute_trigger = no + tribute_mission_is_available_concubine_trigger = yes } add_to_list = potential_concubine_tribute_list random_in_list = { @@ -3462,7 +3442,7 @@ offer_courtier_interaction = { add_opinion = { target = scope:recipient modifier = annoyed_opinion - opinion = 10 + opinion = -10 } } scope:recipient = { diff --git a/common/character_interactions/00_vassal_interactions.txt b/common/character_interactions/00_vassal_interactions.txt index 468d3fa4..35141ab0 100644 --- a/common/character_interactions/00_vassal_interactions.txt +++ b/common/character_interactions/00_vassal_interactions.txt @@ -2,7 +2,7 @@ grant_vassal_interaction = { category = interaction_category_vassal - common_interaction = yes + common_interaction = no interface = transfer_vassal icon = icon_vassal @@ -1393,24 +1393,17 @@ create_claimant_faction_against_interaction = { exists = scope:recipient exists = scope:landed_title scope:recipient = { - OR = { - has_title = title:e_minister_chancellor - has_title = title:e_minister_censor - has_title = title:e_minister_grand_marshal - has_title = title:e_minister_of_personnel - has_title = title:e_minister_of_revenue - has_title = title:e_minister_of_rites - has_title = title:e_minister_of_war - has_title = title:e_minister_of_justice - has_title = title:e_minister_of_works - } + tgp_is_any_minister = yes } } scope:recipient = { custom_description = { text = target_is_a_minister_desc subject = this - scope:landed_title = { this = title:h_china } + any_held_title = { + tgp_is_minister_title = yes + de_jure_liege ?= scope:landed_title + } } } } @@ -1681,10 +1674,7 @@ force_onto_council = { NAND = { has_council_position = councillor_court_chaplain faith = { - OR = { - has_doctrine = doctrine_clerical_succession_temporal_fixed_appointment - has_doctrine = doctrine_clerical_succession_spiritual_fixed_appointment - } + has_doctrine_parameter = clerical_appointment_fixed } } } @@ -2291,7 +2281,7 @@ ask_for_pardon_interaction = { first_valid = { triggered_desc = { trigger = { - scope:actor != scope:recipient.liege + scope:actor.top_liege != scope:recipient } desc = ask_for_pardon_interaction_minister_desc } @@ -2332,7 +2322,9 @@ ask_for_pardon_interaction = { is_highlighted = { OR = { - has_usable_hook = scope:recipient + scope:actor = { + has_usable_hook = scope:recipient + } AND = { scope:recipient = { has_title = title:e_minister_of_justice @@ -4008,6 +4000,7 @@ grant_court_position = { scope:recipient = { liege ?= scope:actor tgp_is_ceremonial_liege_trigger = no + NOT = { has_character_flag = travel_option_added_character } } } diff --git a/common/character_interactions/00_war.txt b/common/character_interactions/00_war.txt index 2867e253..4b2e1270 100644 --- a/common/character_interactions/00_war.txt +++ b/common/character_interactions/00_war.txt @@ -114,7 +114,9 @@ NOT = { has_strong_hook = scope:actor } trigger_if = { limit = { is_imprisoned = yes } - imprisoner != scope:actor + NOT = { + imprisoner = scope:actor + } } } scope:actor = { diff --git a/common/character_interactions/03_fp2_interactions.txt b/common/character_interactions/03_fp2_interactions.txt index e3fe3533..938dd6e4 100644 --- a/common/character_interactions/03_fp2_interactions.txt +++ b/common/character_interactions/03_fp2_interactions.txt @@ -3411,7 +3411,11 @@ contract_assistance_interaction = { greedy = medium_stress_impact_gain arrogant = medium_stress_impact_gain } - custom_tooltip = contract_assistance_interaction_condition_tt + custom_description_no_bullet = { + text = contract_assistance_interaction_condition_tt + subject = scope:recipient + object = scope:actor + } show_as_tooltip = { pay_short_term_gold = { target = scope:actor @@ -3996,7 +4000,11 @@ request_contract_assistance_interaction = { greedy = medium_stress_impact_gain arrogant = medium_stress_impact_gain } - custom_tooltip = request_contract_assistance_interaction_condition_tt + custom_description_no_bullet = { + text = contract_assistance_interaction_condition_tt + subject = scope:actor + object = scope:recipient + } show_as_tooltip = { pay_short_term_gold = { target = scope:recipient @@ -4778,8 +4786,8 @@ bargain_fealty_interaction = { top_liege = this is_at_war = yes any_character_war = { - is_war_leader = prev - primary_defender = prev + is_war_leader = scope:actor + primary_defender = scope:actor } trigger_if = { limit = { @@ -4799,24 +4807,36 @@ bargain_fealty_interaction = { } } } - # Recipient is not at war with Actor scope:recipient = { - any_neighboring_and_across_water_top_liege_realm_owner = { this = scope:actor } + NOT = { this = scope:actor } primary_title = { is_mercenary_company = no } - NOR = { - this = scope:actor - is_at_war_with = scope:actor - } } } is_valid_showing_failures_only = { scope:actor = { + custom_tooltip = { + text = bargain_fealty_interaction_valid_tt + any_character_war = { + is_war_leader = scope:actor + primary_defender = scope:actor + NOT = { using_cb = fp2_border_raid } + NOT = { using_cb = county_struggle_cb } + } + } any_character_struggle = { involvement = involved has_struggle_phase_parameter = unlocks_bargain_fealty_interaction } } + scope:recipient = { + custom_tooltip = { + text = bargain_fealty_interaction_neighbor_tt + any_neighboring_and_across_water_top_liege_realm_owner = { this = scope:actor } + } + # Recipient is not at war with Actor + NOT = { is_at_war_with = scope:actor } + } } can_be_picked = { @@ -4841,45 +4861,45 @@ bargain_fealty_interaction = { } } + can_send = { + exists = scope:target + } + on_accept = { - if = { - limit = { exists = scope:target } + scope:target = { # Add Recipient to Actor's war - scope:target = { - hidden_effect = { set_called_to = scope:recipient } - if = { - limit = { is_attacker = scope:actor } - add_attacker = scope:recipient - } - else = { add_defender = scope:recipient } + hidden_effect = { set_called_to = scope:recipient } + add_defender = scope:recipient + } + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + } + scope:actor = { + change_liege = { + liege = scope:recipient + change = scope:change } - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - } - scope:actor = { - change_liege = { - liege = scope:recipient - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - # Actor effects - scope:actor = { - stress_impact = { - arrogant = medium_stress_impact_gain - craven = medium_stress_impact_gain - } - } - # Recipient effects - scope:recipient = { - stress_impact = { - greedy = medium_stress_impact_gain - craven = medium_stress_impact_gain - } + resolve_title_and_vassal_change = scope:change + } + # Actor effects + scope:actor = { + stress_impact = { + arrogant = medium_stress_impact_gain + craven = medium_stress_impact_gain } } - else = { + # Recipient effects + scope:recipient = { + stress_impact = { + greedy = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + } + if = { + limit = { + NOT = { exists = scope:target } + } scope:actor = { send_interface_toast = { type = event_toast_effect_neutral @@ -5377,7 +5397,7 @@ invite_foreign_ruler_to = { # is_imprisoned = no # # Matches the regular minimum triggers. # any_character_struggle = { involvement = involved } - # short_term_gold > standard_activity_cost + # short_term_gold > standard_activity_base_cost #} # #ai_target_quick_trigger = { adult = yes } diff --git a/common/character_interactions/06_ep3_laamp_interactions.txt b/common/character_interactions/06_ep3_laamp_interactions.txt index 5446f642..01b687b3 100644 --- a/common/character_interactions/06_ep3_laamp_interactions.txt +++ b/common/character_interactions/06_ep3_laamp_interactions.txt @@ -168,21 +168,18 @@ purchase_land_interaction = { } is_valid_showing_failures_only = { - scope:actor = { top_liege = this } scope:actor = { + top_liege = this prestige_level >= 2 - } - scope:actor = { - NOT = { + NOR = { has_trait = gallowsbait - } - } - scope:actor = { - NOT = { has_trait = gallivanter } } - scope:recipient = { is_at_war = no } + scope:recipient = { + is_at_war = no + NOT = { has_strong_hook = scope:actor } + } trigger_if = { # Can't purchase Baronies limit = { scope:target ?= { tier = tier_barony } @@ -240,9 +237,6 @@ purchase_land_interaction = { always = no } } - scope:recipient = { - NOT = { has_strong_hook = scope:actor } - } #Has to be used instead of diplo range checks in laamp to landed interactions ep3_laamp_diplo_range_trigger = { TARGET = scope:recipient @@ -320,9 +314,7 @@ purchase_land_interaction = { multiply = 0.5 } if = { - limit = { - scope:offer_gold = yes - } + limit = { scope:offer_gold = yes } multiply = 2 } } @@ -346,7 +338,9 @@ purchase_land_interaction = { } } } - show_as_tooltip = { purchase_land_interaction_shortened_effect = yes } + show_as_tooltip = { + scope:actor = { purchase_land_interaction_effect = yes } + } if = { limit = { always = scope:hook } scope:actor = { use_hook = scope:recipient } @@ -2010,10 +2004,7 @@ negotiate_settlement_interaction = { any_claim = { OR = { holder ?= { - OR = { - this = scope:actor - target_is_liege_or_above = scope:actor - } + target_is_same_character_or_above = scope:actor } target_is_de_jure_liege_or_above = scope:actor.primary_title } @@ -4801,6 +4792,11 @@ hire_laamp_mercenaries_interaction = { is_ai = yes } scope:recipient.current_military_strength >= 100 + scope:recipient = { + NOT = { + has_character_flag = ai_hire_blocker + } + } } } } @@ -4922,9 +4918,20 @@ hire_laamp_mercenaries_interaction = { } } scope:actor = { - pay_short_term_gold = { - target = scope:recipient - gold = ep3_hire_laamp_mercs_cost_value + if = { + limit = { + has_treasury = no + } + pay_short_term_gold = { + target = scope:recipient + gold = ep3_hire_laamp_mercs_cost_value + } + } + else = { + pay_short_term_treasury = { + target = scope:recipient + treasury = ep3_hire_laamp_mercs_cost_value + } } add_to_variable_list = { name = hired_mercenaries @@ -4945,7 +4952,10 @@ hire_laamp_mercenaries_interaction = { } } scope:recipient = { - add_character_flag = joined_as_mercenary + set_variable = { + name = joined_as_mercenary + value = scope:actor + } } add_clan_unity_interaction_effect = { CHARACTER = scope:actor @@ -5665,10 +5675,7 @@ evict_adventurer_interaction = { scope:recipient = { # Adventurer must be in the subrealm domicile.domicile_location.county.holder ?= { - OR = { - this = scope:actor - any_liege_or_above = { this ?= scope:actor } - } + target_is_same_character_or_above = scope:actor } } # AI should not against hired adventurers @@ -5709,10 +5716,7 @@ evict_adventurer_interaction = { every_character_task_contract = { limit = { task_contract_location.county.holder = { - OR = { - this = scope:actor - any_liege_or_above = { this = scope:actor } - } + target_is_same_character_or_above = scope:actor } } invalidate_contract = yes @@ -5733,14 +5737,14 @@ evict_adventurer_interaction = { modifier = demanded_eviction_opinion } custom_tooltip = evict_adventurer_contracts_tt - } - scope:actor = { custom_description_no_bullet = { text = evict_adventurer_consequences_tt - object = scope:recipient - subject = scope:actor + object = scope:actor + subject = scope:recipient } custom_tooltip = evict_adventurer_casus_belli_tt + } + scope:actor = { show_as_tooltip = { add_opinion = { target = scope:recipient @@ -5835,6 +5839,10 @@ evict_adventurer_interaction = { target = scope:recipient } } + modifier = { + add = 100 + has_imprisonment_reason = scope:recipient + } modifier = { add = { if = { diff --git a/common/character_interactions/09_mpo_interactions.txt b/common/character_interactions/09_mpo_interactions.txt index ae55136e..9bbeb1fb 100644 --- a/common/character_interactions/09_mpo_interactions.txt +++ b/common/character_interactions/09_mpo_interactions.txt @@ -369,9 +369,7 @@ scope:recipient = { NOT = { any_land_neighboring_realm_with_tributaries_owner = { - NOT = { - this = scope:actor - } + this != scope:actor } } NOT = { @@ -2631,7 +2629,43 @@ migration_interaction = { value = scope:target_title } } - + if = { + limit = { + OR = { + has_variable = crowned_king_var + has_variable = crowned_emperor_var + } + } + set_variable = { + name = nomad_migration_preserve_coronation + value = yes + } + } + if = { + limit = { + highest_held_title_tier = tier_duchy + } + add_character_modifier = { + modifier = mpo_migrating_accolade_duke_modifier + } + } + else_if = { + limit = { + highest_held_title_tier = tier_kingdom + } + add_character_modifier = { + modifier = mpo_migrating_accolade_king_modifier + } + } + else_if = { + limit = { + highest_held_title_tier >= tier_empire + } + add_character_modifier = { + modifier = mpo_migrating_accolade_emperor_modifier + } + } + # Save your old lands save_scope_as = old_holder capital_county = { save_scope_as = old_capital_county } @@ -2716,17 +2750,6 @@ migration_interaction = { migration_set_obedient_vassal_effect = yes } } - # Player and non obedient vassals get turned into Tributaries instead - every_vassal = { - limit = { - exists = scope:target_title - OR = { - NOT = { is_obedient_to = scope:actor } - is_ai = no - } - } - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:actor TRIBUTARY = prev } - } # Migration travel is handled by code } } @@ -2751,6 +2774,44 @@ migration_interaction = { } } } + scope:actor = { + if = { + limit = { + OR = { + has_variable = crowned_king_var + has_variable = crowned_emperor_var + } + } + set_variable = { + name = nomad_migration_preserve_coronation + value = yes + } + } + if = { + limit = { + highest_held_title_tier = tier_duchy + } + add_character_modifier = { + modifier = mpo_migrating_accolade_duke_modifier + } + } + else_if = { + limit = { + highest_held_title_tier = tier_kingdom + } + add_character_modifier = { + modifier = mpo_migrating_accolade_king_modifier + } + } + else_if = { + limit = { + highest_held_title_tier >= tier_empire + } + add_character_modifier = { + modifier = mpo_migrating_accolade_emperor_modifier + } + } + } # Migration wars are handled by code scope:actor = { if = { @@ -3332,9 +3393,7 @@ migration_interaction = { } AND = { tier = tier_county - any_county_province = { - any_province_epidemic = { - } + any_county_province_epidemic = { } } } @@ -7716,7 +7775,9 @@ mpo_retrieve_land_from_herder_interaction = { desc = YOU_ARE_AN_ADVENTURER_REASON } modifier = { - exists = scope:actor.suzerain + scope:recipient = { + is_tributary = yes + } add = -25 desc = ADVENTURER_SUZERAIN_REASON } @@ -7775,6 +7836,7 @@ mpo_vassal_to_tributary_interaction = { is_valid_showing_failures_only = { scope:recipient = { is_imprisoned = no + is_independent_ruler = yes } scope:actor = { is_imprisoned = no @@ -8769,9 +8831,7 @@ mpo_offer_submission_or_ruin = { scope:recipient = { NOT = { any_neighboring_top_liege_realm_owner = { - NOT = { - this = scope:actor - } + this != scope:actor } } NOT = { diff --git a/common/character_interactions/tgp_tribute_mission_interactions.txt b/common/character_interactions/tgp_tribute_mission_interactions.txt index b41ebcd5..95a0d913 100644 --- a/common/character_interactions/tgp_tribute_mission_interactions.txt +++ b/common/character_interactions/tgp_tribute_mission_interactions.txt @@ -382,8 +382,7 @@ tribute_mission_concubine_interaction = { GIVER = scope:actor CHARACTER = scope:actor.overlord } - has_any_disease_trigger = no - has_easily_mocked_physical_attribute_trigger = no + tribute_mission_is_available_concubine_trigger = yes } add_to_list = characters } diff --git a/common/council_tasks/00_chancellor_tasks.txt b/common/council_tasks/00_chancellor_tasks.txt index 5f994261..46d4889e 100644 --- a/common/council_tasks/00_chancellor_tasks.txt +++ b/common/council_tasks/00_chancellor_tasks.txt @@ -567,17 +567,18 @@ task_integrate_title = { trigger_if = { limit = { has_tgp_dlc_trigger = yes - liege = { - any_character_situation = { - situation_type = dynastic_cycle - save_temporary_scope_as = dynastic_cycle + top_liege = { + top_participant_group:dynastic_cycle ?= { + participant_group_type = hegemon_ruler } } } custom_tooltip = { text = dynastic_cycle_locks_title_integration_tt - top_participant_group:dynastic_cycle ?= { - NOT = { has_participant_group_parameter = dynastic_cycle_locks_title_integration } + top_liege = { + top_participant_group:dynastic_cycle ?= { + NOT = { has_participant_group_parameter = dynastic_cycle_locks_title_integration } + } } } } @@ -585,6 +586,17 @@ task_integrate_title = { on_finish_task_county = { start_default_task = yes + # Add the title to the Dynastic Cycle core region + if = { + limit = { + scope:councillor_liege = { + top_participant_group:dynastic_cycle ?= { + participant_group_type = hegemon_ruler + } + } + } + situation:dynastic_cycle.situation_sub_region:core = { add_dejure_title_to_sub_region = scope:county.empire } + } } potential_county = { diff --git a/common/culture/eras/00_culture_eras.txt b/common/culture/eras/00_culture_eras.txt index a84f8c3a..e8ab2d02 100644 --- a/common/culture/eras/00_culture_eras.txt +++ b/common/culture/eras/00_culture_eras.txt @@ -34,33 +34,6 @@ culture_era_early_medieval = { damage = 5 toughness = 2 } - - # Accolade - ## Accolade Archers - maa_upgrade = { - men_at_arms = accolade_maa_archers - damage = 6 - } - ## Accolade Skirmishers - maa_upgrade = { - men_at_arms = accolade_maa_skirmishers - damage = 6 - } - ## Accolade Pikes - maa_upgrade = { - men_at_arms = accolade_maa_pikes - damage = 6 - } - ## Accolade Outriders - maa_upgrade = { - men_at_arms = accolade_maa_outriders - pursuit = 6 - } - ## Accolade Cameliers - maa_upgrade = { - men_at_arms = accolade_maa_cameliers - pursuit = 6 - } } culture_era_high_medieval = { @@ -105,55 +78,6 @@ culture_era_high_medieval = { damage = 5 screen = 3 } - - # Accolade - ## Accolade Archers - maa_upgrade = { - men_at_arms = accolade_maa_archers - damage = 4 - toughness = 4 - } - ## Accolade Skirmishers - maa_upgrade = { - men_at_arms = accolade_maa_skirmishers - damage = 4 - toughness = 4 - pursuit = 4 - screen = 4 - } - ## Accolade Pikes - maa_upgrade = { - men_at_arms = accolade_maa_pikes - damage = 4 - toughness = 4 - } - ## Accolade Outriders - maa_upgrade = { - men_at_arms = accolade_maa_outriders - damage = 4 - toughness = 4 - pursuit = 4 - screen = 4 - } - ## Accolade Vanguards - maa_upgrade = { - men_at_arms = accolade_maa_vanguards - damage = 10 - toughness = 10 - } - ## Accolade Lancers - maa_upgrade = { - men_at_arms = accolade_maa_lancers - pursuit = 10 - } - ## Accolade Cameliers - maa_upgrade = { - men_at_arms = accolade_maa_cameliers - damage = 4 - toughness = 4 - pursuit = 4 - screen = 4 - } } culture_era_late_medieval = { @@ -199,59 +123,4 @@ culture_era_late_medieval = { damage = 8 screen = 5 } - - # Accolade - ## Accolade Archers - maa_upgrade = { - men_at_arms = accolade_maa_archers - damage = 10 - toughness = 10 - } - ## Accolade Skirmishers - maa_upgrade = { - men_at_arms = accolade_maa_skirmishers - damage = 6 - toughness = 6 - pursuit = 4 - screen = 4 - } - ## Accolade Pikes - maa_upgrade = { - men_at_arms = accolade_maa_pikes - damage = 10 - toughness = 6 - } - ## Accolade Outriders - maa_upgrade = { - men_at_arms = accolade_maa_outriders - damage = 16 - toughness = 16 - pursuit = 20 - screen = 6 - } - ## Accolade Vanguards - maa_upgrade = { - men_at_arms = accolade_maa_vanguards - damage = 10 - toughness = 10 - } - ## Accolade Lancers - maa_upgrade = { - men_at_arms = accolade_maa_lancers - screen = 20 - } - ## Accolade Crossbowers - maa_upgrade = { - men_at_arms = accolade_maa_crossbowers - damage = 10 - toughness = 10 - } - ## Accolade Cameliers - maa_upgrade = { - men_at_arms = accolade_maa_cameliers - damage = 16 - toughness = 6 - pursuit = 20 - screen = 6 - } } diff --git a/common/culture/innovations/tgp_innovations.txt b/common/culture/innovations/tgp_innovations.txt index c8c4e0a0..d79123e8 100644 --- a/common/culture/innovations/tgp_innovations.txt +++ b/common/culture/innovations/tgp_innovations.txt @@ -181,17 +181,7 @@ innovation_sericulture = { # VICTORIA TECHS ARE BACK BABEYYY AWOOOOU (wolf howl) icon = @sericulture potential = { - has_tgp_dlc_trigger = yes - } - - can_progress = { - custom_tooltip = { - text = silk_road_sericulture_trigger_tt - OR = { - has_cultural_pillar = heritage_chinese - has_cultural_pillar = heritage_byzantine - } - } + silk_road_innovation_trigger = { INNOVATION = sericulture } } parameters = { diff --git a/common/culture/name_equivalency/00_names.txt b/common/culture/name_equivalency/00_names.txt index 5f962457..5e18e6e6 100644 --- a/common/culture/name_equivalency/00_names.txt +++ b/common/culture/name_equivalency/00_names.txt @@ -932,7 +932,7 @@ morganna_female = { Morganna Morganne } morna_female = { Morna Muirne } moses_male = { MosE_ Moses Mouses Musa Muza } mstislav_male = { Mstislav ML_cisL_aw MS_cisL_aw } -muhammad_male = { Muhammad Mahammad Mamlan Mihemed Mohammed Muhammed Mahamed } +muhammad_male = { Muhammad Mahammad Mamlan Mihemed Mohammed Muhammed Mahamed Muhammad_Bughra Muhammad_Toghan } mungo_male = { Mungo Mwyn } munia_female = { Moninha Monnia Munia MU_nia Munya } muniadomna_female = { Mumadona MU_niadomna Muniadona } @@ -1218,7 +1218,7 @@ skule_male = { Skule Scule Skuli SkU_li } slaine_female = { Slaine SlA_I_ne } smbat_male = { Smbat Sumbat } sobeslaus_male = { Sobeslaus SobE_slav Sobieslav } -solomon_male = { Salemon Salman Salomon Selevan Selyf Solomon SolomO_n Sulayman Suleyman Suleiman } +solomon_male = { Salemon Salman Salomon Selevan Selyf Solomon SolomO_n Sulayman Suleyman Suleiman Suleyman-Arslan } solve_male = { SO_lve SO_lvi } somerled_male = { Somerled Somhairle SumarliT_i } sonpala_male = { Sonpala Sonpal } diff --git a/common/culture/traditions/00_realm_traditions.txt b/common/culture/traditions/00_realm_traditions.txt index 5edac7aa..2dcf6e74 100644 --- a/common/culture/traditions/00_realm_traditions.txt +++ b/common/culture/traditions/00_realm_traditions.txt @@ -551,6 +551,7 @@ tradition_gardening = { } } } + NOT = { culture_tradition:tradition_tgp_ephemeral_grace = { is_in_list = traits } } } parameters = { @@ -1624,7 +1625,7 @@ tradition_culture_blending = { scope:character = { any_sub_realm_county = { percent >= 0.3 - NOT = { culture = root } + culture != root } } } @@ -1718,9 +1719,7 @@ tradition_isolationist = { any_sub_realm_county = { culture = scope:character.culture any_neighboring_county = { - NOT = { - culture = scope:character.culture - } + culture != scope:character.culture culture = { cultural_acceptance = { target = scope:character.culture value >= 40 } } @@ -1760,6 +1759,14 @@ tradition_isolationist = { } } + can_pick = { + # Mutually exclusive with other Isolationist + NOR = { + culture_tradition:tradition_tgp_inward_perfection = { is_in_list = traits } + culture_tradition:tradition_cultural_primacy = { is_in_list = traits } + } + } + ai_will_do = { value = 100 if = { @@ -1903,16 +1910,20 @@ tradition_agrarian = { 1 = indian 4 = farmland.dds } + + is_shown = { + NOT = { + culture_tradition:tradition_intensive_farming = { is_in_list = traits } + } + } can_pick = { custom_tooltip = { text = culture_in_farmlands_or_floodplains_terrain_desc any_culture_county = { - any_county_province = { - OR = { - terrain = farmlands - terrain = floodplains - } + county_has_province_with_terrain = { + terrain = farmlands + terrain = floodplains } } } @@ -1966,11 +1977,9 @@ tradition_agrarian = { NOT = { any_culture_county = { count >= 5 - any_county_province = { - OR = { - terrain = farmlands - terrain = floodplains - } + county_has_province_with_terrain = { + terrain = farmlands + terrain = floodplains } } } @@ -2004,11 +2013,9 @@ tradition_agrarian = { any_sub_realm_county = { count >= 2 culture = scope:character.culture - any_county_province = { - OR = { - terrain = farmlands - terrain = floodplains - } + county_has_province_with_terrain = { + terrain = farmlands + terrain = floodplains } } } @@ -2130,11 +2137,9 @@ tradition_pastoralists = { any_sub_realm_county = { percent >= 0.6 culture = scope:character.culture - any_county_province = { - OR = { - terrain = plains - terrain = steppe - } + county_has_province_with_terrain = { + terrain = plains + terrain = steppe } } } @@ -2437,9 +2442,7 @@ tradition_staunch_traditionalists = { limit = { scope:character = { any_sub_realm_county = { - NOT = { - culture = scope:character.culture - } + culture != scope:character.culture } } } @@ -2516,7 +2519,7 @@ tradition_hill_dwellers = { custom_description = { text = culture_in_hills_desc any_culture_county = { - any_county_province = { + county_has_province_with_terrain = { terrain = hills } } @@ -2562,7 +2565,7 @@ tradition_hill_dwellers = { NOT = { any_culture_county = { percent >= 0.3 - any_county_province = { + county_has_province_with_terrain = { terrain = hills } } @@ -2597,7 +2600,7 @@ tradition_hill_dwellers = { any_sub_realm_county = { percent >= 0.2 culture = scope:character.culture - any_county_province = { + county_has_province_with_terrain = { terrain = hills } } @@ -2610,7 +2613,7 @@ tradition_hill_dwellers = { limit = { any_culture_county = { percent >= 0.6 - any_county_province = { + county_has_province_with_terrain = { terrain = hills } } @@ -2642,11 +2645,9 @@ tradition_forest_folk = { custom_description = { text = culture_in_forest_desc any_culture_county = { - any_county_province = { - OR = { - terrain = forest - terrain = taiga - } + county_has_province_with_terrain = { + terrain = forest + terrain = taiga } } } @@ -2695,11 +2696,9 @@ tradition_forest_folk = { NOT = { any_culture_county = { percent >= 0.3 - any_county_province = { - OR = { - terrain = forest - terrain = taiga - } + county_has_province_with_terrain = { + terrain = forest + terrain = taiga } } } @@ -2733,11 +2732,9 @@ tradition_forest_folk = { any_sub_realm_county = { percent >= 0.2 culture = scope:character.culture - any_county_province = { - OR = { - terrain = forest - terrain = taiga - } + county_has_province_with_terrain = { + terrain = forest + terrain = taiga } } } @@ -2749,11 +2746,9 @@ tradition_forest_folk = { limit = { any_culture_county = { percent >= 0.6 - any_county_province = { - OR = { - terrain = forest - terrain = taiga - } + county_has_province_with_terrain = { + terrain = forest + terrain = taiga } } } @@ -2791,11 +2786,9 @@ tradition_mountain_homes = { custom_description = { text = culture_in_mountains_desc any_culture_county = { - any_county_province = { - OR = { - terrain = mountains - terrain = desert_mountains - } + county_has_province_with_terrain = { + terrain = mountains + terrain = desert_mountains } } } @@ -2844,11 +2837,9 @@ tradition_mountain_homes = { NOT = { any_culture_county = { percent >= 0.3 - any_county_province = { - OR = { - terrain = mountains - terrain = desert_mountains - } + county_has_province_with_terrain = { + terrain = mountains + terrain = desert_mountains } } } @@ -2882,11 +2873,9 @@ tradition_mountain_homes = { any_sub_realm_county = { percent >= 0.2 culture = scope:character.culture - any_county_province = { - OR = { - terrain = mountains - terrain = desert_mountains - } + county_has_province_with_terrain = { + terrain = mountains + terrain = desert_mountains } } } @@ -2898,11 +2887,9 @@ tradition_mountain_homes = { limit = { any_culture_county = { percent >= 0.6 - any_county_province = { - OR = { - terrain = mountains - terrain = desert_mountains - } + county_has_province_with_terrain = { + terrain = mountains + terrain = desert_mountains } } } @@ -2924,11 +2911,9 @@ tradition_dryland_dwellers = { custom_description = { text = culture_in_dryland_desc any_culture_county = { - any_county_province = { - OR = { - terrain = drylands - terrain = desert - } + county_has_province_with_terrain = { + terrain = drylands + terrain = desert } } } @@ -2981,11 +2966,9 @@ tradition_dryland_dwellers = { NOT = { any_culture_county = { percent >= 0.3 - any_county_province = { - OR = { - terrain = drylands - terrain = desert - } + county_has_province_with_terrain = { + terrain = drylands + terrain = desert } } } @@ -3019,11 +3002,9 @@ tradition_dryland_dwellers = { any_sub_realm_county = { percent >= 0.2 culture = scope:character.culture - any_county_province = { - OR = { - terrain = drylands - terrain = desert - } + county_has_province_with_terrain = { + terrain = drylands + terrain = desert } } } @@ -3035,11 +3016,9 @@ tradition_dryland_dwellers = { limit = { any_culture_county = { percent >= 0.6 - any_county_province = { - OR = { - terrain = drylands - terrain = desert - } + county_has_province_with_terrain = { + terrain = drylands + terrain = desert } } } @@ -3068,7 +3047,7 @@ tradition_jungle_dwellers = { custom_description = { text = culture_in_jungle_desc any_culture_county = { - any_county_province = { + county_has_province_with_terrain = { terrain = jungle } } @@ -3111,7 +3090,7 @@ tradition_jungle_dwellers = { NOT = { any_culture_county = { percent >= 0.3 - any_county_province = { + county_has_province_with_terrain = { terrain = jungle } } @@ -3146,7 +3125,7 @@ tradition_jungle_dwellers = { any_sub_realm_county = { percent >= 0.2 culture = scope:character.culture - any_county_province = { + county_has_province_with_terrain = { terrain = jungle } } @@ -3159,7 +3138,7 @@ tradition_jungle_dwellers = { limit = { any_culture_county = { percent >= 0.6 - any_county_province = { + county_has_province_with_terrain = { terrain = jungle } } @@ -3182,7 +3161,7 @@ tradition_wetlanders = { custom_tooltip = { text = culture_in_wetlands_desc any_culture_county = { - any_county_province = { + county_has_province_with_terrain = { terrain = wetlands } } @@ -3237,7 +3216,7 @@ tradition_wetlanders = { NOT = { any_culture_county = { count >= 3 - any_county_province = { + county_has_province_with_terrain = { terrain = wetlands } } @@ -3272,7 +3251,7 @@ tradition_wetlanders = { any_sub_realm_county = { count >= 3 culture = scope:character.culture - any_county_province = { + county_has_province_with_terrain = { terrain = wetlands } } @@ -3285,7 +3264,7 @@ tradition_wetlanders = { limit = { any_culture_county = { percent >= 0.6 - any_county_province = { + county_has_province_with_terrain = { terrain = wetlands } } @@ -3315,7 +3294,7 @@ tradition_hidden_cities = { custom_description = { text = culture_in_jungle_desc any_culture_county = { - any_county_province = { + county_has_province_with_terrain = { terrain = jungle } } @@ -3358,7 +3337,7 @@ tradition_hidden_cities = { NOT = { any_culture_county = { percent >= 0.3 - any_county_province = { + county_has_province_with_terrain = { terrain = jungle } } @@ -3391,7 +3370,7 @@ tradition_hidden_cities = { NOT = { any_culture_county = { percent >= 0.3 - any_county_province = { + county_has_province_with_terrain = { terrain = jungle } } @@ -3419,8 +3398,8 @@ tradition_hidden_cities = { limit = { any_culture_county = { percent >= 0.6 - any_county_province = { - terrain = wetlands + county_has_province_with_terrain = { + terrain = jungle } } } @@ -3478,7 +3457,7 @@ tradition_ancient_miners = { scope:character = { any_sub_realm_county = { culture = scope:character.culture - any_county_province = { + county_has_province_with_terrain = { terrain = hills } } @@ -3503,8 +3482,11 @@ tradition_castle_keepers = { custom_tooltip = { scope:character = { OR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_clan + government_has_flag = government_is_feudal + government_has_flag = government_is_clan #Update for FP3 + government_has_flag = government_is_administrative + government_has_flag = government_has_merit + government_has_flag = government_is_japan_feudal } } text = must_be_feudal_or_clan @@ -3611,13 +3593,20 @@ tradition_city_keepers = { can_pick = { trigger_if = { - limit = { has_ep3_dlc_trigger = yes } + limit = { + OR = { + has_ep3_dlc_trigger = yes + has_tgp_dlc_trigger = yes + } + } custom_tooltip = { scope:character = { OR = { government_has_flag = government_is_feudal - government_has_flag = government_is_clan #Update for FP3 + government_has_flag = government_is_clan government_has_flag = government_is_administrative + government_has_flag = government_has_merit + government_has_flag = government_is_japan_feudal } } text = must_be_feudal_clan_or_admin @@ -3628,7 +3617,7 @@ tradition_city_keepers = { scope:character = { OR = { government_has_flag = government_is_feudal - government_has_flag = government_is_clan #Update for FP3 + government_has_flag = government_is_clan } } text = must_be_feudal_or_clan @@ -3735,9 +3724,7 @@ tradition_maritime_mercantilism = { custom_description = { text = culture_on_coast_desc any_culture_county = { - any_county_province = { - is_coastal = yes - } + has_coastal_province = yes } } } @@ -3779,9 +3766,7 @@ tradition_maritime_mercantilism = { NOT = { any_culture_county = { percent >= 0.3 - any_county_province = { - is_coastal = yes - } + has_coastal_province = yes } } } @@ -3812,9 +3797,7 @@ tradition_maritime_mercantilism = { scope:character = { any_sub_realm_county = { percent >= 0.6 - any_county_province = { - is_coastal = yes - } + has_coastal_province = yes } } } @@ -3835,9 +3818,7 @@ tradition_maritime_mercantilism = { scope:character = { any_sub_realm_county = { percent >= 0.3 - any_county_province = { - is_coastal = yes - } + has_coastal_province = yes } } } @@ -3848,9 +3829,7 @@ tradition_maritime_mercantilism = { limit = { any_culture_county = { percent >= 0.6 - any_county_province = { - is_coastal = yes - } + has_coastal_province = yes } } multiply = 2 diff --git a/common/culture/traditions/00_societal_traditions.txt b/common/culture/traditions/00_societal_traditions.txt index 1bef6091..22e9643d 100644 --- a/common/culture/traditions/00_societal_traditions.txt +++ b/common/culture/traditions/00_societal_traditions.txt @@ -1238,6 +1238,7 @@ tradition_music_theory = { gregarious_trait_gives_bonuses = yes characters_are_better_court_musicians = yes # Also hooked in to increase the Feast opinion bonus better_court_musicians = yes + withering_mind_less_likely = yes } cost = { diff --git a/common/culture/traditions/03_fp3_traditions.txt b/common/culture/traditions/03_fp3_traditions.txt index 4f45ce91..eca80452 100644 --- a/common/culture/traditions/03_fp3_traditions.txt +++ b/common/culture/traditions/03_fp3_traditions.txt @@ -781,6 +781,7 @@ tradition_fp3_fierce_independence = { } parameters = { + unlock_maa_tawashi = yes harder_to_hybridize = yes harder_to_convert_county_culture = yes } diff --git a/common/customizable_localization/00_government_custom_loc.txt b/common/customizable_localization/00_government_custom_loc.txt index 739a60c7..6977c1d8 100644 --- a/common/customizable_localization/00_government_custom_loc.txt +++ b/common/customizable_localization/00_government_custom_loc.txt @@ -302,7 +302,17 @@ GetSuccessionHeirMotion = { trigger = { trigger_if = { limit = { is_ruler = yes } - has_government = landless_adventurer_government + OR = { + has_government = landless_adventurer_government + AND = { + OR = { + any_held_title = { is_noble_family_title = yes } + government_allows = administrative + } + is_independent_ruler = no + } + tgp_is_ceremonial_regent_trigger = yes + } } trigger_else = { liege ?= { has_government = landless_adventurer_government } @@ -508,10 +518,10 @@ GetRealmOrDomicileTooltip = { trigger = { trigger_if = { limit = { is_ruler = yes } - is_governor = yes + is_governor_or_admin_count = yes } trigger_else = { - liege ?= { is_governor = yes } + liege ?= { is_governor_or_admin_count = yes } } } localization_key = GOVERNORSHIP_TOOLTIP diff --git a/common/customizable_localization/00_greeting_custom_loc.txt b/common/customizable_localization/00_greeting_custom_loc.txt index 948d4692..c42b539c 100644 --- a/common/customizable_localization/00_greeting_custom_loc.txt +++ b/common/customizable_localization/00_greeting_custom_loc.txt @@ -800,7 +800,7 @@ FormOfAddressForLiege = { trigger = { tgp_is_ceremonial_regent_trigger = yes } - localization_key = form_of_address_ladylord_regent + localization_key = form_of_address_liege_title } text = { trigger = { diff --git a/common/customizable_localization/00_ruler_transition_loc.txt b/common/customizable_localization/00_ruler_transition_loc.txt index 9cda6e91..1c0cca72 100644 --- a/common/customizable_localization/00_ruler_transition_loc.txt +++ b/common/customizable_localization/00_ruler_transition_loc.txt @@ -203,6 +203,24 @@ DeathMessageIntro = { } } +NicknameReason = { + type = character + + random_valid = yes + text = { + localization_key = SUCCESSION_EVENT_WINDOW_NICKNAME + trigger = { + has_any_nickname = yes + } + } + text = { + localization_key = blank_line + trigger = { + has_any_nickname = no + } + } +} + DeathMessageReason = { type = character @@ -455,7 +473,10 @@ DeathMessageOutro = { text = { localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_MIND_INFIRM trigger = { - has_trait = infirm + OR = { + has_trait = infirm + has_trait = withering_mind + } } weight_multiplier = { base = 2 @@ -2099,6 +2120,22 @@ GameOverMessageNotableAchievements = { } } + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_BRUNEI_KINGDOM_DESC + trigger = { + exists = global_var:flag_created_brunei_kingdom + dynasty = global_var:flag_created_brunei_kingdom.dynasty + } + } + + text = { + localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_BRUNEI_EMPIRE_DESC + trigger = { + exists = global_var:flag_created_brunei_empire + dynasty = global_var:flag_created_brunei_empire.dynasty + } + } + text = { localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_RUM_DESC trigger = { diff --git a/common/customizable_localization/05_bp2_custom_loc.txt b/common/customizable_localization/05_bp2_custom_loc.txt index f212664b..7e032252 100644 --- a/common/customizable_localization/05_bp2_custom_loc.txt +++ b/common/customizable_localization/05_bp2_custom_loc.txt @@ -390,6 +390,12 @@ GetLearningBuilding = { RockStoryName = { type = character + text = { + trigger = { + NOT = { exists = var:story_cycle_rock_name } + } + localization_key = not_yet_chosen + } text = { trigger = { AND = { diff --git a/common/customizable_localization/tgp_custom_loc.txt b/common/customizable_localization/tgp_custom_loc.txt index b80ee605..cf084066 100644 --- a/common/customizable_localization/tgp_custom_loc.txt +++ b/common/customizable_localization/tgp_custom_loc.txt @@ -701,31 +701,31 @@ GetTurbanRebellionColor = { type = all text = { trigger = { - has_global_variable = old_dynastic_color_is_red + situation:dynastic_cycle.var:wuking_element ?= flag:metal } localization_key = red } text = { trigger = { - has_global_variable = old_dynastic_color_is_green + situation:dynastic_cycle.var:wuking_element ?= flag:earth } localization_key = green } text = { trigger = { - has_global_variable = old_dynastic_color_is_white + situation:dynastic_cycle.var:wuking_element ?= flag:wood } localization_key = white } text = { trigger = { - has_global_variable = old_dynastic_color_is_black + situation:dynastic_cycle.var:wuking_element ?= flag:fire } localization_key = black } text = { trigger = { - has_global_variable = old_dynastic_color_is_yellow + situation:dynastic_cycle.var:wuking_element ?= flag:water } localization_key = yellow } diff --git a/common/decisions/00_major_decisions_east_europe.txt b/common/decisions/00_major_decisions_east_europe.txt index d9d39b07..d25c7ac9 100644 --- a/common/decisions/00_major_decisions_east_europe.txt +++ b/common/decisions/00_major_decisions_east_europe.txt @@ -95,6 +95,10 @@ unite_the_western_slavs_decision = { name = unite_the_western_slavs_decision_title value = scope:western_slav_uniter.primary_title } + close_view = { + view = decisions + player = root + } } @@ -126,7 +130,7 @@ unite_the_southern_slavs_decision = { is_shown = { culture = { has_cultural_pillar = heritage_south_slavic } - NOT = { + NOR = { has_culture = culture:vlach # Not technically Slavic despite being in the South Slavic group. is_target_in_global_variable_list = { name = unavailable_unique_decisions diff --git a/common/decisions/10_religious_decisions.txt b/common/decisions/10_religious_decisions.txt index 90213a7f..79b8e40d 100644 --- a/common/decisions/10_religious_decisions.txt +++ b/common/decisions/10_religious_decisions.txt @@ -401,7 +401,7 @@ initiate_consolamentum_decision = { is_valid = { OR = { - age >= 60 + age >= ritual_suicide_age custom_description = { text = decision_consolamentum_health health <= 1 @@ -414,7 +414,7 @@ initiate_consolamentum_decision = { hidden_effect = { add_piety_level = 1 } - death = { death_reason = death_suicide} + death = { death_reason = death_ritual_suicide } show_as_tooltip = { add_piety_level = 1 } @@ -1356,12 +1356,18 @@ return_rome_decision = { resolve_title_and_vassal_change = scope:change add_piety = major_piety_value - - faith.religious_head = { - add_opinion = { - target = root - modifier = grateful_opinion - opinion = 20 + if = { + limit = { + faith.religious_head ?= { + this != root + } + } + faith.religious_head = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } } } diff --git a/common/decisions/80_major_decisions_roman.txt b/common/decisions/80_major_decisions_roman.txt index f5937f66..50a83124 100644 --- a/common/decisions/80_major_decisions_roman.txt +++ b/common/decisions/80_major_decisions_roman.txt @@ -39,7 +39,7 @@ restore_roman_empire_decision = { is_valid = { prestige_level >= max_prestige_level - + restore_roman_empire_decision_religion_culture_trigger = yes completely_controls = title:d_latium completely_controls = title:d_venice completely_controls = title:d_romagna @@ -62,13 +62,6 @@ restore_roman_empire_decision = { is_capable_adult = yes is_imprisoned = no top_liege = this - - OR = { - religion = { is_in_family = rf_abrahamic } - religion = religion:hellenism_religion - culture = { has_cultural_pillar = heritage_latin } - culture = { has_cultural_pillar = heritage_byzantine } - } } effect = { @@ -151,6 +144,7 @@ restore_roman_empire_holy_decision = { is_valid = { prestige_level >= max_prestige_level + restore_roman_empire_decision_religion_culture_trigger = yes completely_controls = title:d_latium completely_controls = title:d_venice completely_controls = title:d_romagna @@ -173,13 +167,6 @@ restore_roman_empire_holy_decision = { is_capable_adult = yes is_imprisoned = no top_liege = this - - OR = { - religion = { is_in_family = rf_abrahamic } - religion = religion:hellenism_religion - culture = { has_cultural_pillar = heritage_latin } - culture = { has_cultural_pillar = heritage_byzantine } - } } effect = { @@ -263,7 +250,7 @@ restore_roman_empire_italian_decision = { is_valid = { prestige_level >= max_prestige_level - + restore_roman_empire_decision_religion_culture_trigger = yes completely_controls = title:d_latium completely_controls = title:d_venice completely_controls = title:d_romagna @@ -286,13 +273,6 @@ restore_roman_empire_italian_decision = { is_capable_adult = yes is_imprisoned = no top_liege = this - - OR = { - religion = { is_in_family = rf_abrahamic } - religion = religion:hellenism_religion - culture = { has_cultural_pillar = heritage_latin } - culture = { has_cultural_pillar = heritage_byzantine } - } } effect = { @@ -907,7 +887,7 @@ restore_pope_in_rome_decision = { } NOT = { title:c_roma.holder = { has_title = title:k_papal_state } } NOT = { capital_county = { this = title:c_roma } } - title:k_papal_state.holder = { + title:k_papal_state.holder ?= { NOT = { has_opinion_modifier = { #Not accepting it if you conquered it yourself. target = root @@ -1277,7 +1257,10 @@ dismantle_byz_pretender_decision = { } is_ruler = yes is_playable_character = yes - is_roman_emperor_trigger = yes + OR = { + is_roman_emperor_trigger = yes + has_title = title:e_hre + } NOR = { #Once an Emperor throws the challenge, he has only one chance to dismantle the Empire. has_character_flag = flag_emperor_challenging_byz #Applied below. has_character_flag = flag_emperor_challenged_byz #Applied in war. diff --git a/common/decisions/dlc_decisions/03_fp2_decisions.txt b/common/decisions/dlc_decisions/03_fp2_decisions.txt index 66df983e..0ea7c268 100644 --- a/common/decisions/dlc_decisions/03_fp2_decisions.txt +++ b/common/decisions/dlc_decisions/03_fp2_decisions.txt @@ -5,6 +5,7 @@ # by Joe Parkin # ############################################# +### [ROOT.Char.GetPrimaryTitle.GetAdjectiveNoTooltip] Dominance ### struggle_iberia_ending_hostility_decision = { decision_group_type = major title = struggle_iberia_ending_hostility_decision @@ -17,6 +18,7 @@ struggle_iberia_ending_hostility_decision = { confirm_click_sound = "event:/DLC/FP2/SFX/UI/fp2_struggle_ending_decision_confirm" is_invisible = yes sort_order = 80 + cooldown = { days = 1 } is_shown = { is_landless_adventurer = no @@ -29,9 +31,7 @@ struggle_iberia_ending_hostility_decision = { OR = { custom_tooltip = { text = struggle_iberia_ending_hostility_decision_correct_phase_tt - any_character_struggle = { - involvement = involved - is_struggle_type = iberian_struggle + struggle:iberian_struggle = { is_struggle_phase = struggle_iberia_phase_hostility } } @@ -45,15 +45,6 @@ struggle_iberia_ending_hostility_decision = { } } - - custom_tooltip = { - text = struggle_ending_decision_correct_involvement_spain_tt - any_character_struggle = { - involvement = involved - is_struggle_type = iberian_struggle - } - } - # Hold and completely control two de jure kingdoms of Hispania OR = { custom_tooltip = { # @@ -158,7 +149,7 @@ struggle_iberia_ending_hostility_decision = { limit = { has_ach_dlc_trigger = yes } add_character_flag = ach_ended_struggle } - + ##### Major Effects ##### show_as_tooltip = { dynasty = { add_dynasty_prestige = 10000 } @@ -221,6 +212,7 @@ struggle_iberia_ending_hostility_decision = { # by Joe Parkin # ############################################# +### Status Quo ### struggle_iberia_ending_compromise_decision = { decision_group_type = major title = struggle_iberia_ending_compromise_decision @@ -232,6 +224,7 @@ struggle_iberia_ending_compromise_decision = { selection_tooltip = struggle_iberia_ending_compromise_decision_tooltip confirm_click_sound = "event:/DLC/FP2/SFX/UI/fp2_struggle_ending_decision_confirm" is_invisible = yes + cooldown = { days = 1 } sort_order = 80 @@ -245,20 +238,11 @@ struggle_iberia_ending_compromise_decision = { custom_tooltip = { text = struggle_iberia_ending_compromise_decision_correct_phase_tt - any_character_struggle = { - is_struggle_type = iberian_struggle + struggle:iberian_struggle = { is_struggle_phase = struggle_iberia_phase_compromise } } - custom_tooltip = { - text = struggle_ending_decision_correct_involvement_spain_tt - any_character_struggle = { - involvement = involved - is_struggle_type = iberian_struggle - } - } - OR = { # Exalted among Men or higher prestige_level >= very_high_prestige_level @@ -434,6 +418,7 @@ struggle_iberia_ending_compromise_decision = { # by Joe Parkin # ############################################# +### Détente ### struggle_iberia_ending_conciliation_decision = { decision_group_type = major title = struggle_iberia_ending_conciliation_decision @@ -445,6 +430,7 @@ struggle_iberia_ending_conciliation_decision = { selection_tooltip = struggle_iberia_ending_conciliation_decision_tooltip confirm_click_sound = "event:/DLC/FP2/SFX/UI/fp2_struggle_ending_decision_confirm" is_invisible = yes + cooldown = { days = 1 } sort_order = 80 @@ -458,20 +444,11 @@ struggle_iberia_ending_conciliation_decision = { custom_tooltip = { text = struggle_iberia_ending_conciliation_decision_correct_phase_tt - any_character_struggle = { - is_struggle_type = iberian_struggle + struggle:iberian_struggle = { is_struggle_phase = struggle_iberia_phase_conciliation } } - custom_tooltip = { - text = struggle_ending_decision_correct_involvement_spain_tt - any_character_struggle = { - involvement = involved - is_struggle_type = iberian_struggle - } - } - prestige_level >= very_high_prestige_level # Exalted among Men or higher # Hold and completely control a de jure kingdom of Hispania @@ -560,10 +537,192 @@ struggle_iberia_ending_conciliation_decision = { ai_will_do = { base = 100 } } +################################### +# Secure the Mediterranean +# By Hugo Cortell +################################### +### Secure The Mediterranean ### +secure_mediterranean_decision = { + title = fp2_secure_mediterranean.t + picture = { + reference = "gfx/interface/illustrations/event_scenes/fp1_ocean.dds" + } + desc = fp2_secure_mediterranean.desc + decision_group_type = major + + selection_tooltip = fp2_secure_mediterranean.tip + sort_order = 50 + + is_shown = { + # DLC check + has_fp2_dlc_trigger = yes + # Standard checks + is_playable_character = yes + exists = dynasty + NOT = { + is_target_in_global_variable_list = { + name = unavailable_unique_decisions + target = flag:flag_secured_the_mediterranean + } + } + + OR = { + completely_controls = title:d_sardinia + completely_controls = title:d_sicily + AND = { + completely_controls = title:d_mallorca + completely_controls = title:d_corsica + } + } + } + + is_valid = { + completely_controls = title:d_mallorca + completely_controls = title:d_sardinia + completely_controls = title:d_corsica + completely_controls = title:d_sicily + } + + is_valid_showing_failures_only = { + is_landed = yes + } + + effect = { + add_to_global_variable_list = { + name = unavailable_unique_decisions + target = flag:flag_secured_the_mediterranean + } + + # LOC + root = { + save_scope_as = mediterranean_conqueror + house = { save_scope_as = mediterranean_house } + } + title:d_mallorca = { save_scope_as = mallorca } + title:d_sardinia = { save_scope_as = sardinas } + title:d_sicily = { save_scope_as = sicily } + title:k_mediterranean_sea = { save_scope_as = mediterranean_title } + + every_player = { + limit = { + this != ROOT + any_held_title = { title_province = { geographical_region = dlc_fp2_mediterranean_shoreline } } + } + send_interface_message = { + type = event_generic_bad_with_text + title = secure_mediterranean_decision.involved_notif + desc = secure_mediterranean_decision.involved_notif_desc # Players who get this: "why do I hear boss music?" (It is meant to sound vaguely threatening) + left_icon = scope:mediterranean_conqueror + + show_as_tooltip = { + scope:mediterranean_conqueror = { + house = { + add_house_modifier = { + modifier = fp2_controls_the_mediterranean_house_modifier + years = 100 + } + } + dynasty = { add_dynasty_prestige = major_prestige_gain } + } + } + } + } + + house = { + add_house_modifier = { + modifier = fp2_controls_the_mediterranean_house_modifier + years = 100 + } + } + dynasty = { add_dynasty_prestige = major_prestige_gain } # You used to get +25% prestiege, but that caused UI issues + custom_tooltip = secure_mediterranean_decision.a + + create_title_and_vassal_change = { + type = created + save_scope_as = title_change + add_claim_on_loss = yes + } + title:k_mediterranean_sea = { + change_title_holder = { + holder = root + change = scope:title_change + } + } + resolve_title_and_vassal_change = scope:title_change + title:d_mallorca = { set_de_jure_liege_title = title:k_mediterranean_sea } + title:d_sardinia = { set_de_jure_liege_title = title:k_mediterranean_sea } + title:d_corsica = { set_de_jure_liege_title = title:k_mediterranean_sea } + title:d_sicily = { set_de_jure_liege_title = title:k_mediterranean_sea } + + hidden_effect = { + title:k_mediterranean_sea = { set_de_jure_liege_title = title:e_italy } # Straying closer to remaking the roman empire + trigger_event = iberia_north_africa.2105 + } + } + + cost = { + gold = { + value = 0 + if = { + limit = { + has_treasury = no + } + add = major_gold_value + multiply = 1.5 + round = yes + } + } + treasury = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = major_gold_value + multiply = 1.5 + round = yes + } + } + prestige = { + value = major_prestige_gain + multiply = 3 + round = yes + } + } + + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 0 + kingdom = 730 + empire = 730 + hegemony = 730 + } + + ai_potential = { + is_ruler = yes + short_term_gold >= { + value = major_gold_value + multiply = 1.5 + round = yes + } + prestige >= { + value = major_prestige_gain + multiply = 3 + round = yes + } + } + + ai_will_do = { + base = 80 + } +} + ############################################# # Eat a Cheese # by Daniel "yes I know what exciting content is stop bullying me" Moore ########################################################################### +### Eat Your Cheese ### eat_cheese_decision = { picture = { reference = "gfx/interface/illustrations/decisions/decision_personal_religious.dds" @@ -599,6 +758,7 @@ eat_cheese_decision = { # Sponsor Jewish Sciences # By Hugo Cortell ################################### +### Sponsor Jewish Sciences ### golden_age_jewish_science_in_iberia_decision = { picture = { reference = "gfx/interface/illustrations/decisions/decision_golden_age.dds" @@ -793,6 +953,7 @@ golden_age_jewish_science_in_iberia_decision = { # Convene Council of Toledo # # by Joe Parkin and Ola Jentzsch # ############################################# +### Council Of Toledo Decision ### council_of_toledo_decision = { title = council_of_toledo_decision_title picture = { @@ -927,6 +1088,7 @@ council_of_toledo_decision = { # Secure Iberian Foothold # by Joe Parkin and Ola Jentzsch ############################################# +### Secure Iberian Foothold Decision ### secure_iberian_foothold_decision = { title = secure_iberian_foothold_decision_title picture = { @@ -1110,6 +1272,7 @@ secure_iberian_foothold_decision = { # Build Pilgrim Roads # By Hugo Cortell ################################### +### Build Pilgrim Roads ### build_holy_pilgrim_roads_decision = { picture = { reference = "gfx/interface/illustrations/decisions/fp2_decision_struggle_opening.dds" @@ -1285,6 +1448,7 @@ build_holy_pilgrim_roads_decision = { # Found Kingdom of Toledo # by Joe Parkin ############################################# +### Found Kingdom Toledo Decision ### found_kingdom_toledo_decision = { title = found_kingdom_toledo_decision_title picture = { @@ -1350,7 +1514,7 @@ found_kingdom_toledo_decision = { } } } - + is_valid_showing_failures_only = { is_landed = yes } @@ -1415,6 +1579,7 @@ found_kingdom_toledo_decision = { # Develop a city # by Maxence Voleau ############################################# +### Expand Cities ### improve_city_province_decision = { title = improve_city_province_decision_name picture = { diff --git a/common/defines/00_defines.txt b/common/defines/00_defines.txt index 71f8675d..e3bd1dbf 100644 --- a/common/defines/00_defines.txt +++ b/common/defines/00_defines.txt @@ -43,7 +43,7 @@ NSetup = { # chance that a courtless character is sent to a court as a guest instead of a regular courtier on game start (0..1) COURTLESS_CHARACTER_GUEST_CHANCE = 0 # Random range for number of characters per pool (duchy) generated at the start of the game - GENERATED_POOL_CHARACTERS = { 2 9 } + GENERATED_POOL_CHARACTERS = { 2 6 } # Templates used for the pool character. The weights correspond to the template names at the same index. # The scope of the template is a random ruler whose capital is in that pool. GENERATED_POOL_CHARACTER_TEMPLATES = { @@ -227,8 +227,10 @@ NCharacter = { SKILL_MODIFIER_OFFSET = -8 # skill modifiers with offset add this from skill value (see common/modifiers/00_basic_modifiers.txt) - #Character window info + # Standard RelationTo number of relations to show MAX_RELATIONS_TO_SHOW = 3 + # Standard RelationToShort number of relations to show + MAX_RELATIONS_TO_SHOW_SHORT = 2 MARRIAGE_TIER_DIFF_PRESTIGE_MULT = 100 @@ -782,9 +784,18 @@ NPowerfulVassal = { VALUE_INCOME_MULT = 50 # Multiplier applied to the income of the vassal } +NFaith = { + BASE_FERVOR = 50.0 # Default fervor + MAX_FERVOR = 100.0 # Max amount of fervor + YEARLY_FERVOR_GROWTH = 3.5 # Fervor yearly change, can be negative + MINIMUM_FAITH_SIZE_FERVOR_MODIFIER = 10 # Adjusts the size modifier for monthly fervor gain for a faith according to the following formula: 1/squareroot(max(define_value, faith_size)/define_value) where define value is the value of MINIMUM_FAITH_SIZE_FERVOR_MODIFIER and faith_size is the current amount of provinces that follows the faith. + FERVOR_CHANGELOG_DURATION = 10 # After how many years do fervor changelog entries get deleted? + FAITH_CREATION_FERVOR_DISCOUNT_PER_MISSING_FERVOR = 1 # How much cheaper does creating a faith get per fervor below 100%? 1 means 1% per point + FAITH_CREATION_FERVOR_DISCOUNT_MAX = 50 # What percentage does the discount cap out at? With these numbers, 0-50 fervor means a 50% discount. Above 50 means between 0% and 50% discount +} + NReligion = { - DEFAULT_FERVOR = 50 # Default fervor - TIME_AT_PEACE_FOR_PIETY = 730 # For faiths with a doctrine with piety_from_long_peace, how long do they need to be at peace (in days) + TIME_AT_PEACE_FOR_PIETY = 730 # For faiths with a doctrine with piety_from_long_peace, how long do they need to be at peace (in days) # Hostility levels start at 0 (same faith or equivalent to same faith) HOSTILITY_OPINION_EFFECTS = { # The opinion effects of each hostility level @@ -817,17 +828,12 @@ NReligion = { PIETY_LOSS_PER_MISSING_SPOUSE = 0.5 # If you have fewer spouses than expected in a polygamous faith, you'll lose this much piety for each spouse you fall short. DESIRED_SPOUSES_PER_TIER = { 0 1 1 2 3 4 4 } # Number of spouses you are expected to have per tier, starging with unlanded, then baron and ending with hegemon FAITH_CONVERSION_PIETY_MINIMUM = 250 # The minimum amount of piety converting faith costs - FAITH_CREATION_FERVOR_DISCOUNT_PER_MISSING_FERVOR = 1 # How much cheaper does creating a faith get per fervor below 100%? 1 means 1% per point - FAITH_CREATION_FERVOR_DISCOUNT_MAX = 50 # What percentage does the discount cap out at? With these numbers, 0-50 fervor means a 50% discount. Above 50 means between 0% and 50% discount PART_OF_GHW_POT_DESIGNATED_FOR_KINGDOM_RECIPIENT = 10 # How many percent of the pot will be reserved for the person receiving the kingdom? GHW_HOSTILITY_MIN_LEVEL = 2 # Any independent ruler within the target kingdom at least this hostile to the caller faith will be a forced defender PREFERRED_GENDER_CHANCE = 3 # When deciding if clergy characters should be male or female a 3 here means that the preferred gender will be three times as likely GHW_DAYS_LIMIT_CAN_CHANGE_TARGET = 30 # is GHW starts sooner than this number, you can no longer change target GHW_COST_PIETY_CHANGE_TARGET = 250 # cost to chagne GHW target. Grows linearly with each change - MAX_FERVOR = 100 # Max amount of fervor HEAD_OF_FAITH_PIETY_GAIN = 1.0 # Monthly piety gain for heads of faith - MINIMUM_FAITH_SIZE_FERVOR_MODIFIER = 10 # Adjusts the size modifier for monthly fervor gain for a faith according to the following formula: 1/squareroot(max(define_value, faith_size)/define_value) where define value is the value of MINIMUM_FAITH_SIZE_FERVOR_MODIFIER and faith_size is the current amount of provinces that follows the faith. - FERVOR_CHANGELOG_DURATION = 10 # After how many years do fervor changelog entries get deleted? FAITH_COLOR_DEVIATION = { 0.25 0.35 } # How much should generated colors differ from the faith they're based on? Distance within the HSV colorspace } @@ -855,7 +861,7 @@ NTitle = { DRIFT_ADJACENT_ACROSS_WATER_DISTANCE = 2 REVOKE_LAWS_COST_SCALE = { 0 0 0.1 0.25 0.5 1 2 } DYNAMIC_TITLE_MAP_COLOR_S_V = { 0.8 1.0 } # What is the Saturation and Value of dynamic title map colors? (via HSV color - Hue is fully randomized) - CREATE_TITLE_PIETY_LEVEL = { 0 0 0 2 3 5 5 } # not a global requirement, it is used only for goverment with rule considers_piety_for_title_creation + CREATE_TITLE_PIETY_LEVEL = { 0 0 0 2 3 5 5 } # not a global requirement, it is used only for government with rule considers_piety_for_title_creation CREATE_TITLE_PIETY_COST = { 0 0 0 500 2500 5000 10000 } # Default desired titles to keep for AI - per current primary title tier. (-1 = keep all) @@ -966,7 +972,7 @@ NCounty = { COUNTY_FERTILITY_DECLINE_FACTOR = 0.125 # Makes all county fertility decline modifiers give out more adjusted growth. 1.1 = 10% stronger decline. Moves equilibriums COUNTY_FERTILITY_EQUILIBRIUM_FACTOR = 0.09 # 0.007 # Factor value for how sensitive the fertility equilibrium is towards small changes. Inverted in calculations: the lower the value the more sensitive the behavior. Set to 100 to have a clear curve. COUNTY_FERTILITY_MONTHLY_CHANGE_LEVELS = { -20 -0.01 0.01 20 } - COUNTY_FERTILITY_NON_NOMAD_HOLDING_MALUS = -0.001 # Negative mult malus applied to the amount of Herd gained from the county fertility in a county that does not have a Nomad or Herder Holding + COUNTY_FERTILITY_NON_NOMAD_HOLDING_MALUS = -0.75 # Negative mult malus applied to the amount of Herd gained from the county fertility in a county that does not have a Nomad or Herder Holding HERD_GAIN_FROM_COUNTY_MULTIPLIER = 0.5 # Direct multiplier on the base Herd gained from County ( Base Gain = CountyFertility * HERD_GAIN_FROM_COUNTY_MULTIPLIER ) } @@ -1057,7 +1063,7 @@ NDomain = { ABOVE_LIMIT_HERD_INCOME_PENALTY = 0.5 # How much herd income from domain is reduced per holding over the limit ABOVE_LIMIT_MAX_HERD_INCOME_PENALTY = 1 # How much herd income from domain can be reduced at most HOLDING_GRACE_PERIOD = 365 # How many days do newly gained holdings not count towards the domain size for the purposes of penalties (but also not produce any levies) - STEWARDSHIP_SKILL_FOR_DOMAIN_LIMIT_INCREASE = 6 # domain limit += floor( / STEWARDSHIP_SKILL_FOR_DOMAIN_LIMIT_INCREASE ) + STEWARDSHIP_SKILL_FOR_DOMAIN_LIMIT_INCREASE = 200 # domain limit += floor( / STEWARDSHIP_SKILL_FOR_DOMAIN_LIMIT_INCREASE ) LEVIES_AT_ZERO_COUNTY_CONTROL = 0.5 # How many % levies do you get at 0 county control? Interpolated between this value and 100% when between 0 and 100 TAX_AT_ZERO_COUNTY_CONTROL = 0.0 # How much % tax do you get at 0 county control? Interpolated between this value and 100% when between 0 and 100 LEVIES_AT_MAX_COUNTY_DEVELOPMENT = 0.5 # How many % levies bonus do you get at 100 county development? Interpolated between this value and 0% when between 0 and 100 @@ -1078,7 +1084,11 @@ NFaction = DEFAULT_POWER_THRESHOLD = 80 # The default power threshold if there no one defined. MAX_DEMAND_DELAY_DAYS = 90 # The faction is guaranteed to send demands on the next update after this number of days has passed since it started being able to send demands. - POTENTIAL_FORCE_JOIN_HOOK_TYPE = "strong" # The type of hook that means the UI will show a member as potentially joining + POTENTIAL_FORCE_JOIN_HOOK_TYPE = "strong" # The type of hook that means the UI will show a member as potentially joining + + # the minimum warscore a defender in a faction war must have to win the war when the faction is destroyed due to other reasons. + # If below this warscore the war will just be invalidated. + MIN_WARSCORE_FOR_VICTORY_ON_FACTION_INVALIDATION = 75 } NPathFinding = { @@ -1379,7 +1389,7 @@ NRaid = { MIN_SOLDIERS_TO_RAID = 200 # How small can a raid army be and still be able to loot? MONTHLY_ATTRITION = 0.01 # How much attrition do you take while looting a province? 0.01 = 1% per month MONTHS_OF_RAID_LOOT = 12 # How many months of holding income (with owner effects discounted) does raiding provide? - LESS_MONTHS_OF_RAID_LOOT = 6 # This is subtracted from MONTHS_OF_RAID_LOOT if you have the goverment 'barter = yes' + LESS_MONTHS_OF_RAID_LOOT = 6 # This is subtracted from MONTHS_OF_RAID_LOOT if you have the government 'barter = yes' # Progress cannot be lower than 1/day (except when interrupted by combat) BASE_PROGRESS = 20 # How much base raid action progress do you get per day? @@ -1399,7 +1409,7 @@ NBarter = { BASE_PROGRESS = 15 PROGRESS_PER_SOLDIER = 0.005 LOOT_PER_SOLDIER = 0.1 # How much loot can a single soldier carry? Minimum increment is 0.001 - BARTER_GOODS_TO_LOOT_MULT = 1.5 # Used to convert Barter Goods to Loot. A value of 0.5 means that 2 Barter Goods are worth 1 Loot + BARTER_GOODS_TO_LOOT_MULT = 0.5 # Used to convert Barter Goods to Loot. A value of 0.5 means that 2 Barter Goods are worth 1 Loot } NCharacterGlow = { @@ -1644,6 +1654,24 @@ NAccolade = { "badge_color9.dds" } + ACCOLADE_GLORY_LEVELS = { + 100 + 300 + 600 + 1000 + 1500 + 2100 + } + + ACCOLADE_SQUIRE_LEVELS = { + 20 + 40 + 60 + 80 + } + + ACCOLADE_MAX_TYPES = 3 # maximum number of accolade attributes (types) an acclaimed knight can have + STARTING_GLORY = 100 # how much glory does each created accolade start out with? 100 is default to unlock rank 1 POTENTIAL_ACCLAIMED_KNIGHT_UPDATE_TIME = 0.5 # Time between potential acclaimed knights window updates, in seconds } diff --git a/common/domiciles/buildings/00_camp_buildings.txt b/common/domiciles/buildings/00_camp_buildings.txt index b1831b87..169a4eb1 100644 --- a/common/domiciles/buildings/00_camp_buildings.txt +++ b/common/domiciles/buildings/00_camp_buildings.txt @@ -4469,7 +4469,7 @@ proving_grounds_01 = { } proving_grounds_02 = { construction_time = @camp_building_main_slot_construction_duration_t2 - allowed_domicile_types = { camp} + allowed_domicile_types = { camp } previous_building = proving_grounds_01 internal_slots = 2 @@ -4518,7 +4518,7 @@ proving_grounds_02 = { } proving_grounds_03 = { construction_time = @camp_building_main_slot_construction_duration_t3 - allowed_domicile_types = { camp} + allowed_domicile_types = { camp } previous_building = proving_grounds_02 internal_slots = 3 @@ -4567,7 +4567,7 @@ proving_grounds_03 = { } proving_grounds_04 = { construction_time = @camp_building_main_slot_construction_duration_t4 - allowed_domicile_types = { camp} + allowed_domicile_types = { camp } previous_building = proving_grounds_03 internal_slots = 4 @@ -4619,7 +4619,7 @@ proving_grounds_04 = { } proving_grounds_05 = { construction_time = @camp_building_main_slot_construction_duration_t5 - allowed_domicile_types = { camp} + allowed_domicile_types = { camp } previous_building = proving_grounds_04 internal_slots = 5 @@ -4670,7 +4670,7 @@ proving_grounds_05 = { } proving_grounds_06 = { construction_time = @camp_building_main_slot_construction_duration_t6 - allowed_domicile_types = { camp} + allowed_domicile_types = { camp } previous_building = proving_grounds_05 internal_slots = 6 @@ -4725,7 +4725,7 @@ proving_grounds_06 = { proving_grounds_horse_run = { # Horse Run slot_type = internal construction_time = @camp_building_internal_slot_construction_duration_t2 - allowed_domicile_types = { camp} + allowed_domicile_types = { camp } previous_building = proving_grounds_01 cost = { gold = proving_grounds_horse_run_domicile_building_gold_cost_value } @@ -4790,7 +4790,7 @@ proving_grounds_horse_run = { # Horse Run proving_grounds_camel_run = { # Camel Run slot_type = internal construction_time = @camp_building_internal_slot_construction_duration_t2 - allowed_domicile_types = { camp} + allowed_domicile_types = { camp } previous_building = proving_grounds_01 cost = { gold = proving_grounds_camel_run_domicile_building_gold_cost_value } @@ -4859,7 +4859,7 @@ proving_grounds_camel_run = { # Camel Run proving_grounds_elephantry_reserve = { # Elephantry Reserve slot_type = internal construction_time = @camp_building_internal_slot_construction_duration_t3 - allowed_domicile_types = { camp} + allowed_domicile_types = { camp } previous_building = proving_grounds_01 cost = { gold = proving_grounds_elephantry_reserve_domicile_building_gold_cost_value } @@ -4922,7 +4922,7 @@ proving_grounds_elephantry_reserve = { # Elephantry Reserve proving_grounds_nightly_barding_drills = { # Nightly Barding Drills slot_type = internal construction_time = @camp_building_internal_slot_construction_duration_t3 - allowed_domicile_types = { camp} + allowed_domicile_types = { camp } previous_building = proving_grounds_01 cost = { gold = proving_grounds_nightly_barding_drills_domicile_building_gold_cost_value } @@ -4987,7 +4987,7 @@ proving_grounds_nightly_barding_drills = { # Nightly Barding Drills proving_grounds_life_in_the_saddle = { # Life in the Saddle slot_type = internal construction_time = @camp_building_internal_slot_construction_duration_t3 - allowed_domicile_types = { camp} + allowed_domicile_types = { camp } previous_building = proving_grounds_01 cost = { gold = proving_grounds_life_in_the_saddle_domicile_building_gold_cost_value } @@ -5002,12 +5002,7 @@ proving_grounds_life_in_the_saddle = { # Life in the Saddle can_construct = { custom_tooltip = { text = proving_grounds_life_in_the_saddle_horse_archers_tt - any_maa_regiment = { - OR = { - is_maa_type = horse_archers - is_maa_type = heavy_horse_archers - } - } + number_maa_regiments_of_base_type:archer_cavalry > 0 } } @@ -5065,7 +5060,7 @@ proving_grounds_life_in_the_saddle = { # Life in the Saddle proving_grounds_the_stump = { # The Stump slot_type = internal construction_time = @camp_building_internal_slot_construction_duration_t3 - allowed_domicile_types = { camp} + allowed_domicile_types = { camp } previous_building = proving_grounds_01 cost = { gold = proving_grounds_the_stump_domicile_building_gold_cost_value } @@ -5130,7 +5125,7 @@ proving_grounds_the_stump = { # The Stump proving_grounds_personal_bouts = { # Personal Bouts slot_type = internal construction_time = @camp_building_internal_slot_construction_duration_t3 - allowed_domicile_types = { camp} + allowed_domicile_types = { camp } previous_building = proving_grounds_01 cost = { gold = proving_grounds_personal_bouts_domicile_building_gold_cost_value } @@ -5196,7 +5191,7 @@ proving_grounds_personal_bouts = { # Personal Bouts proving_grounds_training_circle = { # Training Circle slot_type = internal construction_time = @camp_building_internal_slot_construction_duration_t3 - allowed_domicile_types = { camp} + allowed_domicile_types = { camp } previous_building = proving_grounds_01 cost = { gold = proving_grounds_training_circle_domicile_building_gold_cost_value } @@ -5262,7 +5257,7 @@ proving_grounds_training_circle = { # Training Circle proving_grounds_mock_battle_drills = { # Mock Battle Drills slot_type = internal construction_time = @camp_building_internal_slot_construction_duration_t3 - allowed_domicile_types = { camp} + allowed_domicile_types = { camp } previous_building = proving_grounds_01 cost = { gold = proving_grounds_mock_battle_drills_domicile_building_gold_cost_value } @@ -5327,7 +5322,7 @@ proving_grounds_mock_battle_drills = { # Mock Battle Drills proving_grounds_lockwagon = { # Lockwagon slot_type = internal construction_time = @camp_building_internal_slot_construction_duration_t2 - allowed_domicile_types = { camp} + allowed_domicile_types = { camp } previous_building = proving_grounds_01 cost = { gold = proving_grounds_lockwagon_domicile_building_gold_cost_value } @@ -5392,7 +5387,7 @@ proving_grounds_lockwagon = { # Lockwagon proving_grounds_martial_study = { # Martial Study slot_type = internal construction_time = @camp_building_internal_slot_construction_duration_t3 - allowed_domicile_types = { camp} + allowed_domicile_types = { camp } previous_building = proving_grounds_01 cost = { gold = proving_grounds_martial_study_domicile_building_gold_cost_value } @@ -5454,7 +5449,7 @@ proving_grounds_martial_study = { # Martial Study proving_grounds_the_stick_game = { # The Stick Game slot_type = internal construction_time = @camp_building_internal_slot_construction_duration_t1 - allowed_domicile_types = { camp} + allowed_domicile_types = { camp } previous_building = proving_grounds_01 cost = { gold = proving_grounds_the_stick_game_domicile_building_gold_cost_value } @@ -5514,7 +5509,7 @@ proving_grounds_the_stick_game = { # The Stick Game proving_grounds_bodyguard_drills = { # Bodyguard Drills slot_type = internal construction_time = @camp_building_internal_slot_construction_duration_t3 - allowed_domicile_types = { camp} + allowed_domicile_types = { camp } previous_building = proving_grounds_01 cost = { gold = proving_grounds_bodyguard_drills_domicile_building_gold_cost_value } @@ -5535,7 +5530,7 @@ proving_grounds_bodyguard_drills = { # Bodyguard Drills character_modifier = { enemy_hostile_scheme_phase_duration_add = minor_scheme_phase_duration_malus_value - scheme_discovery_chance_mult = 0.15 + enemy_scheme_secrecy_add = -15 } parameters = { @@ -5907,7 +5902,7 @@ camp_perimeter_good_siting = { # Good Siting } character_modifier = { - scheme_discovery_chance_mult = 0.1 + enemy_scheme_secrecy_add = -10 enemy_hostile_scheme_phase_duration_add = minor_scheme_phase_duration_malus_value } @@ -6021,7 +6016,7 @@ camp_perimeter_extra_watch = { # Extra Watch character_modifier = { enemy_hostile_scheme_phase_duration_add = major_scheme_phase_duration_malus_value - scheme_discovery_chance_mult = 0.1 + enemy_scheme_secrecy_add = -10 archers_damage_mult = 0.1 archer_cavalry_damage_mult = 0.05 } diff --git a/common/domiciles/buildings/00_chinese_estate_buildings.txt b/common/domiciles/buildings/00_chinese_estate_buildings.txt index f8b9c7f1..bfb9226d 100644 --- a/common/domiciles/buildings/00_chinese_estate_buildings.txt +++ b/common/domiciles/buildings/00_chinese_estate_buildings.txt @@ -633,9 +633,7 @@ east_asian_peasant_quarters_01 = { } can_construct = { - top_participant_group:dynastic_cycle ?= { - NOT = { participant_group_type = conservative_movement } - } + } cost = { @@ -668,9 +666,7 @@ east_asian_peasant_quarters_02 = { previous_building = east_asian_peasant_quarters_01 can_construct = { - top_participant_group:dynastic_cycle ?= { - NOT = { participant_group_type = conservative_movement } - } + } cost = { @@ -704,9 +700,7 @@ east_asian_peasant_quarters_03 = { previous_building = east_asian_peasant_quarters_02 can_construct = { - top_participant_group:dynastic_cycle ?= { - NOT = { participant_group_type = conservative_movement } - } + } cost = { @@ -742,9 +736,7 @@ east_asian_peasant_quarters_04 = { previous_building = east_asian_peasant_quarters_03 can_construct = { - top_participant_group:dynastic_cycle ?= { - NOT = { participant_group_type = conservative_movement } - } + } cost = { @@ -2656,7 +2648,10 @@ east_asian_estate_commander_study_01 = { custom_tooltip = { text = is_a_military_governor_county_or_above_desc highest_held_title_tier >= tier_county - vassal_contract_has_flag = celestial_military_appointment + OR = { + vassal_contract_has_flag = celestial_military_appointment + vassal_contract_has_flag = meritocratic_military_appointment + } } } } @@ -2674,6 +2669,7 @@ east_asian_estate_commander_study_01 = { parameters = { celestial_military_score_bonus_1 = yes + meritocratic_military_score_bonus_1 = yes } character_modifier = { @@ -2701,7 +2697,10 @@ east_asian_estate_commander_study_02 = { custom_tooltip = { text = is_a_military_governor_duchy_or_above_desc highest_held_title_tier >= tier_duchy - vassal_contract_has_flag = celestial_military_appointment + OR = { + vassal_contract_has_flag = celestial_military_appointment + vassal_contract_has_flag = meritocratic_military_appointment + } } } @@ -2718,6 +2717,7 @@ east_asian_estate_commander_study_02 = { parameters = { celestial_military_score_bonus_2 = yes + meritocratic_military_score_bonus_2 = yes } character_modifier = { @@ -2746,7 +2746,10 @@ east_asian_estate_commander_study_03 = { custom_tooltip = { text = is_a_military_governor_kingdom_or_above_desc highest_held_title_tier >= tier_kingdom - vassal_contract_has_flag = celestial_military_appointment + OR = { + vassal_contract_has_flag = celestial_military_appointment + vassal_contract_has_flag = meritocratic_military_appointment + } } domicile ?= { has_domicile_building_or_higher = east_asian_estate_main_02 } } @@ -2764,6 +2767,7 @@ east_asian_estate_commander_study_03 = { parameters = { celestial_military_score_bonus_3 = yes + meritocratic_military_score_bonus_3 = yes } character_modifier = { @@ -2806,6 +2810,7 @@ east_asian_estate_commander_study_04 = { parameters = { celestial_military_score_bonus_4 = yes + meritocratic_military_score_bonus_4 = yes } character_modifier = { @@ -2837,7 +2842,10 @@ east_asian_estate_office_01 = { custom_tooltip = { text = is_a_civilian_governor_county_or_above_desc highest_held_title_tier >= tier_county - vassal_contract_has_flag = celestial_civil_appointment + OR = { + vassal_contract_has_flag = celestial_civil_appointment + vassal_contract_has_flag = meritocratic_civil_appointment + } } } @@ -2854,6 +2862,7 @@ east_asian_estate_office_01 = { parameters = { celestial_civilian_score_bonus_1 = yes + meritocratic_civilian_score_bonus_1 = yes } character_modifier = { @@ -2881,7 +2890,10 @@ east_asian_estate_office_02 = { custom_tooltip = { text = is_a_civilian_governor_duchy_or_above_desc highest_held_title_tier >= tier_duchy - vassal_contract_has_flag = celestial_civil_appointment + OR = { + vassal_contract_has_flag = celestial_civil_appointment + vassal_contract_has_flag = meritocratic_civil_appointment + } } } @@ -2898,6 +2910,7 @@ east_asian_estate_office_02 = { parameters = { celestial_civilian_score_bonus_2 = yes + meritocratic_civilian_score_bonus_2 = yes estate_governor_efficiency_bonus = yes } @@ -2926,7 +2939,10 @@ east_asian_estate_office_03 = { custom_tooltip = { text = is_a_civilian_governor_kingdom_or_above_desc highest_held_title_tier >= tier_kingdom - vassal_contract_has_flag = celestial_civil_appointment + OR = { + vassal_contract_has_flag = celestial_civil_appointment + vassal_contract_has_flag = meritocratic_civil_appointment + } } domicile ?= { has_domicile_building_or_higher = east_asian_estate_main_02 } } @@ -2944,6 +2960,7 @@ east_asian_estate_office_03 = { parameters = { celestial_civilian_score_bonus_3 = yes + meritocratic_civilian_score_bonus_3 = yes estate_governor_efficiency_bonus = yes estate_governor_efficiency_bonus_for_house_members = yes } @@ -2986,6 +3003,7 @@ east_asian_estate_office_04 = { parameters = { celestial_civilian_score_bonus_4 = yes + meritocratic_civilian_score_bonus_4 = yes estate_governor_efficiency_bonus = yes estate_governor_efficiency_bonus_for_house_members = yes estate_governor_trait_xp_bonus_for_contracts = yes @@ -4007,9 +4025,6 @@ east_asian_estate_reception_hall_01 = { previous_building = east_asian_estate_main_01 can_construct_potential = { - top_participant_group:dynastic_cycle ?= { - participant_group_type = conservative_movement - } } cost = { @@ -4050,9 +4065,6 @@ east_asian_estate_reception_hall_02 = { previous_building = east_asian_estate_reception_hall_01 can_construct = { - top_participant_group:dynastic_cycle ?= { - participant_group_type = conservative_movement - } } cost = { @@ -4094,9 +4106,6 @@ east_asian_estate_reception_hall_03 = { previous_building = east_asian_estate_reception_hall_02 can_construct = { - top_participant_group:dynastic_cycle ?= { - participant_group_type = conservative_movement - } domicile ?= { has_domicile_building_or_higher = east_asian_estate_main_02 } } @@ -4138,11 +4147,6 @@ east_asian_estate_reception_hall_04 = { slot_type = internal previous_building = east_asian_estate_reception_hall_03 - can_construct = { - top_participant_group:dynastic_cycle ?= { - participant_group_type = conservative_movement - } - } cost = { gold = { @@ -4183,9 +4187,6 @@ east_asian_estate_reception_hall_05 = { previous_building = east_asian_estate_reception_hall_04 can_construct = { - top_participant_group:dynastic_cycle ?= { - participant_group_type = conservative_movement - } domicile ?= { has_domicile_building_or_higher = east_asian_estate_main_04 } } @@ -4229,7 +4230,7 @@ east_asian_estate_cabinet_of_curiosities_01 = { slot_type = internal previous_building = east_asian_estate_main_01 - can_construct_potential = { + can_construct = { dynasty ?= { has_dynasty_perk = ep3_administrative_legacy_4 } } @@ -5106,6 +5107,7 @@ east_asian_estate_health_01 = { parameters = { estate_increase_safe_treatment_success_1 = yes + estate_increase_physician_aptitude_1 = yes } ai_value = { @@ -5152,7 +5154,7 @@ east_asian_estate_health_02 = { parameters = { estate_increase_safe_treatment_success_1 = yes - estate_increase_physician_aptitude = yes + estate_increase_physician_aptitude_2 = yes } ai_value = { @@ -5194,7 +5196,7 @@ east_asian_estate_health_03 = { parameters = { estate_increase_safe_treatment_success_1 = yes - estate_increase_physician_aptitude = yes + estate_increase_physician_aptitude_3 = yes } ai_value = { @@ -5236,7 +5238,7 @@ east_asian_estate_health_04 = { parameters = { estate_increase_safe_treatment_success_2 = yes - estate_increase_physician_aptitude_2 = yes + estate_increase_physician_aptitude_4 = yes } ai_value = { @@ -5278,7 +5280,7 @@ east_asian_estate_health_05 = { parameters = { estate_increase_safe_treatment_success_2 = yes - estate_increase_physician_aptitude_2 = yes + estate_increase_physician_aptitude_5 = yes } ai_value = { @@ -5320,7 +5322,7 @@ east_asian_estate_health_06 = { parameters = { estate_increase_safe_treatment_success_2 = yes - estate_increase_physician_aptitude_3 = yes + estate_increase_physician_aptitude_6 = yes } ai_value = { @@ -6572,6 +6574,7 @@ east_asian_estate_watchtower_01 = { } parameters = { + estate_increase_bodyguard_aptitude_1 = yes raids_less_likely_to_make_prisoners_1 = yes house_head_can_ask_for_knight = yes } @@ -6617,7 +6620,7 @@ east_asian_estate_watchtower_02 = { parameters = { raids_less_likely_to_make_prisoners_1 = yes - estate_increase_bodyguard_aptitude_1 = yes + estate_increase_bodyguard_aptitude_2 = yes house_head_can_ask_for_knight = yes } @@ -6657,7 +6660,7 @@ east_asian_estate_watchtower_03 = { parameters = { raids_less_likely_to_make_prisoners_2 = yes estate_unlock_bolster_security_decision = yes - estate_increase_bodyguard_aptitude_1 = yes + estate_increase_bodyguard_aptitude_3 = yes house_head_can_ask_for_knight = yes house_head_can_ask_for_maa = yes } @@ -6709,7 +6712,7 @@ east_asian_estate_watchtower_04 = { raids_less_likely_to_make_prisoners_2 = yes house_head_can_ask_for_maa = yes estate_unlock_bolster_security_decision = yes - estate_increase_bodyguard_aptitude_2 = yes + estate_increase_bodyguard_aptitude_4 = yes house_head_can_ask_for_knight = yes } @@ -6760,7 +6763,7 @@ east_asian_estate_watchtower_05 = { raids_less_likely_to_make_prisoners_3 = yes house_head_can_ask_for_maa = yes estate_unlock_bolster_security_decision = yes - estate_increase_bodyguard_aptitude_2 = yes + estate_increase_bodyguard_aptitude_5 = yes house_head_can_ask_for_knight = yes } @@ -6812,7 +6815,7 @@ east_asian_estate_watchtower_06 = { estate_unlock_patrol_decision = yes house_head_can_ask_for_maa = yes estate_unlock_bolster_security_decision = yes - estate_increase_bodyguard_aptitude_2 = yes + estate_increase_bodyguard_aptitude_6 = yes house_head_can_ask_for_knight = yes } @@ -7119,7 +7122,7 @@ east_asian_estate_garden_leisure_04 = { } parameters = { - increased_gardener_aptitude_3 = yes + increased_gardener_aptitude_4 = yes } on_complete = { @@ -7206,7 +7209,7 @@ east_asian_estate_garden_leisure_05 = { } parameters = { - increased_gardener_aptitude_3 = yes + increased_gardener_aptitude_5 = yes } on_complete = { @@ -7293,7 +7296,7 @@ east_asian_estate_garden_leisure_06 = { } parameters = { - increased_gardener_aptitude_3 = yes + increased_gardener_aptitude_6 = yes } on_complete = { @@ -7383,7 +7386,7 @@ east_asian_estate_garden_fruit_04 = { } parameters = { - increased_gardener_aptitude_3 = yes + increased_gardener_aptitude_4 = yes } on_complete = { @@ -7471,7 +7474,7 @@ east_asian_estate_garden_fruit_05 = { } parameters = { - increased_gardener_aptitude_3 = yes + increased_gardener_aptitude_5 = yes } on_complete = { @@ -7559,7 +7562,7 @@ east_asian_estate_garden_fruit_06 = { } parameters = { - increased_gardener_aptitude_3 = yes + increased_gardener_aptitude_6 = yes } on_complete = { @@ -11280,7 +11283,10 @@ east_asian_estate_militia_muster_green_01 = { can_construct = { custom_tooltip = { text = celestial_military_appointment_allowed_desc - vassal_contract_has_flag = celestial_military_appointment + OR = { + vassal_contract_has_flag = celestial_military_appointment + vassal_contract_has_flag = meritocratic_military_appointment + } } } @@ -11436,7 +11442,10 @@ east_asian_estate_ration_wine_stores_01 = { can_construct = { custom_tooltip = { text = celestial_military_appointment_allowed_desc - vassal_contract_has_flag = celestial_military_appointment + OR = { + vassal_contract_has_flag = celestial_military_appointment + vassal_contract_has_flag = meritocratic_military_appointment + } } } @@ -13765,7 +13774,10 @@ east_asian_estate_tea_horse_road_office_01 = { custom_tooltip = { text = is_a_military_governor_county_or_above_desc highest_held_title_tier >= tier_county - vassal_contract_has_flag = celestial_military_appointment + OR = { + vassal_contract_has_flag = celestial_military_appointment + vassal_contract_has_flag = meritocratic_military_appointment + } } } } @@ -14626,7 +14638,10 @@ east_asian_estate_field_surgeon_cart_01 = { custom_tooltip = { text = is_a_military_governor_county_or_above_desc highest_held_title_tier >= tier_county - vassal_contract_has_flag = celestial_military_appointment + OR = { + vassal_contract_has_flag = celestial_military_appointment + vassal_contract_has_flag = meritocratic_military_appointment + } } } } @@ -15870,7 +15885,7 @@ east_asian_estate_history_school_04 = { } } parameters = { - estate_increased_tutor_aptitude_1 = yes + estate_increased_tutor_aptitude_4 = yes } character_modifier = { monthly_merit = @east_asian_manor_monthly_merit_2 @@ -16316,7 +16331,10 @@ east_asian_estate_armorer_01 = { custom_tooltip = { text = is_a_military_governor_county_or_above_desc highest_held_title_tier >= tier_county - vassal_contract_has_flag = celestial_military_appointment + OR = { + vassal_contract_has_flag = celestial_military_appointment + vassal_contract_has_flag = meritocratic_military_appointment + } } } } @@ -16741,7 +16759,10 @@ east_asian_estate_sergeants_school_01 = { custom_tooltip = { text = is_a_military_governor_county_or_above_desc highest_held_title_tier >= tier_county - vassal_contract_has_flag = celestial_military_appointment + OR = { + vassal_contract_has_flag = celestial_military_appointment + vassal_contract_has_flag = meritocratic_military_appointment + } } } } @@ -16886,7 +16907,10 @@ east_asian_estate_drill_yard_01 = { custom_tooltip = { text = is_a_military_governor_county_or_above_desc highest_held_title_tier >= tier_county - vassal_contract_has_flag = celestial_military_appointment + OR = { + vassal_contract_has_flag = celestial_military_appointment + vassal_contract_has_flag = meritocratic_military_appointment + } } } } @@ -17604,7 +17628,10 @@ east_asian_estate_crossbow_storage_01 = { can_construct = { custom_tooltip = { text = celestial_military_appointment_allowed_desc - vassal_contract_has_flag = celestial_military_appointment + OR = { + vassal_contract_has_flag = celestial_military_appointment + vassal_contract_has_flag = meritocratic_military_appointment + } } } @@ -18445,7 +18472,10 @@ east_asian_estate_foaling_pens_01 = { custom_tooltip = { text = is_a_military_governor_county_or_above_desc highest_held_title_tier >= tier_county - vassal_contract_has_flag = celestial_military_appointment + OR = { + vassal_contract_has_flag = celestial_military_appointment + vassal_contract_has_flag = meritocratic_military_appointment + } } } } @@ -19712,7 +19742,10 @@ east_asian_estate_leatherworks_01 = { can_construct = { custom_tooltip = { text = celestial_military_appointment_allowed_desc - vassal_contract_has_flag = celestial_military_appointment + OR = { + vassal_contract_has_flag = celestial_military_appointment + vassal_contract_has_flag = meritocratic_military_appointment + } } } @@ -20987,7 +21020,10 @@ east_asian_estate_salt_lick_terraces_01 = { custom_tooltip = { text = is_a_military_governor_county_or_above_desc highest_held_title_tier >= tier_county - vassal_contract_has_flag = celestial_military_appointment + OR = { + vassal_contract_has_flag = celestial_military_appointment + vassal_contract_has_flag = meritocratic_military_appointment + } } } } diff --git a/common/domiciles/buildings/00_yurt_buildings.txt b/common/domiciles/buildings/00_yurt_buildings.txt index ae9d80f3..e3be9d5b 100644 --- a/common/domiciles/buildings/00_yurt_buildings.txt +++ b/common/domiciles/buildings/00_yurt_buildings.txt @@ -2217,8 +2217,6 @@ camel_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -2261,8 +2259,6 @@ camel_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -2305,8 +2301,6 @@ camel_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -2349,8 +2343,6 @@ camel_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -2486,8 +2478,6 @@ goat_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -2533,8 +2523,6 @@ goat_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -2580,8 +2568,6 @@ goat_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -2627,8 +2613,6 @@ goat_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -3028,8 +3012,6 @@ sheep_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -3075,8 +3057,6 @@ sheep_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -3122,8 +3102,6 @@ sheep_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -3169,8 +3147,6 @@ sheep_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -3270,8 +3246,6 @@ steal_herd_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -3305,8 +3279,6 @@ steal_herd_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -3340,8 +3312,6 @@ steal_herd_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -3375,8 +3345,6 @@ steal_herd_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -3466,8 +3434,6 @@ consumption_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -3497,8 +3463,6 @@ consumption_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -3528,8 +3492,6 @@ consumption_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -3559,8 +3521,6 @@ consumption_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -3650,8 +3610,6 @@ herd_wealth_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -3681,8 +3639,6 @@ herd_wealth_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -3712,8 +3668,6 @@ herd_wealth_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -3743,8 +3697,6 @@ herd_wealth_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -3834,8 +3786,6 @@ herder_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -3864,8 +3814,6 @@ herder_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -3895,8 +3843,6 @@ herder_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -3926,8 +3872,6 @@ herder_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -4045,8 +3989,6 @@ character_warfare_yurt_03 = { ai_value = { value = nomadic_capital_exterior_building_3 - - } asset = { @@ -4091,8 +4033,6 @@ character_warfare_yurt_04 = { ai_value = { value = nomadic_capital_exterior_building_4 - - } asset = { @@ -4138,8 +4078,6 @@ character_warfare_yurt_05 = { ai_value = { value = nomadic_capital_exterior_building_5 - - } asset = { @@ -4191,8 +4129,6 @@ character_warfare_yurt_06 = { ai_value = { value = nomadic_capital_exterior_building_6 - - } asset = { @@ -4296,8 +4232,6 @@ falconry_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -4331,8 +4265,6 @@ falconry_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -4366,8 +4298,6 @@ falconry_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -4402,8 +4332,6 @@ falconry_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -4490,8 +4418,6 @@ knight_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -4520,8 +4446,6 @@ knight_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -4551,8 +4475,6 @@ knight_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -4582,8 +4504,6 @@ knight_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -4673,8 +4593,6 @@ commander_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -4704,8 +4622,6 @@ commander_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -4737,8 +4653,6 @@ commander_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -4770,8 +4684,6 @@ commander_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -4795,7 +4707,7 @@ bodyguard_yurt_01 = { } parameters = { - nomad_yurt_increased_bodyguard_aptitude_lvl_1 = yes + estate_increase_bodyguard_aptitude_1 = yes } character_modifier = { @@ -4828,7 +4740,7 @@ bodyguard_yurt_02 = { } parameters = { - nomad_yurt_increased_bodyguard_aptitude_lvl_1 = yes + estate_increase_bodyguard_aptitude_2 = yes } character_modifier = { @@ -4861,7 +4773,7 @@ bodyguard_yurt_03 = { } parameters = { - nomad_yurt_increased_bodyguard_aptitude_lvl_2 = yes + estate_increase_bodyguard_aptitude_3 = yes } character_modifier = { @@ -4871,8 +4783,6 @@ bodyguard_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -4896,7 +4806,7 @@ bodyguard_yurt_04 = { } parameters = { - nomad_yurt_increased_bodyguard_aptitude_lvl_2 = yes + estate_increase_bodyguard_aptitude_4 = yes } character_modifier = { @@ -4907,8 +4817,6 @@ bodyguard_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -4932,7 +4840,7 @@ bodyguard_yurt_05 = { } parameters = { - nomad_yurt_increased_bodyguard_aptitude_lvl_3 = yes + estate_increase_bodyguard_aptitude_5 = yes } character_modifier = { @@ -4942,8 +4850,6 @@ bodyguard_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -4967,7 +4873,7 @@ bodyguard_yurt_06 = { } parameters = { - nomad_yurt_increased_bodyguard_aptitude_lvl_3 = yes + estate_increase_bodyguard_aptitude_6 = yes } character_modifier = { @@ -4978,8 +4884,6 @@ bodyguard_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -5070,8 +4974,6 @@ accolade_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -5102,8 +5004,6 @@ accolade_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -5134,8 +5034,6 @@ accolade_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -5166,8 +5064,6 @@ accolade_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -5204,6 +5100,7 @@ mass_warfare_yurt_01 = { parameters = { unlock_maa_heavy_horse_archers = yes + nomad_yurt_unlock_master_the_art_of_command = yes } ai_value = { @@ -5244,8 +5141,6 @@ mass_warfare_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_1 - - } asset = { @@ -5283,8 +5178,6 @@ mass_warfare_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -5330,8 +5223,6 @@ mass_warfare_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -5371,8 +5262,6 @@ mass_warfare_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -5422,8 +5311,6 @@ mass_warfare_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -5518,8 +5405,6 @@ lcav_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -5551,8 +5436,6 @@ lcav_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -5585,8 +5468,6 @@ lcav_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -5619,8 +5500,6 @@ lcav_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -5716,8 +5595,6 @@ foot_archer_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -5747,8 +5624,6 @@ foot_archer_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -5778,8 +5653,6 @@ foot_archer_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -5809,8 +5682,6 @@ foot_archer_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -5908,8 +5779,6 @@ merc_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -5958,8 +5827,6 @@ merc_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -5994,8 +5861,6 @@ merc_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -6044,8 +5909,6 @@ merc_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -6133,8 +5996,6 @@ herd_conversion_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -6164,8 +6025,6 @@ herd_conversion_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -6195,8 +6054,6 @@ herd_conversion_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -6226,8 +6083,6 @@ herd_conversion_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -6318,8 +6173,6 @@ raiding_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -6350,8 +6203,6 @@ raiding_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -6382,8 +6233,6 @@ raiding_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -6414,8 +6263,6 @@ raiding_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -6503,8 +6350,6 @@ stationing_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -6534,8 +6379,6 @@ stationing_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -6566,8 +6409,6 @@ stationing_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -6598,8 +6439,6 @@ stationing_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -6715,8 +6554,6 @@ court_yurt_03 = { ai_value = { value = nomadic_capital_exterior_building_3 - - } asset = { @@ -6766,8 +6603,6 @@ court_yurt_04 = { ai_value = { value = nomadic_capital_exterior_building_4 - - } asset = { @@ -6813,8 +6648,6 @@ court_yurt_05 = { ai_value = { value = nomadic_capital_exterior_building_5 - - } asset = { @@ -6865,8 +6698,6 @@ court_yurt_06 = { ai_value = { value = nomadic_capital_exterior_building_6 - - } asset = { @@ -6962,8 +6793,6 @@ tributary_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -6996,8 +6825,6 @@ tributary_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -7030,8 +6857,6 @@ tributary_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -7064,8 +6889,6 @@ tributary_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -7152,8 +6975,6 @@ vassal_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -7183,8 +7004,6 @@ vassal_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -7214,8 +7033,6 @@ vassal_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -7245,8 +7062,6 @@ vassal_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -7271,7 +7086,7 @@ secret_scheme_yurt_01 = { character_modifier = { owned_scheme_secrecy_add = 4 - scheme_discovery_chance_mult = 0.04 + enemy_scheme_secrecy_add = -4 } ai_value = { @@ -7300,7 +7115,7 @@ secret_scheme_yurt_02 = { character_modifier = { owned_scheme_secrecy_add = 2 - scheme_discovery_chance_mult = 0.04 + enemy_scheme_secrecy_add = -4 } ai_value = { @@ -7329,13 +7144,11 @@ secret_scheme_yurt_03 = { character_modifier = { owned_scheme_secrecy_add = 4 - scheme_discovery_chance_mult = 0.08 + enemy_scheme_secrecy_add = -8 } ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -7360,13 +7173,11 @@ secret_scheme_yurt_04 = { character_modifier = { owned_scheme_secrecy_add = 4 - scheme_discovery_chance_mult = 0.08 + enemy_scheme_secrecy_add = -8 } ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -7391,13 +7202,11 @@ secret_scheme_yurt_05 = { character_modifier = { owned_scheme_secrecy_add = 6 - scheme_discovery_chance_mult = 0.16 + enemy_scheme_secrecy_add = -16 } ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -7422,13 +7231,11 @@ secret_scheme_yurt_06 = { character_modifier = { owned_scheme_secrecy_add = 10 - scheme_discovery_chance_mult = 0.16 + enemy_scheme_secrecy_add = -16 } ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -7486,8 +7293,6 @@ kurultai_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -7517,8 +7322,6 @@ kurultai_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -7548,8 +7351,6 @@ kurultai_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -7579,8 +7380,6 @@ kurultai_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -7610,8 +7409,6 @@ kurultai_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -7676,8 +7473,6 @@ feast_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -7710,8 +7505,6 @@ feast_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -7744,8 +7537,6 @@ feast_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -7778,8 +7569,6 @@ feast_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -7812,8 +7601,6 @@ feast_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -7875,8 +7662,6 @@ agent_dread_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -7910,8 +7695,6 @@ agent_dread_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -7945,8 +7728,6 @@ agent_dread_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -7980,8 +7761,6 @@ agent_dread_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -8015,8 +7794,6 @@ agent_dread_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -8082,8 +7859,6 @@ dynasty_court_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -8116,8 +7891,6 @@ dynasty_court_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -8150,8 +7923,6 @@ dynasty_court_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -8185,8 +7956,6 @@ dynasty_court_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -8220,8 +7989,6 @@ dynasty_court_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -8289,8 +8056,6 @@ culture_court_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -8324,8 +8089,6 @@ culture_court_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -8359,8 +8122,6 @@ culture_court_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -8395,8 +8156,6 @@ culture_court_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -8431,8 +8190,6 @@ culture_court_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -8506,8 +8263,6 @@ family_yurt_02 = { ai_value = { value = nomadic_capital_exterior_building_2 - - } asset = { @@ -8546,8 +8301,6 @@ family_yurt_03 = { ai_value = { value = nomadic_capital_exterior_building_3 - - } asset = { @@ -8595,8 +8348,6 @@ family_yurt_04 = { ai_value = { value = nomadic_capital_exterior_building_4 - - } asset = { @@ -8640,8 +8391,6 @@ family_yurt_05 = { ai_value = { value = nomadic_capital_exterior_building_5 - - } asset = { @@ -8688,8 +8437,6 @@ family_yurt_06 = { ai_value = { value = nomadic_capital_exterior_building_6 - - } asset = { @@ -8916,8 +8663,8 @@ wet_nurse_yurt_01 = { } parameters = { - nomad_yurt_wet_nurse_aptitude_lvl_1 = yes - nomad_yurt_court_tutor_aptitude_lvl_1 = yes + domicile_increased_wet_nurse_aptitude_1 = yes + estate_increased_tutor_aptitude_1 = yes } ai_value = { @@ -8951,8 +8698,8 @@ wet_nurse_yurt_02 = { } parameters = { - nomad_yurt_wet_nurse_aptitude_lvl_1 = yes - nomad_yurt_court_tutor_aptitude_lvl_1 = yes + domicile_increased_wet_nurse_aptitude_2 = yes + estate_increased_tutor_aptitude_2 = yes } character_modifier = { @@ -8961,8 +8708,6 @@ wet_nurse_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -8986,8 +8731,8 @@ wet_nurse_yurt_03 = { } parameters = { - nomad_yurt_wet_nurse_aptitude_lvl_2 = yes - nomad_yurt_court_tutor_aptitude_lvl_1 = yes + domicile_increased_wet_nurse_aptitude_3 = yes + estate_increased_tutor_aptitude_3 = yes } character_modifier = { @@ -8996,8 +8741,6 @@ wet_nurse_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -9021,8 +8764,8 @@ wet_nurse_yurt_04 = { } parameters = { - nomad_yurt_wet_nurse_aptitude_lvl_2 = yes - nomad_yurt_court_tutor_aptitude_lvl_2 = yes + domicile_increased_wet_nurse_aptitude_4 = yes + estate_increased_tutor_aptitude_4 = yes } character_modifier = { @@ -9031,8 +8774,6 @@ wet_nurse_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -9056,8 +8797,8 @@ wet_nurse_yurt_05 = { } parameters = { - nomad_yurt_wet_nurse_aptitude_lvl_3 = yes - nomad_yurt_court_tutor_aptitude_lvl_3 = yes + domicile_increased_wet_nurse_aptitude_5 = yes + estate_increased_tutor_aptitude_5 = yes } character_modifier = { @@ -9066,8 +8807,6 @@ wet_nurse_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -9091,8 +8830,8 @@ wet_nurse_yurt_06 = { } parameters = { - nomad_yurt_wet_nurse_aptitude_lvl_4 = yes - nomad_yurt_court_tutor_aptitude_lvl_4 = yes + domicile_increased_wet_nurse_aptitude_6 = yes + estate_increased_tutor_aptitude_6 = yes } character_modifier = { @@ -9101,8 +8840,6 @@ wet_nurse_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -9161,8 +8898,6 @@ personal_chamber_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -9192,8 +8927,6 @@ personal_chamber_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -9227,8 +8960,6 @@ personal_chamber_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -9262,8 +8993,6 @@ personal_chamber_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -9297,8 +9026,6 @@ personal_chamber_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -9357,8 +9084,6 @@ recreation_chamber_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -9389,8 +9114,6 @@ recreation_chamber_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -9421,8 +9144,6 @@ recreation_chamber_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -9453,8 +9174,6 @@ recreation_chamber_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -9485,8 +9204,6 @@ recreation_chamber_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -9551,8 +9268,6 @@ marriage_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -9585,8 +9300,6 @@ marriage_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -9619,8 +9332,6 @@ marriage_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -9653,8 +9364,6 @@ marriage_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -9687,8 +9396,6 @@ marriage_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -9753,8 +9460,6 @@ better_children_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -9787,8 +9492,6 @@ better_children_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -9821,8 +9524,6 @@ better_children_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -9855,8 +9556,6 @@ better_children_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -9889,8 +9588,6 @@ better_children_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -9955,8 +9652,6 @@ friend_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -9989,8 +9684,6 @@ friend_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -10023,8 +9716,6 @@ friend_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -10057,8 +9748,6 @@ friend_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -10091,8 +9780,6 @@ friend_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -10159,8 +9846,6 @@ hostage_ward_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -10194,8 +9879,6 @@ hostage_ward_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -10229,8 +9912,6 @@ hostage_ward_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -10264,8 +9945,6 @@ hostage_ward_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -10299,8 +9978,6 @@ hostage_ward_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -10366,8 +10043,6 @@ mystical_yurt_02 = { ai_value = { value = nomadic_capital_exterior_building_2 - - } asset = { @@ -10399,8 +10074,6 @@ mystical_yurt_03 = { ai_value = { value = nomadic_capital_exterior_building_3 - - } asset = { @@ -10442,8 +10115,6 @@ mystical_yurt_04 = { ai_value = { value = nomadic_capital_exterior_building_4 - - } asset = { @@ -10485,8 +10156,6 @@ mystical_yurt_05 = { ai_value = { value = nomadic_capital_exterior_building_5 - - } asset = { @@ -10532,8 +10201,6 @@ mystical_yurt_06 = { ai_value = { value = nomadic_capital_exterior_building_6 - - } asset = { @@ -10605,8 +10272,6 @@ astrologer_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -10641,8 +10306,6 @@ astrologer_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -10677,8 +10340,6 @@ astrologer_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -10713,8 +10374,6 @@ astrologer_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -10749,8 +10408,6 @@ astrologer_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -10774,7 +10431,7 @@ physician_yurt_01 = { } parameters = { - nomad_yurt_increased_physician_aptitude_lvl_1 = yes + estate_increase_physician_aptitude_1 = yes } character_modifier = { @@ -10807,7 +10464,7 @@ physician_yurt_02 = { } parameters = { - nomad_yurt_increased_physician_aptitude_lvl_1 = yes + estate_increase_physician_aptitude_2 = yes } character_modifier = { @@ -10817,8 +10474,6 @@ physician_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -10842,7 +10497,7 @@ physician_yurt_03 = { } parameters = { - nomad_yurt_increased_physician_aptitude_lvl_2 = yes + estate_increase_physician_aptitude_3 = yes } character_modifier = { @@ -10852,8 +10507,6 @@ physician_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -10877,7 +10530,7 @@ physician_yurt_04 = { } parameters = { - nomad_yurt_increased_physician_aptitude_lvl_2 = yes + estate_increase_physician_aptitude_4 = yes } character_modifier = { @@ -10887,8 +10540,6 @@ physician_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -10912,7 +10563,7 @@ physician_yurt_05 = { } parameters = { - nomad_yurt_increased_physician_aptitude_lvl_3 = yes + estate_increase_physician_aptitude_5 = yes } character_modifier = { @@ -10922,8 +10573,6 @@ physician_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -10947,7 +10596,7 @@ physician_yurt_06 = { } parameters = { - nomad_yurt_increased_physician_aptitude_lvl_4 = yes + estate_increase_physician_aptitude_6 = yes } character_modifier = { @@ -10957,8 +10606,6 @@ physician_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -11023,8 +10670,6 @@ fertility_mystical_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -11057,8 +10702,6 @@ fertility_mystical_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -11091,8 +10734,6 @@ fertility_mystical_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -11125,8 +10766,6 @@ fertility_mystical_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -11159,8 +10798,6 @@ fertility_mystical_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -11239,8 +10876,6 @@ language_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -11280,8 +10915,6 @@ language_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -11317,8 +10950,6 @@ language_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -11355,8 +10986,6 @@ language_yurt_05 = { ai_value = { value = 5 - - } asset = { @@ -11398,8 +11027,6 @@ language_yurt_06 = { ai_value = { value = 26 - - } asset = { @@ -11464,8 +11091,6 @@ omen_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -11498,8 +11123,6 @@ omen_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -11532,8 +11155,6 @@ omen_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -11567,8 +11188,6 @@ omen_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -11601,8 +11220,6 @@ omen_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -11667,8 +11284,6 @@ kurultai_mystical_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -11702,8 +11317,6 @@ kurultai_mystical_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -11737,8 +11350,6 @@ kurultai_mystical_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -11773,8 +11384,6 @@ kurultai_mystical_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -11808,8 +11417,6 @@ kurultai_mystical_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -11875,8 +11482,6 @@ knight_mystical_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -11909,8 +11514,6 @@ knight_mystical_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -11943,8 +11546,6 @@ knight_mystical_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -11978,8 +11579,6 @@ knight_mystical_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -12013,8 +11612,6 @@ knight_mystical_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -12113,8 +11710,6 @@ trade_yurt_02 = { ai_value = { value = nomadic_capital_exterior_building_2 - - } asset = { @@ -12163,8 +11758,6 @@ trade_yurt_03 = { ai_value = { value = nomadic_capital_exterior_building_3 - - } asset = { @@ -12218,8 +11811,6 @@ trade_yurt_04 = { ai_value = { value = nomadic_capital_exterior_building_4 - - } asset = { @@ -12269,8 +11860,6 @@ trade_yurt_05 = { ai_value = { value = nomadic_capital_exterior_building_5 - - } asset = { @@ -12324,8 +11913,6 @@ trade_yurt_06 = { ai_value = { value = nomadic_capital_exterior_building_6 - - } asset = { @@ -12397,8 +11984,6 @@ paiza_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -12432,8 +12017,6 @@ paiza_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -12471,8 +12054,6 @@ paiza_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -12506,8 +12087,6 @@ paiza_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -12545,8 +12124,6 @@ paiza_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -12612,8 +12189,6 @@ innovation_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -12647,8 +12222,6 @@ innovation_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -12682,8 +12255,6 @@ innovation_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -12717,8 +12288,6 @@ innovation_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -12752,8 +12321,6 @@ innovation_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -12820,8 +12387,6 @@ merchant_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -12855,8 +12420,6 @@ merchant_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -12890,8 +12453,6 @@ merchant_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -12925,8 +12486,6 @@ merchant_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -12960,8 +12519,6 @@ merchant_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -13028,8 +12585,6 @@ fertility_trade_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_1 - - } asset = { @@ -13063,8 +12618,6 @@ fertility_trade_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -13098,8 +12651,6 @@ fertility_trade_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -13133,8 +12684,6 @@ fertility_trade_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -13168,8 +12717,6 @@ fertility_trade_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -13236,8 +12783,6 @@ herd_trade_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -13271,8 +12816,6 @@ herd_trade_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -13306,8 +12849,6 @@ herd_trade_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -13341,8 +12882,6 @@ herd_trade_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -13376,8 +12915,6 @@ herd_trade_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -13442,8 +12979,6 @@ char_trade_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -13477,8 +13012,6 @@ char_trade_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -13503,7 +13036,6 @@ char_trade_yurt_04 = { parameters = { nomad_yurt_paiza_char_gain_lvl_2 = yes - nomad_yurt_paiza_char_gain_arrival_lvl_1 = yes } character_modifier = { @@ -13512,8 +13044,6 @@ char_trade_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -13538,7 +13068,6 @@ char_trade_yurt_05 = { parameters = { nomad_yurt_paiza_char_gain_lvl_2 = yes - nomad_yurt_paiza_char_gain_arrival_lvl_1 = yes } character_modifier = { @@ -13547,8 +13076,6 @@ char_trade_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -13573,7 +13100,6 @@ char_trade_yurt_06 = { parameters = { nomad_yurt_paiza_char_gain_lvl_3 = yes - nomad_yurt_paiza_char_gain_arrival_lvl_2 = yes } character_modifier = { @@ -13582,8 +13108,6 @@ char_trade_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { @@ -13648,8 +13172,6 @@ knight_trade_yurt_02 = { ai_value = { value = nomadic_capital_interior_building_2 - - } asset = { @@ -13682,8 +13204,6 @@ knight_trade_yurt_03 = { ai_value = { value = nomadic_capital_interior_building_3 - - } asset = { @@ -13716,8 +13236,6 @@ knight_trade_yurt_04 = { ai_value = { value = nomadic_capital_interior_building_4 - - } asset = { @@ -13750,8 +13268,6 @@ knight_trade_yurt_05 = { ai_value = { value = nomadic_capital_interior_building_5 - - } asset = { @@ -13784,8 +13300,6 @@ knight_trade_yurt_06 = { ai_value = { value = nomadic_capital_interior_building_6 - - } asset = { diff --git a/common/domiciles/buildings/10_japanese_manor_buildings.txt b/common/domiciles/buildings/10_japanese_manor_buildings.txt index 0dcfbc0b..edcb9fb7 100644 --- a/common/domiciles/buildings/10_japanese_manor_buildings.txt +++ b/common/domiciles/buildings/10_japanese_manor_buildings.txt @@ -2015,7 +2015,7 @@ japanese_manor_library_confucian_04 = { } parameters = { - japanese_manor_unlock_tier_5_education = yes + estate_unlock_tier_5_education = yes } character_modifier = { @@ -2056,7 +2056,7 @@ japanese_manor_library_confucian_05 = { } parameters = { - japanese_manor_unlock_tier_5_education = yes + estate_unlock_tier_5_education = yes } character_modifier = { @@ -2097,7 +2097,7 @@ japanese_manor_library_confucian_06 = { } parameters = { - japanese_manor_unlock_tier_5_education = yes + estate_unlock_tier_5_education = yes } character_modifier = { @@ -2188,7 +2188,7 @@ japanese_manor_retainer_accomodations_02 = { parameters = { house_head_can_ask_for_knight = yes - estate_increase_bodyguard_aptitude_1 = yes + estate_increase_bodyguard_aptitude_2 = yes } ai_value = { @@ -2231,7 +2231,7 @@ japanese_manor_retainer_accomodations_03 = { parameters = { house_head_can_ask_for_knight = yes - estate_increase_bodyguard_aptitude_1 = yes + estate_increase_bodyguard_aptitude_3 = yes } ai_value = { @@ -2263,7 +2263,7 @@ japanese_manor_retainer_accomodations_04 = { parameters = { house_head_can_ask_for_knight = yes - estate_increase_bodyguard_aptitude_2 = yes + estate_increase_bodyguard_aptitude_4 = yes } character_modifier = { @@ -2304,7 +2304,7 @@ japanese_manor_retainer_accomodations_05 = { parameters = { house_head_can_ask_for_knight = yes - estate_increase_bodyguard_aptitude_2 = yes + estate_increase_bodyguard_aptitude_5 = yes } character_modifier = { @@ -3691,7 +3691,7 @@ japanese_shrine_01 = { can_construct = { custom_tooltip = { text = humility_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_shrine } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_shrine } } } @@ -3734,7 +3734,7 @@ japanese_shrine_02 = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_02 } custom_tooltip = { text = humility_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_shrine } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_shrine } } } @@ -3769,14 +3769,14 @@ japanese_shrine_02 = { japanese_shrine_03 = { construction_time = @japanese_manor_external_construction_time_tier_3 allowed_domicile_types = { japanese_manor } - internal_slots = 1 + internal_slots = 2 previous_building = japanese_shrine_02 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_03 } custom_tooltip = { text = humility_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_shrine } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_shrine } } } @@ -3818,7 +3818,7 @@ japanese_shrine_04 = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_04 } custom_tooltip = { text = humility_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_shrine } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_shrine } } } @@ -3854,14 +3854,14 @@ japanese_shrine_04 = { japanese_shrine_05 = { construction_time = @japanese_manor_external_construction_time_tier_5 allowed_domicile_types = { japanese_manor } - internal_slots = 2 + internal_slots = 3 previous_building = japanese_shrine_04 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_05 } custom_tooltip = { text = humility_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_shrine } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_shrine } } } @@ -3896,14 +3896,14 @@ japanese_shrine_05 = { japanese_shrine_06 = { construction_time = @japanese_manor_external_construction_time_tier_6 allowed_domicile_types = { japanese_manor } - internal_slots = 2 + internal_slots = 3 previous_building = japanese_shrine_05 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_06 } custom_tooltip = { text = humility_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_shrine } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_shrine } } } @@ -3985,6 +3985,10 @@ japanese_cemetery_02 = { dynasty_house_opinion = @japanese_manor_opinion_add_1 } + parameters = { + estate_cheaper_funeral_cost = yes + } + ai_value = { value = 8 add = japanese_manor_building_ai_modifier_value @@ -4014,6 +4018,10 @@ japanese_cemetery_03 = { monthly_dynasty_prestige = @japanese_manor_monthly_dynasty_prestige_add_1 dynasty_house_opinion = @japanese_manor_opinion_add_1 } + + parameters = { + estate_cheaper_funeral_cost = yes + } ai_value = { value = 7 @@ -4044,6 +4052,10 @@ japanese_cemetery_04 = { monthly_dynasty_prestige = @japanese_manor_monthly_dynasty_prestige_add_1 dynasty_house_opinion = @japanese_manor_opinion_add_1 } + + parameters = { + estate_cheaper_funeral_cost = yes + } ai_value = { value = 7 @@ -4074,6 +4086,10 @@ japanese_cemetery_05 = { monthly_dynasty_prestige = @japanese_manor_monthly_dynasty_prestige_add_1 dynasty_house_opinion = @japanese_manor_opinion_add_1 } + + parameters = { + estate_cheaper_funeral_cost = yes + } ai_value = { value = 7 @@ -4104,6 +4120,10 @@ japanese_cemetery_06 = { monthly_dynasty_prestige = @japanese_manor_monthly_dynasty_prestige_add_1 dynasty_house_opinion = @japanese_manor_opinion_add_1 } + + parameters = { + estate_cheaper_funeral_cost = yes + } ai_value = { value = 7 @@ -4168,6 +4188,10 @@ japanese_shokubo_02 = { character_travel_safety = @japanese_manor_character_travel_safety } + parameters = { + estate_cheaper_pilgrimage_cost = yes + } + ai_value = { value = 8 add = japanese_manor_building_ai_modifier_value @@ -4198,6 +4222,10 @@ japanese_shokubo_03 = { different_faith_opinion = @japanese_manor_opinion_add_1 character_travel_safety = @japanese_manor_character_travel_safety } + + parameters = { + estate_cheaper_pilgrimage_cost = yes + } ai_value = { value = 7 @@ -4230,6 +4258,10 @@ japanese_shokubo_04 = { different_faith_opinion = @japanese_manor_opinion_add_1 character_travel_safety = @japanese_manor_character_travel_safety } + + parameters = { + estate_cheaper_pilgrimage_cost = yes + } ai_value = { value = 7 @@ -4261,6 +4293,10 @@ japanese_shokubo_05 = { different_faith_opinion = @japanese_manor_opinion_add_1 character_travel_safety = @japanese_manor_character_travel_safety } + + parameters = { + estate_cheaper_pilgrimage_cost = yes + } ai_value = { value = 7 @@ -4292,6 +4328,10 @@ japanese_shokubo_06 = { different_faith_opinion = @japanese_manor_opinion_add_1 character_travel_safety = @japanese_manor_character_travel_safety } + + parameters = { + estate_cheaper_pilgrimage_cost = yes + } ai_value = { value = 7 @@ -4534,7 +4574,7 @@ japanese_brewery_01 = { can_construct = { custom_tooltip = { text = prosperity_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_brewery } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_brewery } } } @@ -4575,7 +4615,7 @@ japanese_brewery_02 = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_02 } custom_tooltip = { text = prosperity_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_brewery } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_brewery } } } @@ -4589,6 +4629,10 @@ japanese_brewery_02 = { county_opinion_add = @japanese_manor_opinion_add_1 } + parameters = { + estate_cheaper_feast_cost = yes + } + ai_value = { value = 8 add = japanese_manor_building_ai_modifier_value @@ -4604,14 +4648,14 @@ japanese_brewery_02 = { japanese_brewery_03 = { construction_time = @japanese_manor_external_construction_time_tier_3 allowed_domicile_types = { japanese_manor } - internal_slots = 1 + internal_slots = 2 previous_building = japanese_brewery_02 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_03 } custom_tooltip = { text = prosperity_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_brewery } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_brewery } } } @@ -4624,6 +4668,10 @@ japanese_brewery_03 = { development_growth_factor = @japanese_manor_development_growth_factor_1 county_opinion_add = @japanese_manor_opinion_add_1 } + + parameters = { + estate_cheaper_feast_cost = yes + } ai_value = { value = 7 @@ -4647,7 +4695,7 @@ japanese_brewery_04 = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_04 } custom_tooltip = { text = prosperity_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_brewery } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_brewery } } } @@ -4661,6 +4709,10 @@ japanese_brewery_04 = { county_opinion_add = @japanese_manor_opinion_add_1 stewardship_per_prestige_level = 1 } + + parameters = { + estate_cheaper_feast_cost = yes + } ai_value = { value = 7 @@ -4677,14 +4729,14 @@ japanese_brewery_04 = { japanese_brewery_05 = { construction_time = @japanese_manor_external_construction_time_tier_5 allowed_domicile_types = { japanese_manor } - internal_slots = 2 + internal_slots = 3 previous_building = japanese_brewery_04 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_05 } custom_tooltip = { text = prosperity_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_brewery } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_brewery } } } @@ -4697,6 +4749,10 @@ japanese_brewery_05 = { development_growth_factor = @japanese_manor_development_growth_factor_1 county_opinion_add = @japanese_manor_opinion_add_1 } + + parameters = { + estate_cheaper_feast_cost = yes + } ai_value = { value = 7 @@ -4713,14 +4769,14 @@ japanese_brewery_05 = { japanese_brewery_06 = { construction_time = @japanese_manor_external_construction_time_tier_6 allowed_domicile_types = { japanese_manor } - internal_slots = 2 + internal_slots = 3 previous_building = japanese_brewery_05 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_06 } custom_tooltip = { text = prosperity_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_brewery } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_brewery } } } @@ -4733,6 +4789,10 @@ japanese_brewery_06 = { development_growth_factor = @japanese_manor_development_growth_factor_1 county_opinion_add = @japanese_manor_opinion_add_1 } + + parameters = { + estate_cheaper_feast_cost = yes + } ai_value = { value = 7 @@ -5291,7 +5351,7 @@ japanese_archive_01 = { } custom_tooltip = { text = service_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_archive } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_archive } } } @@ -5307,8 +5367,8 @@ japanese_archive_01 = { parameters = { japanese_archives_governor_efficiency_boost = yes japanese_manor_local_theme_cost_reduction = yes - japanese_manor_governor_efficiency_bonus = yes - japanese_manor_governor_trait_xp_bonus_for_contracts = yes + estate_governor_efficiency_bonus = yes + estate_governor_trait_xp_bonus_for_contracts = yes } ai_value = { @@ -5337,7 +5397,7 @@ japanese_archive_02 = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_02 } custom_tooltip = { text = service_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_archive } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_archive } } } @@ -5349,6 +5409,13 @@ japanese_archive_02 = { domicile_monthly_influence_add = @japanese_manor_monthly_influence_add_2 } + parameters = { + japanese_archives_governor_efficiency_boost = yes + japanese_manor_local_theme_cost_reduction = yes + estate_governor_efficiency_bonus = yes + estate_governor_trait_xp_bonus_for_contracts = yes + } + ai_value = { value = 8 add = japanese_manor_building_ai_modifier_value @@ -5364,7 +5431,7 @@ japanese_archive_02 = { japanese_archive_03 = { construction_time = @japanese_manor_external_construction_time_tier_3 allowed_domicile_types = { japanese_manor } - internal_slots = 1 + internal_slots = 2 previous_building = japanese_archive_02 can_construct = { @@ -5375,7 +5442,7 @@ japanese_archive_03 = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_03 } custom_tooltip = { text = service_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_archive } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_archive } } } @@ -5386,6 +5453,13 @@ japanese_archive_03 = { character_modifier = { domicile_monthly_influence_add = @japanese_manor_monthly_influence_add_2 } + + parameters = { + japanese_archives_governor_efficiency_boost = yes + japanese_manor_local_theme_cost_reduction = yes + estate_governor_efficiency_bonus = yes + estate_governor_trait_xp_bonus_for_contracts = yes + } ai_value = { value = 7 @@ -5413,7 +5487,7 @@ japanese_archive_04 = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_04 } custom_tooltip = { text = service_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_archive } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_archive } } } @@ -5425,6 +5499,13 @@ japanese_archive_04 = { stewardship_per_influence_level = 1 domicile_monthly_influence_add = @japanese_manor_monthly_influence_add_2 } + + parameters = { + japanese_archives_governor_efficiency_boost = yes + japanese_manor_local_theme_cost_reduction = yes + estate_governor_efficiency_bonus = yes + estate_governor_trait_xp_bonus_for_contracts = yes + } ai_value = { value = 7 @@ -5441,7 +5522,7 @@ japanese_archive_04 = { japanese_archive_05 = { construction_time = @japanese_manor_external_construction_time_tier_5 allowed_domicile_types = { japanese_manor } - internal_slots = 2 + internal_slots = 3 previous_building = japanese_archive_04 can_construct = { @@ -5452,7 +5533,7 @@ japanese_archive_05 = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_05 } custom_tooltip = { text = service_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_archive } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_archive } } } @@ -5463,6 +5544,13 @@ japanese_archive_05 = { character_modifier = { domicile_monthly_influence_add = @japanese_manor_monthly_influence_add_2 } + + parameters = { + japanese_archives_governor_efficiency_boost = yes + japanese_manor_local_theme_cost_reduction = yes + estate_governor_efficiency_bonus = yes + estate_governor_trait_xp_bonus_for_contracts = yes + } ai_value = { value = 7 @@ -5479,7 +5567,7 @@ japanese_archive_05 = { japanese_archive_06 = { construction_time = @japanese_manor_external_construction_time_tier_6 allowed_domicile_types = { japanese_manor } - internal_slots = 2 + internal_slots = 3 previous_building = japanese_archive_05 can_construct = { @@ -5490,7 +5578,7 @@ japanese_archive_06 = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_06 } custom_tooltip = { text = service_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_archive } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_archive } } } @@ -5501,6 +5589,13 @@ japanese_archive_06 = { character_modifier = { domicile_monthly_influence_add = @japanese_manor_monthly_influence_add_2 } + + parameters = { + japanese_archives_governor_efficiency_boost = yes + japanese_manor_local_theme_cost_reduction = yes + estate_governor_efficiency_bonus = yes + estate_governor_trait_xp_bonus_for_contracts = yes + } ai_value = { value = 7 @@ -5530,7 +5625,7 @@ japanese_schoolhouse_01 = { } parameters = { - increased_tutor_aptitude_1 = yes + estate_increased_tutor_aptitude_1 = yes estate_reduced_tutor_cost = yes japanese_schoolhouse_education_boost_1 = yes estate_governor_efficiency_bonus_for_house_members = yes @@ -5566,7 +5661,7 @@ japanese_schoolhouse_02 = { } parameters = { - increased_tutor_aptitude_2 = yes + estate_increased_tutor_aptitude_2 = yes estate_reduced_tutor_cost = yes japanese_schoolhouse_education_boost_1 = yes estate_governor_efficiency_bonus_for_house_members = yes @@ -5602,7 +5697,7 @@ japanese_schoolhouse_03 = { } parameters = { - increased_tutor_aptitude_3 = yes + estate_increased_tutor_aptitude_3 = yes estate_reduced_tutor_cost = yes japanese_schoolhouse_education_boost_1 = yes estate_governor_efficiency_bonus_for_house_members = yes @@ -5638,7 +5733,7 @@ japanese_schoolhouse_04 = { } parameters = { - increased_tutor_aptitude_4 = yes + estate_increased_tutor_aptitude_4 = yes estate_reduced_tutor_cost = yes japanese_schoolhouse_education_boost_1 = yes estate_governor_efficiency_bonus_for_house_members = yes @@ -5674,7 +5769,7 @@ japanese_schoolhouse_05 = { } parameters = { - increased_tutor_aptitude_5 = yes + estate_increased_tutor_aptitude_5 = yes estate_reduced_tutor_cost = yes japanese_schoolhouse_education_boost_1 = yes estate_governor_efficiency_bonus_for_house_members = yes @@ -5710,9 +5805,9 @@ japanese_schoolhouse_06 = { } parameters = { - japanese_schoolhouse_education_boost_1 = yes - increased_tutor_aptitude_6 = yes + estate_increased_tutor_aptitude_6 = yes estate_reduced_tutor_cost = yes + japanese_schoolhouse_education_boost_1 = yes estate_governor_efficiency_bonus_for_house_members = yes } @@ -6108,7 +6203,7 @@ japanese_armory_01 = { can_construct = { custom_tooltip = { text = strength_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_armory } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_armory } } } @@ -6150,7 +6245,7 @@ japanese_armory_02 = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_02 } custom_tooltip = { text = strength_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_armory } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_armory } } } @@ -6184,14 +6279,14 @@ japanese_armory_02 = { japanese_armory_03 = { construction_time = @japanese_manor_external_construction_time_tier_3 allowed_domicile_types = { japanese_manor } - internal_slots = 1 + internal_slots = 2 previous_building = japanese_armory_02 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_03 } custom_tooltip = { text = strength_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_armory } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_armory } } } @@ -6232,7 +6327,7 @@ japanese_armory_04 = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_04 } custom_tooltip = { text = strength_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_armory } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_armory } } } @@ -6267,14 +6362,14 @@ japanese_armory_04 = { japanese_armory_05 = { construction_time = @japanese_manor_external_construction_time_tier_5 allowed_domicile_types = { japanese_manor } - internal_slots = 2 + internal_slots = 3 previous_building = japanese_armory_04 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_05 } custom_tooltip = { text = strength_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_armory } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_armory } } } @@ -6308,14 +6403,14 @@ japanese_armory_05 = { japanese_armory_06 = { construction_time = @japanese_manor_external_construction_time_tier_6 allowed_domicile_types = { japanese_manor } - internal_slots = 2 + internal_slots = 3 previous_building = japanese_armory_05 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_06 } custom_tooltip = { text = strength_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_armory } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_armory } } } @@ -6923,6 +7018,11 @@ japanese_barracks_02 = { character_modifier = { knight_limit = 1 } + + parameters = { + house_head_can_ask_for_maa = yes + reduce_success_of_raid_estate = yes + } ai_value = { value = 8 @@ -6959,6 +7059,11 @@ japanese_barracks_03 = { character_modifier = { men_at_arms_limit = 1 } + + parameters = { + house_head_can_ask_for_maa = yes + reduce_success_of_raid_estate = yes + } ai_value = { value = 8 @@ -6991,6 +7096,11 @@ japanese_barracks_04 = { } } } + + parameters = { + house_head_can_ask_for_maa = yes + reduce_success_of_raid_estate = yes + } ai_value = { value = 8 @@ -7027,6 +7137,11 @@ japanese_barracks_05 = { character_modifier = { knight_limit = 1 } + + parameters = { + house_head_can_ask_for_maa = yes + reduce_success_of_raid_estate = yes + } ai_value = { value = 8 @@ -7063,6 +7178,11 @@ japanese_barracks_06 = { character_modifier = { men_at_arms_cap = 1 } + + parameters = { + house_head_can_ask_for_maa = yes + reduce_success_of_raid_estate = yes + } ai_value = { value = 8 @@ -7086,7 +7206,7 @@ japanese_watch_house_01 = { can_construct = { custom_tooltip = { text = determination_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_watch_house } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_watch_house } } } @@ -7135,7 +7255,7 @@ japanese_watch_house_02 = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_02 } custom_tooltip = { text = determination_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_watch_house } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_watch_house } } } @@ -7156,6 +7276,11 @@ japanese_watch_house_02 = { hostile_raid_time = @japanese_manor_hostile_raid_time_1 } + parameters = { + reduce_success_of_raid_estate = yes + raids_less_likely_to_make_prisoners_1_japanese = yes + } + ai_value = { value = 8 add = japanese_manor_building_ai_modifier_value @@ -7171,14 +7296,14 @@ japanese_watch_house_02 = { japanese_watch_house_03 = { construction_time = @japanese_manor_external_construction_time_tier_3 allowed_domicile_types = { japanese_manor } - internal_slots = 1 + internal_slots = 2 previous_building = japanese_watch_house_02 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_03 } custom_tooltip = { text = determination_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_watch_house } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_watch_house } } } @@ -7200,6 +7325,7 @@ japanese_watch_house_03 = { } parameters = { + reduce_success_of_raid_estate = yes raids_less_likely_to_make_prisoners_2_japanese = yes } @@ -7225,7 +7351,7 @@ japanese_watch_house_04 = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_04 } custom_tooltip = { text = determination_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_watch_house } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_watch_house } } } @@ -7246,6 +7372,11 @@ japanese_watch_house_04 = { hostile_raid_time = @japanese_manor_hostile_raid_time_1 intrigue_per_prestige_level = 1 } + + parameters = { + reduce_success_of_raid_estate = yes + raids_less_likely_to_make_prisoners_2_japanese = yes + } ai_value = { value = 8 @@ -7262,14 +7393,14 @@ japanese_watch_house_04 = { japanese_watch_house_05 = { construction_time = @japanese_manor_external_construction_time_tier_5 allowed_domicile_types = { japanese_manor } - internal_slots = 2 + internal_slots = 3 previous_building = japanese_watch_house_04 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_05 } custom_tooltip = { text = determination_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_watch_house } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_watch_house } } } @@ -7291,6 +7422,7 @@ japanese_watch_house_05 = { } parameters = { + reduce_success_of_raid_estate = yes raids_less_likely_to_make_prisoners_3_japanese = yes } @@ -7309,14 +7441,14 @@ japanese_watch_house_05 = { japanese_watch_house_06 = { construction_time = @japanese_manor_external_construction_time_tier_6 allowed_domicile_types = { japanese_manor } - internal_slots = 2 + internal_slots = 3 previous_building = japanese_watch_house_05 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_06 } custom_tooltip = { text = determination_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_watch_house } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_watch_house } } } @@ -7337,6 +7469,11 @@ japanese_watch_house_06 = { hostile_raid_time = @japanese_manor_hostile_raid_time_1 } + parameters = { + reduce_success_of_raid_estate = yes + raids_less_likely_to_make_prisoners_3_japanese = yes + } + ai_value = { value = 7 add = japanese_manor_building_ai_modifier_value @@ -7988,7 +8125,7 @@ japanese_horse_pastures_02 = { } japanese_horse_pastures_03 = { construction_time = @japanese_manor_external_construction_time_tier_3 - internal_slots = 1 + internal_slots = 2 allowed_domicile_types = { japanese_manor } previous_building = japanese_horse_pastures_02 @@ -8066,7 +8203,7 @@ japanese_horse_pastures_04 = { } japanese_horse_pastures_05 = { construction_time = @japanese_manor_external_construction_time_tier_5 - internal_slots = 2 + internal_slots = 3 allowed_domicile_types = { japanese_manor } previous_building = japanese_horse_pastures_04 @@ -8105,7 +8242,7 @@ japanese_horse_pastures_05 = { } japanese_horse_pastures_06 = { construction_time = @japanese_manor_external_construction_time_tier_6 - internal_slots = 2 + internal_slots = 3 allowed_domicile_types = { japanese_manor } previous_building = japanese_horse_pastures_05 @@ -8835,7 +8972,7 @@ japanese_tea_plantation_02 = { } japanese_tea_plantation_03 = { construction_time = @japanese_manor_external_construction_time_tier_3 - internal_slots = 1 + internal_slots = 2 allowed_domicile_types = { japanese_manor } previous_building = japanese_tea_plantation_02 @@ -8965,7 +9102,7 @@ japanese_tea_plantation_04 = { } japanese_tea_plantation_05 = { construction_time = @japanese_manor_external_construction_time_tier_5 - internal_slots = 2 + internal_slots = 3 allowed_domicile_types = { japanese_manor } previous_building = japanese_tea_plantation_04 @@ -9030,7 +9167,7 @@ japanese_tea_plantation_05 = { } japanese_tea_plantation_06 = { construction_time = @japanese_manor_external_construction_time_tier_6 - internal_slots = 2 + internal_slots = 3 allowed_domicile_types = { japanese_manor } previous_building = japanese_tea_plantation_05 @@ -9881,7 +10018,7 @@ japanese_stables_02 = { japanese_stables_03 = { construction_time = @japanese_manor_external_construction_time_tier_3 allowed_domicile_types = { japanese_manor } - internal_slots = 1 + internal_slots = 2 previous_building = japanese_stables_02 can_construct = { @@ -9967,7 +10104,7 @@ japanese_stables_04 = { japanese_stables_05 = { construction_time = @japanese_manor_external_construction_time_tier_5 allowed_domicile_types = { japanese_manor } - internal_slots = 2 + internal_slots = 3 previous_building = japanese_stables_04 can_construct = { @@ -10010,7 +10147,7 @@ japanese_stables_05 = { japanese_stables_06 = { construction_time = @japanese_manor_external_construction_time_tier_6 allowed_domicile_types = { japanese_manor } - internal_slots = 2 + internal_slots = 3 previous_building = japanese_stables_05 can_construct = { @@ -10784,7 +10921,7 @@ japanese_workshop_03 = { construction_time = @japanese_manor_external_construction_time_tier_3 allowed_domicile_types = { japanese_manor } previous_building = japanese_workshop_02 - internal_slots = 1 + internal_slots = 2 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_03 } @@ -10862,7 +10999,7 @@ japanese_workshop_05 = { construction_time = @japanese_manor_external_construction_time_tier_5 allowed_domicile_types = { japanese_manor } previous_building = japanese_workshop_04 - internal_slots = 2 + internal_slots = 3 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_05 } @@ -10901,7 +11038,7 @@ japanese_workshop_06 = { construction_time = @japanese_manor_external_construction_time_tier_6 allowed_domicile_types = { japanese_manor } previous_building = japanese_workshop_05 - internal_slots = 2 + internal_slots = 3 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_06 } @@ -11595,7 +11732,7 @@ japanese_tea_house_01 = { can_construct = { custom_tooltip = { text = ceremony_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_tea_house } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_tea_house } } } @@ -11635,7 +11772,7 @@ japanese_tea_house_02 = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_02 } custom_tooltip = { text = ceremony_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_tea_house } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_tea_house } } } @@ -11667,14 +11804,14 @@ japanese_tea_house_02 = { japanese_tea_house_03 = { construction_time = @japanese_manor_external_construction_time_tier_3 allowed_domicile_types = { japanese_manor } - internal_slots = 1 + internal_slots = 2 previous_building = japanese_tea_house_02 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_03 } custom_tooltip = { text = ceremony_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_tea_house } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_tea_house } } } @@ -11706,14 +11843,14 @@ japanese_tea_house_03 = { japanese_tea_house_04 = { construction_time = @japanese_manor_external_construction_time_tier_4 allowed_domicile_types = { japanese_manor } - internal_slots = 1 + internal_slots = 2 previous_building = japanese_tea_house_03 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_04 } custom_tooltip = { text = ceremony_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_tea_house } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_tea_house } } } @@ -11746,14 +11883,14 @@ japanese_tea_house_04 = { japanese_tea_house_05 = { construction_time = @japanese_manor_external_construction_time_tier_5 allowed_domicile_types = { japanese_manor } - internal_slots = 1 + internal_slots = 3 previous_building = japanese_tea_house_04 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_05 } custom_tooltip = { text = ceremony_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_tea_house } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_tea_house } } } @@ -11785,14 +11922,14 @@ japanese_tea_house_05 = { japanese_tea_house_06 = { construction_time = @japanese_manor_external_construction_time_tier_6 allowed_domicile_types = { japanese_manor } - internal_slots = 1 + internal_slots = 3 previous_building = japanese_tea_house_05 can_construct = { domicile ?= { has_domicile_building_or_higher = japanese_manor_main_06 } custom_tooltip = { text = ceremony_house_power_tt - house = { has_house_power_parameter = unlocks_japanese_manor_tea_house } + house = { has_house_aspiration_parameter = unlocks_japanese_manor_tea_house } } } @@ -11882,6 +12019,10 @@ japanese_guest_house_02 = { character_modifier = { owned_personal_scheme_success_chance_add = @japanese_manor_owned_scheme_success_chance_add } + + parameters = { + estate_unlock_ingratiate_family_interaction = yes + } ai_value = { value = 6 @@ -11919,6 +12060,10 @@ japanese_guest_house_03 = { owned_personal_scheme_success_chance_add = @japanese_manor_owned_scheme_success_chance_add max_personal_schemes_add = 1 } + + parameters = { + estate_unlock_ingratiate_family_interaction = yes + } ai_value = { value = 5 @@ -11957,6 +12102,10 @@ japanese_guest_house_04 = { personal_scheme_phase_duration_add = @japanese_manor_owned_scheme_phase_duration_add owned_personal_scheme_success_chance_add = @japanese_manor_owned_scheme_success_chance_add } + + parameters = { + estate_unlock_ingratiate_family_interaction = yes + } ai_value = { value = 4 @@ -11995,6 +12144,10 @@ japanese_guest_house_05 = { personal_scheme_phase_duration_add = @japanese_manor_owned_scheme_phase_duration_add owned_personal_scheme_success_chance_add = @japanese_manor_owned_scheme_success_chance_add } + + parameters = { + estate_unlock_ingratiate_family_interaction = yes + } ai_value = { value = 4 @@ -12033,6 +12186,10 @@ japanese_guest_house_06 = { personal_scheme_phase_duration_add = @japanese_manor_owned_scheme_phase_duration_add owned_personal_scheme_success_chance_add = @japanese_manor_owned_scheme_success_chance_add } + + parameters = { + estate_unlock_ingratiate_family_interaction = yes + } ai_value = { value = 4 @@ -12093,6 +12250,10 @@ japanese_performance_stage_02 = { personal_scheme_phase_duration_add = @japanese_manor_owned_scheme_phase_duration_add owned_personal_scheme_success_chance_add = @japanese_manor_owned_scheme_success_chance_add } + + parameters = { + estate_improved_feast_opinion = yes + } ai_value = { value = 6 @@ -12123,6 +12284,10 @@ japanese_performance_stage_03 = { personal_scheme_phase_duration_add = @japanese_manor_owned_scheme_phase_duration_add owned_personal_scheme_success_chance_add = @japanese_manor_owned_scheme_success_chance_add } + + parameters = { + estate_improved_feast_opinion = yes + } ai_value = { value = 5 @@ -12154,6 +12319,10 @@ japanese_performance_stage_04 = { personal_scheme_phase_duration_add = @japanese_manor_owned_scheme_phase_duration_add owned_personal_scheme_success_chance_add = @japanese_manor_owned_scheme_success_chance_add } + + parameters = { + estate_improved_feast_opinion = yes + } ai_value = { value = 4 @@ -12185,6 +12354,10 @@ japanese_performance_stage_05 = { personal_scheme_phase_duration_add = @japanese_manor_owned_scheme_phase_duration_add owned_personal_scheme_success_chance_add = @japanese_manor_owned_scheme_success_chance_add } + + parameters = { + estate_improved_feast_opinion = yes + } ai_value = { value = 4 @@ -12214,6 +12387,10 @@ japanese_performance_stage_06 = { character_modifier = { dynasty_house_opinion = @japanese_manor_opinion_add_1 } + + parameters = { + estate_improved_feast_opinion = yes + } ai_value = { value = 4 @@ -12510,7 +12687,7 @@ japanese_garden_02 = { japanese_garden_03 = { construction_time = @japanese_manor_external_construction_time_tier_3 allowed_domicile_types = { japanese_manor } - internal_slots = 1 + internal_slots = 2 previous_building = japanese_garden_02 can_construct = { @@ -12596,7 +12773,7 @@ japanese_garden_04 = { japanese_garden_05 = { construction_time = @japanese_manor_external_construction_time_tier_5 allowed_domicile_types = { japanese_manor } - internal_slots = 2 + internal_slots = 3 previous_building = japanese_garden_04 can_construct = { @@ -12639,7 +12816,7 @@ japanese_garden_05 = { japanese_garden_06 = { construction_time = @japanese_manor_external_construction_time_tier_6 allowed_domicile_types = { japanese_manor } - internal_slots = 2 + internal_slots = 3 previous_building = japanese_garden_05 can_construct = { diff --git a/common/factions/00_factions.txt b/common/factions/00_factions.txt index 35fc2ecf..8ad7e5e8 100644 --- a/common/factions/00_factions.txt +++ b/common/factions/00_factions.txt @@ -297,6 +297,15 @@ } } + trigger_if = { + limit = { + government_allows = administrative + } + custom_tooltip = { + text = admin_high_tier_vassal_create_faction + highest_held_title_tier >= tier_kingdom + } + } #PROPPA CONFEDERATION VASSALS trigger_if = { limit = { @@ -371,6 +380,15 @@ } } + trigger_if = { + limit = { + government_allows = administrative + } + custom_tooltip = { + text = admin_high_tier_vassal_create_faction + highest_held_title_tier >= tier_kingdom + } + } #PROPPA CONFEDERATION VASSALS trigger_if = { limit = { @@ -417,6 +435,15 @@ } } + trigger_if = { + limit = { + government_allows = administrative + } + custom_tooltip = { + text = admin_high_tier_vassal_join_faction + highest_held_title_tier >= tier_kingdom + } + } #PROPPA CONFEDERATION VASSALS trigger_if = { limit = { @@ -672,97 +699,15 @@ liberty_faction = { # Bloc Cohesion requirement japan_faction_cohesion_trigger = yes - trigger_if = { - limit = { scope:target = { realm_law_use_imperial_bureaucracy = yes } } - custom_description = { - text = has_lowest_imperial_bureaucracy - subject = scope:target - scope:target = { - OR = { - has_realm_law = imperial_bureaucracy_1 - has_realm_law = imperial_bureaucracy_2 - has_realm_law = imperial_bureaucracy_3 - } - } - } - } - trigger_else_if = { - limit = { scope:target = { government_has_flag = government_is_tribal } } - custom_description = { - text = has_lowest_tribal_authority - subject = scope:target - scope:target = { - OR = { - has_realm_law = tribal_authority_1 - has_realm_law = tribal_authority_2 - has_realm_law = tribal_authority_3 - } - } - } - } - trigger_else_if = { - limit = { scope:target = { realm_law_use_celestial_bureaucracy = yes } } - custom_description = { - text = has_lowest_celestial_bureaucracy - subject = scope:target - scope:target = { - OR = { - has_realm_law = celestial_bureaucracy_1 - has_realm_law = celestial_bureaucracy_2 - has_realm_law = celestial_bureaucracy_3 - } - } - } - } - trigger_else_if = { - limit = { scope:target = { realm_law_use_meritocratic_bureaucracy = yes } } - custom_description = { - text = has_lowest_meritocratic_bureaucracy - subject = scope:target - scope:target = { - OR = { - has_realm_law = meritocratic_bureaucracy_1 - has_realm_law = meritocratic_bureaucracy_2 - has_realm_law = meritocratic_bureaucracy_3 - } - } - } - } - trigger_else_if = { - limit = { scope:target = { realm_law_use_japanese_bureaucracy = yes } } - custom_description = { - text = has_lowest_japanese_bureaucracy - subject = scope:target - scope:target = { - OR = { - has_realm_law = japanese_bureaucracy_1 - has_realm_law = japanese_bureaucracy_2 - has_realm_law = japanese_bureaucracy_3 - } - } - } - } - trigger_else = { - custom_description = { - text = has_lowest_crown_authority - subject = scope:target - scope:target = { - OR = { - has_realm_law = crown_authority_1 - has_realm_law = crown_authority_2 - has_realm_law = crown_authority_3 - } - } - } + has_valid_realm_laws_for_liberty_faction_trigger = { + TARGET = scope:target } trigger_if = { limit = { - scope:target = { government_has_flag = government_is_administrative } - } - scope:target = { - top_liege = this + scope:target = { government_allows = administrative } } + is_vassal_of = scope:target.top_liege } } @@ -781,9 +726,7 @@ liberty_faction = { limit = { scope:target = { government_allows = administrative } } - scope:target = { - top_liege = this - } + is_vassal_of = scope:target.top_liege } } @@ -802,9 +745,7 @@ liberty_faction = { limit = { scope:faction.faction_target = { government_allows = administrative } } - scope:faction.faction_target = { - top_liege = this - } + is_vassal_of = scope:faction.faction_target } } @@ -1031,22 +972,15 @@ claimant_faction = { # Ministers cannot be claimants unless we are targeting h_china trigger_if = { limit = { - OR = { - has_title = title:e_minister_chancellor - has_title = title:e_minister_censor - has_title = title:e_minister_grand_marshal - has_title = title:e_minister_of_personnel - has_title = title:e_minister_of_revenue - has_title = title:e_minister_of_rites - has_title = title:e_minister_of_war - has_title = title:e_minister_of_justice - has_title = title:e_minister_of_works - } + tgp_has_minister_title = yes } custom_description = { text = target_is_a_minister_desc subject = this - root.special_title = { this = title:h_china } + any_held_title = { + tgp_is_minister_title = yes + de_jure_liege = root.special_title + } } } } diff --git a/common/game_concepts/00_game_concepts.txt b/common/game_concepts/00_game_concepts.txt index a4e38797..4041201d 100644 --- a/common/game_concepts/00_game_concepts.txt +++ b/common/game_concepts/00_game_concepts.txt @@ -1265,12 +1265,36 @@ illness = { texture = "gfx/interface/icons/traits/ill.dds" } +clouded_eyes_mitigation = { + texture = "gfx/interface/icons/traits/clouded_eyes.dds" + parent = elder_traits +} + +fragile_bones_mitigation = { + texture = "gfx/interface/icons/traits/fragile_bones.dds" + parent = elder_traits +} + +withering_mind_mitigation = { + texture = "gfx/interface/icons/traits/withering_mind.dds" + parent = elder_traits +} + +infirm_mitigation = { + texture = "gfx/interface/icons/traits/infirm.dds" + parent = elder_traits +} + +elder_traits = { + texture = "gfx/interface/icons/traits/faltering_heart.dds" +} + medical_treatments = { texture = "gfx/interface/icons/traits/ill.dds" } occupation = { - alias = {occupy occupying occupied occupations} + alias = {occupy occupying occupied occupations occupies} } fortified_holding = { @@ -1305,6 +1329,7 @@ physical_trait = { fame_trait = { texture = "gfx/interface/icons/traits/augustus.dds" parent = trait + alias = { fame_traits } } health_trait = { @@ -3216,6 +3241,10 @@ state_faith = { parent = faith } +story_cycle = { + alias = { story_cycles } +} + story_content_hereward = { texture = "gfx/interface/icons/court_position_types/champion_court_position.dds" shown_in_encyclopedia = no diff --git a/common/governments/00_government_types.txt b/common/governments/00_government_types.txt index ca05baac..5d662c65 100644 --- a/common/governments/00_government_types.txt +++ b/common/governments/00_government_types.txt @@ -8,6 +8,7 @@ feudal_government = { rulers_should_have_dynasty = yes dynasty_named_realms = no legitimacy = yes + allow_accolades = yes } royal_court = any @@ -134,9 +135,17 @@ theocracy_government = { can_get_government = { NOT = { - faith = { - has_doctrine = doctrine_theocracy_lay_clergy + faith = { has_doctrine = doctrine_theocracy_lay_clergy } + } + #The LAAMP Construct Holding decision + trigger_if = { + limit = { + OR = { + has_variable = city_construction_is_temple_citadel + has_variable = city_construction_is_castle + } } + always = no } } @@ -165,6 +174,7 @@ clan_government = { legitimacy = yes dynasty_named_realms = no always_use_patronym = yes + allow_accolades = yes } royal_court = any @@ -245,6 +255,7 @@ tribal_government = { legitimacy = yes always_use_patronym = yes affected_by_development = no + allow_accolades = yes } royal_court = any @@ -305,6 +316,7 @@ wanua_government = { # "Wanua" gain_legitimacy_becoming_tributary = yes regiments_use_barter_goods_as_gold = yes barter = yes + allow_accolades = yes } royal_court = any @@ -347,6 +359,7 @@ wanua_government = { # "Wanua" flags = { government_is_tribal government_is_wanua + government_is_settled government_can_raid_rule government_enables_naval_raiding government_enables_river_travel @@ -368,6 +381,7 @@ mercenary_government = { court_generate_spouses = no council = no inherit_from_dynastic_government = no + allow_accolades = no } court_generate_commanders = 5 @@ -406,6 +420,7 @@ holy_order_government = { council = no court_generate_spouses = no inherit_from_dynastic_government = no + allow_accolades = no } court_generate_commanders = 5 @@ -450,6 +465,7 @@ administrative_government = { administrative = yes use_as_base_on_landed = yes use_as_base_on_rank_up = yes + allow_as_base_for_baronies = no inherit_from_dynastic_government = no sticky_government = yes house_aspirations = yes @@ -457,9 +473,11 @@ administrative_government = { admin_allows_holding_multiple_primary_tier_titles = yes treasury = yes replace_gold_cost_by_treasury = yes + allow_accolades = yes } - royal_court = top_liege + royal_court = any + blocked_subject_courts = { meritocratic_government celestial_government japan_administrative_government administrative_government steppe_admin_government } domicile_type = estate main_administrative_tier = duchy @@ -474,6 +492,19 @@ administrative_government = { vassal_contract_group = admin_vassal + can_get_government = { + #The LAAMP Construct Holding decision + trigger_if = { + limit = { + OR = { + has_variable = city_construction_is_temple_citadel + has_variable = city_construction_is_castle + } + } + always = no + } + } + character_modifier = { levy_size = -0.5 feudal_government_tax_contribution_mult = -0.5 @@ -484,7 +515,7 @@ administrative_government = { men_at_arms_limit = -2 knight_limit = -5 vassal_limit = 100 - active_accolades = -1 + accolades = -1 title_creation_cost_mult = -0.5 mercenary_hire_cost_mult = 2 men_at_arms_maintenance = 0.5 @@ -545,6 +576,7 @@ landless_adventurer_government = { allow_out_of_realm_inheritance = yes use_as_base_on_landed = yes use_maa_maintenance = no + allow_accolades = no } domicile_type = camp @@ -560,7 +592,6 @@ landless_adventurer_government = { valid_holdings = { tribal_holding church_holding castle_holding city_holding temple_citadel_holding } character_modifier = { - active_accolades = -100 knight_limit = 2 men_at_arms_cap = -3 men_at_arms_limit = -2 @@ -872,6 +903,7 @@ nomad_government = { no_capital_movement_cooldown = yes affected_by_development = no buildings = no + allow_accolades = yes } royal_court = any @@ -888,6 +920,10 @@ nomad_government = { vassal_contract_group = nomad_vassal + can_get_government = { + has_mpo_dlc_trigger = yes + } + character_modifier = { steppe_travel_danger = steppe_high_danger_reduction plains_travel_danger = steppe_high_danger_reduction @@ -955,11 +991,11 @@ herder_government = { deny_powerful_vassal = yes redirects_wars_to_overlord = yes buildings = no + allow_accolades = no } character_modifier = { knight_limit = -100 - active_accolades = -100 county_opinion_add = 100 monthly_income_mult = -10 } @@ -1006,6 +1042,7 @@ celestial_government = { legitimacy = yes use_as_base_on_landed = yes use_as_base_on_rank_up = yes + allow_as_base_for_baronies = no inherit_from_dynastic_government = no sticky_government = yes house_aspirations = yes @@ -1017,9 +1054,12 @@ celestial_government = { replace_gold_cost_by_treasury = yes block_alliance_child_marriage = yes admin_allows_holding_multiple_primary_tier_titles = no + disable_regnal_numbers = yes + allow_accolades = yes } - royal_court = top_liege + royal_court = any + blocked_subject_courts = { meritocratic_government celestial_government japan_administrative_government administrative_government steppe_admin_government } domicile_type = east_asian_estate main_administrative_tier = duchy @@ -1030,7 +1070,7 @@ celestial_government = { fallback = 3 primary_holding = castle_holding - valid_holdings = { city_holding temple_citadel_holding } + valid_holdings = { city_holding temple_citadel_holding tribal_holding } required_county_holdings = { castle_holding city_holding church_holding } vassal_contract_group = celestial_vassal @@ -1045,7 +1085,7 @@ celestial_government = { men_at_arms_limit = -2 knight_limit = -5 vassal_limit = 20 - active_accolades = -1 + accolades = -1 character_max_merit_level_add = 1 mercenary_hire_cost_mult = 2 @@ -1130,6 +1170,7 @@ mandala_government = { count_tributaries_for_title_requirements = yes radiance = yes + allow_accolades = yes } royal_court = any @@ -1142,8 +1183,18 @@ mandala_government = { has_tgp_dlc_trigger = yes always = no OR = { - liege = { has_government = mandala_government } - highest_held_title_tier > tier_barony + liege ?= { has_government = mandala_government } + is_independent_ruler = yes + } + #The LAAMP Construct Holding decision + trigger_if = { + limit = { + OR = { + has_variable = city_construction_is_temple_citadel + has_variable = city_construction_is_castle + } + } + capital_province = { has_holding_type = temple_citadel_holding } } } @@ -1288,6 +1339,7 @@ steppe_admin_government = { legitimacy = yes use_as_base_on_rank_up = yes use_as_base_on_landed = yes + allow_as_base_for_baronies = no inherit_from_dynastic_government = no sticky_government = yes house_aspirations = yes @@ -1299,9 +1351,12 @@ steppe_admin_government = { replace_gold_cost_by_treasury = yes government_ignores_rightful_liege_penalties = yes deny_powerful_vassal = yes + disable_regnal_numbers = yes + allow_accolades = yes } royal_court = any + blocked_subject_courts = { meritocratic_government celestial_government japan_administrative_government administrative_government steppe_admin_government } domicile_type = east_asian_estate @@ -1310,7 +1365,7 @@ steppe_admin_government = { minimum_provincial_maa_tier = duchy primary_holding = castle_holding - valid_holdings = { city_holding temple_citadel_holding } + valid_holdings = { city_holding temple_citadel_holding tribal_holding } required_county_holdings = { castle_holding city_holding church_holding } vassal_contract_group = meritocratic_vassal @@ -1326,8 +1381,8 @@ steppe_admin_government = { men_at_arms_cap = -2 men_at_arms_limit = -2 knight_limit = -5 - vassal_limit = 100 - active_accolades = -1 + vassal_limit = 20 + accolades = -1 ignore_negative_opinion_of_culture = yes movement_speed = 0.1 movement_speed_land_raiding = 0.1 @@ -1381,6 +1436,7 @@ steppe_admin_government = { can_raze_holdings government_is_settled government_uses_domicile_but_not_adventurer + government_uses_domain_limit government_uses_admin_province_obligations government_uses_merit_family_aspirations has_special_house_aspirations @@ -1409,6 +1465,7 @@ meritocratic_government = { # e.g. Korea, Dai Viet legitimacy = yes use_as_base_on_landed = yes use_as_base_on_rank_up = yes + allow_as_base_for_baronies = no inherit_from_dynastic_government = no sticky_government = yes house_aspirations = yes @@ -1418,9 +1475,12 @@ meritocratic_government = { # e.g. Korea, Dai Viet treasury = yes replace_gold_cost_by_treasury = yes deny_powerful_vassal = yes + disable_regnal_numbers = yes + allow_accolades = yes } royal_court = any + blocked_subject_courts = { meritocratic_government celestial_government japan_administrative_government administrative_government steppe_admin_government } domicile_type = east_asian_estate main_administrative_tier = duchy @@ -1428,7 +1488,7 @@ meritocratic_government = { # e.g. Korea, Dai Viet minimum_provincial_maa_tier = duchy primary_holding = castle_holding - valid_holdings = { city_holding temple_citadel_holding } + valid_holdings = { city_holding temple_citadel_holding tribal_holding } required_county_holdings = { castle_holding city_holding church_holding } vassal_contract_group = meritocratic_vassal @@ -1442,8 +1502,8 @@ meritocratic_government = { # e.g. Korea, Dai Viet men_at_arms_cap = -2 men_at_arms_limit = -2 knight_limit = -5 - vassal_limit = 100 - active_accolades = -1 + vassal_limit = 20 + accolades = -1 title_creation_cost_mult = -0.5 character_max_merit_level_add = 2 mercenary_hire_cost_mult = 2 @@ -1478,7 +1538,6 @@ meritocratic_government = { # e.g. Korea, Dai Viet can_get_government = { has_tgp_dlc_trigger = yes - always = no } # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). diff --git a/common/laws/00_succession_laws.txt b/common/laws/00_succession_laws.txt index e53c1b25..5d0f8a8f 100644 --- a/common/laws/00_succession_laws.txt +++ b/common/laws/00_succession_laws.txt @@ -708,6 +708,7 @@ government_has_flag = government_is_celestial government_has_flag = government_is_japan_administrative government_has_flag = government_is_meritocratic + government_has_flag = government_is_steppe_admin } is_independent_ruler = no } @@ -1231,6 +1232,7 @@ } flag = advanced_succession_law flag = appointment_type_succession + flag = appointment_with_level_requirement modifier = { glory_hound_opinion = -10 courtly_opinion = 5 @@ -1302,6 +1304,7 @@ } flag = advanced_succession_law flag = appointment_type_succession + flag = appointment_with_level_requirement modifier = { glory_hound_opinion = 5 courtly_opinion = -10 @@ -1380,17 +1383,30 @@ japanese_appointment_succession_law = { can_keep = { can_keep_japanese_appointment_succession_law_trigger = yes + custom_tooltip = { + text = celestial_military_appointment_allowed_desc + NOT = { vassal_contract_has_flag = japan_administrative_military_appointment } + } } can_pass = { can_change_japanese_appointment_succession_law_trigger = yes + custom_tooltip = { + text = celestial_military_appointment_allowed_desc + NOT = { vassal_contract_has_flag = japan_administrative_military_appointment } + } } can_have = { can_have_japanese_appointment_succession_law_trigger = yes + custom_tooltip = { + text = celestial_military_appointment_allowed_desc + NOT = { vassal_contract_has_flag = japan_administrative_military_appointment } + } } should_start_with = { government_has_flag = government_is_japan_administrative is_independent_ruler = no NOT = { has_title = title:k_chrysanthemum_throne } + NOT = { vassal_contract_has_flag = japan_administrative_military_appointment } } succession = { order_of_succession = appointment @@ -1449,11 +1465,13 @@ can_have = { government_allows = administrative is_independent_ruler = no + vassal_contract_has_flag = japan_administrative_military_appointment } can_pass = { can_change_succession_law_trigger = yes government_allows = administrative is_independent_ruler = no + vassal_contract_has_flag = japan_administrative_military_appointment } should_start_with = { government_has_flag = government_is_japan_administrative @@ -1538,7 +1556,7 @@ government_allows = administrative is_independent_ruler = no custom_tooltip = { - text = celestial_military_appointment_allowed_desc + text = celestial_appointment_allowed_desc NOT = { vassal_contract_has_flag = meritocratic_military_appointment } } # Vassal Contract allows it @@ -1565,7 +1583,7 @@ } is_independent_ruler = no custom_tooltip = { - text = celestial_military_appointment_allowed_desc + text = celestial_appointment_allowed_desc NOT = { vassal_contract_has_flag = meritocratic_military_appointment } } } @@ -1575,6 +1593,7 @@ } flag = advanced_succession_law flag = appointment_type_succession + flag = appointment_with_level_requirement modifier = { glory_hound_opinion = -10 courtly_opinion = 5 @@ -1602,7 +1621,10 @@ } potential = { - government_has_flag = government_is_meritocratic + OR = { + government_has_flag = government_is_steppe_admin + government_has_flag = government_is_meritocratic + } is_independent_ruler = no } } @@ -1649,6 +1671,7 @@ } flag = advanced_succession_law flag = appointment_type_succession + flag = appointment_with_level_requirement modifier = { glory_hound_opinion = -10 courtly_opinion = 5 @@ -1676,7 +1699,10 @@ } potential = { - government_has_flag = government_is_meritocratic + OR = { + government_has_flag = government_is_steppe_admin + government_has_flag = government_is_meritocratic + } is_independent_ruler = no } } diff --git a/common/laws/01_title_succession_laws.txt b/common/laws/01_title_succession_laws.txt index c7e2c02c..0ece08c4 100644 --- a/common/laws/01_title_succession_laws.txt +++ b/common/laws/01_title_succession_laws.txt @@ -79,11 +79,7 @@ can_change_title_law_trigger = yes } can_title_have = { - tier >= tier_county - is_temporal_head_of_faith_trigger = no - NOT = { - is_nomad_title = yes - } + can_title_have_law_general_trigger = yes } succession = { order_of_succession = election @@ -360,16 +356,7 @@ can_pass = { } can_title_have = { - OR = { - this = title:e_minister_chancellor - this = title:e_minister_censor - this = title:e_minister_of_personnel - this = title:e_minister_of_revenue - this = title:e_minister_of_rites - this = title:e_minister_of_war - this = title:e_minister_of_justice - this = title:e_minister_of_works - } + tgp_is_civilian_minister_title = yes } can_realm_have = { always = no @@ -388,6 +375,7 @@ celestial_government_opinion = 5 } flag = appointment_type_succession + flag = appointment_with_level_requirement } # Celestial Grand Marshal Succession @@ -421,6 +409,7 @@ celestial_government_opinion = 5 } flag = appointment_type_succession + flag = appointment_with_level_requirement } } diff --git a/common/laws/_laws.info b/common/laws/_laws.info index 6716e264..8815dc0f 100644 --- a/common/laws/_laws.info +++ b/common/laws/_laws.info @@ -269,8 +269,9 @@ faith = same_faith ### brief: create_primary_tier_titles ( bool, optional ) - # If set, then under partition all titles you can create of your primary - # tier will be created for free, resulting in a more split-up realm + # If set and under partition, titles you can create of your primary tier + # ( up to your number of secondary heirs ) will be created for free, + # resulting in a more split-up realm # default = no # create_primary_tier_titles = no diff --git a/common/men_at_arms_types/_men_at_arms_types.info b/common/men_at_arms_types/_men_at_arms_types.info index 40a4a4f8..cad53fec 100644 --- a/common/men_at_arms_types/_men_at_arms_types.info +++ b/common/men_at_arms_types/_men_at_arms_types.info @@ -57,6 +57,7 @@ holy_order_fallback = no # Holy order will have a lower priority to use this type allowed_in_hired_troops = yes # MaA type can be used in hired troops max_sub_regiments = -1 # If positive, only one reginemt of this type can be created, and have this maximum size. Unaffected by bonuses to MaA regiment size + max_regiments = -1 # If positive, only this number of this type can be created. provision_cost = 0 # The amount of provison cost for this MAA type when moving your domicile } diff --git a/common/modifier_definition_formats/00_definitions.txt b/common/modifier_definition_formats/00_definitions.txt index 06778472..2a964901 100644 --- a/common/modifier_definition_formats/00_definitions.txt +++ b/common/modifier_definition_formats/00_definitions.txt @@ -33,6 +33,43 @@ prowess_no_portrait = { prefix = MOD_PROWESS_PREFIX } +diplomacy_mult = { + decimals = 0 + percent = yes + prefix = MOD_DIPLOMACY_PREFIX +} + +martial_mult = { + decimals = 0 + percent = yes + prefix = MOD_MARTIAL_PREFIX +} + +stewardship_mult = { + decimals = 0 + percent = yes + prefix = MOD_STEWARDSHIP_PREFIX +} + +intrigue_mult = { + decimals = 0 + percent = yes + prefix = MOD_INTRIGUE_PREFIX +} + +learning_mult = { + decimals = 0 + percent = yes + prefix = MOD_LEARNING_PREFIX +} + +prowess_mult = { + decimals = 0 + percent = yes + prefix = MOD_PROWESS_PREFIX +} + + negate_diplomacy_penalty_add = { decimals = 0 prefix = MOD_DIPLOMACY_PREFIX @@ -2358,23 +2395,6 @@ domicile_monthly_gold_add = { suffix = MOD_MONTHLY_POSTFIX } -domicile_monthly_barter_goods = { - decimals = 2 - prefix = MOD_MONTHLY_BARTER_GOODS_PREFIX - suffix = MOD_MONTHLY_POSTFIX -} - -domicile_monthly_barter_goods_mult = { - decimals = 0 - prefix = MOD_MONTHLY_BARTER_GOODS_PREFIX - percent = yes -} -domicile_monthly_barter_goods_add = { - decimals = 2 - prefix = MOD_MONTHLY_BARTER_GOODS_PREFIX - suffix = MOD_MONTHLY_POSTFIX -} - domicile_monthly_prestige_add = { decimals = 2 prefix = MOD_MONTHLY_PRESTIGE_PREFIX @@ -2762,7 +2782,7 @@ strife_opinion_loss_mult = { percent = yes } -active_accolades = { +accolades = { decimals = 0 dlc_feature = accolades } diff --git a/common/modifiers/00_province_modifiers.txt b/common/modifiers/00_province_modifiers.txt index 72d8491d..f4d97aef 100644 --- a/common/modifiers/00_province_modifiers.txt +++ b/common/modifiers/00_province_modifiers.txt @@ -72,7 +72,7 @@ flourishing_culture_modifier = { } hungarian_resettlement_modifier = { - icon = horse_positive + icon = horse_mixed county_opinion_add = -10 build_speed = -0.1 development_growth_factor = small_development_growth_gain @@ -167,10 +167,12 @@ winter_harsh_modifier = { # End of winter modifiers spurned_by_traders = { + icon = social_negative development_growth_factor = -0.25 } elevate_mann_and_the_isles_modifier = { + icon = social_positive development_growth_factor = 0.5 levy_size = 1 tax_mult = 0.5 @@ -208,7 +210,7 @@ wayfarer_astronomical_phenomenon = { } innkeeper_bad_result = { - icon = county_modifier_development_negative + icon = county_modifier_development_mixed monthly_income = 0.5 county_opinion_add = -20 } diff --git a/common/on_action/army_on_actions.txt b/common/on_action/army_on_actions.txt index 587b2a56..561fff82 100644 --- a/common/on_action/army_on_actions.txt +++ b/common/on_action/army_on_actions.txt @@ -58,6 +58,189 @@ on_army_monthly = { # scope:war is the war causing the previous controller and the occupant to be hostile on_county_occupied = { effect = { + random = { # chance of granting a knight eligibility for marauder / besieger accolade + chance = 2 + modifier = { + factor = accolade_progress + } + modifier = { + NOT = { + any_knight = { + OR = { + can_be_acclaimed = yes + accolade ?= { + accolade_can_have_more_attributes = yes + } + } + knight_army ?= { + location.county = scope:county + } + OR = { + AND = { # needed for besieger + knight_army ?= { + any_army_maa_regiment = { + is_unit_type = siege_weapon + } + } + besieger_attribute_trigger = no + } + AND = { # needed for marauder + NOT = { + has_trait = compassionate + } + marauder_attribute_trigger = no + } + } + } + } + factor = 0 + } + set_variable = { + name = accolade_progress + value = 0 + } + random_list = { + 10 = { # marauder + trigger = { + any_knight = { + OR = { + can_be_acclaimed = yes + accolade ?= { + accolade_can_have_more_attributes = yes + } + } + knight_army ?= { + location.county = scope:county + } + NOT = { + has_trait = compassionate + } + marauder_attribute_trigger = no + } + } + random_knight = { + limit = { + OR = { + can_be_acclaimed = yes + accolade ?= { + accolade_can_have_more_attributes = yes + } + } + knight_army ?= { + location.county = scope:county + } + NOT = { + has_trait = compassionate + } + marauder_attribute_trigger = no + } + weight = { + base = 1 + modifier = { + add = 60 + is_acclaimed = yes + } + modifier = { + add = 30 + has_trait = sadistic + } + modifier = { + add = 30 + has_trait = callous + } + modifier = { + add = 30 + has_trait = wrathful + } + modifier = { + add = 30 + has_trait = greedy + } + } + save_scope_as = marauder + } + send_interface_message = { + type = msg_accolade_eligibility + title = accolade_marauder_unlock.t + left_icon = scope:marauder + right_icon = scope:recipient + custom_tooltip = accolade_marauder_unlock.tt + scope:marauder = { + set_variable = { + name = marauder_attribute_unlock + value = yes + } + } + } + } + 10 = { # besieger + trigger = { + any_knight = { + OR = { + can_be_acclaimed = yes + accolade ?= { + accolade_can_have_more_attributes = yes + } + } + knight_army ?= { + location.county = scope:county + any_army_maa_regiment = { + is_unit_type = siege_weapon + } + } + besieger_attribute_trigger = no + } + } + random_knight = { + limit = { + OR = { + can_be_acclaimed = yes + accolade ?= { + accolade_can_have_more_attributes = yes + } + } + knight_army ?= { + location.county = scope:county + any_army_maa_regiment = { + is_unit_type = siege_weapon + } + } + besieger_attribute_trigger = no + } + weight = { + base = 1 + modifier = { + add = 60 + is_acclaimed = yes + } + modifier = { + add = 30 + has_trait = calm + } + modifier = { + add = 30 + has_trait = patient + } + } + save_scope_as = besieger + } + send_interface_message = { + type = msg_accolade_eligibility + title = accolade_besieger_unlock.t + left_icon = scope:besieger + right_icon = scope:recipient + custom_tooltip = accolade_besieger_unlock.tt + scope:besieger = { + set_variable = { + name = besieger_attribute_unlock + value = yes + } + } + } + } + } + + } scope:county = { if = { limit = { @@ -186,28 +369,28 @@ on_county_occupied = { limit = { house ?= { OR = { - has_house_power_parameter = occupations_give_bonuses_1 - has_house_power_parameter = occupations_give_bonuses_2 - has_house_power_parameter = occupations_give_bonuses_3 + has_house_aspiration_parameter = occupations_give_bonuses_1 + has_house_aspiration_parameter = occupations_give_bonuses_2 + has_house_aspiration_parameter = occupations_give_bonuses_3 } } } send_interface_message = { type = msg_siege_effect - title = tactical_besiegers_house_power + title = tactical_besiegers_house_aspiration left_icon = root right_icon = scope:barony if = { limit = { - house = { has_house_power_parameter = occupations_give_bonuses_3 } + house = { has_house_aspiration_parameter = occupations_give_bonuses_3 } } add_gold = occupations_give_bonuses_3_value change_influence = occupations_give_bonuses_3_value } else_if = { limit = { - house = { has_house_power_parameter = occupations_give_bonuses_2 } + house = { has_house_aspiration_parameter = occupations_give_bonuses_2 } } add_gold = occupations_give_bonuses_2_value change_influence = occupations_give_bonuses_2_value diff --git a/common/on_action/death.txt b/common/on_action/death.txt index 3d9acb68..49f6f08a 100644 --- a/common/on_action/death.txt +++ b/common/on_action/death.txt @@ -516,48 +516,44 @@ on_death = { # EP2 - Handle Grand Wedding betrothals if = { - limit = { - is_ai = no + limit = { # You have promised someone else in a grand marriage has_variable = promised_grand_wedding_marriage_countdown - exists = player_heir + var:promised_grand_wedding_marriage_countdown != this } - var:promised_grand_wedding_marriage_countdown = { save_scope_as = temp_marriage_scope } - player_heir = { - set_variable = { - name = promised_grand_wedding_marriage_countdown - value = prev.var:promised_grand_wedding_marriage_countdown - years = grand_wedding_timeout_alt + if = { # Find a player heir or primary heir that hasn't ALSO promised a grand wedding + limit = { + player_heir ?= { NOT = { has_variable = promised_grand_wedding_marriage_countdown } } } - # Notification that the countdown has expired (one day before, to avoid getting the variable deleted before we have used it) - trigger_event = { - id = ep2_wedding.0001 - days = grand_wedding_timeout_notification_alt + player_heir = { save_scope_as = new_wedding_host } + } + else_if = { + limit = { + primary_heir ?= { NOT = { has_variable = promised_grand_wedding_marriage_countdown } } + } + primary_heir = { save_scope_as = new_wedding_host } + } + if = { # If such an heir exists, copy all involved scopes, clean up, and recreate the promise on all relevant characters + limit = { + exists = scope:new_wedding_host + has_variable = promised_grand_wedding_to + } + var:promised_grand_wedding_marriage_countdown = { + save_scope_as = spouse_1 + betrothed = { save_scope_as = spouse_2 } + } + var:promised_grand_wedding_to = { + save_scope_as = promisee + } + clean_grand_wedding_betrothal_variables = yes + set_grand_wedding_betrothal_variables = { + HOST = scope:new_wedding_host + SPOUSE_1 = scope:spouse_1 + SPOUSE_2 = scope:spouse_2 + PROMISEE = scope:promisee } } - } - if = { - limit = { - is_ai = no - has_variable = promised_grand_wedding_marriage_countdown - exists = primary_heir - NOT = { - primary_heir = { - has_variable = promised_grand_wedding_marriage_countdown - } - } - } - var:promised_grand_wedding_marriage_countdown = { save_scope_as = temp_marriage_scope } - primary_heir = { - set_variable = { - name = promised_grand_wedding_marriage_countdown - value = prev.var:promised_grand_wedding_marriage_countdown - years = grand_wedding_timeout_alt - } - # Notification that the countdown has expired (one day before, to avoid getting the variable deleted before we have used it) - trigger_event = { - id = ep2_wedding.0001 - days = grand_wedding_timeout_notification_alt - } + else = { # Otherwise, clean up all variables on all characters (cancelling the Grand Wedding promise but retaining the betrothal) + clean_grand_wedding_betrothal_variables = yes } } if = { @@ -565,8 +561,7 @@ on_death = { # You are a spouse to be has_variable = promised_grand_wedding_by # your Grand Wedding has not been organized yet - NOR = { - exists = involved_activity + NOT = { involved_activity ?= { has_activity_type = activity_wedding OR = { @@ -1640,7 +1635,7 @@ on_death = { } # save Wallada's scope save_scope_as = wallada - random_artifact = { + random_character_artifact = { limit = { has_artifact_modifier = double_moon_modifier } @@ -1879,10 +1874,10 @@ on_death = { limit = { house ?= { OR = { - has_house_power_parameter = inherit_merit_bonus_1 - has_house_power_parameter = inherit_merit_bonus_2 - has_house_power_parameter = inherit_merit_bonus_3 - has_house_power_parameter = inherit_merit_bonus_4 + has_house_aspiration_parameter = inherit_merit_bonus_1 + has_house_aspiration_parameter = inherit_merit_bonus_2 + has_house_aspiration_parameter = inherit_merit_bonus_3 + has_house_aspiration_parameter = inherit_merit_bonus_4 } } } diff --git a/common/on_action/dlc/mpo/mpo_on_actions_2.txt b/common/on_action/dlc/mpo/mpo_on_actions_2.txt index 8220b29e..a08268e6 100644 --- a/common/on_action/dlc/mpo/mpo_on_actions_2.txt +++ b/common/on_action/dlc/mpo/mpo_on_actions_2.txt @@ -126,6 +126,30 @@ mpo_migration_finished = { move_domicile = prev.capital_province } } + if = { + limit = { + has_character_modifier = mpo_migrating_accolade_duke_modifier + } + remove_character_modifier = mpo_migrating_accolade_duke_modifier + } + else_if = { + limit = { + has_character_modifier = mpo_migrating_accolade_king_modifier + } + remove_character_modifier = mpo_migrating_accolade_king_modifier + } + else_if = { + limit = { + has_character_modifier = mpo_migrating_accolade_emperor_modifier + } + remove_character_modifier = mpo_migrating_accolade_emperor_modifier + } + if = { + limit = { + has_variable = nomad_migration_preserve_coronation + } + remove_variable = nomad_migration_preserve_coronation + } } } @@ -225,6 +249,12 @@ on_migration_war_end = { trigger_event = { on_action = mpo_migration_finished } + if = { + limit = { + has_variable = nomad_migration_preserve_coronation + } + remove_variable = nomad_migration_preserve_coronation + } every_character_situation = { limit = { any_participant_group = { @@ -294,7 +324,7 @@ on_kurultai_succession_stable = { list = obedient_kurultai limit = { exists = this - NOT = { this = root } + this != root } add_opinion = { target = root @@ -336,7 +366,7 @@ on_kurultai_succession_chaotic = { list = obedient_kurultai limit = { exists = this - NOT = { this = root } + this != root } add_opinion = { target = root diff --git a/common/on_action/game_start.txt b/common/on_action/game_start.txt index b6b51e18..f6ef1718 100644 --- a/common/on_action/game_start.txt +++ b/common/on_action/game_start.txt @@ -84,6 +84,7 @@ on_game_start = { add_confederation_member = title:d_trier.holder } } + set_global_variable = { name = is_game_start_date days = 1 } # Chinese Song-fashion if = { limit = { @@ -689,6 +690,7 @@ on_game_start = { } } } + } religion:eastern_orthodox_religion = { every_faith = { @@ -1536,6 +1538,7 @@ on_game_start = { limit = { government_has_flag = government_is_wanua } + empty_treasury_when_abandoning_landed_life_effect = yes change_government = tribal_government } # TGP: Clean up mandala govs and revert them to non-dlc feudals @@ -1543,6 +1546,7 @@ on_game_start = { limit = { government_has_flag = government_is_mandala } + empty_treasury_when_abandoning_landed_life_effect = yes change_government = feudal_government } ### Every Celestial/Meritocratic/Japanese Government becomes feudal if DLC not enabled, pre-lobby history setup ### @@ -1556,8 +1560,8 @@ on_game_start = { has_government = japan_feudal_government } } + empty_treasury_when_abandoning_landed_life_effect = yes change_government = feudal_government - } if = { limit = { @@ -2571,26 +2575,29 @@ on_game_start = { } ### TGP Earthquake Regions + # background regions add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_europe } add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_europe_south } - add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_asia } add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_asia_china } - add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_asia_japan } + add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:north_pacific_earthquake_region } # Basically Japan, whole region as risky + add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_asia_north_east_and_korea } + add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_asia_southeast_mainland } # no Burma since it's already fully covered by sichuan_myanmar_earthquake_region + add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_asia_southeast_islands } add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_asia_minor } - add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_asia_indonesia } - add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_asia_philippines } - add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_asia_sakhalin_hokkaido } add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_middle_east } add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_india } add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_steppe } add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_siberia } - add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_burma } - add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:custom_arakan_mountains } - add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:custom_bactria } add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_tibet } - add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_himalaya } add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_africa } add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:world_africa_north_east } + # strips + add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:himalaya_earthquake_region } + add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:sichuan_myanmar_earthquake_region } + add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:south_china_coastaline_earthquake_region } + add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:north_china_earthquake_region } + add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:mongolia_baikal_earthquake_region } + add_to_global_variable_list = { name = earthquake_region_list target = geographical_region:central_asian_earthquake_region } ### TGP Flood Regions add_to_global_variable_list = { name = flood_region_list target = geographical_region:amur_river_region } @@ -2632,8 +2639,13 @@ on_game_start = { limit = { has_tgp_dlc_trigger = yes } ### DYNASTIES tgp_dynasty_house_name_setup_effect = yes - ### BLOCS - tgp_setup_historical_house_bloc_effect = yes + ### BLOCS — AuH defers to after noble_family_title_realm_setup (see TGP SETUP); else house heads lack NF titles and create_confederation asserts. + if = { + limit = { + NOT = { has_dlc_feature = all_under_heaven } + } + tgp_setup_historical_house_bloc_effect = yes + } } # if = { @@ -2675,6 +2687,8 @@ on_game_start = { # Like on_game_start, except it is called once the host (or player, in single player) exits the lobby. Good for anything where you need to know who the players are, or what the game rules are on_game_start_after_lobby = { effect = { + disable_succession_calculation = yes + # To prevent the Season Changes event from triggering on game start situation:the_great_steppe ?= { every_participant_group = { @@ -2805,34 +2819,6 @@ on_game_start_after_lobby = { } } } - title:k_xia ?= { - every_in_de_jure_hierarchy = { - limit = { - holder ?= { - government_has_flag = government_is_tribal - } - } - holder = { - set_variable = { - name = steppe_game_start_var - years = 1 - } - every_held_title = { - if = { - limit = { - title_province = { - has_holding_type = tribal_holding - } - } - title_province = { - set_holding_type = nomad_holding - } - } - } - change_government = nomad_government - } - } - } } #Sami if = { @@ -2970,6 +2956,12 @@ on_game_start_after_lobby = { culture = culture:bedouin is_ai = no } + NOR = { + culture = culture:welayta + culture = culture:ethiopian + culture = culture:nubian + culture = culture:daju + } } } holder = { @@ -3059,6 +3051,9 @@ on_game_start_after_lobby = { enact_treasury_budgets_init = yes } } + + + every_ruler = { # PUT EVERY_RULER TYPE STUFF HERE FOR PERFORMANCE REASONS ### Every nomad in the Steppe Region gets their yurt domicile goodies ### if = { @@ -3141,7 +3136,6 @@ on_game_start_after_lobby = { domicile ?= { add_domicile_building = yurt_main_02 add_random_yurt_external_building_effect = yes - add_random_yurt_external_building_effect = yes upgrade_random_yurt_external_building_effect = yes } } @@ -4555,6 +4549,8 @@ on_game_start_after_lobby = { } } } + + if = { limit = { has_game_rule = sexuality_distribution_default } @@ -8341,6 +8337,7 @@ on_game_start_after_lobby = { has_government = landless_adventurer_government } add_realm_law_skip_effects = camp_purpose_scholars + add_realm_law_skip_effects = equal_law trigger_event = ep3_story_cycle_violet_poet.0001 } } @@ -8584,7 +8581,7 @@ on_game_start_after_lobby = { add_realm_law_skip_effects = camp_purpose_mercenaries } } - character:bojo_jinul_1 ?= { + character:il_eom_1 ?= { if = { limit = { is_alive = yes @@ -8713,6 +8710,35 @@ on_game_start_after_lobby = { limit = { has_tgp_dlc_trigger = yes } ### JAPAN + # History defaults e_japan to feudal + single heir so partial DLC / no AuH bookmarks load cleanly. + # Restore Ritsuryō Kampaku when All Under Heaven is active (must run before noble-family / bureaucracy setup). + if = { + limit = { has_dlc_feature = all_under_heaven } + title:e_japan.holder ?= { + # can_get_government for japan_administrative checks top_liege for japanese government OR this flag; independent Kampaku is neither until flagged. + if = { + limit = { + NOT = { government_has_flag = government_is_japan_administrative } + OR = { + has_government = feudal_government + has_government = japan_feudal_government + } + } + add_character_flag = tgp_japan_restore_japanese_government_flag + change_government = japan_administrative_government + remove_character_flag = tgp_japan_restore_japanese_government_flag + } + # Separate if (not else_if): first block can flip government same pass; law must still run for that case and for history Ritsuryō holders missing the law. + if = { + limit = { + government_has_flag = government_is_japan_administrative + NOT = { has_realm_law = japanese_regency_succession_law } + } + add_realm_law_skip_effects = japanese_regency_succession_law + } + } + } + # Special variable that UI uses to display correct title title:e_japan = { # More starting house relations @@ -8795,6 +8821,14 @@ on_game_start_after_lobby = { } } + if = { + limit = { + has_dlc_feature = all_under_heaven + exists = title:e_japan.holder + } + tgp_setup_historical_house_bloc_effect = yes + } + ### MANDALA @@ -8847,11 +8881,11 @@ on_game_start_after_lobby = { add_great_building = mandala_capital_01 } else_if = { - limit = { game_start_date >= 1066.1.1 } - add_great_building = mandala_capital_02 + limit = { game_start_date > 1066.09.15 } + add_great_building = mandala_capital_03 } else = { - add_great_building = mandala_capital_03 + add_great_building = mandala_capital_02 } add_to_global_variable_list = { # Add to list so it can be found by the PoI name = mandala_poi_list @@ -8928,6 +8962,37 @@ on_game_start_after_lobby = { create_story = story_mandala } } + #Tai Migrations + every_county_in_region = { # save all migration counties to variable list + region = custom_tai_migration_target + add_to_global_variable_list = { + name = tai_migration_target_counties + target = this + } + } + every_in_global_list = { # give all saved migration county holders the story + variable = tai_migration_target_counties + holder = { + if = { + limit = { + NOT = { + any_owned_story = { + type = story_tai_migrations + } + } + has_tgp_dlc_trigger = yes + any_realm_province = { + culture = { + NOT = { + has_cultural_pillar = heritage_tai + } + } + } + } + create_story = story_tai_migrations + } + } + } } ### TGP MERIT AND TREASURY HANDOUT ON GAME START ### if = { @@ -9762,26 +9827,65 @@ on_game_start_after_lobby = { limit = { is_ai = yes OR = { - AND = { - OR = { - vassal_contract_has_flag = celestial_province_military - vassal_contract_has_flag = celestial_province_protectorate - } - has_trait_with_flag = civilian_province + is_governor = yes + tgp_is_any_minister = yes + } + trigger_if = { + limit = { has_trait_with_flag = civilian_province } + OR = { + vassal_contract_has_flag = celestial_military_appointment + vassal_contract_has_flag = meritocratic_military_appointment } - AND = { - OR = { - vassal_contract_has_flag = celestial_province_standard - vassal_contract_has_flag = celestial_province_industrial - vassal_contract_has_flag = celestial_province_metropolitan - } - has_trait_with_flag = military_province + } + trigger_else = { + OR = { + vassal_contract_has_flag = celestial_civil_appointment + vassal_contract_has_flag = meritocratic_civil_appointment } } } - tgp_flip_education_track_on_game_start = yes + if = { + limit = { has_trait_with_flag = civilian_province } + set_variable = { + name = appointment_trait_override + value = trait:education_martial_1 + } + } + else = { + set_variable = { + name = appointment_trait_override + value = trait:education_stewardship_1 + } + } } } + if = { + limit = { + has_game_rule = no_easteregg_characters + } + # needed for error suppression as all characters are added to the list in the history + if = { + limit = { + always = no + } + add_to_global_variable_list = { + name = easteregg_characters_list + target = this + } + } + every_in_global_list = { + variable = easteregg_characters_list + limit = { + is_ai = yes + } + death = { + death_reason = death_vanished + } + } + clear_global_variable_list = easteregg_characters_list + } + + enable_and_run_succession_calculation = yes } events = { diff --git a/common/on_action/title_on_actions.txt b/common/on_action/title_on_actions.txt index 49d3220d..a19cc445 100644 --- a/common/on_action/title_on_actions.txt +++ b/common/on_action/title_on_actions.txt @@ -101,34 +101,8 @@ on_title_destroyed = { } } } - every_vassal = { - # Because a change in liege isn't triggered when the title being destroyed - if = { - limit = { - government_has_flag = government_is_celestial - highest_held_title_tier >= tier_kingdom - primary_title = { - has_custom_title_name = no - } - tgp_capital_not_in_chinese_naming_region = no - } - if = { - limit = { - is_ai = no - } - trigger_event = { - id = tgp_dynastic_cycle.9000 - days = 1 # so the player gets to choose first - } - } - else = { - trigger_event = { - id = tgp_dynastic_cycle.9000 - days = 2 - } - } - } - } + # Because a change in liege isn't triggered when the title being destroyed + tgp_fire_china_realm_name_event_for_vassals_effect = yes title:h_china = { reset_title_name = yes } @@ -661,7 +635,7 @@ on_title_gain = { ########### if = { limit = { - scope:title.title_province = { + scope:title.title_province ?= { geographical_region = geographical_region:mpo_region_permafrost } } @@ -1142,7 +1116,7 @@ on_title_gain = { } every_held_title = { limit = { exists = var:administrative_ui_special_title } - var:administrative_ui_special_title.holder = { tgp_destroy_ceremonial_throne_effect = yes } + holder = { tgp_destroy_ceremonial_throne_effect = yes } } if = { limit = { has_trait = former_emperor } @@ -1174,12 +1148,16 @@ on_title_gain = { limit = { has_trait = devoted } remove_trait = devoted } - destroy_laamp_effect = { ADVENTURER = this } + if = { + limit = { government_has_flag = government_is_landless_adventurer } + destroy_laamp_effect = { ADVENTURER = this } + } } # Reset raid remit if = { limit = { this = top_liege + scope:title = primary_title any_noble_family = { } } every_noble_family = { @@ -1442,7 +1420,10 @@ on_title_gain = { # When conquering China - Change to conquest phase if = { limit = { - root.dynasty != scope:previous_holder.dynasty + OR = { + root.dynasty != scope:previous_holder.dynasty + is_lowborn = yes # in the rare instance that a lowborn theocrat reunites China + } } if = { limit = { @@ -1527,6 +1508,7 @@ on_title_gain = { set_family_accomplishment_effect = { ACCOMPLISHMENT = family_accomplishment_dynasty } } } + # left them in enum since we can not avoid touch here with encapsulated macro else_if = { limit = { OR = { @@ -1673,16 +1655,8 @@ on_title_gain = { } } # That isn't a part of the ministry - NOR = { - scope:title = title:e_minister_chancellor - scope:title = title:e_minister_censor - scope:title = title:e_minister_grand_marshal - scope:title = title:e_minister_of_personnel - scope:title = title:e_minister_of_revenue - scope:title = title:e_minister_of_rites - scope:title = title:e_minister_of_war - scope:title = title:e_minister_of_justice - scope:title = title:e_minister_of_works + scope:title = { + tgp_is_minister_title = no } } trigger_event = { @@ -1799,7 +1773,10 @@ on_title_gain = { limit = { has_trait = devoted } remove_trait = devoted } - destroy_laamp_effect = { ADVENTURER = this } + if = { + limit = { government_has_flag = government_is_landless_adventurer } + destroy_laamp_effect = { ADVENTURER = this } + } trigger_event = { id = tgp_japan_general.9100 days = 1 @@ -2029,6 +2006,14 @@ on_title_gain = { } has_appointment_level_for_title = scope:title } + # prevent penalty for giving non-feudal lands to nomad/tribals + OR = { + scope:title = { + has_title_law_flag = appointment_with_level_requirement + } + has_realm_law_flag = appointment_with_level_requirement + } + has_global_variable = game_has_started # Don't mess up for initialization } situation:dynastic_cycle ?= { if = { @@ -2044,17 +2029,8 @@ on_title_gain = { if = { limit = { scope:title = { - OR = { - this = title:e_minister_chancellor - this = title:e_minister_censor - this = title:e_minister_grand_marshal - this = title:e_minister_of_personnel - this = title:e_minister_of_revenue - this = title:e_minister_of_rites - this = title:e_minister_of_war - this = title:e_minister_of_justice - this = title:e_minister_of_works - } + tgp_is_minister_title = yes + de_jure_liege = title:h_china } NOT = { has_appointment_level_for_title = scope:title } } @@ -2071,40 +2047,21 @@ on_title_gain = { # Admin Stuff if = { limit = { - OR = { - government_allows = administrative - government_has_flag = government_is_japan_feudal - } - NOT = { has_variable = laamp_invasion_flag } + government_allows = noble_families } government_type = { save_scope_as = nf_gov_type } # Note: anything that should be run after creation can go in on_noble_family_title_created give_new_noble_family_title_effect = yes - # EP3 - Ensure Emperor keeps old realm capital in admin realms & apply unique domicile building bonus if appropriate + } + if = { + limit = { + government_allows = administrative + NOT = { has_variable = laamp_invasion_flag } + } + # EP3 - apply unique domicile building bonus if appropriate if = { limit = { top_liege = this - highest_held_title_tier >= tier_empire - NOT = { - any_held_title = { - OR = { - tier = tier_empire - tier = tier_hegemony - } - this != scope:title - } - } - } - if = { # Ensure we keep the old realm capital - limit = { - scope:title = { - tier >= tier_empire - title_capital_county != root.capital_county - # Constantinople must have been inherited - title_capital_county.holder = root - } - } - set_realm_capital = scope:title.title_capital_county } if = { # Get legitimacy from Reception Hall House Bonus limit = { @@ -2160,37 +2117,17 @@ on_title_gain = { scope:title = root.primary_title has_ep3_dlc_trigger = yes #Checks so this event doesn't fire after character creation, although it's not really a problem if it does - trigger_if = { - limit = { - game_start_date = 867.1.1 - } - current_date >= 867.1.4 - } - trigger_if = { - limit = { - game_start_date = 1066.9.15 - } - current_date >= 1066.9.18 - } - trigger_if = { - limit = { - game_start_date = 1178.10.1 - } - current_date >= 1178.10.4 - } + current_date_is_start_date_trigger = no } save_scope_as = emperor #Should trigger special event during fourth crusade! if = { limit = { - exists = global_var:byz_claimant_champion - global_var:byz_claimant_champion = { + scope:title = title:e_byzantium + global_var:byz_claimant_champion ?= { any_owned_story = { type = frankokratia_story - exists = var:byz_claimant - var:byz_claimant = { - this = root - } + var:byz_claimant ?= root } } } @@ -2201,27 +2138,24 @@ on_title_gain = { trigger_event = ep3_frankokratia_events.0110 } } - else = { - if = { + else_if = { + limit = { + exists = house + exists = scope:previous_holder + is_alive = yes + is_ruler = yes + is_imprisoned = no + top_liege = this + } + every_vassal_or_below = { limit = { - exists = root.house - } - #normal triggering - every_vassal_or_below = { - limit = { - is_playable_character = yes - exists = scope:previous_holder - has_government = administrative_government - OR = { - highest_held_title_tier >= main_administrative_tier # All governors - liege = root - } - } - trigger_event = { - id = ep3_governor_yearly.3060 - days = 1 + is_playable_character = yes + OR = { + highest_held_title_tier >= main_administrative_tier # All governors + liege = root } } + trigger_event = ep3_governor_yearly.3060 } } } @@ -2691,6 +2625,7 @@ on_title_gain = { limit = { scope:title = { tier = tier_county + is_landless_type_title = no OR = { has_county_modifier = major_coronation_approval_unsettled_modifier has_county_modifier = medium_coronation_approval_unsettled_modifier @@ -3923,17 +3858,9 @@ on_title_lost = { # Remove manually added Ministers if they're not ministers anymore if = { limit = { - NOR = { - primary_title = title:e_minister_chancellor - primary_title = title:e_minister_censor - primary_title = title:e_minister_grand_marshal - primary_title = title:e_minister_of_personnel - primary_title = title:e_minister_of_revenue - primary_title = title:e_minister_of_rites - primary_title = title:e_minister_of_war - primary_title = title:e_minister_of_justice - primary_title = title:e_minister_of_works - } + is_landed = no + tgp_is_any_minister = no + any_character_situation = { this = situation:dynastic_cycle } } situation:dynastic_cycle = { remove_manual_participant = prev @@ -4146,6 +4073,64 @@ on_rank_up = { # Will not fire during history execution or for dying characters events = { } effect = { + # EP3 - Ensure Emperor keeps old realm capital in admin realms + if = { + limit = { + government_allows = administrative + NOT = { has_variable = laamp_invasion_flag } + top_liege = this + trigger_if = { + limit = { exists = scope:title } + highest_held_title_tier > scope:title.tier + } + } + # celestial emperor+ ruler keep their capital when they were kingdom + # but if they become emperor+ without ever being a king, follow normal de jure realm + if = { + limit = { + tgp_use_chinese_naming_trigger = yes + trigger_if = { + limit = { + NOT = { exists = title:h_china.holder } + capital_county.title_province ?= { + OR = { + geographical_region = tgp_county_chinese_naming_region + geographical_region = tgp_duchy_chinese_naming_region + } + } + } + highest_held_title_tier >= tier_duchy + } + trigger_else = { + highest_held_title_tier >= tier_empire + } + primary_title = { + is_de_jure_liege_or_above_target = prev.capital_county + } + } + primary_title = { + if = { + limit = { + title_capital_county != prev.capital_county + NOT = { previous_holder.house ?= prev.house } + } + set_capital_county = prev.capital_county + } + } + } + else_if = { # Ensure we keep the old realm capital + limit = { + highest_held_title_tier >= tier_empire + primary_title = { + title_capital_county != root.capital_county + # Constantinople must have been inherited + title_capital_county.holder = root + } + } + set_realm_capital = primary_title.title_capital_county + } + } + if = { # ACH call to coronation reminder limit = { coronation_trigger = yes @@ -4302,8 +4287,23 @@ on_rank_up = { # Will not fire during history execution or for dying characters if = { limit = { is_independent_ruler = yes - government_has_flag = government_is_celestial - highest_held_title_tier >= tier_kingdom + OR = { + tgp_use_chinese_naming_trigger = yes + primary_title = { + recent_history = { + type = conquest_populist + days = 1 + } + previous_holder = { + tgp_use_chinese_naming_trigger = yes + } + } + AND = { + exists = var:claimed_mandate_var + primary_title ?= title:h_china + } + } + tgp_chinese_naming_tier_trigger = yes OR = { primary_title ?= { has_custom_title_name = no @@ -4312,56 +4312,12 @@ on_rank_up = { # Will not fire during history execution or for dying characters } trigger_if = { limit = { - tgp_capital_not_in_chinese_naming_region = yes + tgp_has_unique_chinese_naming = no } primary_title ?= title:h_china } } - if = { - limit = { - is_ai = no - } - trigger_event = { - id = tgp_dynastic_cycle.9000 - days = 1 # so the player gets to choose first - } - } - else = { - trigger_event = { - id = tgp_dynastic_cycle.9000 - days = 2 - } - } - } - else_if = { # Make sure non-Celestials get to rename/recolor china - limit = { - is_independent_ruler = yes - has_tgp_dlc_trigger = yes - NOT = { government_has_flag = government_is_celestial } - exists = var:claimed_mandate_var - primary_title ?= title:h_china - OR = { - primary_title ?= { - has_custom_title_name = no - } - primary_title.previous_holder.dynasty != root.dynasty - } - } - if = { - limit = { - is_ai = no - } - trigger_event = { - id = tgp_dynastic_cycle.9000 - days = 1 # so the player gets to choose first - } - } - else = { - trigger_event = { - id = tgp_dynastic_cycle.9000 - days = 2 - } - } + tgp_fire_china_realm_name_event_effect = yes } # ACH - Remove Coronated laws when titles are passed onto a new character @@ -4386,6 +4342,7 @@ on_rank_up = { # Will not fire during history execution or for dying characters limit = { is_house_head = yes NOT = { house.house_confederation.leading_house = this.house } + house.house_confederation.leading_house.house_head.top_liege = this } house.house_confederation = { tgp_set_house_bloc_leading_house_effect = { LEADER = root.house } @@ -4476,6 +4433,46 @@ on_rank_down = { # Will not fire during history execution or for dying character } ach_remove_oaths_on_king_minus_effect = yes } + + # Grand Wedding: no longer valid host + if = { + limit = { + highest_held_title_tier < tier_county + has_variable = promised_grand_wedding_marriage_countdown + scope:transfer_type = flag:abdication + } + + scope:title.holder ?= { + if = { + limit = { NOT = { has_variable = promised_grand_wedding_marriage_countdown } } + save_scope_as = new_wedding_host + } + } + + if = { + limit = { + exists = scope:new_wedding_host + has_variable = promised_grand_wedding_to + } + var:promised_grand_wedding_marriage_countdown = { + save_scope_as = spouse_1 + betrothed = { save_scope_as = spouse_2 } + } + var:promised_grand_wedding_to = { + save_scope_as = promisee + } + clean_grand_wedding_betrothal_variables = yes + set_grand_wedding_betrothal_variables = { + HOST = scope:new_wedding_host + SPOUSE_1 = scope:spouse_1 + SPOUSE_2 = scope:spouse_2 + PROMISEE = scope:promisee + } + } + else = { + clean_grand_wedding_betrothal_variables = yes + } + } } } @@ -4551,6 +4548,37 @@ on_vassal_gained = { # TGP end the ceremonial liege tgp_destroy_ceremonial_throne_effect = yes } + + # TGP Put vassals in blocs + if = { + limit = { + top_liege != this # independent rulers are an exception + exists = house.house_confederation + scope:vassal = { + tgp_uses_house_blocs_trigger = yes + house.house_head = scope:vassal + } + trigger_if = { + limit = { exists = scope:vassal.house.house_confederation } + scope:vassal.house.house_confederation != house.house_confederation + } + } + if = { + limit = { exists = scope:vassal.house.house_confederation } + scope:vassal.house = { + tgp_leave_house_bloc_effect = { + OPINION = flag:no + TRUCE = flag:yes + } + } + } + scope:vassal.house = { + tgp_join_house_bloc_effect = { + INVITER = root.house + OPINION = flag:no + } + } + } } } @@ -4566,7 +4594,7 @@ on_vassal_change = { government_allows = administrative is_house_head = yes trigger_if = { - # This trigger is intentionally different from the similar effecy in on_title_gain up above. We want all direct vassals of the top liege to have a family title if they can + # This trigger is intentionally different from the similar effect in on_title_gain up above. We want all direct vassals of the top liege to have a family title if they can limit = { government_has_flag = government_has_county_tier_noble_families } highest_held_title_tier >= tier_county } @@ -4590,27 +4618,50 @@ on_vassal_change = { ### If an admin ruler becomes independent... if = { limit = { - liege = root # I.e. root is independent government_has_flag = government_is_administrative } - # And is not of a high enough rank, change government if = { - limit = { - administrative_tier_allows_independence = no + limit = { + liege = root # I.e. root is independent } - admin_change_government_effect = yes - } - # If they can be independent, make sure they have a noble family title - else_if = { - limit = { - NOT = { - any_held_title = { - is_noble_family_title = yes + # And is not of a high enough rank, change government + if = { + limit = { + administrative_tier_allows_independence = no + } + admin_change_government_effect = yes + } + # If they can be independent, make sure they have a noble family title + else_if = { + limit = { + NOT = { + any_held_title = { + is_noble_family_title = yes + } } } + create_noble_family_effect = { GOVERNMENT_GIVER = this } + domicile ?= { set_up_domicile_estate_effect = yes } } - create_noble_family_effect = { GOVERNMENT_GIVER = this } - domicile ?= { set_up_domicile_estate_effect = yes } + } + # Byz admin landless NF should always be direct vassal of top liege + else_if = { + limit = { + liege != top_liege + primary_title = { + is_noble_family_title = yes + } + is_landed = no + } + create_title_and_vassal_change = { + type = appointment + save_scope_as = change + } + change_liege = { + liege = top_liege + change = scope:change + } + resolve_title_and_vassal_change = scope:change } } ### Independent Celestial rulers who become direct vassals of a top liege adopt Military obligations if they have title troops - Everyone else will default to Standard. @@ -4623,6 +4674,12 @@ on_vassal_change = { primary_title = { any_title_maa_regiment = { count >= 1 } } + liege = { #only if the liege didn't reach the limit yet + any_vassal = { + count < celestial_province_military_max_value + vassal_contract_has_flag = celestial_province_military + } + } } vassal_contract_set_obligation_level = { type = celestial_provinces level = 3 } } @@ -4636,52 +4693,14 @@ on_vassal_change = { this = top_liege } - any_held_title = { - # has a ministry title that is not being swapped - OR = { - this = title:e_minister_chancellor - this = title:e_minister_censor - this = title:e_minister_grand_marshal - this = title:e_minister_of_personnel - this = title:e_minister_of_revenue - this = title:e_minister_of_rites - this = title:e_minister_of_war - this = title:e_minister_of_justice - this = title:e_minister_of_works - } - } + # has a ministry title that is not being swapped + tgp_has_minister_title = yes } every_held_title = { - switch = { - trigger = this - title:e_minister_chancellor = { - root = { destroy_title = title:e_minister_chancellor } - } - title:e_minister_censor = { - root = { destroy_title = title:e_minister_censor } - } - title:e_minister_grand_marshal = { - root = { destroy_title = title:e_minister_grand_marshal } - } - title:e_minister_of_personnel = { - root = { destroy_title = title:e_minister_of_personnel } - } - title:e_minister_of_revenue = { - root = { destroy_title = title:e_minister_of_revenue } - } - title:e_minister_of_rites = { - root = { destroy_title = title:e_minister_of_rites } - } - title:e_minister_of_war = { - root = { destroy_title = title:e_minister_of_war } - } - title:e_minister_of_justice = { - root = { destroy_title = title:e_minister_of_justice } - } - title:e_minister_of_works = { - root = { destroy_title = title:e_minister_of_works } - } + limit = { + tgp_is_minister_title = yes } + root = { destroy_title = prev } } } # Make sure independent rulers and their vassals leave movements if they are part of the Dynastic Cycle @@ -4711,42 +4730,24 @@ on_vassal_change = { if = { limit = { # We have become independent! - NOT = { - scope:old_liege = root - } + scope:old_liege != root liege = root - government_has_flag = government_is_celestial - highest_held_title_tier >= tier_kingdom + tgp_use_chinese_naming_trigger = yes + tgp_chinese_naming_tier_trigger = yes primary_title = { has_custom_title_name = no # sanity check } OR = { - tgp_capital_not_in_chinese_naming_region = no + tgp_has_unique_chinese_naming = yes primary_title = title:h_china # failsafe, in case this somehow ends up here } } - if = { - limit = { - is_ai = no - } - trigger_event = { - id = tgp_dynastic_cycle.9000 - days = 1 # so the player gets to choose first - } - } - else = { - trigger_event = { - id = tgp_dynastic_cycle.9000 - days = 2 - } - } + tgp_fire_china_realm_name_event_effect = yes } if = { limit = { scope:old_liege = root - NOT = { - liege = root - } + liege != root primary_title ?= { has_custom_title_name = yes } @@ -4946,6 +4947,43 @@ on_realm_capital_change = { } } } + + # Move ministers to realm capital. + if = { + limit = { + tgp_has_access_to_ministry_trigger = yes + } + every_vassal = { + limit = { + tgp_has_minister_title = yes + } + every_held_title = { + limit = { + OR = { + is_noble_family_title = yes + tgp_is_minister_title = yes + } + } + set_capital_county = ROOT.county + } + if = { + limit = { is_ai = yes } + domicile ?= { + move_domicile = ROOT.title_province + } + } + # don't move them in such cases + if = { + limit = { + is_landed = no + is_in_army = no + is_travelling = no + NOT = { exists = involved_activity } + } + set_location_to_default = yes + } + } + } } } } diff --git a/common/on_action/travel_on_actions.txt b/common/on_action/travel_on_actions.txt index 62a56e79..7097b755 100644 --- a/common/on_action/travel_on_actions.txt +++ b/common/on_action/travel_on_actions.txt @@ -3,7 +3,7 @@ on_travel_plan_movement = { # It should be more likely to fire a danger event if it's valid for the given province trigger = { is_ruler = yes - is_adult = yes + is_adult = yes } on_actions = { @@ -13,7 +13,7 @@ on_travel_plan_movement = { delay = { days = 2 } adventurer_talent_scouting_on_action delay = { days = 3 } - adventurer_encourage_realtionships_on_action + adventurer_encourage_relationships_on_action migration_events_on_action delay = { days = 1 } } @@ -67,10 +67,10 @@ on_travel_plan_movement = { is_on_a_pilgrimage_trigger = yes } pilgrimages_track_encountered_cultures_effect = yes - } + } # We change your Legend if you travel through somewhere relevant if = { - limit = { + limit = { current_travel_plan.current_location = { has_any_point_of_interest_flag = yes } @@ -122,7 +122,7 @@ on_travel_plan_movement = { } add_to_variable_list = { name = cultural_ambassador_culture_list - target = current_location.culture + target = current_location.culture } } else_if = { @@ -130,14 +130,14 @@ on_travel_plan_movement = { NOR = { is_target_in_variable_list = { name = cultural_ambassador_culture_list - target = current_location.culture + target = current_location.culture } current_location.culture = root.culture } } add_to_variable_list = { name = cultural_ambassador_culture_list - target = current_location.culture + target = current_location.culture } current_location = { culture = { save_scope_as = current_culture } @@ -228,7 +228,7 @@ on_travel_plan_movement = { } } } - + #Surveyor MAA Mustering surveyor_perk_mustering_effect = yes @@ -245,7 +245,7 @@ on_travel_plan_movement = { # Wayfarer Fame if = { limit = { - has_perk = far_and_wide_perk + has_perk = far_and_wide_perk } add_prestige_experience = 10 } @@ -255,7 +255,7 @@ on_travel_plan_movement = { voyager_gracious_host_impeccable_guest_effect = yes #Tutor Child Travel Option surveyor_tutor_child_effect = yes - reminiscing_event_effect = yes + reminiscing_event_effect = yes # General laamp effects. if = { @@ -336,7 +336,7 @@ on_travel_plan_movement = { add_gold = adventurers_make_local_deals_option_value add_to_variable_list = { name = haggle_provinces - target = root.current_travel_plan.current_location + target = root.current_travel_plan.current_location } } if = { @@ -493,7 +493,10 @@ on_travel_plan_movement = { # laamp_base_1041/Ambush Travellers task contract minigame. current_travel_plan ?= { if = { - limit = { has_variable = activate_laamp_base_1041_logic } + limit = { + has_variable = activate_laamp_base_1041_logic + current_location = { is_sea_province = no } + } travel_plan_owner.var:laamp_base_1041_travel_plan_contract_storage = { if = { limit = { var:event_ratio_tracker >= 1 } @@ -553,6 +556,62 @@ travel_danger_events_on_action = { is_migrating = no # No Danger events while migrating exists = current_travel_plan } + effect = { + random = { # chance of inspiring a knight to become eligible for stalwart accolade + chance = 0.05 + modifier = { + factor = current_travel_plan.current_danger_value # scales with danger (even if mitigated) + } + modifier = { + factor = accolade_progress # scales with accolade progress + } + modifier = { # must have an eligible knight + NOT = { + any_knight = { + current_travel_plan ?= root.current_travel_plan + can_unlock_accolade_attribute_trigger = { + ATTRIBUTE = stalwart + } + } + } + factor = 0 + } + set_variable = { + name = accolade_progress + value = 0 + } + random_knight = { + limit = { + current_travel_plan ?= root.current_travel_plan + can_unlock_accolade_attribute_trigger = { + ATTRIBUTE = stalwart + } + } + weight = { + base = 1 + modifier = { + add = 50 + is_acclaimed = yes + } + } + save_scope_as = accolade_knight + } + save_scope_as = accolade_liege + send_interface_message = { + type = msg_accolade_eligibility + title = accolade_stalwart_unlock.t + left_icon = scope:accolade_knight + right_icon = scope:accolade_liege + custom_tooltip = accolade_stalwart_unlock.tt + scope:accolade_knight = { + set_variable = { + name = stalwart_attribute_unlock + value = yes + } + } + } + } + } random_events = { chance_of_no_event = { value = { @@ -630,7 +689,7 @@ travel_danger_events_on_action = { 200 = natural_disaster_flavor_events.0001 # As Scavengers Gather - Search the ruins for loot or survivors 200 = natural_disaster_flavor_events.0010 # Desperate Souls - Decide how to deal with a throng of paupers - + # Laamp Travel Danger Events 350 = ep3_laamp_flavour_ewan.4001 # Bandits! - Bandit raid. 350 = ep3_laamp_flavour_ewan.4021 # Parched - Difficulty finding water. @@ -641,6 +700,15 @@ travel_danger_events_on_action = { 350 = ep3_laamp_flavour_ewan.4071 # Slavers - bastards try to kidnap people from the edges of your train. 350 = ep3_laamp_flavour_ewan.4081 # Born of Desperation - hungry locals swarm at you, searching for food. 350 = ep3_laamp_flavour_ewan.4091 # Night Attack - unknown group assaults your camp one evening. + + # TGP Travel Danger Events + 100 = tgp_travel_danger_events.0001 # Encounter an orphan in an area struck by natural disaster. + + # Simple Danger Events + 100 = travel_danger_events.9030 # Rain: delay + 100 = travel_danger_events.9040 # Rainstorm, someone is lost & gone forever! + 100 = travel_danger_events.9050 # Someone with Withering Mind walks off + 100 = travel_danger_events.9060 # Faltering Heart/Fragile Bones entourage character suffers during travel } } @@ -664,21 +732,21 @@ travel_events_on_action = { random_events = { chance_of_no_event = { - value = 80 + value = 95 if = { limit = { is_ai = yes } - add = 19 # Not very important that AI's get these + add = 4 # Not very important that AI's get these } if = { # Less regular travel events when you're migrating limit = { is_migrating = yes } - add = 15 + add = 4 } } - 100 = 0 + 100 = 0 5 = travel_events.1000 #Peasant with no shoes 10 = travel_events.2000 #Good omen? - Encounter a duck 100 = travel_events.2002 #Crossing an ant path - Ignore or don't ignore your guide @@ -745,6 +813,7 @@ travel_events_on_action = { 100 = travel_events.4050 # hostage/ward/different culture courtier acts as cultural mediator 200 = hunt.8200 # Falconry Practice 500 = hunt.8210 #Pursued by a Shrine Maiden + 100 = travel_events.5100 #You reach a spirit haunted bridge #Cultural Tradition events 100 = travel_events.1200 #Friendly People 100 = travel_events.1201 #Chivalry @@ -769,7 +838,7 @@ travel_events_on_action = { #Mystical animal story 300 = hunt_mystical_animal.1002 - + # BP3 Travel Events 150 = travel_events_oltner_2.1000 # Mirage of the Cultivated Sands 150 = travel_events_oltner_2.1010 # Hospitable Hospices @@ -859,13 +928,25 @@ travel_events_on_action = { 100 = mpo_events_anna.0015 #A Morsel of Meat - choose the fate of a fawn stuck in a trap 100 = mpo_events_anna.0020 #Race Against Time - encounter a wounded messenger 100 = mpo_events_anna.0025 #Familiar Tunes - encounter with a performer - + #TGP Travel Events - China 100 = tgp_travel_events.0025 100 = tgp_travel_events.0030 100 = tgp_travel_events.0035 100 = tgp_travel_events.0040 100 = tgp_travel_events.0045 + + #Travel Events Japan + 100 = tgp_japan_yearly_events.0006 # 0006 - Treasures from the Sea - ama divers + 100 = tgp_japan_yearly_events.0012 # 0012 - Monkey Business - Onsen + 100 = tgp_japan_yearly_events.0013 # 0013 - Purifying the Spirit - Onsen + 100 = tgp_japan_yearly_events.0014 # 0014 - Taking It Easy - Onsen + 100 = tgp_japan_yearly_events.0027 # 0027 - Prove Your Worth - Tengu + 10 = tgp_japan_yearly_events.0028 # 0028 - False Rumors - Tengu + 100 = tgp_japan_yearly_events.1000 # 1000 - You see some Onibi, follow them or no? + 50 = tgp_japan_yearly_events.1040 # 1040 - You come across a red bridge + 50 = tgp_japan_yearly_events.1120 # 1120 - You meet a warrior monk + 50 = tgp_japan_yearly_events.1140 # 1140 - You are stopped in Soryo lands as a Ritsuryo ruler } } @@ -898,7 +979,7 @@ migration_events_on_action = { 100 = migration_events.1010 #Wife wants you to travel in the yurt wagon 50 = migration_events.1020 #Family member wants to take land from local herder 50 = migration_events.1030 #Your herds can't find good grazing land - 100 = migration_events.1040 #Local ruler offers you a meal and a gift + 100 = migration_events.1040 #Local ruler offers you a meal and a gift 50 = migration_events.1050 #Your warriors raid a settlement your people pass 50 = migration_events.1060 #The going is slow and your warriors want to ride on ahead 100 = mpo_migration_travel_events.0001 # A ruler offers herd @@ -942,7 +1023,8 @@ travel_event_tombola = { 1 = travel_events_on_action 2 = on_tour_travel 2 = pilgrimage_journey_events - 2 = hajj_journey_events + #2 = hajj_journey_events # They're the same as Pilgrimage for now, commenting out until further notice to save performance + # If Hajj content is added, also see comment in is_on_a_pilgrimage_trigger } } @@ -1019,10 +1101,10 @@ on_travel_plan_arrival = { } } } - + voyager_souvenirs_aplenty_effect = yes reminiscing_event_effect = yes - + # Visited Points of Interest tracker, currently only for Adventurers points_of_interest_tracker_effect = yes } @@ -1242,7 +1324,7 @@ on_travel_plan_start = { fishing_yurt_county_modifier_2 = { remove_county_modifier = fishing_yurt_county_modifier_2 } fishing_yurt_county_modifier_1 = { remove_county_modifier = fishing_yurt_county_modifier_1 } } - } + } } # Wayfarer Popularity of_the_people_effect = yes @@ -1289,18 +1371,24 @@ on_travel_plan_start = { } } events = { - travel_start_event.1000 #Generic start (no activity) - travel_start_event.1010 #Travelling to a Tournament + # Commented-out events are removed due to spam concerns + # The ones who are left have mechanical impacts; Tours give prestige/stress loss, pilgrimages add additional pilgrims, wanderer activities give boons based ona ctivity options for Monument Explorations, etc. + # Chinese debates/examinations give necessary context effects, such as choosing movement if you have none, or resigning from your alnds if you need to take the exam + + travel_start_event.1130 # Generic 'travel started' toast, also plays mx_cue_travel_start + + #travel_start_event.1000 #Generic start (no activity) + #travel_start_event.1010 #Travelling to a Tournament travel_start_event.1020 #Setting off on a Tour - travel_start_event.1030 #Travelling to a Wedding - travel_start_event.1040 #Travelling to a Feast - travel_start_event.1050 #Travelling to a Playdate + #travel_start_event.1030 #Travelling to a Wedding + #travel_start_event.1040 #Travelling to a Feast + #travel_start_event.1050 #Travelling to a Playdate travel_start_event.1060 #Going on a Pilgrimage - travel_start_event.1070 #Travelling to a Hunt - travel_start_event.1080 #Travelling to a Witch Ritual + #travel_start_event.1070 #Travelling to a Hunt + #travel_start_event.1080 #Travelling to a Witch Ritual travel_start_event.1090 #Travelling to a Travel Lifestyle Activity travel_start_event.1100 #Travelling to an Examination - travel_start_event.1110 #Travelling to a Mandala Ritual + #travel_start_event.1110 #Travelling to a Mandala Ritual travel_start_event.1120 #Travelling to a Debate ep3_contract_event.0002 #When doing a Contract as Landless Adventurer fill your entourage with relevant people @@ -1351,14 +1439,14 @@ on_travel_plan_complete = { exists = current_travel_plan.var:travel_plan_provinces_traversed add = { value = current_travel_plan.var:travel_plan_provinces_traversed - divide = 5 + divide = 5 } } if = { limit = { NOT = { has_trait = lifestyle_traveler } } - add_trait = lifestyle_traveler + add_trait = lifestyle_traveler } } 80 = {} @@ -1386,7 +1474,7 @@ on_travel_plan_complete = { send_interface_toast = { type = event_generic_good title = leisurely_option_effect - + add_prestige_experience = { value = { value = current_travel_plan.var:travel_plan_provinces_traversed @@ -1408,7 +1496,7 @@ on_travel_plan_complete = { send_interface_toast = { type = event_generic_good title = travel_logs_title - + add_trait_xp = { trait = lifestyle_traveler track = danger @@ -1500,7 +1588,7 @@ on_travel_plan_complete = { type = event_generic_good title = of_the_people_perk_name left_icon = root - + add_prestige_experience = { value = diplomacy multiply = 15 @@ -1581,7 +1669,7 @@ on_travel_plan_complete = { fishing_yurt_riverside_lakeside_fertility_bonus_lvl_2 = { domicile_location.county = { add_county_modifier = fishing_yurt_county_modifier_2 } } fishing_yurt_riverside_lakeside_fertility_bonus_lvl_1 = { domicile_location.county = { add_county_modifier = fishing_yurt_county_modifier_1 } } } - } + } } if = { # A fallback for the contract "Settle Theological Arguments" if you have your domicile in the same location as the start province, due to how the 'Travel Plan' effect works @@ -1608,6 +1696,9 @@ on_travel_plan_complete = { trigger_event = laamp_base_learning_contract_events.4017 } tribute_mission_clean_up_variables_effect = yes + + #Remove characters added by travel options at the start of travel plan + remove_travel_option_added_character_effect = yes } } @@ -1676,18 +1767,18 @@ on_travel_plan_abort = { send_interface_toast = { type = event_toast_effect_neutral title = petition_liege_costs_refunded - left_icon = root + left_icon = root remove_decision_cooldown = petition_liege_decision # refund prestige and influence cost if = { limit = { petition_liege_admin_valid_trigger = yes } - change_influence_no_experience = standard_activity_cost + change_influence_no_experience = standard_activity_base_cost } else = { - add_prestige_no_experience = standard_activity_cost + add_prestige_no_experience = standard_activity_base_cost } } - # remove variables and flags + # remove variables and flags petition_liege_variable_cleanup_effect = yes } if = { @@ -1707,6 +1798,9 @@ on_travel_plan_abort = { #Hit absentee Tributary with Tribute Mission penalty requested_tribute_mission_penalty_effect = yes tribute_mission_clean_up_variables_effect = yes + + #Remove characters added by travel options at the start of travel plan + remove_travel_option_added_character_effect = yes } } @@ -1726,18 +1820,18 @@ on_travel_plan_cancel = { send_interface_toast = { type = event_toast_effect_neutral title = petition_liege_costs_refunded - left_icon = root + left_icon = root remove_decision_cooldown = petition_liege_decision # refund prestige and influence cost if = { limit = { petition_liege_admin_valid_trigger = yes } - change_influence_no_experience = standard_activity_cost + change_influence_no_experience = standard_activity_base_cost } else = { - add_prestige_no_experience = standard_activity_cost + add_prestige_no_experience = standard_activity_base_cost } } - # remove variables and flags + # remove variables and flags petition_liege_variable_cleanup_effect = yes } if = { @@ -1745,16 +1839,16 @@ on_travel_plan_cancel = { send_interface_toast = { type = event_toast_effect_neutral title = petition_ceremonial_liege_costs_refunded - left_icon = root + left_icon = root remove_decision_cooldown = petition_ceremonial_liege_decision # refund prestige and influence cost if = { limit = { petition_liege_admin_valid_trigger = yes } - change_influence_no_experience = standard_activity_cost + change_influence_no_experience = standard_activity_base_cost } - else = { add_prestige_no_experience = standard_activity_cost } + else = { add_prestige_no_experience = standard_activity_base_cost } } - # remove variables and flags + # remove variables and flags petition_liege_variable_cleanup_effect = yes } if = { @@ -1768,7 +1862,7 @@ on_travel_plan_cancel = { send_interface_toast = { type = event_toast_effect_neutral title = pay_homage_costs_refunded - left_icon = root + left_icon = root # Remove variable preventing you from paying homage again if = { limit = { @@ -1788,7 +1882,7 @@ on_travel_plan_cancel = { remove_variable = pledge_loyalty_to_liege_grace } # refund any costs - add_prestige = standard_activity_cost + add_prestige = standard_activity_base_cost if = { limit = { has_variable = pay_homage_gold_value @@ -1860,7 +1954,7 @@ on_travel_activity_complete = { # If the travel is due to an activity and the activity is invalidated (not completed), this will trigger. # After this on_action, the travel plan will be rerouted home. on_travel_activity_invalidated = { - + } # If the travel is due to an activity and the activity has started while this travel plan is still underway, this @@ -1948,7 +2042,7 @@ travel_laamps_provisions_on_action = { events = { ep3_laamps_provisions.1080 } - + random_events = { chance_of_no_event = { value = 10 @@ -1989,7 +2083,7 @@ adventurer_talent_scouting_on_action = { } } -adventurer_encourage_realtionships_on_action = { +adventurer_encourage_relationships_on_action = { trigger = { current_travel_plan ?= { has_travel_option = adventurers_encourage_relationships_option } } diff --git a/common/schemes/scheme_types/learn_language_scheme.txt b/common/schemes/scheme_types/learn_language_scheme.txt index beff07b4..7f79b721 100644 --- a/common/schemes/scheme_types/learn_language_scheme.txt +++ b/common/schemes/scheme_types/learn_language_scheme.txt @@ -65,6 +65,9 @@ } valid = { is_incapable = no + NOT = { + has_character_modifier = partially_mute_modifier + } NOT = { knows_language_of_culture = scope:target.culture } diff --git a/common/script_values/00_culture_values.txt b/common/script_values/00_culture_values.txt index d47c5746..9d51979d 100644 --- a/common/script_values/00_culture_values.txt +++ b/common/script_values/00_culture_values.txt @@ -665,6 +665,12 @@ court_language_ai_score = { min = 1 } + #Increase from number of other courts using the Language (1.5 per court). + add = { + value = scope:courts_with_language + multiply = 1.5 + } + #Adjust for Court Grandeur. #World religions primarily cares about other courts that share their faith. add = { @@ -732,6 +738,15 @@ court_language_ai_score = { } #Add nothing } + else_if = { # Immaterial harmony wants immaterial harmony languages + limit = { + faith = { has_doctrine = special_doctrine_immaterial_harmony } + NOT = { + scope:target.faith = { has_doctrine = special_doctrine_immaterial_harmony } + } + } + #Add nothing + } else_if = { #Eastern religion matching vs non Eastern religion - CGV Ignored limit = { OR = { @@ -750,13 +765,27 @@ court_language_ai_score = { else = { #Everyone else just cares about the Grandeur directly add = scope:target.court_grandeur_current } - } - - - #Increase from number of other courts using the Language (1.5 per court). - add = { - value = scope:courts_with_language - multiply = 1.5 + if = { # Only care about checking rulers who speak the language that their court speaks + limit = { + scope:target = { + NOT = { + knows_court_language_of = scope:target + } + } + } + multiply = 0 + } + else_if = { # Reduce if the target does not have the court language of their own culture + limit = { + scope:target = { + is_ai = yes + NOT = { + has_court_language_of_culture = scope:target.culture + } + } + } + multiply = 0.5 + } } #Arbitrary Geographical Bias - if our courts are not in the same region the score is divided by 2. diff --git a/common/script_values/00_men_at_arms_values.txt b/common/script_values/00_men_at_arms_values.txt index 00782379..424e0e3f 100644 --- a/common/script_values/00_men_at_arms_values.txt +++ b/common/script_values/00_men_at_arms_values.txt @@ -386,6 +386,10 @@ guanch_vaulter_recruitment_cost = @[skirmisher_recruitment_cost * 1.2] guanch_vaulter_low_maint_cost = @[skirmisher_low_maint_cost * 1.2] guanch_vaulter_high_maint_cost = @[skirmisher_high_maint_cost * 1.2] +teulu_recruitment_cost = @[light_cavalry_recruitment_cost * 1.2] +teulu_low_maint_cost = @[light_cavalry_low_maint_cost * 1.2] +teulu_high_maint_cost = @[light_cavalry_high_maint_cost * 1.2] + ###Accolade MaA accolade_skirmisher_recruitment_cost = @[skirmisher_recruitment_cost * 2] diff --git a/common/script_values/02_religion_values.txt b/common/script_values/02_religion_values.txt index 67a80bfe..a36c301b 100644 --- a/common/script_values/02_religion_values.txt +++ b/common/script_values/02_religion_values.txt @@ -3329,11 +3329,11 @@ holy_war_defensive_join_value = { # Root = faith faith_conversion_fervor_mult = { - value = define:NReligion|MAX_FERVOR + value = define:NFaith|MAX_FERVOR subtract = fervor - multiply = define:NReligion|FAITH_CREATION_FERVOR_DISCOUNT_PER_MISSING_FERVOR - max = define:NReligion|FAITH_CREATION_FERVOR_DISCOUNT_MAX - divide = define:NReligion|MAX_FERVOR + multiply = define:NFaith|FAITH_CREATION_FERVOR_DISCOUNT_PER_MISSING_FERVOR + max = define:NFaith|FAITH_CREATION_FERVOR_DISCOUNT_MAX + divide = define:NFaith|MAX_FERVOR } # Modify (multiply) the doctrine cost when creating a faith. diff --git a/common/script_values/04_ep2_wedding_values.txt b/common/script_values/04_ep2_wedding_values.txt index 74081f05..fd9c5200 100644 --- a/common/script_values/04_ep2_wedding_values.txt +++ b/common/script_values/04_ep2_wedding_values.txt @@ -816,7 +816,7 @@ if = { limit = { - scope:actor = { + scope:actor ?= { has_variable = severed_head_vassalization var:severed_head_vassalization = { this = scope:impress_check diff --git a/common/script_values/07_ep3_values.txt b/common/script_values/07_ep3_values.txt index 091c6292..6e44c95f 100644 --- a/common/script_values/07_ep3_values.txt +++ b/common/script_values/07_ep3_values.txt @@ -1047,7 +1047,7 @@ ep3_hire_laamp_mercs_payment_value = { min = scope:employer.medium_gold_value if = { limit = { - scope:laamp_temp.domicile ?= { has_domicile_parameter = camp_improved_mercenary_contract_rewards } + domicile ?= { has_domicile_parameter = camp_improved_mercenary_contract_rewards } } multiply = camp_improved_mercenary_contract_rewards_value } @@ -1062,10 +1062,14 @@ ep3_hire_laamp_mercs_payment_value = { } if = { limit = { - scope:laamp_temp ?= { has_perk = hard_rule_perk } + has_perk = hard_rule_perk } multiply = adventurer_hard_rule_contract_rewards_value } + if = { + limit = { exists = var:aggregate_war_contribution_value } + add = var:aggregate_war_contribution_value + } max = { value = scope:employer.yearly_character_income if = { @@ -1421,514 +1425,7 @@ governor_efficiency = { } divide = 100 } - if = { - limit = { - OR = { - AND = { - realm_size >= 65 - realm_size < 75 - } - liege ?= { - realm_size >= 65 - realm_size < 75 - } - } - } - add = { - add = { - value = -5 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - OR = { - AND = { - realm_size >= 75 - realm_size < 85 - } - liege ?= { - realm_size >= 75 - realm_size < 85 - } - } - } - add = { - add = { - value = -10 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - - OR = { - AND = { - realm_size >= 85 - realm_size < 95 - } - liege ?= { - realm_size >= 85 - realm_size < 95 - } - } - } - add = { - add = { - value = -15 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - - OR = { - AND = { - realm_size >= 95 - realm_size < 105 - } - liege ?= { - realm_size >= 95 - realm_size < 105 - } - } - } - add = { - add = { - value = -20 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - - OR = { - AND = { - realm_size >= 105 - realm_size < 115 - } - liege ?= { - realm_size >= 105 - realm_size < 115 - } - } - } - add = { - add = { - value = -25 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - - OR = { - AND = { - realm_size >= 115 - realm_size < 125 - } - liege ?= { - realm_size >= 115 - realm_size < 125 - } - } - } - add = { - add = { - value = -30 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - - OR = { - AND = { - realm_size >= 125 - realm_size < 135 - } - liege ?= { - realm_size >= 125 - realm_size < 135 - } - } - } - add = { - add = { - value = -35 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - - OR = { - AND = { - realm_size >= 135 - realm_size < 145 - } - liege ?= { - realm_size >= 135 - realm_size < 145 - } - } - } - add = { - add = { - value = -40 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - - OR = { - AND = { - realm_size >= 145 - realm_size < 155 - } - liege ?= { - realm_size >= 145 - realm_size < 155 - } - } - } - add = { - add = { - value = -45 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - - OR = { - AND = { - realm_size >= 155 - realm_size < 165 - } - liege ?= { - realm_size >= 155 - realm_size < 165 - } - } - } - add = { - add = { - value = -50 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - - OR = { - AND = { - realm_size >= 175 - realm_size < 185 - } - liege ?= { - realm_size >= 175 - realm_size < 185 - } - } - } - add = { - add = { - value = -55 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - - OR = { - AND = { - realm_size >= 185 - realm_size < 195 - } - liege ?= { - realm_size >= 185 - realm_size < 195 - } - } - } - add = { - add = { - value = -60 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - - OR = { - AND = { - realm_size >= 195 - realm_size < 205 - } - liege ?= { - realm_size >= 195 - realm_size < 205 - } - } - } - add = { - add = { - value = -65 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - - OR = { - AND = { - realm_size >= 205 - realm_size < 215 - } - liege ?= { - realm_size >= 205 - realm_size < 215 - } - } - } - add = { - add = { - value = -70 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - - OR = { - AND = { - realm_size >= 215 - realm_size < 225 - } - liege ?= { - realm_size >= 215 - realm_size < 225 - } - } - } - add = { - add = { - value = -75 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - - OR = { - AND = { - realm_size >= 225 - realm_size < 235 - } - liege ?= { - realm_size >= 225 - realm_size < 235 - } - } - } - add = { - add = { - value = -80 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - - OR = { - AND = { - realm_size >= 235 - realm_size < 245 - } - liege ?= { - realm_size >= 235 - realm_size < 245 - } - } - } - add = { - add = { - value = -85 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - OR = { - AND = { - realm_size >= 245 - realm_size < 255 - - } - liege ?= { - realm_size >= 245 - realm_size < 255 - - } - } - } - add = { - add = { - value = -90 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - - OR = { - AND = { - realm_size >= 255 - realm_size < 265 - } - liege ?= { - realm_size >= 255 - realm_size < 265 - } - } - } - add = { - add = { - value = -95 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - OR = { - AND = { - realm_size >= 265 - realm_size < 275 - - } - liege ?= { - realm_size >= 265 - realm_size < 275 - - } - } - } - add = { - add = { - value = -100 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - OR = { - AND = { - realm_size >= 275 - realm_size < 285 - - } - liege ?= { - realm_size >= 275 - realm_size < 285 - - } - } - } - add = { - add = { - value = -105 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - - OR = { - AND = { - realm_size >= 285 - realm_size < 295 - } - liege ?= { - realm_size >= 285 - realm_size < 295 - } - } - } - add = { - add = { - value = -110 - desc = game_concept_realm_size - } - divide = 100 - } - } - else_if = { - limit = { - - OR = { - AND = { - realm_size >= 300 - } - liege ?= { - realm_size >= 300 - } - } - } - add = { - add = { - value = -115 - desc = game_concept_realm_size - } - divide = 100 - } - } - else = { - } # Rank 4 or 5 education trait if = { limit = { @@ -2042,7 +1539,7 @@ governor_efficiency = { # Aspirations if = { limit = { # Service - house ?= { has_house_power_parameter = service_house_governor_efficiency_bonus } + house ?= { has_house_aspiration_parameter = service_house_governor_efficiency_bonus } } add = { add = { @@ -2055,7 +1552,7 @@ governor_efficiency = { } if = { limit = { # Governance - house ?= { has_house_power_parameter = governance_improved_governor_efficiency_bonus } + house ?= { has_house_aspiration_parameter = governance_improved_governor_efficiency_bonus } } add = { add = { @@ -2540,10 +2037,8 @@ governor_efficiency = { } if = { # The Forbidden City special building bonus limit = { - top_liege ?= { - capital_province = { - has_building_or_higher = forbidden_city_01 - } + top_liege.capital_province ?= { + has_building_or_higher = forbidden_city_01 } } add = { @@ -2900,20 +2395,38 @@ estate_local_theme_cost_reduction_value = -0.25 estate_court_tutor_cost_reduction_low_value = 0.25 estate_court_tutor_cost_reduction_value = 0.5 estate_court_tutor_cost_reduction_high_value = 0.75 -estate_increased_tutor_aptitude_value = 20 +estate_increased_tutor_aptitude_1_value = 5 +estate_increased_tutor_aptitude_2_value = 10 +estate_increased_tutor_aptitude_3_value = 15 +estate_increased_tutor_aptitude_4_value = 20 +estate_increased_tutor_aptitude_5_value = 25 +estate_increased_tutor_aptitude_6_value = 30 +domicile_increased_wet_nurse_aptitude_1_value = 5 +domicile_increased_wet_nurse_aptitude_2_value = 10 +domicile_increased_wet_nurse_aptitude_3_value = 15 +domicile_increased_wet_nurse_aptitude_4_value = 20 +domicile_increased_wet_nurse_aptitude_5_value = 25 +domicile_increased_wet_nurse_aptitude_6_value = 30 estate_increase_charioteer_aptitude_value = 20 estate_improved_wine_cellar_1_value = 0.1 estate_improved_wine_cellar_2_value = 0.25 estate_improved_wine_cellar_3_value = 0.5 estate_increase_bodyguard_aptitude_1_value = 5 -estate_increase_bodyguard_aptitude_2_value = 15 +estate_increase_bodyguard_aptitude_2_value = 10 +estate_increase_bodyguard_aptitude_3_value = 15 +estate_increase_bodyguard_aptitude_4_value = 20 +estate_increase_bodyguard_aptitude_5_value = 25 +estate_increase_bodyguard_aptitude_6_value = 30 estate_cheaper_feast_cost_value = 0.2 estate_reduce_council_position_cost_value = 0.2 estate_reduce_commission_artifact_cost_value = 0.5 estate_increase_antiquarian_aptitude_value = 20 -estate_increase_physician_aptitude_value = 10 -estate_increase_physician_aptitude_2_value = 15 -estate_increase_physician_aptitude_3_value = 20 +estate_increase_physician_aptitude_1_value = 5 +estate_increase_physician_aptitude_2_value = 10 +estate_increase_physician_aptitude_3_value = 15 +estate_increase_physician_aptitude_4_value = 20 +estate_increase_physician_aptitude_5_value = 25 +estate_increase_physician_aptitude_6_value = 30 estate_increase_master_of_hunt_aptitude_value = 20 estate_increase_master_of_horse_aptitude_value = 20 estate_cheaper_hunt_cost_value = 0.2 @@ -4643,6 +4156,38 @@ appointment_investment_cap = { limit = { has_domicile_building = reception_hall_05 } add = 40 } + if = { + limit = { has_domicile_building = east_asian_estate_main_02 } + add = 10 + } + else_if = { + limit = { has_domicile_building = east_asian_estate_main_03 } + add = 20 + } + else_if = { + limit = { has_domicile_building = east_asian_estate_main_04 } + add = 30 + } + else_if = { + limit = { has_domicile_building = east_asian_estate_main_05 } + add = 40 + } + if = { + limit = { has_domicile_building = east_asian_estate_reception_hall_02 } + add = 10 + } + else_if = { + limit = { has_domicile_building = east_asian_estate_reception_hall_03 } + add = 20 + } + else_if = { + limit = { has_domicile_building = east_asian_estate_reception_hall_04 } + add = 30 + } + else_if = { + limit = { has_domicile_building = east_asian_estate_reception_hall_05 } + add = 40 + } if = { limit = { has_domicile_building = japanese_manor_office_01 } add = 5 @@ -4676,15 +4221,15 @@ appointment_investment_cap = { add = { value = 0 if = { - limit = { has_house_power_parameter = increased_investment_cap_bonus_3 } + limit = { has_house_aspiration_parameter = increased_investment_cap_bonus_3 } add = increased_investment_cap_bonus_3_value } else_if = { - limit = { has_house_power_parameter = increased_investment_cap_bonus_2 } + limit = { has_house_aspiration_parameter = increased_investment_cap_bonus_2 } add = increased_investment_cap_bonus_2_value } else_if = { - limit = { has_house_power_parameter = increased_investment_cap_bonus_1 } + limit = { has_house_aspiration_parameter = increased_investment_cap_bonus_1 } add = increased_investment_cap_bonus_1_value } desc = political_meddlers_attribute_name_desc @@ -6744,13 +6289,6 @@ laamp_city_construction_year_value = { add = 100 } -estate_increase_tutor_aptitude_value_1 = 5 -estate_increase_tutor_aptitude_value_2 = 10 -estate_increase_tutor_aptitude_value_3 = 15 -estate_increase_tutor_aptitude_value_4 = 20 -estate_increase_tutor_aptitude_value_5 = 25 -estate_increase_tutor_aptitude_value_6 = 30 - force_step_down_interaction_gold_cost_value = { value = 0 scope:recipient = { @@ -6831,15 +6369,15 @@ building_construction_dynasty_prestige_gain_value = { value = 0 scope:character.house ?= { if = { - limit = { has_house_power_parameter = gain_dynasty_prestige_on_building_construction_3 } + limit = { has_house_aspiration_parameter = gain_dynasty_prestige_on_building_construction_3 } add = gain_dynasty_prestige_on_building_construction_3_value } else_if = { - limit = { has_house_power_parameter = gain_dynasty_prestige_on_building_construction_2 } + limit = { has_house_aspiration_parameter = gain_dynasty_prestige_on_building_construction_2 } add = gain_dynasty_prestige_on_building_construction_2_value } else_if = { - limit = { has_house_power_parameter = gain_dynasty_prestige_on_building_construction_1 } + limit = { has_house_aspiration_parameter = gain_dynasty_prestige_on_building_construction_1 } add = gain_dynasty_prestige_on_building_construction_1_value } } @@ -6855,20 +6393,25 @@ swing_scales_cost_reduction_3_value = -0.2 swing_scales_cost_multipler_value = { value = 1 - house ?= { - if = { - limit = { has_house_power_parameter = respected_despots } + if = { + limit = { + exists = house + } + house = { if = { - limit = { has_house_power_parameter = swing_scales_cost_reduction_3 } - add = swing_scales_cost_reduction_3_value - } - else_if = { - limit = { has_house_power_parameter = swing_scales_cost_reduction_2 } - add = swing_scales_cost_reduction_2_value - } - else_if = { - limit = { has_house_power_parameter = swing_scales_cost_reduction_1 } - add = swing_scales_cost_reduction_1_value + limit = { has_house_aspiration_parameter = respected_despots } + if = { + limit = { has_house_aspiration_parameter = swing_scales_cost_reduction_3 } + add = swing_scales_cost_reduction_3_value + } + else_if = { + limit = { has_house_aspiration_parameter = swing_scales_cost_reduction_2 } + add = swing_scales_cost_reduction_2_value + } + else_if = { + limit = { has_house_aspiration_parameter = swing_scales_cost_reduction_1 } + add = swing_scales_cost_reduction_1_value + } } } } diff --git a/common/scripted_character_templates/00_court_character_templates.txt b/common/scripted_character_templates/00_court_character_templates.txt index b7757936..e3942ede 100644 --- a/common/scripted_character_templates/00_court_character_templates.txt +++ b/common/scripted_character_templates/00_court_character_templates.txt @@ -1,5 +1,6 @@ bleeding_diplomat_character = { age = { 18 60 } + dynasty = none gender = male random_traits_list = { count = 2 @@ -26,6 +27,7 @@ preaching_tour_priest_character = { age = { 50 80 } + dynasty = none gender_female_chance = root_faith_clergy_gender_female_chance random_traits_list = { count = 2 @@ -55,6 +57,7 @@ preaching_tour_priest_character = { bernard_of_clairvaux_character = { name = Bernard_of_Clairvaux age = { 20 63 } + dynasty = none gender = male trait = saint trait = ambitious @@ -66,6 +69,7 @@ bernard_of_clairvaux_character = { head_chasing_monk_character = { age = { 20 30 } + dynasty = none gender_female_chance = root_faith_clergy_gender_female_chance faith = root.faith culture = root.culture @@ -80,6 +84,7 @@ head_chasing_monk_character = { fake_artifact_peddler_character = { age = { 20 80 } + dynasty = none trait = greedy trait = education_intrigue_2 random_traits = yes @@ -87,6 +92,7 @@ fake_artifact_peddler_character = { adoring_fan_character = { age = { 20 80 } + dynasty = none gender_female_chance = root_faith_clergy_gender_female_chance trait = trusting trait = education_martial_3 @@ -95,6 +101,7 @@ adoring_fan_character = { trepanner_character = { age = { 20 40 } + dynasty = none gender_female_chance = root_faith_clergy_gender_female_chance trait = lifestyle_physician diff --git a/common/scripted_character_templates/00_court_position_templates.txt b/common/scripted_character_templates/00_court_position_templates.txt index 080a4798..68b42e2a 100644 --- a/common/scripted_character_templates/00_court_position_templates.txt +++ b/common/scripted_character_templates/00_court_position_templates.txt @@ -1,6 +1,7 @@  scribe_travel_option_character = { age = { 25 30 } + dynasty = none gender_female_chance = 50 trait = devoted diff --git a/common/scripted_character_templates/00_fund_inspiration_character_templates.txt b/common/scripted_character_templates/00_fund_inspiration_character_templates.txt index f7acb5d7..2dcf3a2f 100644 --- a/common/scripted_character_templates/00_fund_inspiration_character_templates.txt +++ b/common/scripted_character_templates/00_fund_inspiration_character_templates.txt @@ -1,5 +1,6 @@ adventurer_pregnant_lover_character = { age = { 18 40 } + dynasty = none gender = female random_traits_list = { count = 2 @@ -24,6 +25,7 @@ adventurer_female_lover_character = { age = { 18 40 } + dynasty = none gender = female random_traits = yes trait = beauty_good_3 @@ -31,6 +33,7 @@ adventurer_female_lover_character = { adventurer_male_lover_character = { age = { 18 40 } + dynasty = none gender = male random_traits = yes trait = beauty_good_3 diff --git a/common/scripted_character_templates/00_hold_court_character_templates.txt b/common/scripted_character_templates/00_hold_court_character_templates.txt index 6b4d1639..dca708a7 100644 --- a/common/scripted_character_templates/00_hold_court_character_templates.txt +++ b/common/scripted_character_templates/00_hold_court_character_templates.txt @@ -1,6 +1,7 @@  demanding_poet_character = { age = { 20 30 } + dynasty = none faith = root.faith culture = root.culture trait = education_learning_2 @@ -19,6 +20,7 @@ demanding_poet_character = { demanding_poet_lover_character = { age = { 20 30 } + dynasty = none faith = root.faith culture = root.culture trait = beauty_good_2 @@ -37,6 +39,7 @@ demanding_poet_lover_character = { demanding_poet_diplomacy_character = { age = { 20 30 } + dynasty = none faith = root.faith culture = root.culture trait = beauty_good_2 @@ -68,6 +71,7 @@ demanding_poet_diplomacy_character = { demanding_poet_stewardship_character = { age = { 20 30 } + dynasty = none faith = root.faith culture = root.culture trait = beauty_good_2 @@ -87,6 +91,7 @@ demanding_poet_stewardship_character = { demanding_poet_martial_character = { age = { 20 30 } + dynasty = none faith = root.faith culture = root.culture trait = beauty_good_2 @@ -118,6 +123,7 @@ demanding_poet_martial_character = { demanding_poet_intrigue_character = { age = { 20 30 } + dynasty = none faith = root.faith culture = root.culture trait = beauty_good_2 @@ -136,6 +142,7 @@ demanding_poet_intrigue_character = { } demanding_poet_learning_character = { age = { 20 30 } + dynasty = none faith = root.faith culture = root.culture trait = beauty_good_2 @@ -155,6 +162,7 @@ demanding_poet_learning_character = { suspicious_genealogist_character = { age = { 70 80 } + dynasty = none faith = root.faith culture = root.culture trait = education_intrigue_2 @@ -169,6 +177,7 @@ suspicious_genealogist_character = { alluring_suitor_character = { age = { 18 35 } + dynasty = none random_traits_list = { count = 1 beauty_good_2 = {} diff --git a/common/scripted_character_templates/00_knight_templates.txt b/common/scripted_character_templates/00_knight_templates.txt index 4203d8dc..39d8b508 100644 --- a/common/scripted_character_templates/00_knight_templates.txt +++ b/common/scripted_character_templates/00_knight_templates.txt @@ -1,5 +1,6 @@ knight_errant_character = { age = { 18 32 } + dynasty = none random_traits = no culture = root.location.culture faith = root.location.faith @@ -43,6 +44,7 @@ knight = { age = { 18 32 } + dynasty = none random_traits = yes culture = root.culture faith = root.faith @@ -86,6 +88,7 @@ knight = { wandering_knight_character = { age = { 18 35 } + dynasty = none random_traits_list = { count = 1 education_martial_2 = {} diff --git a/common/scripted_character_templates/00_mystic_templates.txt b/common/scripted_character_templates/00_mystic_templates.txt index 1628805a..67c7a066 100644 --- a/common/scripted_character_templates/00_mystic_templates.txt +++ b/common/scripted_character_templates/00_mystic_templates.txt @@ -1,5 +1,6 @@ default_mystic_character = { age = { 30 80 } + dynasty = none trait = lifestyle_mystic random_traits = yes faith = root.faith @@ -37,6 +38,7 @@ local_saint_template = { age = { 30 80 } faith = root.faith culture = root.culture + dynasty = none gender_female_chance = { if = { limit = { root.faith = { has_doctrine = doctrine_gender_male_dominated } } @@ -243,6 +245,7 @@ local_saint_template = { mendicant_mystic_character = { age = { 30 80 } + dynasty = none # Education random_traits_list = { count = 1 @@ -295,6 +298,7 @@ mendicant_mystic_character = { wise_woman_character = { age = { 30 80 } + dynasty = none #Education random_traits_list = { count = 1 @@ -425,6 +429,7 @@ stylite_saint_character = { ancient_forest_traveler_character = { age = { 60 90 } + dynasty = none # Education random_traits_list = { count = 1 diff --git a/common/scripted_character_templates/00_officials_templates.txt b/common/scripted_character_templates/00_officials_templates.txt index c3cc2f6e..7e44281a 100644 --- a/common/scripted_character_templates/00_officials_templates.txt +++ b/common/scripted_character_templates/00_officials_templates.txt @@ -1,6 +1,7 @@  tax_collector_character = { age = { 30 65 } + dynasty = none gender_female_chance = root_faith_dominant_gender_female_chance random_traits = yes culture = scope:county.culture @@ -173,6 +174,7 @@ administrator_character = { estate_owner_character = { age = { 20 40 } + dynasty = none trait = deceitful random_traits_list = { count = 1 @@ -203,6 +205,7 @@ estate_owner_character = { herald_character = { age = { 30 50 } + dynasty = none faith = root.faith culture = root.culture gender_female_chance = root_faith_dominant_gender_female_chance diff --git a/common/scripted_character_templates/00_peasant_leader_templates.txt b/common/scripted_character_templates/00_peasant_leader_templates.txt index 1a5fc97b..31eed9e1 100644 --- a/common/scripted_character_templates/00_peasant_leader_templates.txt +++ b/common/scripted_character_templates/00_peasant_leader_templates.txt @@ -1,5 +1,6 @@ peasant_leader_stewardship_character = { age = { 20 40 } + dynasty = none random_traits = yes culture = scope:project_county.culture faith = scope:project_county.faith @@ -25,6 +26,7 @@ peasant_leader_martial_character = { age = { 20 40 } + dynasty = none random_traits = yes culture = scope:project_county.culture faith = scope:project_county.faith diff --git a/common/scripted_character_templates/00_physician_character_template.txt b/common/scripted_character_templates/00_physician_character_template.txt index 35265317..92aa147e 100644 --- a/common/scripted_character_templates/00_physician_character_template.txt +++ b/common/scripted_character_templates/00_physician_character_template.txt @@ -1,5 +1,6 @@ physician_low_character_template = { age = { 18 50 } + dynasty = none faith = root.faith culture = root.culture gender_female_chance = 50 @@ -32,6 +33,7 @@ physician_high_character_template = { age = { 24 50 } + dynasty = none faith = root.faith culture = root.culture gender_female_chance = 50 @@ -65,6 +67,7 @@ physician_high_character_template = { physician_excellent_character_template = { age = { 30 60 } + dynasty = none faith = root.faith culture = root.culture gender_female_chance = 50 diff --git a/common/scripted_character_templates/00_pool_repopulation_character_templates.txt b/common/scripted_character_templates/00_pool_repopulation_character_templates.txt index edf2da24..0927081a 100644 --- a/common/scripted_character_templates/00_pool_repopulation_character_templates.txt +++ b/common/scripted_character_templates/00_pool_repopulation_character_templates.txt @@ -1186,7 +1186,6 @@ pool_repopulate_local_flavor = { lifestyle_hunter = {} } dynasty = none - after_creation = { random_list = { @@ -1534,7 +1533,7 @@ pool_repopulate_local_flavor = { 450 = { trigger = { NOT = { - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = this.faith GENDER_CHARACTER = this } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = this.faith GENDER_CHARACTER = this } } } add_trait = witch diff --git a/common/scripted_character_templates/00_priest_character_template.txt b/common/scripted_character_templates/00_priest_character_template.txt index adffb096..68fdf709 100644 --- a/common/scripted_character_templates/00_priest_character_template.txt +++ b/common/scripted_character_templates/00_priest_character_template.txt @@ -1,5 +1,6 @@ priest_character_template = { age = { 30 60 } + dynasty = none random_traits_list = { count = 1 education_learning_2 = {} @@ -25,6 +26,7 @@ simple_priest_character_template = { age = { 30 60 } + dynasty = none random_traits_list = { count = 1 education_learning_2 = {} @@ -46,6 +48,7 @@ simple_priest_character_template = { virtuous_priest_character_template = { age = { 30 60 } + dynasty = none random_traits_list = { count = 1 education_learning_3 = {} @@ -1088,6 +1091,7 @@ location_pilgrim_template = { tournament_priest_character_template = { age = { 30 60 } + dynasty = none random_traits_list = { count = 1 education_learning_2 = {} diff --git a/common/scripted_character_templates/00_saharan_nomad_template.txt b/common/scripted_character_templates/00_saharan_nomad_template.txt index 30c16ca4..ce83bd5f 100644 --- a/common/scripted_character_templates/00_saharan_nomad_template.txt +++ b/common/scripted_character_templates/00_saharan_nomad_template.txt @@ -1,6 +1,7 @@ #Clan leader saharan_clan_leader_character = { age = { 30 50 } + dynasty = none #Education random_traits_list = { count = 1 diff --git a/common/scripted_character_templates/00_scholar_template.txt b/common/scripted_character_templates/00_scholar_template.txt index 86883bd5..f690b151 100644 --- a/common/scripted_character_templates/00_scholar_template.txt +++ b/common/scripted_character_templates/00_scholar_template.txt @@ -2,6 +2,7 @@ # Root scholars scholar_character = { age = { 35 50 } + dynasty = none random_traits_list = { count = 1 education_learning_3 = {} @@ -29,6 +30,7 @@ scholar_character = { writer_character = { age = { 25 60 } + dynasty = none random_traits_list = { count = 1 education_learning_2 = {} @@ -59,6 +61,7 @@ writer_character = { # Capital county-based scholars capital_scholar_character = { age = { 35 50 } + dynasty = none random_traits_list = { count = 1 education_learning_2 = {} @@ -77,6 +80,7 @@ capital_scholar_character = { capital_writer_character = { age = { 25 60 } + dynasty = none random_traits_list = { count = 1 education_learning_2 = {} diff --git a/common/scripted_character_templates/00_scripted_character_templates.txt b/common/scripted_character_templates/00_scripted_character_templates.txt index 5b31b0f9..65e457fe 100644 --- a/common/scripted_character_templates/00_scripted_character_templates.txt +++ b/common/scripted_character_templates/00_scripted_character_templates.txt @@ -1,5 +1,6 @@ frankish_knight_character = { age = { 20 40 } + dynasty = none random_traits = yes culture = culture:frankish faith = faith:catholic diff --git a/common/scripted_character_templates/00_soldier_character_templates.txt b/common/scripted_character_templates/00_soldier_character_templates.txt index b0da6d40..faac0223 100644 --- a/common/scripted_character_templates/00_soldier_character_templates.txt +++ b/common/scripted_character_templates/00_soldier_character_templates.txt @@ -1,6 +1,7 @@  soldier_friend_character = { age = { 18 35 } + dynasty = none random_traits_list = { count = 1 education_martial_2 = {} @@ -59,6 +60,7 @@ soldier_friend_character = { new_commander_character = { age = { 18 40 } + dynasty = none random_traits_list = { count = 1 education_martial_2 = {} @@ -129,6 +131,7 @@ new_commander_character = { new_warrior_character = { age = { 18 40 } + dynasty = none random_traits_list = { count = 1 education_martial_2 = {} @@ -245,6 +248,7 @@ new_warrior_character = { new_siege_engineer = { age = { 30 45 } + dynasty = none random_traits_list = { count = 1 education_martial_4 = {} @@ -319,6 +323,7 @@ new_siege_engineer = { new_berserker_character = { age = { 18 40 } + dynasty = none random_traits_list = { count = 1 education_martial_1 = {} @@ -396,6 +401,7 @@ new_berserker_character = { mercenary = { age = { 25 42 } + dynasty = none random_traits_list = { count = 1 education_martial_3 = {} @@ -446,6 +452,7 @@ mercenary = { great_mercenary = { age = { 25 42 } + dynasty = none random_traits_list = { count = 1 @@ -504,6 +511,7 @@ great_mercenary = { retired_mercenary = { age = { 40 60 } + dynasty = none random_traits_list = { count = 1 education_martial_3 = {} @@ -556,6 +564,7 @@ retired_mercenary = { new_raider_character = { age = { 40 60 } + dynasty = none random_traits_list = { count = 1 education_martial_2 = {} @@ -592,6 +601,7 @@ new_raider_character = { honorable_soldier_character = { age = { 30 50 } + dynasty = none random_traits_list = { count = 1 education_martial_3 = {} @@ -641,6 +651,7 @@ honorable_soldier_character = { old_knight_teacher = { age = { 55 60 } + dynasty = none random_traits_list = { count = 1 education_martial_3 = {} @@ -687,6 +698,7 @@ old_knight_teacher = { wrestler_character = { age = { 25 42 } + dynasty = none trait = education_martial_1 diff --git a/common/scripted_character_templates/00_terrain_specialist_templates.txt b/common/scripted_character_templates/00_terrain_specialist_templates.txt index 4343e452..82052fb5 100644 --- a/common/scripted_character_templates/00_terrain_specialist_templates.txt +++ b/common/scripted_character_templates/00_terrain_specialist_templates.txt @@ -1,5 +1,6 @@ winter_commander_character = { age = { 18 40 } + dynasty = none random_traits_list = { count = 1 education_martial_2 = {} @@ -56,6 +57,7 @@ forest_commander_character = { age = { 18 40 } + dynasty = none random_traits_list = { count = 1 education_martial_2 = {} @@ -107,6 +109,7 @@ forest_commander_character = { mountain_commander_character = { age = { 18 40 } + dynasty = none random_traits_list = { count = 1 education_martial_2 = {} @@ -149,6 +152,7 @@ mountain_commander_character = { desert_commander_character = { age = { 18 40 } + dynasty = none random_traits_list = { count = 1 education_martial_2 = {} @@ -192,6 +196,7 @@ desert_commander_character = { hill_commander_character = { age = { 18 40 } + dynasty = none random_traits_list = { count = 1 education_martial_2 = {} @@ -231,6 +236,7 @@ hill_commander_character = { jungle_commander_character = { age = { 18 40 } + dynasty = none random_traits_list = { count = 1 education_martial_2 = {} @@ -282,6 +288,7 @@ jungle_commander_character = { open_commander_character = { age = { 18 40 } + dynasty = none random_traits_list = { count = 1 education_martial_2 = {} @@ -331,6 +338,7 @@ open_commander_character = { #Slightly different to the above; used in the Hereward story cycle wetlands_commander_character = { age = { 18 40 } + dynasty = none culture = root.culture faith = root.faith gender_female_chance = root_soldier_female_chance diff --git a/common/scripted_character_templates/01_bp1_filippa_character_templates.txt b/common/scripted_character_templates/01_bp1_filippa_character_templates.txt index 2e83714c..41da60fe 100644 --- a/common/scripted_character_templates/01_bp1_filippa_character_templates.txt +++ b/common/scripted_character_templates/01_bp1_filippa_character_templates.txt @@ -1,6 +1,7 @@  bp1_yearly_2021_martial_person_template = { age = { 18 35 } + dynasty = none random_traits_list = { count = 1 education_martial_3 = {} @@ -56,6 +57,7 @@ bp1_yearly_2021_martial_person_template = { bp1_yearly_2021_learning_witch_template = { age = { 18 35 } + dynasty = none random_traits_list = { count = 1 lifestyle_mystic = {} @@ -114,6 +116,7 @@ bp1_yearly_2021_learning_witch_template = { bp1_yearly_2021_learning_person_template = { age = { 18 35 } + dynasty = none random_traits_list = { count = 1 lifestyle_mystic = {} @@ -176,6 +179,7 @@ bp1_yearly_2021_learning_person_template = { bp1_yearly_2021_stewardship_person_template = { age = { 18 35 } + dynasty = none random_traits_list = { count = 1 education_stewardship_3 = {} @@ -212,6 +216,7 @@ bp1_yearly_2021_stewardship_person_template = { bp1_yearly_2021_diplomacy_person_template = { age = { 18 35 } + dynasty = none random_traits_list = { count = 1 education_diplomacy_3 = {} @@ -254,6 +259,7 @@ bp1_yearly_2021_diplomacy_person_template = { bp1_yearly_2021_intrigue_person_template = { age = { 18 35 } + dynasty = none random_traits_list = { count = 1 education_intrigue_3 = {} diff --git a/common/scripted_character_templates/01_ep1_character_templates.txt b/common/scripted_character_templates/01_ep1_character_templates.txt index 75d788ae..9fa8d72b 100644 --- a/common/scripted_character_templates/01_ep1_character_templates.txt +++ b/common/scripted_character_templates/01_ep1_character_templates.txt @@ -1,5 +1,6 @@ frontier_hero_template = { age = { 18 30 } + dynasty = none trait = education_martial_4 trait = brave random_traits_list = { @@ -225,7 +226,6 @@ inspired_template = { local_artisan_template = { age = { 20 40 } - dynasty = none faith = root.faith culture = root.culture dynasty = none @@ -995,6 +995,7 @@ local_dispute_template = { symposium_template = { # General age = { 55 65 } + dynasty = none faith = scope:symposium_ruler.faith culture = scope:symposium_ruler.culture gender_female_chance = root_faith_dominant_gender_adjusted_female_chance diff --git a/common/scripted_character_templates/01_fp1_character_templates.txt b/common/scripted_character_templates/01_fp1_character_templates.txt index b99ae32a..d9f631fc 100644 --- a/common/scripted_character_templates/01_fp1_character_templates.txt +++ b/common/scripted_character_templates/01_fp1_character_templates.txt @@ -250,6 +250,7 @@ fp1_ms_vagrant_character = { fp1_western_warrior_character = { #General age = { 30 60 } + dynasty = none faith = scope:scandinavian_county.faith culture = scope:scandinavian_county.culture #Education @@ -309,6 +310,7 @@ fp1_western_warrior_character = { fp1_eastern_warrior_character = { #General age = { 30 60 } + dynasty = none faith = scope:scandinavian_county.faith culture = scope:scandinavian_county.culture #Education @@ -371,6 +373,7 @@ fp1_eastern_warrior_character = { fp1_jomsviking_bigwig = { #General age = { 30 60 } + dynasty = none faith = faith:norse_pagan culture = culture:norse #Education @@ -441,6 +444,7 @@ fp1_jomsviking_bigwig = { fp1_jomsviking_retainer_martial = { #General age = { 25 45 } + dynasty = none faith = faith:norse_pagan culture = root.culture #Education @@ -499,6 +503,7 @@ fp1_jomsviking_retainer_martial = { fp1_jomsviking_retainer_prowess = { #General age = { 25 45 } + dynasty = none faith = faith:norse_pagan culture = root.culture #Education @@ -712,6 +717,7 @@ fp1_truthful_explorer_character = { fp1_islamic_explorer_character = { #General age = { 30 60 } + dynasty = none faith = scope:sponsoring_liege.faith culture = scope:sponsoring_liege.culture dynasty = generate @@ -1216,6 +1222,7 @@ fp1_trade_partner_warrior = { # Local Warlords old_country_local_warlord_template = { age = { 20 40 } + dynasty = none random_traits = yes culture = scope:current_county.title_province.culture faith = scope:current_county.title_province.faith diff --git a/common/scripted_character_templates/01_tgp_japan_character_templates.txt b/common/scripted_character_templates/01_tgp_japan_character_templates.txt index b1bf5743..c26a87f8 100644 --- a/common/scripted_character_templates/01_tgp_japan_character_templates.txt +++ b/common/scripted_character_templates/01_tgp_japan_character_templates.txt @@ -5,6 +5,7 @@ tgp_japan_yearly_events_pearl_diver_template = { age = { 18 70 } + dynasty = none #Force the character to always be brave and calm trait = brave trait = calm @@ -54,6 +55,7 @@ tgp_japan_yearly_events_pearl_diver_template = { tgp_japan_yearly_events_tengu_warrior_template = { age = { 35 70 } + dynasty = none gender_female_chance = root_soldier_female_chance trait = reclusive trait = lifestyle_blademaster diff --git a/common/scripted_character_templates/03_fp2_character_templates.txt b/common/scripted_character_templates/03_fp2_character_templates.txt index d57e6d17..6bb0fefe 100644 --- a/common/scripted_character_templates/03_fp2_character_templates.txt +++ b/common/scripted_character_templates/03_fp2_character_templates.txt @@ -7,6 +7,7 @@ # Super Scholar celebration_scholar_character = { age = { 35 50 } + dynasty = none random_traits_list = { count = 1 education_learning_2 = {} @@ -52,6 +53,7 @@ celebration_scholar_character = { celebration_martial_character = { age = { 18 30 } + dynasty = none trait = brave random_traits_list = { count = 1 @@ -104,6 +106,7 @@ celebration_martial_character = { celebration_diplomat_character = { age = { 18 30 } + dynasty = none trait = brave random_traits_list = { count = 1 @@ -254,6 +257,7 @@ celebration_hunter_character = { celebration_priest_character = { age = { 30 60 } + dynasty = none random_traits_list = { count = 1 education_learning_2 = {} @@ -482,6 +486,7 @@ celebration_artisan_character = { celebration_chessmaster_character = { age = { 35 50 } + dynasty = none random_traits_list = { count = { 0 1 } @@ -527,6 +532,7 @@ celebration_chessmaster_character = { spanish_jewish_merchant_character = { age = { 25 50 } + dynasty = none random_traits_list = { count = 1 @@ -562,6 +568,7 @@ spanish_jewish_merchant_character = { spanish_conversos_character = { age = { 25 50 } + dynasty = none random_traits = yes @@ -573,6 +580,7 @@ spanish_conversos_character = { toledan_night_character = { age = { 25 50 } + dynasty = none trait = sadistic random_traits_list = { count = 1 diff --git a/common/scripted_character_templates/04_ep2_accolade_character_templates.txt b/common/scripted_character_templates/04_ep2_accolade_character_templates.txt index a3f84f51..c094a15f 100644 --- a/common/scripted_character_templates/04_ep2_accolade_character_templates.txt +++ b/common/scripted_character_templates/04_ep2_accolade_character_templates.txt @@ -1,9 +1,34 @@ # COMMON ATTRIBUTES accolade_marauder_character = { - age = { 16 35 } + age = { 16 22 } random_traits = yes - + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 sadistic = {} @@ -33,30 +58,31 @@ accolade_marauder_character = { vengeful = {} callous = {} greedy = {} - } - random_traits_list = { - education_intrigue_1 = { weight = { base = 35 } } - education_intrigue_2 = { weight = { base = 35 } } - education_intrigue_3 = { weight = { base = 20 } } - education_intrigue_4 = { weight = { base = 10 } } - } - random_traits_list = { - count = { 0 1 } - lifestyle_blademaster = {} - lifestyle_hunter = {} - giant = {} - torturer = {} - murderer = {} - strong = {} disloyal = {} } + # Bad traits for bad squires random_traits_list = { - count = { 0 1 } - tourney_participant = { } + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} + flagellant = {} } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + # Good traits for good squires + random_traits_list = { + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} + torturer = {} + lifestyle_blademaster = {} + lifestyle_hunter = {} + } + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_intrigue_education_from_squires_quality_effect = yes #berserker if = { limit = { @@ -70,7 +96,7 @@ accolade_marauder_character = { if = { limit = { current_date < 1400 - root = { + scope:new_owner = { has_title = title:e_byzantium } culture = { @@ -166,13 +192,38 @@ accolade_marauder_character = { LEVEL_1 = yes LEVEL_3 = no } - add_random_tourney_participant_level_effect = yes } } accolade_idealist_character = { - age = { 16 35 } + age = { 16 22 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -202,27 +253,32 @@ accolade_idealist_character = { trusting = {} generous = {} } + # Bad traits for bad squires random_traits_list = { - education_diplomacy_1 = { weight = { base = 35 } } - education_diplomacy_2 = { weight = { base = 35 } } - education_diplomacy_3 = { weight = { base = 20 } } - education_diplomacy_4 = { weight = { base = 10 } } - } - random_traits_list = { - count = { 0 1 } - lifestyle_hunter = {} - gallant = {} - diplomat = {} - loyal = {} + count = squire_quality_bad_traits + murderer = {} + disfigured = {} + drunkard = {} + rakish = {} + reclusive = {} improvident = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } - tourney_participant = { } + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} + gallant = {} + loyal = {} + diplomat = {} + lifestyle_hunter = {} } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_diplomacy_education_from_squires_quality_effect = yes random = { chance = 5 @@ -319,13 +375,38 @@ accolade_idealist_character = { LEVEL_1 = yes LEVEL_3 = no } - add_random_tourney_participant_level_effect = yes } } accolade_charmer_character = { - age = { 16 35 } + age = { 16 22 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -356,29 +437,31 @@ accolade_charmer_character = { callous = {} greedy = {} } + # Bad traits for bad squires random_traits_list = { - education_intrigue_1 = { weight = { base = 35 } } - education_intrigue_2 = { weight = { base = 35 } } - education_intrigue_3 = { weight = { base = 20 } } - education_intrigue_4 = { weight = { base = 10 } } - } - random_traits_list = { - count = { 0 1 } - gallant = {} - seducer = {} - fecund = {} - rakish = {} - lovers_pox = {} + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} deviant = {} - lifestyle_reveler = { } + lovers_pox = {} + rakish = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } - tourney_participant = { } + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} + seducer = {} + gallant = {} + lifestyle_reveler = {} } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_intrigue_education_from_squires_quality_effect = yes random = { chance = 5 @@ -469,15 +552,38 @@ accolade_charmer_character = { } } set_interesting_traits_and_modifiers_effect = yes - add_random_tourney_participant_level_effect = yes } } - - accolade_thug_character = { - age = { 16 35 } + age = { 16 22 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -509,33 +615,41 @@ accolade_thug_character = { callous = {} greedy = {} } + # Bad traits for bad squires random_traits_list = { - education_martial_1 = { weight = { base = 35 } } - education_martial_2 = { weight = { base = 35 } } - education_intrigue_1 = { weight = { base = 35 } } - education_intrigue_2 = { weight = { base = 35 } } - } - random_traits_list = { - count = { 0 1 } - lifestyle_blademaster = {} - strong = {} - reaver = {} - giant = {} + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} dull = {} irritable = {} disloyal = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } - tourney_participant = { } + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} + reaver = {} + lifestyle_blademaster = {} + giant = {} } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + random_list = { + 1 = { + assign_intrigue_education_from_squires_quality_effect = yes + } + 1 = { + assign_martial_education_from_squires_quality_effect = yes + } + } if = { limit = { current_date < 1400 - root = { + scope:new_owner = { has_title = title:e_byzantium } culture = { @@ -635,13 +749,38 @@ accolade_thug_character = { LEVEL_1 = yes LEVEL_3 = no } - add_random_tourney_participant_level_effect = yes } } accolade_disciplinarian_character = { - age = { 16 35 } + age = { 16 22 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -673,32 +812,34 @@ accolade_disciplinarian_character = { callous = {} greedy = {} } + # Bad traits for bad squires random_traits_list = { - education_stewardship_1 = { weight = { base = 35 } } - education_stewardship_2 = { weight = { base = 35 } } - education_stewardship_3 = { weight = { base = 20 } } - education_stewardship_4 = { weight = { base = 10 } } + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} + flagellant = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } - lifestyle_blademaster = {} + count = squire_quality_good_traits + strong = {} athletic = {} + shrewd = {} organizer = {} overseer = {} - flagellant = {} administrator = {} + lifestyle_blademaster = {} } - random_traits_list = { - count = { 0 1 } - tourney_participant = { } - } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_stewardship_education_from_squires_quality_effect = yes if = { limit = { current_date < 1400 - root = { + scope:new_owner = { has_title = title:e_byzantium } culture = { @@ -787,13 +928,38 @@ accolade_disciplinarian_character = { LEVEL_1 = yes LEVEL_3 = no } - add_random_tourney_participant_level_effect = yes } } accolade_fanatic_character = { - age = { 16 35 } + age = { 16 22 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -823,33 +989,34 @@ accolade_fanatic_character = { callous = {} greedy = {} } + # Bad traits for bad squires random_traits_list = { - education_learning_1 = { weight = { base = 35 } } - education_learning_2 = { weight = { base = 35 } } - education_learning_3 = { weight = { base = 20 } } - education_learning_4 = { weight = { base = 10 } } - } - random_traits_list = { - count = { 0 1 } - lifestyle_blademaster = {} + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} lunatic_1 = {} lunatic_genetic = {} - albino = {} - disfigured = {} + flagellant = {} + contrite = {} + } + # Good traits for good squires + random_traits_list = { + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} theologian = {} lifestyle_mystic = {} holy_warrior = {} - flagellant = {} - contrite = {} whole_of_body = {} + lifestyle_blademaster = {} } - random_traits_list = { - count = { 0 1 } - tourney_participant = { } - } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_learning_education_from_squires_quality_effect = yes # Cultural Traditions if = { limit = { @@ -932,13 +1099,38 @@ accolade_fanatic_character = { LEVEL_1 = yes LEVEL_3 = yes } - add_random_tourney_participant_level_effect = yes } } accolade_valiant_character = { - age = { 16 35 } + age = { 16 22 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -969,33 +1161,36 @@ accolade_valiant_character = { forgiving = {} trusting = {} } + # Bad traits for bad squires random_traits_list = { - education_martial_1 = { weight = { base = 35 } } - education_martial_2 = { weight = { base = 35 } } - education_martial_3 = { weight = { base = 20 } } - education_martial_4 = { weight = { base = 10 } } + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} + weak = {} + hunchbacked = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } + count = squire_quality_good_traits lifestyle_blademaster = {} lifestyle_traveler = {} strong = {} lifestyle_hunter = {} - reckless = {} + athletic = {} + shrewd = {} gallant = {} loyal = {} } - random_traits_list = { - count = { 0 1 } - tourney_participant = { } - } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_martial_education_from_squires_quality_effect = yes if = { limit = { current_date < 1400 - root = { + scope:new_owner = { has_title = title:e_byzantium } culture = { @@ -1118,13 +1313,38 @@ accolade_valiant_character = { LEVEL_1 = yes LEVEL_3 = no } - add_random_tourney_participant_level_effect = yes } } accolade_stalwart_character = { - age = { 16 35 } + age = { 16 22 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -1155,14 +1375,23 @@ accolade_stalwart_character = { forgiving = {} greedy = {} } + # Bad traits for bad squires random_traits_list = { - education_martial_1 = { weight = { base = 35 } } - education_martial_2 = { weight = { base = 35 } } - education_martial_3 = { weight = { base = 20 } } - education_martial_4 = { weight = { base = 10 } } + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} + weak = {} + hunchbacked = {} + clubfooted = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} lifestyle_blademaster = {} lifestyle_hunter = {} athletic = {} @@ -1170,21 +1399,14 @@ accolade_stalwart_character = { confider = {} unyielding_defender = {} } - random_traits_list = { - count = { 0 1 } - tourney_participant = { } - } - random_traits_list = { - count = { 0 1 } - loyal = {} - } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_martial_education_from_squires_quality_effect = yes if = { limit = { current_date < 1400 - root = { + scope:new_owner = { has_title = title:e_byzantium } culture = { @@ -1279,13 +1501,38 @@ accolade_stalwart_character = { LEVEL_1 = yes LEVEL_3 = no } - add_random_tourney_participant_level_effect = yes } } accolade_scoundrel_character = { - age = { 16 35 } + age = { 16 22 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -1315,36 +1562,42 @@ accolade_scoundrel_character = { forgiving = {} greedy = {} } + # Bad traits for bad squires random_traits_list = { - education_diplomacy_1 = { weight = { base = 35 } } - education_diplomacy_2 = { weight = { base = 35 } } - education_diplomacy_3 = { weight = { base = 20 } } - education_diplomacy_4 = { weight = { base = 10 } } - } - random_traits_list = { - count = { 0 1 } - lifestyle_traveler = {} - disloyal = {} - shrewd = {} - schemer = {} + count = squire_quality_bad_traits + murderer = {} + contrite = {} drunkard = {} - hashishiyah = {} + dull = {} rakish = {} profligate = {} + disloyal = {} wild_oat = {} + } + # Good traits for good squires + random_traits_list = { + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} + lifestyle_traveler = {} lifestyle_reveler = { } } - random_traits_list = { - count = { 0 1 } - tourney_participant = { } - } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + random_list = { + 1 = { + assign_diplomacy_education_from_squires_quality_effect = yes + } + 1 = { + assign_intrigue_education_from_squires_quality_effect = yes + } + } if = { limit = { current_date < 1400 - root = { + scope:new_owner = { has_title = title:e_byzantium } culture = { @@ -1445,15 +1698,40 @@ accolade_scoundrel_character = { } } set_interesting_traits_and_modifiers_effect = yes - add_random_tourney_participant_level_effect = yes } } # SKILLED ATTRIBUTES accolade_politicker_character = { - age = { 18 36 } + age = { 16 24 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -1497,24 +1775,32 @@ accolade_politicker_character = { forgiving = {} } + # Bad traits for bad squires random_traits_list = { - education_diplomacy_3 = { weight = { base = 50 } } - education_diplomacy_4 = { weight = { base = 25 } } + count = squire_quality_bad_traits + inappetetic = {} + murderer = {} + drunkard = {} + dull = {} + stuttering = {} + lisping = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} lifestyle_traveler = {} diplomat = {} - lifestyle_poet = {} august = {} loyal = {} lifestyle_reveler = { } - tourney_participant = { } } - prowess = { min_guest_template_skill 16 } - diplomacy = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_diplomacy_education_from_squires_quality_effect = yes random = { chance = 1 @@ -1604,13 +1890,38 @@ accolade_politicker_character = { } } set_interesting_traits_and_modifiers_effect = yes - add_random_tourney_participant_level_effect = yes } } accolade_tactician_character = { - age = { 18 36 } + age = { 16 24 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -1656,31 +1967,38 @@ accolade_tactician_character = { vengeful = {} forgiving = {} } - + # Bad traits for bad squires random_traits_list = { - education_martial_3 = { weight = { base = 50 } } - education_martial_4 = { weight = { base = 25 } } + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} + weak = {} + clubfooted = {} + hunchbacked = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} lifestyle_hunter = {} + lifestyle_blademaster = {} strategist = {} gallant = {} overseer = {} - tourney_participant = {} - lifestyle_blademaster = {} - strong = {} - lifestyle_hunter = {} } - prowess = { 8 14 } - martial = { 9 12 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_martial_education_from_squires_quality_effect = yes # Cultural Traditions if = { limit = { current_date < 1400 - root = { + scope:new_owner = { has_title = title:e_byzantium } culture = { @@ -1768,14 +2086,39 @@ accolade_tactician_character = { LEVEL_1 = yes LEVEL_3 = no } - add_random_tourney_participant_level_effect = yes set_interesting_traits_and_modifiers_effect = yes } } accolade_reeve_character = { - age = { 18 36 } + age = { 16 24 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -1819,24 +2162,29 @@ accolade_reeve_character = { vengeful = {} forgiving = {} } - + # Bad traits for bad squires random_traits_list = { - education_stewardship_3 = { weight = { base = 50 } } - education_stewardship_4 = { weight = { base = 25 } } + count = squire_quality_bad_traits + murderer = {} + profligate = {} + drunkard = {} + dull = {} + comfort_eater = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } - administrator = {} - avaricious = {} - architect = {} + count = squire_quality_good_traits + strong = {} + athletic = {} shrewd = {} - tourney_participant = { } - journaller = {} + avaricious = {} + administrator = {} + architect = {} } - prowess = { min_guest_template_skill 16 } - stewardship = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_stewardship_education_from_squires_quality_effect = yes # Cultural Traditions if = { limit = { @@ -1909,13 +2257,38 @@ accolade_reeve_character = { } } set_interesting_traits_and_modifiers_effect = yes - add_random_tourney_participant_level_effect = yes } } accolade_manipulator_character = { - age = { 18 36 } + age = { 16 24 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -1962,30 +2335,37 @@ accolade_manipulator_character = { fickle = {} vengeful = {} } - + # Bad traits for bad squires random_traits_list = { - education_intrigue_3 = { weight = { base = 50 } } - education_intrigue_4 = { weight = { base = 25 } } + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} + loyal = {} + blind = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } - tourney_participant = { } + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} schemer = {} seducer = {} torturer = {} lifestyle_herbalist = {} lifestyle_reveler = {} - disloyal = {} } - prowess = { min_guest_template_skill 16 } - intrigue = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_intrigue_education_from_squires_quality_effect = yes # Cultural Traditions if = { limit = { current_date < 1400 - root = { + scope:new_owner = { has_title = title:e_byzantium } culture = { @@ -2068,13 +2448,38 @@ accolade_manipulator_character = { } } set_interesting_traits_and_modifiers_effect = yes - add_random_tourney_participant_level_effect = yes } } accolade_mentor_character = { - age = { 20 40 } + age = { 22 30 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -2101,32 +2506,33 @@ accolade_mentor_character = { deceitful = {} greedy = {} } - + # Bad traits for bad squires random_traits_list = { - education_learning_3 = { weight = { base = 50 } } - education_learning_4 = { weight = { base = 25 } } + count = squire_quality_bad_traits + murderer = {} + drunkard = {} + dull = {} + inappetetic = {} + flagellant = {} + rakish = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } - chaste = {} - diligent = {} - shy = {} - forgiving = {} - patient = {} - cynical = {} + count = squire_quality_good_traits + strong = {} + athletic = {} shrewd = {} - one_eyed = {} + journaller = {} scholar = {} theologian = {} lifestyle_traveler = {} whole_of_body = {} lifestyle_physician = {} - journaller = {} } - prowess = { min_guest_template_skill 16 } - learning = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_learning_education_from_squires_quality_effect = yes # Cultural Traditions if = { limit = { @@ -2199,15 +2605,38 @@ accolade_mentor_character = { } } set_interesting_traits_and_modifiers_effect = yes - add_random_tourney_participant_level_effect = yes } } accolade_contender_character = { - age = { 16 36 } + age = { 16 24 } random_traits = yes - - trait = tourney_participant + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 wrathful = {} @@ -2235,27 +2664,37 @@ accolade_contender_character = { deceitful = {} greedy = {} } - + # Bad traits for bad squires random_traits_list = { - education_martial_1 = { weight = { base = 45 } } - education_martial_2 = { weight = { base = 40 } } - education_martial_3 = { weight = { base = 10 } } - education_martial_4 = { weight = { base = 5 } } + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} + irritable = {} + inappetetic = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } - brave = {} - vengeful = {} - sadistic = {} - giant = {} + count = squire_quality_good_traits strong = {} + athletic = {} + shrewd = {} + giant = {} gallant = {} lifestyle_blademaster = {} - irritable = {} } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + random_list = { + 1 = { + assign_martial_education_from_squires_quality_effect = yes + } + 1 = { + assign_diplomacy_education_from_squires_quality_effect = yes + } + } #berserker if = { limit = { @@ -2270,7 +2709,7 @@ accolade_contender_character = { if = { limit = { current_date < 1400 - root = { + scope:new_owner = { has_title = title:e_byzantium } culture = { @@ -2358,16 +2797,40 @@ accolade_contender_character = { LEVEL_1 = yes LEVEL_3 = yes } - add_random_tourney_participant_level_effect = yes } } # MEN-AT-ARMS ACCOLADES accolade_archer_character = { - age = { 16 35 } + age = { 16 22 } random_traits = yes - trait = tourney_participant + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 arbitrary = {} @@ -2391,48 +2854,30 @@ accolade_archer_character = { deceitful = {} greedy = {} } - + # Bad traits for bad squires random_traits_list = { - education_martial_1 = { weight = { base = 35 } } - education_martial_2 = { weight = { base = 35 } } - education_martial_3 = { weight = { base = 20 } } - education_martial_4 = { weight = { base = 10 } } + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} + irritable = {} + inappetetic = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} + giant = {} + gallant = {} lifestyle_hunter = {} - calm = {} - patient = {} - cynical = {} - callous = {} - craven = {} - forest_fighter = {} - } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + } + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { - add_trait_xp = { - trait = tourney_participant - track = bow - value = 25 - } - random = { - chance = 35 - add_trait_xp = { - trait = tourney_participant - track = bow - value = 25 - } - } - random = { - chance = 5 - add_trait_xp = { - trait = tourney_participant - track = bow - value = 30 - } - } - + assign_martial_education_from_squires_quality_effect = yes # Cultural Traditions if = { limit = { @@ -2512,9 +2957,34 @@ accolade_archer_character = { } accolade_skirmisher_character = { - age = { 16 35 } + age = { 16 22 } random_traits = yes - trait = tourney_participant + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 wrathful = {} @@ -2541,57 +3011,40 @@ accolade_skirmisher_character = { deceitful = {} greedy = {} } - + # Bad traits for bad squires random_traits_list = { - education_martial_1 = { weight = { base = 35 } } - education_martial_2 = { weight = { base = 35 } } - education_martial_3 = { weight = { base = 20 } } - education_martial_4 = { weight = { base = 10 } } + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} + irritable = {} + inappetetic = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} + physique_good_1 = {} + gallant = {} lifestyle_hunter = {} - lifestyle_blademaster = {} - jungle_stalker = {} - winter_soldier = {} - diligent = {} - brave = {} - fickle = {} - arbitrary = {} - humble = {} - scarred = {} } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_martial_education_from_squires_quality_effect = yes + add_trait = tourney_participant add_trait_xp = { trait = tourney_participant track = bow - value = 20 + value = 10 } - random = { - chance = 35 - add_trait_xp = { - trait = tourney_participant - track = foot - value = 20 - } - } - random = { - chance = 20 - add_trait_xp = { - trait = tourney_participant - track = bow - value = 30 - } - } - random = { - chance = 20 - add_trait_xp = { - trait = tourney_participant - track = foot - value = 30 - } + add_trait_xp = { + trait = tourney_participant + track = foot + value = 10 } # Cultural Traditions @@ -2675,8 +3128,34 @@ accolade_skirmisher_character = { } accolade_pike_character = { - age = { 16 35 } + age = { 16 22 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -2701,56 +3180,44 @@ accolade_pike_character = { deceitful = {} greedy = {} } - + # Bad traits for bad squires random_traits_list = { - education_martial_1 = { weight = { base = 35 } } - education_martial_2 = { weight = { base = 35 } } - education_martial_3 = { weight = { base = 20 } } - education_martial_4 = { weight = { base = 10 } } + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} + irritable = {} + inappetetic = {} + weak = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } - rough_terrain_expert = {} - unyielding_defender = {} - just = {} - cynical = {} - forgiving = {} - diligent = {} - trusting = {} - stubborn = {} + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} giant = {} + gallant = {} + lifestyle_blademaster = {} + rough_terrain_expert = {} } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_martial_education_from_squires_quality_effect = yes add_trait = tourney_participant add_trait_xp = { trait = tourney_participant track = foot - value = 25 - } - random = { - chance = 35 - add_trait_xp = { - trait = tourney_participant - track = foot - value = 25 - } - } - random = { - chance = 5 - add_trait_xp = { - trait = tourney_participant - track = foot - value = 30 - } + value = 10 } # Cultural Traditions if = { limit = { current_date < 1400 - root = { + scope:new_owner = { has_title = title:e_byzantium } culture = { @@ -2834,8 +3301,34 @@ accolade_pike_character = { } accolade_outrider_character = { - age = { 16 35 } + age = { 16 22 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -2863,49 +3356,38 @@ accolade_outrider_character = { deceitful = {} greedy = {} } - + # Bad traits for bad squires random_traits_list = { - education_martial_1 = { weight = { base = 35 } } - education_martial_2 = { weight = { base = 35 } } - education_martial_3 = { weight = { base = 20 } } - education_martial_4 = { weight = { base = 10 } } + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} + irritable = {} + inappetetic = {} + weak = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} + physique_good_1 = {} + gallant = {} + lifestyle_blademaster = {} lifestyle_hunter = {} open_terrain_expert = {} - reckless = {} - brave = {} - wrathful = {} - impatient = {} - ambitious = {} - arbitrary = {} - fickle = {} } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_martial_education_from_squires_quality_effect = yes add_trait = tourney_participant add_trait_xp = { trait = tourney_participant track = horse - value = 25 - } - random = { - chance = 35 - add_trait_xp = { - trait = tourney_participant - track = horse - value = 25 - } - } - random = { - chance = 5 - add_trait_xp = { - trait = tourney_participant - track = horse - value = 30 - } + value = 10 } # Cultural Traditions @@ -2990,8 +3472,115 @@ accolade_outrider_character = { } accolade_vanguard_character = { - age = { 16 35 } + age = { 16 22 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { + exists = location.culture + location.culture = { + OR = { + has_innovation = innovation_quilted_armor + has_cultural_tradition = tradition_fp1_coastal_warriors + has_cultural_tradition = tradition_hird + has_cultural_tradition = tradition_futuwaa + has_cultural_tradition = tradition_druzhina + has_cultural_tradition = tradition_khadga_puja + has_cultural_tradition = tradition_garuda_warriors + has_cultural_tradition = tradition_himalayan_settlers + has_cultural_tradition = tradition_mubarizuns + has_cultural_tradition = tradition_burman_royal_army + has_cultural_tradition = tradition_mountaineer_ruralism + has_innovation = innovation_sarawit + has_innovation = innovation_legionnaires + has_cultural_parameter = unlock_zhanmadao + has_cultural_parameter = unlock_burenjia + } + } + } + } + scope:knight_culture = { + trigger = { + exists = scope:knight_culture + scope:knight_culture = { + OR = { + has_innovation = innovation_quilted_armor + has_cultural_tradition = tradition_fp1_coastal_warriors + has_cultural_tradition = tradition_hird + has_cultural_tradition = tradition_futuwaa + has_cultural_tradition = tradition_druzhina + has_cultural_tradition = tradition_khadga_puja + has_cultural_tradition = tradition_garuda_warriors + has_cultural_tradition = tradition_himalayan_settlers + has_cultural_tradition = tradition_mubarizuns + has_cultural_tradition = tradition_burman_royal_army + has_cultural_tradition = tradition_mountaineer_ruralism + has_innovation = innovation_sarawit + has_innovation = innovation_legionnaires + has_cultural_parameter = unlock_zhanmadao + has_cultural_parameter = unlock_burenjia + } + } + } + } + scope:varangian_culture = { + trigger = { + exists = scope:varangian_culture + scope:varangian_culture = { + OR = { + has_innovation = innovation_quilted_armor + has_cultural_tradition = tradition_fp1_coastal_warriors + has_cultural_tradition = tradition_hird + has_cultural_tradition = tradition_futuwaa + has_cultural_tradition = tradition_druzhina + has_cultural_tradition = tradition_khadga_puja + has_cultural_tradition = tradition_garuda_warriors + has_cultural_tradition = tradition_himalayan_settlers + has_cultural_tradition = tradition_mubarizuns + has_cultural_tradition = tradition_burman_royal_army + has_cultural_tradition = tradition_mountaineer_ruralism + has_innovation = innovation_sarawit + has_innovation = innovation_legionnaires + has_cultural_parameter = unlock_zhanmadao + has_cultural_parameter = unlock_burenjia + } + } + } + } + scope:type_specific_culture = { + trigger = { + exists = scope:type_specific_culture + scope:type_specific_culture = { + OR = { + has_innovation = innovation_quilted_armor + has_cultural_tradition = tradition_fp1_coastal_warriors + has_cultural_tradition = tradition_hird + has_cultural_tradition = tradition_futuwaa + has_cultural_tradition = tradition_druzhina + has_cultural_tradition = tradition_khadga_puja + has_cultural_tradition = tradition_garuda_warriors + has_cultural_tradition = tradition_himalayan_settlers + has_cultural_tradition = tradition_mubarizuns + has_cultural_tradition = tradition_burman_royal_army + has_cultural_tradition = tradition_mountaineer_ruralism + has_innovation = innovation_sarawit + has_innovation = innovation_legionnaires + has_cultural_parameter = unlock_zhanmadao + has_cultural_parameter = unlock_burenjia + } + } + } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -3019,50 +3608,36 @@ accolade_vanguard_character = { gregarious = {} greedy = {} } - + # Bad traits for bad squires random_traits_list = { - education_martial_1 = { weight = { base = 35 } } - education_martial_2 = { weight = { base = 35 } } - education_martial_3 = { weight = { base = 20 } } - education_martial_4 = { weight = { base = 10 } } + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} + irritable = {} + flagellant = {} + rakish = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } - lifestyle_blademaster = {} + count = squire_quality_good_traits strong = {} athletic = {} - gallant = {} - wrathful = {} - impatient = {} - arrogant = {} - brave = {} - stubborn = {} + shrewd = {} giant = {} + gallant = {} + lifestyle_blademaster = {} } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_martial_education_from_squires_quality_effect = yes add_trait = tourney_participant add_trait_xp = { trait = tourney_participant track = foot - value = 25 - } - random = { - chance = 35 - add_trait_xp = { - trait = tourney_participant - track = foot - value = 25 - } - } - random = { - chance = 5 - add_trait_xp = { - trait = tourney_participant - track = foot - value = 30 - } + value = 10 } # Cultural Traditions @@ -3079,7 +3654,7 @@ accolade_vanguard_character = { if = { limit = { current_date < 1400 - root = { + scope:new_owner = { has_title = title:e_byzantium } culture = { @@ -3171,8 +3746,91 @@ accolade_vanguard_character = { } accolade_lancer_character = { - age = { 16 35 } + age = { 16 22 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { + exists = location.culture + location.culture = { + OR = { + has_innovation = innovation_arched_saddle + has_cultural_tradition = tradition_caucasian_wolves + has_cultural_tradition = tradition_ep3_audacious_cadets + has_cultural_tradition = tradition_roman_legacy + has_cultural_tradition = tradition_ep3_imperial_tagmata + has_innovation = innovation_valets + has_cultural_parameter = unlock_maa_cataphract_archers + has_innovation = innovation_tiefutu + has_cultural_parameter = unlock_maa_black_armor_cavalry + } + } + } + } + scope:knight_culture = { + trigger = { + exists = scope:knight_culture + scope:knight_culture = { + OR = { + has_innovation = innovation_arched_saddle + has_cultural_tradition = tradition_caucasian_wolves + has_cultural_tradition = tradition_ep3_audacious_cadets + has_cultural_tradition = tradition_roman_legacy + has_cultural_tradition = tradition_ep3_imperial_tagmata + has_innovation = innovation_valets + has_cultural_parameter = unlock_maa_cataphract_archers + has_innovation = innovation_tiefutu + has_cultural_parameter = unlock_maa_black_armor_cavalry + } + } + } + } + scope:turkic_culture = { + trigger = { + exists = scope:turkic_culture + scope:turkic_culture = { + OR = { + has_innovation = innovation_arched_saddle + has_cultural_tradition = tradition_caucasian_wolves + has_cultural_tradition = tradition_ep3_audacious_cadets + has_cultural_tradition = tradition_roman_legacy + has_cultural_tradition = tradition_ep3_imperial_tagmata + has_innovation = innovation_valets + has_cultural_parameter = unlock_maa_cataphract_archers + has_innovation = innovation_tiefutu + has_cultural_parameter = unlock_maa_black_armor_cavalry + } + } + } + } + scope:type_specific_culture = { + trigger = { + exists = scope:type_specific_culture + scope:type_specific_culture = { + OR = { + has_innovation = innovation_arched_saddle + has_cultural_tradition = tradition_caucasian_wolves + has_cultural_tradition = tradition_ep3_audacious_cadets + has_cultural_tradition = tradition_roman_legacy + has_cultural_tradition = tradition_ep3_imperial_tagmata + has_innovation = innovation_valets + has_cultural_parameter = unlock_maa_cataphract_archers + has_innovation = innovation_tiefutu + has_cultural_parameter = unlock_maa_black_armor_cavalry + } + } + } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -3200,59 +3858,44 @@ accolade_lancer_character = { deceitful = {} greedy = {} } - + # Bad traits for bad squires random_traits_list = { - education_martial_1 = { weight = { base = 35 } } - education_martial_2 = { weight = { base = 35 } } - education_martial_3 = { weight = { base = 20 } } - education_martial_4 = { weight = { base = 10 } } + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} + irritable = {} + inappetetic = {} + weak = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } - lifestyle_blademaster = {} + count = squire_quality_good_traits strong = {} + athletic = {} + shrewd = {} + giant = {} gallant = {} + lifestyle_blademaster = {} aggressive_attacker = {} - brave = {} - wrathful = {} - impatient = {} - arrogant = {} - honest = {} - ambitious = {} - zealous = {} - vengeful = {} } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_martial_education_from_squires_quality_effect = yes add_trait = tourney_participant add_trait_xp = { trait = tourney_participant track = horse - value = 25 - } - random = { - chance = 35 - add_trait_xp = { - trait = tourney_participant - track = horse - value = 25 - } - } - random = { - chance = 5 - add_trait_xp = { - trait = tourney_participant - track = horse - value = 30 - } + value = 10 } # Cultural Traditions if = { limit = { current_date < 1400 - root = { + scope:new_owner = { has_title = title:e_byzantium } culture = { @@ -3343,163 +3986,51 @@ accolade_lancer_character = { } } -accolade_crossbowmen_character = { - age = { 16 35 } +accolade_besieger_character = { + age = { 16 22 } random_traits = yes - + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { + exists = location.culture + location.culture = { has_innovation = innovation_mangonel } + } + } + scope:knight_culture = { + trigger = { + exists = scope:knight_culture + scope:knight_culture = { has_innovation = innovation_mangonel } + } + } + scope:varangian_culture = { + trigger = { + exists = scope:varangian_culture + scope:varangian_culture = { has_innovation = innovation_mangonel } + } + } + scope:turkic_culture = { + trigger = { + exists = scope:turkic_culture + scope:turkic_culture = { has_innovation = innovation_mangonel } + } + } + scope:type_specific_culture = { + trigger = { + exists = scope:type_specific_culture + scope:type_specific_culture = { has_innovation = innovation_mangonel } + } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait random_traits_list = { count = 1 - arbitrary = {} - impatient = {} - lustful = {} - compassionate = {} - forgiving = {} - trusting = {} - generous = {} - sadistic = {} - callous = {} - vengeful = {} - stubborn = {} - diligent = {} - temperate = {} - honest = {} - just = {} - patient = {} - ambitious = {} - gregarious = {} - deceitful = {} - greedy = {} + education_martial_1 = {} } - random_traits_list = { - education_martial_1 = { weight = { base = 35 } } - education_martial_2 = { weight = { base = 35 } } - education_martial_3 = { weight = { base = 20 } } - education_martial_4 = { weight = { base = 10 } } - } - random_traits_list = { - count = { 0 1 } - lifestyle_hunter = {} - calm = {} - patient = {} - cynical = {} - callous = {} - craven = {} - humble = {} - cautious_leader = {} - military_engineer = {} - } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance - after_creation = { - add_trait = tourney_participant - add_trait_xp = { - trait = tourney_participant - track = bow - value = 25 - } - random = { - chance = 35 - add_trait_xp = { - trait = tourney_participant - track = bow - value = 25 - } - } - random = { - chance = 5 - add_trait_xp = { - trait = tourney_participant - track = bow - value = 30 - } - } - - # Cultural Traditions - if = { - limit = { - culture = { - has_cultural_parameter = winter_soldier_trait_more_common - } - NOT = { - has_trait = winter_soldier - } - } - random = { - chance = 10 - add_trait = winter_soldier - } - } - if = { - limit = { - culture = { - has_cultural_parameter = forest_fighter_trait_more_common - } - NOT = { - has_trait = forest_fighter - } - } - random = { - chance = 10 - add_trait = forest_fighter - } - } - if = { - limit = { - culture = { - has_cultural_parameter = rough_terrain_expert_trait_more_common - } - NOT = { - has_trait = rough_terrain_expert - } - } - random = { - chance = 10 - add_trait = rough_terrain_expert - } - } - if = { - limit = { - culture = { - has_cultural_parameter = desert_warrior_trait_more_common - } - NOT = { - has_trait = desert_warrior - } - } - random = { - chance = 10 - add_trait = desert_warrior - } - } - if = { - limit = { - culture = { - has_cultural_parameter = jungle_stalker_trait_more_common - } - NOT = { - has_trait = jungle_stalker - } - } - random = { - chance = 10 - add_trait = jungle_stalker - } - } - set_interesting_traits_and_modifiers_effect = yes - add_random_tiered_trait_track_xp_effect = { - TRAIT = lifestyle_hunter - TRACK = hunter - LEVEL_1 = yes - LEVEL_3 = yes - } - } -} - -accolade_besieger_character = { - age = { 16 35 } - random_traits = yes - random_traits_list = { count = 1 wrathful = {} @@ -3523,37 +4054,37 @@ accolade_besieger_character = { deceitful = {} greedy = {} } - + # Bad traits for bad squires random_traits_list = { - education_martial_1 = { weight = { base = 35 } } - education_martial_2 = { weight = { base = 35 } } - education_martial_3 = { weight = { base = 20 } } - education_martial_4 = { weight = { base = 10 } } + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} + irritable = {} + inappetetic = {} + weak = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } - tourney_participant = {} + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} + giant = {} + gallant = {} logistician = {} - calm = {} - patient = {} - deceitful = {} - cynical = {} - paranoid = {} - sadistic = {} - callous = {} - vengeful = {} - diligent = {} - stubborn = {} - } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + } + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_martial_education_from_squires_quality_effect = yes add_trait = military_engineer # Cultural Traditions if = { limit = { current_date < 1400 - root = { + scope:new_owner = { has_title = title:e_byzantium } culture = { @@ -3642,13 +4173,241 @@ accolade_besieger_character = { LEVEL_1 = yes LEVEL_3 = yes } - add_random_tourney_participant_level_effect = yes + } +} + +accolade_crossbowmen_character = { + age = { 16 22 } + random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { + exists = location.culture + location.culture = { + has_innovation = innovation_advanced_bowmaking + has_innovation = innovation_repeating_crossbow + } + } + } + scope:knight_culture = { + trigger = { + exists = scope:knight_culture + scope:knight_culture = { + OR = { + has_innovation = innovation_advanced_bowmaking + has_innovation = innovation_repeating_crossbow + } + } + } + } + scope:turkic_culture = { + trigger = { + exists = scope:turkic_culture + scope:turkic_culture = { + OR = { + has_innovation = innovation_advanced_bowmaking + has_innovation = innovation_repeating_crossbow + } + } + } + } + scope:type_specific_culture = { + trigger = { + exists = scope:type_specific_culture + scope:type_specific_culture = { + OR = { + has_innovation = innovation_advanced_bowmaking + has_innovation = innovation_repeating_crossbow + } + } + } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } + + random_traits_list = { + count = 1 + arbitrary = {} + impatient = {} + lustful = {} + compassionate = {} + forgiving = {} + trusting = {} + generous = {} + sadistic = {} + callous = {} + vengeful = {} + stubborn = {} + diligent = {} + temperate = {} + honest = {} + just = {} + patient = {} + ambitious = {} + gregarious = {} + deceitful = {} + greedy = {} + } + # Bad traits for bad squires + random_traits_list = { + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} + irritable = {} + inappetetic = {} + weak = {} + } + # Good traits for good squires + random_traits_list = { + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} + giant = {} + gallant = {} + lifestyle_hunter = {} + military_engineer = {} + } + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance + after_creation = { + assign_martial_education_from_squires_quality_effect = yes + add_trait = tourney_participant + add_trait_xp = { + trait = tourney_participant + track = bow + value = 10 + } + + # Cultural Traditions + if = { + limit = { + culture = { + has_cultural_parameter = winter_soldier_trait_more_common + } + NOT = { + has_trait = winter_soldier + } + } + random = { + chance = 10 + add_trait = winter_soldier + } + } + if = { + limit = { + culture = { + has_cultural_parameter = forest_fighter_trait_more_common + } + NOT = { + has_trait = forest_fighter + } + } + random = { + chance = 10 + add_trait = forest_fighter + } + } + if = { + limit = { + culture = { + has_cultural_parameter = rough_terrain_expert_trait_more_common + } + NOT = { + has_trait = rough_terrain_expert + } + } + random = { + chance = 10 + add_trait = rough_terrain_expert + } + } + if = { + limit = { + culture = { + has_cultural_parameter = desert_warrior_trait_more_common + } + NOT = { + has_trait = desert_warrior + } + } + random = { + chance = 10 + add_trait = desert_warrior + } + } + if = { + limit = { + culture = { + has_cultural_parameter = jungle_stalker_trait_more_common + } + NOT = { + has_trait = jungle_stalker + } + } + random = { + chance = 10 + add_trait = jungle_stalker + } + } + set_interesting_traits_and_modifiers_effect = yes + add_random_tiered_trait_track_xp_effect = { + TRAIT = lifestyle_hunter + TRACK = hunter + LEVEL_1 = yes + LEVEL_3 = yes + } } } accolade_camelry_character = { - age = { 16 35 } + age = { 16 22 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { + exists = location.culture + location.culture = { has_innovation = innovation_war_camels } + } + } + scope:knight_culture = { + trigger = { + exists = scope:knight_culture + scope:knight_culture = { has_innovation = innovation_war_camels } + } + } + scope:turkic_culture = { + trigger = { + exists = scope:turkic_culture + scope:turkic_culture = { has_innovation = innovation_war_camels } + } + } + scope:type_specific_culture = { + trigger = { + exists = scope:type_specific_culture + scope:type_specific_culture = { has_innovation = innovation_war_camels } + } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -3675,56 +4434,37 @@ accolade_camelry_character = { deceitful = {} greedy = {} } - + # Bad traits for bad squires random_traits_list = { - education_martial_1 = { weight = { base = 35 } } - education_martial_2 = { weight = { base = 35 } } - education_martial_3 = { weight = { base = 20 } } - education_martial_4 = { weight = { base = 10 } } + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} + irritable = {} + inappetetic = {} + weak = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} + physique_good_1 = {} + gallant = {} lifestyle_hunter = {} - temperate = {} - wrathful = {} - impatient = {} - brave = {} - zealous = {} - humble = {} - content = {} - stubborn = {} } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_martial_education_from_squires_quality_effect = yes add_trait = desert_warrior - random = { - chance = 60 - if = { - limit = { - NOT = { has_trait = tourney_participant } - } - add_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = 20 - } - } - random = { - chance = 20 - if = { - limit = { - NOT = { has_trait = tourney_participant } - } - add_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = 30 - } + add_trait = tourney_participant + add_trait_xp = { + trait = tourney_participant + track = horse + value = 10 } # Cultural Traditions @@ -3795,8 +4535,37 @@ accolade_camelry_character = { } accolade_elephantry_character = { - age = { 16 35 } + age = { 16 22 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { + exists = location.culture + location.culture = { has_innovation = innovation_elephantry } + } + } + scope:knight_culture = { + trigger = { + exists = scope:knight_culture + scope:knight_culture = { has_innovation = innovation_elephantry } + } + } + scope:type_specific_culture = { + trigger = { + exists = scope:type_specific_culture + scope:type_specific_culture = { has_innovation = innovation_elephantry } + } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -3824,84 +4593,35 @@ accolade_elephantry_character = { gregarious = {} greedy = {} } - + # Bad traits for bad squires random_traits_list = { - education_martial_1 = { weight = { base = 35 } } - education_martial_2 = { weight = { base = 35 } } - education_martial_3 = { weight = { base = 20 } } - education_martial_4 = { weight = { base = 10 } } + count = squire_quality_bad_traits + murderer = {} + clubfooted = {} + drunkard = {} + dull = {} + irritable = {} + inappetetic = {} + weak = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } - gallant = {} - wrathful = {} - impatient = {} - arrogant = {} - ambitious = {} - stubborn = {} - gregarious = {} - lazy = {} + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} giant = {} - } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + gallant = {} + } + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { - add_trait = jungle_stalker - random = { - chance = 30 - if = { - limit = { - NOT = { has_trait = tourney_participant } - } - add_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = 20 - } - } - random = { - chance = 10 - if = { - limit = { - NOT = { has_trait = tourney_participant } - } - add_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = 30 - } - } - random = { - chance = 30 - if = { - limit = { - NOT = { has_trait = tourney_participant } - } - add_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = bow - value = 20 - } - } - random = { - chance = 10 - if = { - limit = { - NOT = { has_trait = tourney_participant } - } - add_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = bow - value = 30 - } + assign_martial_education_from_squires_quality_effect = yes + add_trait = tourney_participant + add_trait_xp = { + trait = tourney_participant + track = horse + value = 10 } # Cultural Traditions @@ -3966,8 +4686,34 @@ accolade_elephantry_character = { } accolade_horse_archer_character = { - age = { 16 35 } + age = { 16 22 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -3995,57 +4741,43 @@ accolade_horse_archer_character = { deceitful = {} greedy = {} } - + # Bad traits for bad squires random_traits_list = { - education_martial_1 = { weight = { base = 35 } } - education_martial_2 = { weight = { base = 35 } } - education_martial_3 = { weight = { base = 20 } } - education_martial_4 = { weight = { base = 10 } } + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} + irritable = {} + inappetetic = {} + weak = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} + physique_good_1 = {} + gallant = {} lifestyle_hunter = {} open_terrain_expert = {} flexible_leader = {} - patient = {} - arbitrary = {} - fickle = {} - trusting = {} - deceitful = {} - cynical = {} - } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + } + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + assign_martial_education_from_squires_quality_effect = yes add_trait = tourney_participant add_trait_xp = { trait = tourney_participant track = bow - value = 20 + value = 10 } - random = { - chance = 35 - add_trait_xp = { - trait = tourney_participant - track = horse - value = 20 - } - } - random = { - chance = 20 - add_trait_xp = { - trait = tourney_participant - track = bow - value = 30 - } - } - random = { - chance = 20 - add_trait_xp = { - trait = tourney_participant - track = horse - value = 30 - } + add_trait_xp = { + trait = tourney_participant + track = horse + value = 10 } # Cultural Traditions @@ -4131,8 +4863,43 @@ accolade_horse_archer_character = { # EMINENT ATTRIBUTES accolade_huntsmaster_character = { - age = { 18 36 } + age = { 16 24 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { + exists = location.culture + location.culture = { NOT = { has_cultural_tradition = tradition_vegetarianism } } + } + } + scope:knight_culture = { + trigger = { + exists = scope:knight_culture + scope:knight_culture = { NOT = { has_cultural_tradition = tradition_vegetarianism } } + } + } + scope:turkic_culture = { + trigger = { + exists = scope:turkic_culture + scope:turkic_culture = { NOT = { has_cultural_tradition = tradition_vegetarianism } } + } + } + scope:type_specific_culture = { + trigger = { + exists = scope:type_specific_culture + scope:type_specific_culture = { NOT = { has_cultural_tradition = tradition_vegetarianism } } + } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -4160,49 +4927,40 @@ accolade_huntsmaster_character = { deceitful = {} greedy = {} } - + # Bad traits for bad squires random_traits_list = { - education_stewardship_3 = { weight = { base = 40 } } - education_stewardship_4 = { weight = { base = 10 } } - education_martial_3 = { weight = { base = 40 } } - education_martial_4 = { weight = { base = 10 } } + count = squire_quality_bad_traits + murderer = {} + profligate = {} + drunkard = {} + dull = {} + irritable = {} + inappetetic = {} + weak = {} } + # Good traits for good squires random_traits_list = { - count = { 0 1 } - tourney_participant = {} - patient = {} - diligent = {} - calm = {} - callous = {} - shy = {} + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} + physique_good_1 = {} + gallant = {} lifestyle_traveler = {} lifestyle_herbalist = {} - } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + } + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { - add_trait = lifestyle_hunter - if = { - limit = { - has_trait = tourney_participant + random_list = { + 1 = { + assign_martial_education_from_squires_quality_effect = yes } - random = { - chance = 60 - add_trait_xp = { - trait = tourney_participant - track = horse - value = 20 - } - } - random = { - chance = 60 - add_trait_xp = { - trait = tourney_participant - track = bow - value = 30 - } + 1 = { + assign_stewardship_education_from_squires_quality_effect = yes } } + add_trait = lifestyle_hunter # Cultural Traditions if = { @@ -4271,8 +5029,34 @@ accolade_huntsmaster_character = { } accolade_blademaster_character = { - age = { 18 36 } + age = { 16 24 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -4301,50 +5085,76 @@ accolade_blademaster_character = { deceitful = {} greedy = {} } - + # Bad traits for bad squires random_traits_list = { - education_martial_1 = { weight = { base = 35 } } - education_martial_2 = { weight = { base = 35 } } - education_martial_3 = { weight = { base = 20 } } - education_martial_4 = { weight = { base = 10 } } - } - random_traits_list = { - count = { 0 1 } - tourney_participant = {} - giant = {} + count = squire_quality_bad_traits + murderer = {} + drunkard = {} + dull = {} + irritable = {} + inappetetic = {} + weak = {} one_eyed = {} - scarred = {} - gallant = {} - temperate = {} - ambitious = {} - calm = {} - vengeful = {} - callous = {} - sadistic = {} } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + # Good traits for good squires + random_traits_list = { + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} + giant = {} + gallant = {} + } + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { - add_trait = lifestyle_blademaster + assign_martial_education_from_squires_quality_effect = yes + add_trait = lifestyle_blademaster add_trait_xp = { trait = lifestyle_blademaster - value = 100 + value = 25 } if = { limit = { - has_trait = tourney_participant + scope:succeeding_accolade = { accolade_squires_quality_value >= accolade_squires_accomplished_minimum_value } } add_trait_xp = { - trait = tourney_participant - track = foot - value = 20 + trait = lifestyle_blademaster + value = 25 + } + } + if = { + limit = { + scope:succeeding_accolade = { accolade_squires_quality_value >= accolade_squires_capable_minimum_value } + } + add_trait_xp = { + trait = lifestyle_blademaster + value = 15 + } + } + if = { + limit = { + scope:succeeding_accolade = { accolade_squires_quality_value >= accolade_squires_inexperienced_minimum_value } + } + add_trait_xp = { + trait = lifestyle_blademaster + value = 10 + } + } + if = { + limit = { + scope:succeeding_accolade = { accolade_squires_quality_value >= accolade_squires_feckless_minimum_value } + } + add_trait_xp = { + trait = lifestyle_blademaster + value = 5 } } # Cultural Traditions if = { limit = { current_date < 1400 - root = { + scope:new_owner = { has_title = title:e_byzantium } culture = { @@ -4416,8 +5226,34 @@ accolade_blademaster_character = { } accolade_master_of_revels_character = { - age = { 18 36 } + age = { 16 24 } random_traits = yes + faith = faith + random_culture = { + culture = { + trigger = { always = yes } + } + location.culture = { + trigger = { exists = location.culture } + } + scope:knight_culture = { + trigger = { exists = scope:knight_culture } + } + scope:varangian_culture = { + trigger = { exists = scope:varangian_culture } + } + scope:turkic_culture = { + trigger = { exists = scope:turkic_culture } + } + scope:type_specific_culture = { + trigger = { exists = scope:type_specific_culture } + } + } + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } random_traits_list = { count = 1 @@ -4443,30 +5279,40 @@ accolade_master_of_revels_character = { deceitful = {} greedy = {} } - + # Bad traits for bad squires random_traits_list = { - education_diplomacy_1 = { weight = { base = 35 } } - education_diplomacy_2 = { weight = { base = 35 } } - education_diplomacy_3 = { weight = { base = 20 } } - education_diplomacy_4 = { weight = { base = 10 } } - } - random_traits_list = { - count = { 0 1 } - tourney_participant = {} - lifestyle_traveler = {} - gluttonous = {} - gregarious = {} - hashishiyah = {} + count = squire_quality_bad_traits + murderer = {} + stuttering = {} drunkard = {} - generous = {} - trusting = {} - content = {} - lazy = {} - august = {} + dull = {} + irritable = {} + inappetetic = {} + lisping = {} } - prowess = { min_guest_template_skill 16 } - gender_female_chance = root_soldier_female_chance + # Good traits for good squires + random_traits_list = { + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} + giant = {} + gallant = {} + august = {} + lifestyle_traveler = {} + diplomat = {} + } + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance after_creation = { + random_list = { + 1 = { + assign_diplomacy_education_from_squires_quality_effect = yes + } + 1 = { + assign_intrigue_education_from_squires_quality_effect = yes + } + } add_trait = lifestyle_reveler random = { chance = 75 @@ -4496,24 +5342,185 @@ accolade_master_of_revels_character = { } } } - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = wit - value = 20 - } - random = { - chance = 50 - add_trait_xp = { - trait = tourney_participant - track = wit - value = 30 - } - } - } set_interesting_traits_and_modifiers_effect = yes } } + +accolade_house_knight_character = { + age = { 16 22 } + random_traits = yes + faith = faith + culture = culture + trait = loyal + + #This is just temporary, will be replaced by squire quality-determined education trait + random_traits_list = { + count = 1 + education_martial_1 = {} + } + random_traits_list = { + count = 1 + honest = {} + just = {} + patient = {} + } + random_traits_list = { + count = 1 + lustful = {} + wrathful = {} + arrogant = {} + stubborn = {} + diligent = {} + temperate = {} + zealous = {} + brave = {} + honest = {} + just = {} + patient = {} + gregarious = {} + trusting = {} + sadistic = {} + vengeful = {} + callous = {} + generous = {} + compassionate = {} + forgiving = {} + greedy = {} + } + # Bad traits for bad squires + random_traits_list = { + count = squire_quality_bad_traits + murderer = {} + contrite = {} + drunkard = {} + dull = {} + weak = {} + hunchbacked = {} + clubfooted = {} + } + # Good traits for good squires + random_traits_list = { + count = squire_quality_good_traits + strong = {} + athletic = {} + shrewd = {} + lifestyle_blademaster = {} + lifestyle_hunter = {} + athletic = {} + strategist = {} + confider = {} + unyielding_defender = {} + } + prowess = min_guest_template_skill + gender_female_chance = scope_value_target_soldier_female_chance + after_creation = { + random_list = { + 1 = { + assign_martial_education_from_squires_quality_effect = yes + } + 1 = { + assign_diplomacy_education_from_squires_quality_effect = yes + } + } + add_trait = bastard + add_trait = disputed_heritage + if = { + limit = { + current_date < 1400 + scope:new_owner = { + has_title = title:e_byzantium + } + culture = { + OR = { + has_cultural_parameter = unlock_maa_huscarls + has_cultural_parameter = unlock_maa_varangian_veterans + } + } + } + add_trait = varangian + } + # Cultural Traditions + if = { + limit = { + culture = { + has_cultural_parameter = winter_soldier_trait_more_common + } + NOT = { + has_trait = winter_soldier + } + } + random = { + chance = 10 + add_trait = winter_soldier + } + } + if = { + limit = { + culture = { + has_cultural_parameter = forest_fighter_trait_more_common + } + NOT = { + has_trait = forest_fighter + } + } + random = { + chance = 10 + add_trait = forest_fighter + } + } + if = { + limit = { + culture = { + has_cultural_parameter = rough_terrain_expert_trait_more_common + } + NOT = { + has_trait = rough_terrain_expert + } + } + random = { + chance = 10 + add_trait = rough_terrain_expert + } + } + if = { + limit = { + culture = { + has_cultural_parameter = desert_warrior_trait_more_common + } + NOT = { + has_trait = desert_warrior + } + } + random = { + chance = 10 + add_trait = desert_warrior + } + } + if = { + limit = { + culture = { + has_cultural_parameter = jungle_stalker_trait_more_common + } + NOT = { + has_trait = jungle_stalker + } + } + random = { + chance = 10 + add_trait = jungle_stalker + } + } + set_interesting_traits_and_modifiers_effect = yes + add_random_tiered_trait_xp_effect = { + TRAIT = lifestyle_blademaster + LEVEL_1 = yes + LEVEL_3 = yes + } + add_random_tiered_trait_track_xp_effect = { + TRAIT = lifestyle_hunter + TRACK = hunter + LEVEL_1 = yes + LEVEL_3 = no + } + } +} diff --git a/common/scripted_character_templates/04_ep2_character_templates.txt b/common/scripted_character_templates/04_ep2_character_templates.txt index 1d447e3a..b1f46b64 100644 --- a/common/scripted_character_templates/04_ep2_character_templates.txt +++ b/common/scripted_character_templates/04_ep2_character_templates.txt @@ -1,5 +1,6 @@ tournament_foot_character = { age = { 18 40 } + dynasty = none random_traits_list = { count = 1 education_martial_2 = {} @@ -26,6 +27,7 @@ tournament_horse_character = { age = { 18 40 } + dynasty = none random_traits_list = { count = 1 education_martial_2 = {} @@ -58,6 +60,7 @@ tournament_horse_character = { tournament_archery_character = { age = { 18 40 } + dynasty = none trait = tourney_participant prowess = { min_template_decent_skill @@ -76,6 +79,7 @@ tournament_archery_character = { tournament_recital_character = { age = { 18 40 } + dynasty = none random_traits_list = { count = 1 lifestyle_poet = {} @@ -95,6 +99,7 @@ tournament_recital_character = { tournament_pugilism_character = { age = { 18 40 } + dynasty = none random_traits_list = { count = 1 strong = {} @@ -119,6 +124,7 @@ tournament_pugilism_character = { tournament_board_game_character = { age = { 18 40 } + dynasty = none random_traits_list = { count = 1 education_learning_2 = {} @@ -133,6 +139,7 @@ tournament_board_game_character = { loyal_fan_character = { age = { 18 40 } + dynasty = none trait = loyal random_traits_list = { count = 1 @@ -151,6 +158,7 @@ loyal_fan_character = { local_beauty_character = { age = { 18 40 } + dynasty = none random_traits_list = { count = { 0 1 } beauty_good_1 = {} @@ -253,6 +261,7 @@ feral_child_template = { castaway_character = { age = { 18 40 } + dynasty = none random_traits = yes gender_female_chance = root_soldier_female_chance after_creation = { @@ -315,6 +324,7 @@ sexy_assassin_character = { garden_hermit_character = { age = { 55 80 } + dynasty = none trait = lifestyle_mystic random_traits_list = { count = 1 @@ -341,6 +351,7 @@ garden_hermit_character = { brainless_character_template = { age = { 18 40 } + dynasty = none trait = dull random_traits_list = { count = 1 @@ -392,6 +403,7 @@ brainless_character_template = { heartless_knight = { age = { 18 40 } + dynasty = none random_traits_list = { # Likely to commit social faux pas count = 1 callous = {} @@ -426,6 +438,7 @@ heartless_knight = { cowardly_knight = { age = { 18 40 } + dynasty = none trait = craven random_traits_list = { count = 1 @@ -485,6 +498,7 @@ wealthy_gambler_template = { tournament_mulan_character = { age = { 18 30 } + dynasty = none random_traits_list = { count = 1 education_martial_2 = {} @@ -514,6 +528,7 @@ tournament_mulan_character = { quasimodo_template = { age = { 6 12 } + dynasty = none random_traits_list = { count = { 1 3 } hunchbacked = {} @@ -533,6 +548,7 @@ quasimodo_template = { tournament_unusual_stranger = { age = { 18 40 } + dynasty = none random_traits_list = { count = 1 education_intrigue_3 = {} diff --git a/common/scripted_character_templates/04_ep2_character_templates_james.txt b/common/scripted_character_templates/04_ep2_character_templates_james.txt index bc3514fe..3993f841 100644 --- a/common/scripted_character_templates/04_ep2_character_templates_james.txt +++ b/common/scripted_character_templates/04_ep2_character_templates_james.txt @@ -1,6 +1,7 @@  swords_for_hire_character = { age = { 18 35 } + dynasty = none random_traits_list = { count = 1 education_martial_3 = {} diff --git a/common/scripted_character_templates/04_ep2_james_character_templates.txt b/common/scripted_character_templates/04_ep2_james_character_templates.txt index 5cb999ee..d86cb4c4 100644 --- a/common/scripted_character_templates/04_ep2_james_character_templates.txt +++ b/common/scripted_character_templates/04_ep2_james_character_templates.txt @@ -1,5 +1,6 @@ pilgrim_character = { age = { 18 40 } + dynasty = none trait = pilgrim trait = lifestyle_traveler random_traits_list = { diff --git a/common/scripted_character_templates/04_fp3_character_templates.txt b/common/scripted_character_templates/04_fp3_character_templates.txt index 0ecf33f4..a626e600 100644 --- a/common/scripted_character_templates/04_fp3_character_templates.txt +++ b/common/scripted_character_templates/04_fp3_character_templates.txt @@ -71,6 +71,7 @@ fp3_raging_ghazi_character = { fp3_chinese_grand_old_lady = { #General age = { 50 75 } + dynasty = none gender = female faith = faith:zhengyi culture = culture:han @@ -111,6 +112,7 @@ fp3_chinese_grand_old_lady = { fp3_chinese_eunuch_envoy = { #General age = { 20 55 } + dynasty = none gender = male faith = faith:mahayana culture = culture:han @@ -149,6 +151,7 @@ fp3_chinese_eunuch_envoy = { fp3_gnostic_paragon = { age = { 30 60 } + dynasty = none faith = faith:manichean culture = culture:levantine #Education @@ -204,6 +207,7 @@ fp3_gnostic_paragon = { fp3_sufi_mystic = { age = { 30 80 } + dynasty = none faith = root.faith culture = root.culture #Education @@ -261,6 +265,7 @@ fp3_sufi_mystic = { fp3_zoroastrian_armed_pilgrim = { age = { 20 50 } + dynasty = none #Education random_traits_list = { education_learning_2 = { @@ -378,7 +383,7 @@ fp3_turkic_traveler = { #General age = { 24 40 } culture = culture:turkish - dynasty = generate + dynasty = none #Education random_traits_list = { education_martial_2 = { @@ -673,6 +678,7 @@ fp3_ferdowsi_template = { fp3_skilled_outsider_template = { # General age = { 30 60 } + dynasty = none # Education ## We give out random low tier education traits, and we'll upgrade them later if we're in batch B. random_traits_list = { diff --git a/common/scripted_character_templates/05_bp2_character_templates.txt b/common/scripted_character_templates/05_bp2_character_templates.txt index 514cc0dd..5ea2343c 100644 --- a/common/scripted_character_templates/05_bp2_character_templates.txt +++ b/common/scripted_character_templates/05_bp2_character_templates.txt @@ -21,6 +21,7 @@ bp2_wet_nurse_template = { adult_education_teacher = { age = { 35 75 } + dynasty = none random_traits_list = { count = 1 education_diplomacy_4 = {} @@ -121,6 +122,7 @@ adult_education_teacher = { adult_education_student = { age = { 18 40 } + dynasty = none random_traits = yes faith = scope:activity.activity_location.faith culture = scope:activity.activity_location.culture @@ -171,6 +173,7 @@ foreign_architect_template = { culture_defender_knight_template = { age = { 20 40 } + dynasty = none random_traits = yes random_traits_list = { @@ -354,6 +357,7 @@ foreign_scholar_template = { foreign_official_template = { age = { 25 45 } + dynasty = none random_traits_list = { count = 3 diff --git a/common/scripted_character_templates/07_ep3_character_templates.txt b/common/scripted_character_templates/07_ep3_character_templates.txt index a5a9fe48..8479b62a 100644 --- a/common/scripted_character_templates/07_ep3_character_templates.txt +++ b/common/scripted_character_templates/07_ep3_character_templates.txt @@ -79,6 +79,7 @@ anatolian_guide_character = { varangian_template = { age = { 16 45 } + dynasty = none random_traits = yes random_traits_list = { @@ -492,6 +493,7 @@ laamp_inheritor_template = { traveler_character = { age = { 25 45 } + dynasty = none random_traits = yes faith = this.faith gender_female_chance = 50 @@ -579,6 +581,7 @@ traveler_character = { ep3_evangelizer_template = { age = { 32 70 } + dynasty = none random_traits = yes culture = root.culture faith = root.faith @@ -839,6 +842,7 @@ ep3_poet_toned_down_template = { ep3_murderer_template = { age = { 25 45 } + dynasty = none random_traits = yes culture = root.culture faith = root.faith diff --git a/common/scripted_character_templates/09_mpo_character_templates.txt b/common/scripted_character_templates/09_mpo_character_templates.txt index 0b1810f7..4de3fd3a 100644 --- a/common/scripted_character_templates/09_mpo_character_templates.txt +++ b/common/scripted_character_templates/09_mpo_character_templates.txt @@ -1085,6 +1085,7 @@ nomadic_husband_template = { wounded_messenger_character_template = { age = { 18 50 } + dynasty = none random_traits = no gender_female_chance = 50 trait = open_terrain_expert @@ -1134,6 +1135,7 @@ wounded_messenger_character_template = { throat_singer_character_template = { age = { 30 55 } + dynasty = none random_traits = no gender_female_chance = 20 trait = lifestyle_poet diff --git a/common/scripted_character_templates/tgp_character_templates.txt b/common/scripted_character_templates/tgp_character_templates.txt index a98509b7..f83f755e 100644 --- a/common/scripted_character_templates/tgp_character_templates.txt +++ b/common/scripted_character_templates/tgp_character_templates.txt @@ -46,6 +46,7 @@ tgp_examiner_learning_template = { age = { 35 49 } + dynasty = none random_traits_list = { count = 1 education_learning_3 = {} @@ -56,15 +57,15 @@ tgp_examiner_learning_template = { max_template_decent_skill } random_traits = yes - faith = title:h_china.holder.faith - culture = title:h_china.holder.culture + faith = scope:host.top_liege.faith + culture = scope:host.top_liege.culture gender_female_chance = { if = { - limit = { title:h_china.holder.faith = { has_doctrine = doctrine_gender_male_dominated } } + limit = { scope:host.top_liege.faith = { has_doctrine = doctrine_gender_male_dominated } } add = 0 } else_if = { - limit = { title:h_china.holder.faith = { has_doctrine = doctrine_gender_female_dominated } } + limit = { scope:host.top_liege.faith = { has_doctrine = doctrine_gender_female_dominated } } add = 100 } else = { @@ -94,6 +95,7 @@ tgp_examiner_learning_template = { tgp_examiner_martial_template = { age = { 35 49 } + dynasty = none random_traits_list = { count = 1 education_martial_3 = {} @@ -104,15 +106,15 @@ tgp_examiner_martial_template = { max_template_decent_skill } random_traits = yes - faith = title:h_china.holder.faith - culture = title:h_china.holder.culture + faith = scope:host.top_liege.faith + culture = scope:host.top_liege.culture gender_female_chance = { if = { - limit = { title:h_china.holder.faith = { has_doctrine = doctrine_gender_male_dominated } } + limit = { scope:host.top_liege.faith = { has_doctrine = doctrine_gender_male_dominated } } add = 0 } else_if = { - limit = { title:h_china.holder.faith = { has_doctrine = doctrine_gender_female_dominated } } + limit = { scope:host.top_liege.faith = { has_doctrine = doctrine_gender_female_dominated } } add = 100 } else = { @@ -142,6 +144,7 @@ tgp_examiner_martial_template = { tgp_examiner_stewardship_template = { age = { 35 49 } + dynasty = none random_traits_list = { count = 1 education_stewardship_3 = {} @@ -152,15 +155,15 @@ tgp_examiner_stewardship_template = { max_template_decent_skill } random_traits = yes - faith = title:h_china.holder.faith - culture = title:h_china.holder.culture + faith = scope:host.top_liege.faith + culture = scope:host.top_liege.culture gender_female_chance = { if = { - limit = { title:h_china.holder.faith = { has_doctrine = doctrine_gender_male_dominated } } + limit = { scope:host.top_liege.faith = { has_doctrine = doctrine_gender_male_dominated } } add = 0 } else_if = { - limit = { title:h_china.holder.faith = { has_doctrine = doctrine_gender_female_dominated } } + limit = { scope:host.top_liege.faith = { has_doctrine = doctrine_gender_female_dominated } } add = 100 } else = { @@ -190,6 +193,7 @@ tgp_examiner_stewardship_template = { tgp_learning_exam_entrant_template = { age = { 16 27 } + dynasty = none random_traits_list = { count = 1 education_learning_2 = {} @@ -200,15 +204,15 @@ tgp_learning_exam_entrant_template = { max_template_average_skill } random_traits = yes - faith = title:h_china.holder.faith - culture = title:h_china.holder.culture + faith = scope:host.top_liege.faith + culture = scope:host.top_liege.culture gender_female_chance = { if = { - limit = { title:h_china.holder.faith = { has_doctrine = doctrine_gender_male_dominated } } + limit = { scope:host.top_liege.faith = { has_doctrine = doctrine_gender_male_dominated } } add = 0 } else_if = { - limit = { title:h_china.holder.faith = { has_doctrine = doctrine_gender_female_dominated } } + limit = { scope:host.top_liege.faith = { has_doctrine = doctrine_gender_female_dominated } } add = 100 } else = { @@ -219,6 +223,7 @@ tgp_learning_exam_entrant_template = { tgp_stewardship_exam_entrant_template = { age = { 16 27 } + dynasty = none random_traits_list = { count = 1 education_stewardship_2 = {} @@ -229,15 +234,15 @@ tgp_stewardship_exam_entrant_template = { max_template_average_skill } random_traits = yes - faith = title:h_china.holder.faith - culture = title:h_china.holder.culture + faith = scope:host.top_liege.faith + culture = scope:host.top_liege.culture gender_female_chance = { if = { - limit = { title:h_china.holder.faith = { has_doctrine = doctrine_gender_male_dominated } } + limit = { scope:host.top_liege.faith = { has_doctrine = doctrine_gender_male_dominated } } add = 0 } else_if = { - limit = { title:h_china.holder.faith = { has_doctrine = doctrine_gender_female_dominated } } + limit = { scope:host.top_liege.faith = { has_doctrine = doctrine_gender_female_dominated } } add = 100 } else = { @@ -248,6 +253,7 @@ tgp_stewardship_exam_entrant_template = { tgp_martial_exam_entrant_template = { age = { 16 27 } + dynasty = none random_traits_list = { count = 1 education_martial_2 = {} @@ -258,15 +264,15 @@ tgp_martial_exam_entrant_template = { max_template_average_skill } random_traits = yes - faith = title:h_china.holder.faith - culture = title:h_china.holder.culture + faith = scope:host.top_liege.faith + culture = scope:host.top_liege.culture gender_female_chance = { if = { - limit = { title:h_china.holder.faith = { has_doctrine = doctrine_gender_male_dominated } } + limit = { scope:host.top_liege.faith = { has_doctrine = doctrine_gender_male_dominated } } add = 0 } else_if = { - limit = { title:h_china.holder.faith = { has_doctrine = doctrine_gender_female_dominated } } + limit = { scope:host.top_liege.faith = { has_doctrine = doctrine_gender_female_dominated } } add = 100 } else = { @@ -414,6 +420,7 @@ tgp_decent_heir_template = { tgp_minister_administrator_template = { age = { 25 49 } + dynasty = none random_traits_list = { count = 1 education_stewardship_3 = {} @@ -484,6 +491,7 @@ tgp_minister_administrator_template = { tgp_minister_diplomat_template = { age = { 25 49 } + dynasty = none random_traits_list = { count = 1 education_diplomacy_3 = {} @@ -524,6 +532,7 @@ tgp_minister_diplomat_template = { tgp_minister_commander_template = { age = { 25 49 } + dynasty = none random_traits_list = { count = 1 education_martial_3 = {} @@ -588,6 +597,7 @@ tgp_minister_commander_template = { tgp_minister_warrior_template = { age = { 18 35 } + dynasty = none random_traits_list = { count = 1 education_martial_2 = {} @@ -670,6 +680,7 @@ tgp_minister_warrior_template = { tgp_minister_scholar_template = { age = { 25 49 } + dynasty = none random_traits_list = { count = 1 education_learning_3 = {} @@ -719,6 +730,7 @@ tgp_minister_scholar_template = { tgp_minister_confucian_scholar_template = { age = { 30 55 } + dynasty = none random_traits_list = { count = 1 education_learning_3 = {} @@ -765,6 +777,7 @@ tgp_minister_confucian_scholar_template = { tgp_minister_eunuch_template = { age = { 25 49 } + dynasty = none random_traits_list = { count = 1 education_diplomacy_3 = { weight = { base = 25 } } @@ -1067,42 +1080,42 @@ tgp_aspect_acolyte_template = { count = 1 education_stewardship_2 = { trigger = { - root.house = { has_house_power_parameter = aspect_of_creation } + root.house = { has_house_aspiration_parameter = aspect_of_creation } } } education_stewardship_3 = { trigger = { - root.house = { has_house_power_parameter = aspect_of_creation } + root.house = { has_house_aspiration_parameter = aspect_of_creation } } } education_diplomacy_2 = { trigger = { - root.house = { has_house_power_parameter = aspect_of_serenity } + root.house = { has_house_aspiration_parameter = aspect_of_serenity } } } education_diplomacy_3 = { trigger = { - root.house = { has_house_power_parameter = aspect_of_serenity } + root.house = { has_house_aspiration_parameter = aspect_of_serenity } } } education_martial_2 = { trigger = { - root.house = { has_house_power_parameter = aspect_of_destruction } + root.house = { has_house_aspiration_parameter = aspect_of_destruction } } } education_martial_3 = { trigger = { - root.house = { has_house_power_parameter = aspect_of_destruction } + root.house = { has_house_aspiration_parameter = aspect_of_destruction } } } education_intrigue_2 = { trigger = { - root.house = { has_house_power_parameter = aspect_of_trickery } + root.house = { has_house_aspiration_parameter = aspect_of_trickery } } } education_intrigue_3 = { trigger = { - root.house = { has_house_power_parameter = aspect_of_trickery } + root.house = { has_house_aspiration_parameter = aspect_of_trickery } } } } diff --git a/common/scripted_effects/00_faction_effects.txt b/common/scripted_effects/00_faction_effects.txt index 6e96b942..3211ad35 100644 --- a/common/scripted_effects/00_faction_effects.txt +++ b/common/scripted_effects/00_faction_effects.txt @@ -942,6 +942,7 @@ successful_nomadic_revolt_outcome_effect = { } if = { limit = { + holder.top_liege = scope:faction_target NOT = { is_in_list = seized_duchies } } add_to_list = seized_duchies diff --git a/common/scripted_effects/00_major_decisions_scripted_effects.txt b/common/scripted_effects/00_major_decisions_scripted_effects.txt index 3a9c4171..3c0a13d5 100644 --- a/common/scripted_effects/00_major_decisions_scripted_effects.txt +++ b/common/scripted_effects/00_major_decisions_scripted_effects.txt @@ -2690,20 +2690,23 @@ form_siam_kingdom_decision_scripted_effect = { hidden_effect = { title:k_siam = { save_scope_as = siam_kingdom } title:d_sukhothai = { save_scope_as = sukhotai_duchy } - title:d_muang_sua = { save_scope_as = muang_sua_duchy } + title:d_lop_buri = { save_scope_as = lop_buri } title:d_sukhothai = { set_de_jure_liege_title = title:k_siam } - title:d_muang_sua = { set_de_jure_liege_title = title:k_siam } + title:d_lop_buri = { set_de_jure_liege_title = title:k_siam } every_held_title = { # add other duchies if I hold any in the region limit = { tier = tier_duchy any_de_jure_county = { title_province = { - geographical_region = world_asia_thailand + OR = { + geographical_region = world_asia_thailand + geographical_region = world_asia_malaysia + } } } NOT = { this = title:d_sukhothai - this = title:d_muang_sua + this = title:d_lop_buri } } set_de_jure_liege_title = title:k_siam @@ -3857,5 +3860,5 @@ found_empire_of_hindustan_scripted_effect = { } } add_legitimacy_effect = { LEGITIMACY = massive_legitimacy_gain } - dynasty = { add_dynasty_prestige = massive_dynasty_prestige_value } + dynasty ?= { add_dynasty_prestige = massive_dynasty_prestige_value } } diff --git a/common/scripted_effects/00_mongol_invasion_effects.txt b/common/scripted_effects/00_mongol_invasion_effects.txt index 2addc7f4..eb13230c 100644 --- a/common/scripted_effects/00_mongol_invasion_effects.txt +++ b/common/scripted_effects/00_mongol_invasion_effects.txt @@ -11975,7 +11975,7 @@ convert_great_yuan_to_admin_effect = { } if = { limit = { - government_has_flag = government_is_celestial + tgp_use_chinese_naming_trigger = yes highest_held_title_tier >= tier_empire primary_title = { has_custom_title_name = no diff --git a/common/scripted_effects/07_dlc_ep3_scripted_effects.txt b/common/scripted_effects/07_dlc_ep3_scripted_effects.txt index 114f6a28..6231091e 100644 --- a/common/scripted_effects/07_dlc_ep3_scripted_effects.txt +++ b/common/scripted_effects/07_dlc_ep3_scripted_effects.txt @@ -1245,7 +1245,11 @@ destroy_landless_title_no_dlc_effect = { NOT = { has_dlc_feature = roads_to_power } game_start_date = $DATE$ } - holder = { destroy_title = prev } + holder ?= { + # Clears liquid treasury whenever balance > 0 + empty_treasury_when_abandoning_landed_life_effect = yes + destroy_title = prev + } } } @@ -1281,8 +1285,8 @@ laamp_game_over_option_effect = { custom_tooltip = laamp_game_over_tt if = { limit = { exists = scope:new_landless_adventurer_title } - hidden_effect = { - destroy_title = scope:new_landless_adventurer_title + hidden_effect = { + destroy_title = scope:new_landless_adventurer_title add_character_flag = { flag = declined_become_laamp days = 1 } # The flag is temporary to make the player get a game over if they had no landed heir to take over their lands # While also making it so that if they did have an heir to take over they can later play as the old character if they somehow inherit from the heir } @@ -1531,12 +1535,37 @@ ep3_become_landed_transfer_effect = { government_is_administrative = { save_scope_value_as = { name = old_government value = flag:admin } } + government_is_feudal = { + save_scope_value_as = { name = old_government value = flag:feudal } + } government_is_clan = { save_scope_value_as = { name = old_government value = flag:clan } } government_is_tribal = { save_scope_value_as = { name = old_government value = flag:tribal } } + government_is_republic = { + if = { + limit = { + scope:government_giver ?= { ep3_is_clan_inclined_trigger = yes } + } + save_scope_value_as = { name = old_government value = flag:clan } + } + else = { + save_scope_value_as = { name = old_government value = flag:feudal } + } + } + government_is_theocracy = { + if = { + limit = { + scope:government_giver ?= { ep3_is_clan_inclined_trigger = yes } + } + save_scope_value_as = { name = old_government value = flag:clan } + } + else = { + save_scope_value_as = { name = old_government value = flag:feudal } + } + } government_is_wanua = { save_scope_value_as = { name = old_government value = flag:wanua } } @@ -1583,12 +1612,8 @@ ep3_become_landed_transfer_effect = { } scope:new_primary_title ?= { ordered_de_jure_county = { - limit = { - holder = scope:defender - } - alternative_limit = { - holder.top_liege = scope:defender.top_liege - } + limit = { holder = scope:defender } + alternative_limit = { holder.top_liege = scope:defender.top_liege } order_by = development_level save_scope_as = new_capital } @@ -1701,18 +1726,12 @@ ep3_become_landed_transfer_effect = { resolve_title_and_vassal_change = scope:title_change # Because target may be either a title or a character, we check if a scope value has been set up in advance if this is being called from the Seize Realm scheme specifically if = { - limit = { - exists = scope:old_government_type - } - scope:old_government_type = { - save_scope_as = old_government - } + limit = { exists = scope:old_government_type } + scope:old_government_type = { save_scope_as = old_government } } # Set government type if = { - limit = { - exists = scope:old_government - } + limit = { exists = scope:old_government } # We don't expect to actually trigger most of the below, as most are not valid targets to begin with, but all are included for completeness and mod support switch = { trigger = scope:old_government @@ -1741,6 +1760,16 @@ ep3_become_landed_transfer_effect = { change_government = administrative_government } flag:nomad = { + #Did you demand a herder's pastureland? + if = { + limit = { + scope:new_capital.title_province = { + has_holding = yes + NOT = { has_holding_type = nomad_holding } + } + } + scope:new_capital.title_province = { set_holding_type = nomad_holding } + } change_government = nomad_government } flag:herder = { @@ -1758,10 +1787,10 @@ ep3_become_landed_transfer_effect = { #Sort out the House shenanigans if = { limit = { is_house_head = no } - house = { + house = { if = { limit = { - house_head = { + house_head = { is_landed = no is_courtier_of = root } @@ -1795,7 +1824,7 @@ ep3_become_landed_transfer_effect = { } flag:japan_administrative = { if = { - limit = { + limit = { scope:new_liege ?= { has_government = japan_administrative_government } } change_government = japan_administrative_government @@ -1872,6 +1901,19 @@ ep3_become_landed_transfer_effect = { } change_government = clan_government } + ## Republic. + else_if = { + limit = { + scope:new_liege ?= { government_has_flag = government_is_republic } + } + if = { + limit = { + scope:new_liege ?= { ep3_is_clan_inclined_trigger = yes } + } + change_government = clan_government + } + else = { change_government = feudal_government } + } ## Tribal. else_if = { limit = { @@ -1907,10 +1949,10 @@ ep3_become_landed_transfer_effect = { hidden_effect = { if = { limit = { is_house_head = no } - house = { + house = { if = { limit = { - house_head = { + house_head = { is_landed = no is_courtier_of = $TITLE_RECEIVER$ } @@ -1924,7 +1966,7 @@ ep3_become_landed_transfer_effect = { set_house_aspiration = { type = no_aspect } } } - } + } } ## Else feudal. else = { @@ -2005,7 +2047,7 @@ ep3_become_landed_transfer_effect = { destroy_laamp_effect = { ADVENTURER = $TITLE_RECEIVER$ } # Setup NF if valid if = { - limit = { government_allows = administrative } + limit = { government_allows = noble_families } give_new_noble_family_title_effect = yes } } @@ -2147,33 +2189,32 @@ purchase_land_interaction_effect = { faith = { has_doctrine = doctrine_polytheist } } #Sort out the House shenanigans - if = { - limit = { is_house_head = no } - house = { - if = { - limit = { - house_head = { - is_landed = no - is_courtier_of = root + hidden_effect = { + if = { + limit = { is_house_head = no } + house ?= { + if = { + limit = { + house_head = { + is_landed = no + is_courtier_of = root + } } + set_house_head = root + } + } + } + else = { + house ?= { + if = { + limit = { + NOT = { has_house_aspiration_parameter = no_aspect } + } + set_house_aspiration = { type = no_aspect } } - set_house_head = root } } } - else = { - house ?= { - set_house_aspiration = { type = no_aspect } - } - } - } - #Otherwise go vanilla - else = { - if = { - limit = { ep3_is_clan_inclined_trigger = yes } - change_government = clan_government - } - else = { change_government = feudal_government } } } @@ -4219,7 +4260,7 @@ spawn_governance_contract_effect = { trigger_event = { on_action = spawn_admin_governance_contract_on_action } - + play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Byzantine_Flavor/ep3_mx_sting_byzantineflavor_become_governor" } @@ -4389,7 +4430,7 @@ remove_other_eparch_modifiers_effect = { } } } - + # Next is the troop modifier scope:liege ?= { # We check and scope to all counties to make sure we remove any stray modifiers in case the capital is moved, etc. @@ -4416,7 +4457,7 @@ remove_other_eparch_modifiers_effect = { } } } - + # Next is the county control modifier scope:liege ?= { # We check and scope to all counties to make sure we remove any stray modifiers in case the capital is moved, etc. @@ -4443,7 +4484,7 @@ remove_other_eparch_modifiers_effect = { } } } - + # And finally, the development modifier scope:liege ?= { # We check and scope to all counties to make sure we remove any stray modifiers in case the capital is moved, etc. @@ -4476,7 +4517,7 @@ remove_other_eparch_modifiers_effect = { eparch_neglecting_duty_effect = { custom_tooltip = { text = eparch_neglecting_duty_warning_tt - + # We check if you have neglected duties in the past if = { limit = { @@ -4484,26 +4525,26 @@ eparch_neglecting_duty_effect = { } # If you have, let's first increase the variable change_variable = { name = eparch_neglecting_duty add = 5 } - + # Then check if the liege notices and decide to take action random = { chance = { # Base value - Increases with each neglecting action value = var:eparch_neglecting_duty - + # Add the difference in intrigue skill add = { value = liege.intrigue subtract = intrigue } - + # Add the difference in influence level add = { value = liege.influence_level subtract = influence_level multiply = 5 } - + # Lower the chance if you belong to a powerful or dominant family if = { limit = { @@ -4517,11 +4558,11 @@ eparch_neglecting_duty_effect = { } subtract = 20 } - + min = 5 max = 90 } - + # The liege have noticed - We reduce the variable slightly as a result (but never below 0) if = { limit = { @@ -4533,7 +4574,7 @@ eparch_neglecting_duty_effect = { else = { set_variable = { name = eparch_neglecting_duty value = 0 } } - + liege = { trigger_event = { id = ep3_eparch_event.9000 days = { 10 90 } } } @@ -4763,70 +4804,70 @@ remove_a_criminal_trait_in_faith_effect = { if = { limit = { has_trait = adulterer - trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:adulterer FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } } remove_trait = adulterer } else_if = { limit = { has_trait = fornicator - trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:fornicator FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } } remove_trait = fornicator } else_if = { limit = { has_trait = sodomite - trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:sodomite FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } } remove_trait = sodomite } else_if = { limit = { has_trait = deviant - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:deviant FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } } remove_trait = deviant } else_if = { limit = { has_trait = kinslayer_3 - trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_3 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:kinslayer_3 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } } remove_trait = kinslayer_3 } else_if = { limit = { has_trait = kinslayer_2 - trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_2 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:kinslayer_2 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } } remove_trait = kinslayer_2 } else_if = { limit = { has_trait = kinslayer_1 - trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_1 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:kinslayer_1 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } } remove_trait = kinslayer_1 } else_if = { limit = { has_trait = witch - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } } remove_trait = witch } else_if = { limit = { has_trait = cannibal - trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:cannibal FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } } remove_trait = cannibal } else_if = { limit = { has_trait = incestuous - trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:incestuous FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } } remove_trait = incestuous } @@ -9064,10 +9105,10 @@ ep3_pick_random_maa_regiment_effect = { 1 = { trigger = { any_active_accolade = { - primary_type = { - this = accolade_type:archer_attribute + accolade_attribute_level = { + type = archer_attribute + level >= 2 } - accolade_rank >= 3 } } save_scope_value_as = { @@ -9078,10 +9119,10 @@ ep3_pick_random_maa_regiment_effect = { 1 = { trigger = { any_active_accolade = { - primary_type = { - this = accolade_type:skirmisher_attribute + accolade_attribute_level = { + type = skirmisher_attribute + level >= 2 } - accolade_rank >= 3 } } save_scope_value_as = { @@ -9092,10 +9133,10 @@ ep3_pick_random_maa_regiment_effect = { 1 = { trigger = { any_active_accolade = { - primary_type = { - this = accolade_type:pike_attribute + accolade_attribute_level = { + type = pike_attribute + level >= 2 } - accolade_rank >= 3 } } save_scope_value_as = { @@ -9106,10 +9147,10 @@ ep3_pick_random_maa_regiment_effect = { 1 = { trigger = { any_active_accolade = { - primary_type = { - this = accolade_type:outrider_attribute + accolade_attribute_level = { + type = outrider_attribute + level >= 2 } - accolade_rank >= 3 } } save_scope_value_as = { @@ -9120,10 +9161,10 @@ ep3_pick_random_maa_regiment_effect = { 1 = { trigger = { any_active_accolade = { - primary_type = { - this = accolade_type:vanguard_attribute + accolade_attribute_level = { + type = vanguard_attribute + level >= 2 } - accolade_rank >= 3 } } save_scope_value_as = { @@ -9134,10 +9175,10 @@ ep3_pick_random_maa_regiment_effect = { 1 = { trigger = { any_active_accolade = { - primary_type = { - this = accolade_type:lancer_attribute + accolade_attribute_level = { + type = lancer_attribute + level >= 2 } - accolade_rank >= 3 } } save_scope_value_as = { @@ -9148,10 +9189,10 @@ ep3_pick_random_maa_regiment_effect = { 1 = { trigger = { any_active_accolade = { - primary_type = { - this = accolade_type:crossbowmen_attribute + accolade_attribute_level = { + type = crossbowmen_attribute + level >= 2 } - accolade_rank >= 3 } } save_scope_value_as = { @@ -9162,10 +9203,10 @@ ep3_pick_random_maa_regiment_effect = { 1 = { trigger = { any_active_accolade = { - primary_type = { - this = accolade_type:camelry_attribute + accolade_attribute_level = { + type = camelry_attribute + level >= 2 } - accolade_rank >= 3 } } save_scope_value_as = { @@ -9176,10 +9217,10 @@ ep3_pick_random_maa_regiment_effect = { 1 = { trigger = { any_active_accolade = { - primary_type = { - this = accolade_type:elephantry_attribute + accolade_attribute_level = { + type = elephantry_attribute + level >= 2 } - accolade_rank >= 3 } } save_scope_value_as = { @@ -9190,10 +9231,10 @@ ep3_pick_random_maa_regiment_effect = { 1 = { trigger = { any_active_accolade = { - primary_type = { - this = accolade_type:horse_archer_attribute + accolade_attribute_level = { + type = horse_archer_attribute + level >= 2 } - accolade_rank >= 3 } } save_scope_value_as = { @@ -10697,8 +10738,8 @@ create_basic_peasant_effect = { template = peasant_character location = root.location dynasty = none - culture = scope:new_landless_minority.culture - faith = scope:new_landless_minority.faith + culture = root.location.culture + faith = root.location.faith gender_female_chance = 50 after_creation = { set_to_lowborn = yes @@ -12040,106 +12081,53 @@ war_task_contracts_completion_effect = { #If a landless adventurer was hired as a mercenary and contributed in a war they get paid, used in war_on_actions, relevant flag set by hire_laamp_mercenaries_interaction or ep3_interactions_events.0112 laamp_as_mercenary_payout_effect = { scope:war = { - if = { + every_war_participant = { limit = { - any_war_participant = { - has_character_flag = joined_as_mercenary - is_attacker_in_war = scope:war - NOT = { is_leader_in_war = scope:war } - OR = { - has_raised_armies = yes - scope:war = { - war_contribution = { - target = prev - value > 0 - } - } - } - } + laamp_as_mercenary_payout_trigger = { WAR = scope:war } } - every_war_participant = { + if = { limit = { - has_character_flag = joined_as_mercenary - is_attacker_in_war = scope:war - NOT = { is_leader_in_war = scope:war } - OR = { - has_raised_armies = yes - scope:war = { - war_contribution = { - target = prev - value > 0 - } - } - } + laamp_as_mercenary_payout_last_war_trigger = { WAR = scope:war } } + save_scope_as = laamp_temp add_to_list = laamp_mercenaries - remove_character_flag = joined_as_mercenary - } - primary_attacker = { - save_scope_as = employer - trigger_event = { - id = ep3_interactions_events.0121 - days = { 3 7 } - } - } - every_in_list = { - list = laamp_mercenaries - scope:employer = { - remove_list_variable = { - name = hired_mercenaries - target = prev + var:joined_as_mercenary = { + save_scope_as = employer + trigger_event = { + id = ep3_interactions_events.0121 + days = { 3 7 } } } - } - } - if = { - limit = { - any_war_participant = { - has_character_flag = joined_as_mercenary - is_defender_in_war = scope:war - NOT = { is_leader_in_war = scope:war } - OR = { - has_raised_armies = yes - scope:war = { - war_contribution = { - target = prev - value > 0 - } + every_in_list = { + list = laamp_mercenaries + scope:employer = { + remove_list_variable = { + name = hired_mercenaries + target = scope:laamp_temp } } } + remove_variable = joined_as_mercenary } - every_war_participant = { - limit = { - has_character_flag = joined_as_mercenary - is_defender_in_war = scope:war - NOT = { is_leader_in_war = scope:war } - OR = { - has_raised_armies = yes - scope:war = { - war_contribution = { - target = prev - value > 0 - } - } + else = { + save_scope_as = laamp_temp + var:joined_as_mercenary = { save_scope_as = employer } + if = { + limit = { exists = var:aggregate_war_contribution_value } + change_variable = { + name = aggregate_war_contribution_value + add = scope:laamp_temp.ep3_hire_laamp_mercs_payment_value + } + # Average + change_variable = { + name = aggregate_war_contribution_value + divide = 2 } } - add_to_list = laamp_mercenaries - remove_character_flag = joined_as_mercenary - } - primary_defender = { - save_scope_as = employer - trigger_event = { - id = ep3_interactions_events.0121 - days = { 3 7 } - } - } - every_in_list = { - list = laamp_mercenaries - scope:employer = { - remove_list_variable = { - name = hired_mercenaries - target = prev + else = { + set_variable = { + name = aggregate_war_contribution_value + value = scope:laamp_temp.ep3_hire_laamp_mercs_payment_value } } } @@ -12153,184 +12141,66 @@ laamp_as_mercenary_payout_effect = { # defender - primary defender from the casus_belli laamp_as_mercenary_payout_tooltip_effect = { show_as_tooltip = { - scope:defender = { - if = { - limit = { - exists = scope:war - any_war_ally = { - has_government = landless_adventurer_government - OR = { - any_character_active_contract = { - has_task_contract_type = laamp_join_war_contract - var:task_contract_war ?= scope:war + scope:war ?= { + every_war_participant = { + limit = { has_government = landless_adventurer_government } + save_scope_as = laamp_temp + save_scope_as = actor + save_scope_value_as = { + name = war_contribution_value + value = "scope:war.war_contribution(scope:laamp_temp)" + } + every_character_active_contract = { + limit = { + has_task_contract_type = laamp_join_war_contract + var:task_contract_war = scope:war + } + show_as_tooltip = { + task_contract_employer = { + save_scope_as = employer + custom_tooltip = ep3_join_war_payment_tt + pay_short_term_gold = { + target = scope:laamp_temp + gold = scope:laamp_temp.ep3_hire_laamp_mercs_payment_value } - AND = { - has_variable = owed_contract_assistance_gold - var:owed_contract_assistance_war ?= scope:war - } - has_variable = joined_as_mercenary } } } - every_war_ally = { + if = { + limit = { + laamp_as_mercenary_payout_trigger = { WAR = scope:war } + } if = { limit = { - has_government = landless_adventurer_government + laamp_as_mercenary_payout_last_war_trigger = { WAR = scope:war } } - save_scope_as = laamp_temp - save_scope_as = actor - save_scope_value_as = { - name = war_contribution_value - value = "scope:war.war_contribution(scope:laamp_temp)" - } - if = { - limit = { - any_character_active_contract = { - has_task_contract_type = laamp_join_war_contract - var:task_contract_war = scope:war - } + var:joined_as_mercenary ?= { + save_scope_as = employer + custom_description_no_bullet = { + text = ep3_hire_laamp_mercs_payment_tt + object = scope:laamp_temp + subject = scope:employer } - every_character_active_contract = { - limit = { - has_task_contract_type = laamp_join_war_contract - var:task_contract_war = scope:war - } - show_as_tooltip = { - task_contract_employer = { - save_scope_as = employer - custom_tooltip = ep3_join_war_payment_tt - pay_short_term_gold = { - target = scope:laamp_temp - gold = ep3_hire_laamp_mercs_payment_value - } - } - } - } - } - if = { - limit = { - has_variable = joined_as_mercenary - scope:defender = { - is_target_in_variable_list = { - name = hired_mercenaries - target = scope:laamp_temp - } - } - } - scope:defender = { - save_scope_as = employer - custom_tooltip = ep3_hire_laamp_mercs_payment_tt - pay_short_term_gold = { - target = scope:laamp_temp - gold = ep3_hire_laamp_mercs_payment_value - } - } - } - if = { - limit = { - has_variable = owed_contract_assistance_gold - var:owed_contract_assistance_war ?= scope:war - } - save_scope_as = contract_assistance_helper - scope:defender = { - save_scope_as = recipient - custom_tooltip = contract_assistance_interaction_condition_tt - pay_short_term_gold = { - target = scope:actor - gold = scope:actor.var:owed_contract_assistance_gold - } + pay_short_term_gold = { + target = scope:laamp_temp + gold = scope:laamp_temp.ep3_hire_laamp_mercs_payment_value } } } + else = { custom_tooltip = ep3_hire_laamp_mercs_payment_later_tt } } - } - } - scope:attacker = { - if = { - limit = { - exists = scope:war - any_war_ally = { - has_government = landless_adventurer_government - OR = { - any_character_active_contract = { - has_task_contract_type = laamp_join_war_contract - var:task_contract_war = scope:war - } - AND = { - has_variable = owed_contract_assistance_gold - var:owed_contract_assistance_war ?= scope:war - } - has_variable = joined_as_mercenary - } + if = { + limit = { + has_variable = owed_contract_assistance_gold + var:owed_contract_assistance_war ?= scope:war } - } - every_war_ally = { - if = { - limit = { - has_government = landless_adventurer_government - } - save_scope_as = laamp_temp - save_scope_as = actor - save_scope_value_as = { - name = war_contribution_value - value = "scope:war.war_contribution(scope:laamp_temp)" - } - if = { - limit = { - any_character_active_contract = { - has_task_contract_type = laamp_join_war_contract - var:task_contract_war = scope:war - } - } - every_character_active_contract = { - limit = { - has_task_contract_type = laamp_join_war_contract - var:task_contract_war = scope:war - } - show_as_tooltip = { - task_contract_employer = { - save_scope_as = employer - custom_tooltip = ep3_hire_laamp_mercs_payment_tt - pay_short_term_gold = { - target = scope:laamp_temp - gold = ep3_hire_laamp_mercs_payment_value - } - } - } - } - } - if = { - limit = { - has_variable = joined_as_mercenary - scope:attacker = { - is_target_in_variable_list = { - name = hired_mercenaries - target = scope:laamp_temp - } - } - } - scope:attacker = { - save_scope_as = employer - custom_tooltip = ep3_hire_laamp_mercs_payment_tt - pay_short_term_gold = { - target = scope:laamp_temp - gold = ep3_hire_laamp_mercs_payment_value - } - } - } - if = { - limit = { - has_variable = owed_contract_assistance_gold - var:owed_contract_assistance_war ?= scope:war - } - save_scope_as = contract_assistance_helper - scope:attacker = { - custom_tooltip = contract_assistance_interaction_condition_tt - pay_short_term_gold = { - target = scope:actor - gold = scope:actor.var:owed_contract_assistance_gold - } - } + save_scope_as = contract_assistance_helper + scope:defender = { + save_scope_as = recipient + custom_description_no_bullet = { text = contract_assistance_interaction_condition_tt } + pay_short_term_gold = { + target = scope:actor + gold = scope:actor.var:owed_contract_assistance_gold } } } @@ -12587,110 +12457,318 @@ disburse_camp_party_reward_effect = { #Host effects scope:host = { - hidden_effect = { - domicile = { - random_list = { - 1 = { - trigger = { - has_domicile_building_or_higher = camp_main_01 - NOT = { has_domicile_building = camp_main_04 } + if = { + limit = { + NOT = { + exists = scope:domicile_building #already saved + } + } + hidden_effect = { + domicile = { + random_list = { + 1 = { + trigger = { + has_domicile_building_or_higher = camp_main_01 + NOT = { has_domicile_building = camp_main_04 } + } + switch = { + trigger = has_domicile_building + camp_main_01 = { + save_scope_value_as = { + name = domicile_building + value = flag:camp_main_01 + } + } + camp_main_02 = { + save_scope_value_as = { + name = domicile_building + value = flag:camp_main_02 + } + } + camp_main_03 = { + save_scope_value_as = { + name = domicile_building + value = flag:camp_main_03 + } + } + } } - switch = { - trigger = has_domicile_building - camp_main_01 = { add_domicile_building = camp_main_02 } - camp_main_02 = { add_domicile_building = camp_main_03 } - camp_main_03 = { add_domicile_building = camp_main_04 } + 1 = { + trigger = { + has_domicile_building_or_higher = supply_tent_01 + NOT = { has_domicile_building = supply_tent_06 } + } + switch = { + trigger = has_domicile_building + supply_tent_01 = { + save_scope_value_as = { + name = domicile_building + value = flag:supply_tent_01 + } + } + supply_tent_02 = { + save_scope_value_as = { + name = domicile_building + value = flag:supply_tent_02 + } + } + supply_tent_03 = { + save_scope_value_as = { + name = domicile_building + value = flag:supply_tent_03 + } + } + supply_tent_04 = { + save_scope_value_as = { + name = domicile_building + value = flag:supply_tent_04 + } + } + supply_tent_05 = { + save_scope_value_as = { + name = domicile_building + value = flag:supply_tent_05 + } + } + } } - } - 1 = { - trigger = { - has_domicile_building_or_higher = supply_tent_01 - NOT = { has_domicile_building = supply_tent_06 } + 1 = { + trigger = { + has_domicile_building_or_higher = barber_tent_01 + NOT = { has_domicile_building = barber_tent_06 } + } + switch = { + trigger = has_domicile_building + barber_tent_01 = { + save_scope_value_as = { + name = domicile_building + value = flag:barber_tent_01 + } + } + barber_tent_02 = { + save_scope_value_as = { + name = domicile_building + value = flag:barber_tent_02 + } + } + barber_tent_03 = { + save_scope_value_as = { + name = domicile_building + value = flag:barber_tent_03 + } + } + barber_tent_04 = { + save_scope_value_as = { + name = domicile_building + value = flag:barber_tent_04 + } + } + barber_tent_05 = { + save_scope_value_as = { + name = domicile_building + value = flag:barber_tent_05 + } + } + } } - switch = { - trigger = has_domicile_building - supply_tent_01 = { add_domicile_building = supply_tent_02 } - supply_tent_02 = { add_domicile_building = supply_tent_03 } - supply_tent_03 = { add_domicile_building = supply_tent_04 } - supply_tent_04 = { add_domicile_building = supply_tent_05 } - supply_tent_05 = { add_domicile_building = supply_tent_06 } + 1 = { + trigger = { + has_domicile_building_or_higher = baggage_train_01 + NOT = { has_domicile_building = baggage_train_06 } + } + switch = { + trigger = has_domicile_building + baggage_train_01 = { + save_scope_value_as = { + name = domicile_building + value = flag:baggage_train_01 + } + } + baggage_train_02 = { + save_scope_value_as = { + name = domicile_building + value = flag:baggage_train_02 + } + } + baggage_train_03 = { + save_scope_value_as = { + name = domicile_building + value = flag:baggage_train_03 + } + } + baggage_train_04 = { + save_scope_value_as = { + name = domicile_building + value = flag:baggage_train_04 + } + } + baggage_train_05 = { + save_scope_value_as = { + name = domicile_building + value = flag:baggage_train_05 + } + } + } } - } - 1 = { - trigger = { - has_domicile_building_or_higher = barber_tent_01 - NOT = { has_domicile_building = barber_tent_06 } + 1 = { + trigger = { + has_domicile_building_or_higher = camp_fire_01 + NOT = { has_domicile_building = camp_fire_06 } + } + switch = { + trigger = has_domicile_building + camp_fire_01 = { + save_scope_value_as = { + name = domicile_building + value = flag:camp_fire_01 + } + } + camp_fire_02 = { + save_scope_value_as = { + name = domicile_building + value = flag:camp_fire_02 + } + } + camp_fire_03 = { + save_scope_value_as = { + name = domicile_building + value = flag:camp_fire_03 + } + } + camp_fire_04 = { + save_scope_value_as = { + name = domicile_building + value = flag:camp_fire_04 + } + } + camp_fire_05 = { + save_scope_value_as = { + name = domicile_building + value = flag:camp_fire_05 + } + } + } } - switch = { - trigger = has_domicile_building - barber_tent_01 = { add_domicile_building = barber_tent_02 } - barber_tent_02 = { add_domicile_building = barber_tent_03 } - barber_tent_03 = { add_domicile_building = barber_tent_04 } - barber_tent_04 = { add_domicile_building = barber_tent_05 } - barber_tent_05 = { add_domicile_building = barber_tent_06 } + 1 = { + trigger = { + has_domicile_building_or_higher = proving_grounds_01 + NOT = { has_domicile_building = proving_grounds_06 } + } + switch = { + trigger = has_domicile_building + proving_grounds_01 = { + save_scope_value_as = { + name = domicile_building + value = flag:proving_grounds_01 + } + } + proving_grounds_02 = { + save_scope_value_as = { + name = domicile_building + value = flag:proving_grounds_02 + } + } + proving_grounds_03 = { + save_scope_value_as = { + name = domicile_building + value = flag:proving_grounds_03 + } + } + proving_grounds_04 = { + save_scope_value_as = { + name = domicile_building + value = flag:proving_grounds_04 + } + } + proving_grounds_05 = { + save_scope_value_as = { + name = domicile_building + value = flag:proving_grounds_05 + } + } + } } - } - 1 = { - trigger = { - has_domicile_building_or_higher = baggage_train_01 - NOT = { has_domicile_building = baggage_train_06 } - } - switch = { - trigger = has_domicile_building - baggage_train_01 = { add_domicile_building = baggage_train_02 } - baggage_train_02 = { add_domicile_building = baggage_train_03 } - baggage_train_03 = { add_domicile_building = baggage_train_04 } - baggage_train_04 = { add_domicile_building = baggage_train_05 } - baggage_train_05 = { add_domicile_building = baggage_train_06 } - } - } - 1 = { - trigger = { - has_domicile_building_or_higher = camp_fire_01 - NOT = { has_domicile_building = camp_fire_06 } - } - switch = { - trigger = has_domicile_building - camp_fire_01 = { add_domicile_building = camp_fire_02 } - camp_fire_02 = { add_domicile_building = camp_fire_03 } - camp_fire_03 = { add_domicile_building = camp_fire_04 } - camp_fire_04 = { add_domicile_building = camp_fire_05 } - camp_fire_05 = { add_domicile_building = camp_fire_06 } - } - } - 1 = { - trigger = { - has_domicile_building_or_higher = proving_grounds_01 - NOT = { has_domicile_building = proving_grounds_06 } - } - switch = { - trigger = has_domicile_building - proving_grounds_01 = { add_domicile_building = proving_grounds_02 } - proving_grounds_02 = { add_domicile_building = proving_grounds_03 } - proving_grounds_03 = { add_domicile_building = proving_grounds_04 } - proving_grounds_04 = { add_domicile_building = proving_grounds_05 } - proving_grounds_05 = { add_domicile_building = proving_grounds_06 } - } - } - 1 = { - trigger = { - has_domicile_building_or_higher = camp_perimeter_01 - NOT = { has_domicile_building = camp_perimeter_06 } - } - switch = { - trigger = has_domicile_building - camp_perimeter_01 = { add_domicile_building = camp_perimeter_02 } - camp_perimeter_02 = { add_domicile_building = camp_perimeter_03 } - camp_perimeter_03 = { add_domicile_building = camp_perimeter_04 } - camp_perimeter_04 = { add_domicile_building = camp_perimeter_05 } - camp_perimeter_05 = { add_domicile_building = camp_perimeter_06 } + 1 = { + trigger = { + has_domicile_building_or_higher = camp_perimeter_01 + NOT = { has_domicile_building = camp_perimeter_06 } + } + switch = { + trigger = has_domicile_building + camp_perimeter_01 = { + save_scope_value_as = { + name = domicile_building + value = flag:camp_perimeter_01 + } + } + camp_perimeter_02 = { + save_scope_value_as = { + name = domicile_building + value = flag:camp_perimeter_02 + } + } + camp_perimeter_03 = { + save_scope_value_as = { + name = domicile_building + value = flag:camp_perimeter_03 + } + } + camp_perimeter_04 = { + save_scope_value_as = { + name = domicile_building + value = flag:camp_perimeter_04 + } + } + camp_perimeter_05 = { + save_scope_value_as = { + name = domicile_building + value = flag:camp_perimeter_05 + } + } + } } } } } } - - custom_tooltip = activity_camp_party_reward_upgrade_building + domicile = { + switch = { + trigger = scope:domicile_building + flag:camp_main_01 = { add_domicile_building = camp_main_02 } + flag:camp_main_02 = { add_domicile_building = camp_main_03 } + flag:camp_main_03 = { add_domicile_building = camp_main_04 } + flag:supply_tent_01 = { add_domicile_building = supply_tent_02 } + flag:supply_tent_02 = { add_domicile_building = supply_tent_03 } + flag:supply_tent_03 = { add_domicile_building = supply_tent_04 } + flag:supply_tent_04 = { add_domicile_building = supply_tent_05 } + flag:supply_tent_05 = { add_domicile_building = supply_tent_06 } + flag:barber_tent_01 = { add_domicile_building = barber_tent_02 } + flag:barber_tent_02 = { add_domicile_building = barber_tent_03 } + flag:barber_tent_03 = { add_domicile_building = barber_tent_04 } + flag:barber_tent_04 = { add_domicile_building = barber_tent_05 } + flag:barber_tent_05 = { add_domicile_building = barber_tent_06 } + flag:baggage_train_01 = { add_domicile_building = baggage_train_02 } + flag:baggage_train_02 = { add_domicile_building = baggage_train_03 } + flag:baggage_train_03 = { add_domicile_building = baggage_train_04 } + flag:baggage_train_04 = { add_domicile_building = baggage_train_05 } + flag:baggage_train_05 = { add_domicile_building = baggage_train_06 } + flag:camp_fire_01 = { add_domicile_building = camp_fire_02 } + flag:camp_fire_02 = { add_domicile_building = camp_fire_03 } + flag:camp_fire_03 = { add_domicile_building = camp_fire_04 } + flag:camp_fire_04 = { add_domicile_building = camp_fire_05 } + flag:camp_fire_05 = { add_domicile_building = camp_fire_06 } + flag:proving_grounds_01 = { add_domicile_building = proving_grounds_02 } + flag:proving_grounds_02 = { add_domicile_building = proving_grounds_03 } + flag:proving_grounds_03 = { add_domicile_building = proving_grounds_04 } + flag:proving_grounds_04 = { add_domicile_building = proving_grounds_05 } + flag:proving_grounds_05 = { add_domicile_building = proving_grounds_06 } + flag:camp_perimeter_01 = { add_domicile_building = camp_perimeter_02 } + flag:camp_perimeter_02 = { add_domicile_building = camp_perimeter_03 } + flag:camp_perimeter_03 = { add_domicile_building = camp_perimeter_04 } + flag:camp_perimeter_04 = { add_domicile_building = camp_perimeter_05 } + flag:camp_perimeter_05 = { add_domicile_building = camp_perimeter_06 } + } + } custom_tooltip = camp_party_100_contracts_get @@ -13436,7 +13514,7 @@ banish_effect = { show_as_tooltip = { banish = yes } save_scope_as = allow_imprisoned_landless if = { - limit = { is_valid_for_laampdom = yes } + limit = { scope:allow_imprisoned_landless = { is_valid_for_laampdom = yes } } custom_tooltip = laamp_may_become_adventurer_tt } $BANISHER$ = { save_scope_as = banisher } @@ -13682,7 +13760,7 @@ governor_contract_invalidated_message_effect = { left_icon = scope:task_contract_character desc = admin_contract_invalidated_desc - current_travel_plan ?= { + current_travel_plan ?= { if = { limit = { can_cancel = yes } cancel_travel_plan = yes @@ -13895,10 +13973,10 @@ add_random_external_estate_building = { random_list = { 10 = { trigger = { - NOR = { + NOR = { has_domicile_building_or_higher = temple_small_01 owner = { - government_has_flag = government_is_celestial + government_has_flag = government_is_celestial } } } @@ -13930,8 +14008,8 @@ add_random_external_estate_building = { } 10 = { trigger = { - NOR = { - has_domicile_building_or_higher = vineyard_01 + NOR = { + has_domicile_building_or_higher = vineyard_01 owner.culture ?= { has_innovation = innovation_champa_rice } @@ -13975,7 +14053,7 @@ add_random_external_estate_building = { } 10 = { trigger = { - NOR = { + NOR = { has_domicile_building_or_higher = grain_field_01 owner.culture ?= { has_innovation = innovation_champa_rice @@ -13990,7 +14068,7 @@ add_random_external_estate_building = { } 10 = { trigger = { - NOT = { + NOT = { has_domicile_building_or_higher = rice_field_01 } owner.culture ?= { @@ -14045,8 +14123,8 @@ add_random_external_estate_building = { } 10 = { trigger = { - NOR = { - has_domicile_building_or_higher = olive_01 + NOR = { + has_domicile_building_or_higher = olive_01 owner.culture ?= { has_innovation = innovation_champa_rice } diff --git a/common/scripted_effects/09_dlc_mpo_scripted_effects.txt b/common/scripted_effects/09_dlc_mpo_scripted_effects.txt index 2080338f..7c80b576 100644 --- a/common/scripted_effects/09_dlc_mpo_scripted_effects.txt +++ b/common/scripted_effects/09_dlc_mpo_scripted_effects.txt @@ -916,12 +916,14 @@ mpo_mongol_recovered_head_content_effect = { if = { limit = { any_side_participant = { + is_alive = yes has_variable = beheaded_warrior is_ruler = yes } } every_side_participant = { limit = { + is_alive = yes has_variable = beheaded_warrior is_ruler = yes } @@ -929,7 +931,6 @@ mpo_mongol_recovered_head_content_effect = { random_list = { 1 = { trigger = { - is_alive = yes is_imprisoned = no } modifier = { @@ -2022,225 +2023,6 @@ mpo_yurts_paiza_bonuses_tooltip_effect = { } } -mpo_yurts_paiza_bonuses_effect = { - if = { - limit = { - domicile ?= { - OR = { - has_domicile_building_or_higher = fertility_trade_yurt_01 - has_domicile_building_or_higher = herd_trade_yurt_01 - has_domicile_building_or_higher = knight_trade_yurt_01 - has_domicile_building_or_higher = merchant_yurt_01 - has_domicile_building_or_higher = char_trade_yurt_01 - } - } - } - custom_tooltip = yurt_paiza_bonuses_generic - } - domicile ?= { - if = { - limit = { - has_domicile_building_or_higher = fertility_trade_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_paiza_fertility_gain_lvl_1 = { - root = { - every_held_county = { - limit = { - uses_county_fertility = yes - } - add_county_modifier = { - modifier = paiza_fertility_modifier_1 - years = 2 - } - } - } - } - nomad_yurt_paiza_fertility_gain_lvl_2 = { - root = { - every_held_county = { - limit = { - uses_county_fertility = yes - } - add_county_modifier = { - modifier = paiza_fertility_modifier_2 - years = 4 - } - } - } - } - nomad_yurt_paiza_fertility_gain_lvl_3 = { - root = { - every_held_county = { - limit = { - uses_county_fertility = yes - } - add_county_modifier = { - modifier = paiza_fertility_modifier_3 - years = 6 - } - } - } - } - } - } - if = { - limit = { - has_domicile_building_or_higher = herd_trade_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_paiza_herd_gain_lvl_1= { - change_herd = { - value = root.var:trade_gold_value - multiply = 0.05 - } - } - nomad_yurt_paiza_herd_gain_lvl_2 = { - change_herd = { - value = root.var:trade_gold_value - multiply = 0.05 - } - } - nomad_yurt_paiza_herd_gain_lvl_3 = { - change_herd = { - value = root.var:trade_gold_value - multiply = 0.2 - } - } - } - } - if = { - limit = { - has_domicile_building_or_higher = knight_trade_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_paiza_maa_gain_lvl_1 = { - root = { - spawn_army = { - name = paiza_troops - men_at_arms = { - type = accolade_maa_archers - stacks = 1 - } - location = root.location - origin = scope:merchant_origin - inheritable = yes - } - } - } - nomad_yurt_paiza_maa_gain_lvl_2 = { - root = { - spawn_army = { - name = paiza_troops - men_at_arms = { - type = accolade_maa_archers - stacks = 4 - } - location = root.location - origin = scope:merchant_origin - inheritable = yes - } - } - } - nomad_yurt_paiza_maa_gain_lvl_3 = { - root = { - spawn_army = { - name = paiza_troops - men_at_arms = { - type = accolade_maa_archers - stacks = 4 - } - men_at_arms = { - type = accolade_maa_vanguards - stacks = 4 - } - location = root.location - origin = scope:merchant_origin - inheritable = yes - } - } - } - } - } - if = { - limit = { - has_domicile_building_or_higher = char_trade_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_paiza_char_gain_lvl_1 = { - root = { - hidden_effect = { - create_character = { - location = root.location - culture = scope:merchant_origin.county.culture - faith = scope:merchant_origin.county.faith - gender_female_chance = 50 - template = peasant_character - save_scope_as = yurt_merchant_char - } - scope:yurt_merchant_char = { - add_trait = lifestyle_traveler - } - add_courtier = scope:yurt_merchant_char - } - } - } - nomad_yurt_paiza_char_gain_lvl_2 = { - root = { - hidden_effect = { - create_character = { - location = root.location - culture = scope:merchant_origin.county.culture - faith = scope:merchant_origin.county.faith - gender_female_chance = 50 - template = merchant_template - save_scope_as = yurt_merchant_char - } - scope:yurt_merchant_char = { - add_trait = lifestyle_traveler - } - add_courtier = scope:yurt_merchant_char - } - } - } - nomad_yurt_paiza_char_gain_lvl_3 = { - root = { - hidden_effect = { - create_character = { - location = root.location - culture = scope:merchant_origin.county.culture - faith = scope:merchant_origin.county.faith - gender_female_chance = 50 - template = merchant_template - save_scope_as = yurt_merchant_char - } - scope:yurt_merchant_char = { - add_random_skill_point_effect = yes - add_random_skill_point_effect = yes - add_random_skill_point_effect = yes - add_random_skill_point_effect = yes - add_random_skill_point_effect = yes - add_random_skill_point_effect = yes - random_list = { - 1 = { add_trait = avaricious } - 1 = { add_trait = diplomat } - 1 = { add_trait = overseer } - } - add_trait = lifestyle_traveler - } - add_courtier = scope:yurt_merchant_char - } - } - } - } - } - } -} - mpo_paiza_improve_maa_smol_effect = { add_character_modifier = mpo_paiza_improve_maa_modifier add_character_flag = paiza_metal_trade_yurt_flag @@ -3874,6 +3656,218 @@ mpo_overrunning_vassal_title_distribution_effect = { } } +mpo_duchy_overrunning_vassal_title_distribution_effect = { + #All counties but capital county are up for grabs + every_held_title = { + limit = { + tier = tier_county + NOT = { + this = scope:attacker.capital_county + } + } + add_to_list = overrun_counties + } + #Distribute all counties + while = { + limit = { + any_in_list = { + list = overrun_counties + holder = scope:attacker + } + any_in_list = { + list = potential_overrunning_vassals + NOT = { + has_character_flag = got_overrun_title + } + } + } + ordered_in_list = { + order_by = development_level + list = overrun_counties + save_scope_as = title_to_grant + } + #Choose a vassal + ordered_in_list = { + list = potential_overrunning_vassals + limit = { + NOT = { + has_character_flag = got_overrun_title + } + } + order_by = max_military_strength + save_scope_as = title_gainer + #Add character flag - they should be done + add_character_flag = got_overrun_title + + #tributaries go + hidden_effect = { + every_tributary = { + custom = custom.every_tributary + end_tributary = yes + } + } + + #Give up nomadic titles + if = { + limit = { + NOT = { + scope:title_to_grant = { + any_county_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + mpo_overrunning_ending_nomadism_effect = yes + } + #Nomads should still move + else = { + hidden_effect = { + give_domain_to_herders = yes + } + } + } + scope:title_gainer = { + create_title_and_vassal_change = { + type = granted + save_scope_as = title_change + } + scope:title_to_grant = { + change_title_holder = { + holder = scope:title_gainer + change = scope:title_change + } + } + resolve_title_and_vassal_change = scope:title_change + #Add duchy if they're getting one + if = { + limit = { + exists = scope:duchy_to_grant + } + create_title_and_vassal_change = { + type = granted + save_scope_as = title_change + } + scope:duchy_to_grant = { + change_title_holder = { + holder = scope:title_gainer + change = scope:title_change + } + } + resolve_title_and_vassal_change = scope:title_change + } + } + #Change government + scope:attacker = { + if = { + limit = { + scope:title_to_grant = { + any_county_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + #Do nothing, they're still nomadic + } + else_if = { + limit = { + scope:title_to_grant = { + any_county_province = { + has_holding_type = tribal_holding + } + } + } + scope:title_gainer = { + nomad_convert_people_to_tribe_effect = yes + } + } + else_if = { + limit = { + scope:title_gainer = { + OR = { + #Personal reasons to go clan + faith.religion = religion:islam_religion + culture = { + OR = { + has_cultural_pillar = heritage_arabic + has_cultural_pillar = heritage_iranian + } + } + #county and liege are clan + AND = { + scope:title_to_grant = { + OR = { + faith.religion = religion:islam_religion + culture = { + OR = { + has_cultural_pillar = heritage_arabic + has_cultural_pillar = heritage_iranian + } + } + } + } + scope:attacker = { + government_has_flag = government_is_clan + } + } + } + } + } + scope:title_gainer = { + nomad_convert_people_to_clan_effect = yes + } + } + else = { + scope:title_gainer = { + nomad_convert_people_to_feudal_effect = yes + } + } + } + + #Have to re-add them as a vassal probably + scope:title_gainer = { + if = { + limit = { + NOT = { + liege = scope:attacker + } + } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + change_liege = { + liege = scope:attacker + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + } + + #Remove chosen titles from list + scope:title_to_grant = { + remove_from_list = overrun_counties + } + scope:undervassal_county ?= { + remove_from_list = overrun_counties + } + } + #Get rid of this now-useless flag + every_vassal = { + limit = { + has_character_flag = got_overrun_title + } + remove_character_flag = got_overrun_title + } +} + mpo_overrunning_ending_nomadism_effect = { #Wrap up being a nomad nomad_domicile_refund_effect = yes @@ -4896,33 +4890,59 @@ summon_three_fair_courtiers_effect = { template = $NOMAD_TEMPLATE_CHARACTER$ faith = root.location.faith culture = root.location.culture - save_scope_as = new_commander + after_creation = { + add_to_list = three_fair_courtiers_list + } + } + create_character = { + employer = scope:root_scope + template = $NOMAD_TEMPLATE_CHARACTER$ + faith = root.location.faith + culture = root.location.culture + after_creation = { + add_to_list = three_fair_courtiers_list + } + } + create_character = { + employer = scope:root_scope + template = $NOMAD_TEMPLATE_CHARACTER$ + faith = root.location.faith + culture = root.location.culture + after_creation = { + add_to_list = three_fair_courtiers_list + } } if = { # Error suppression limit = { - exists = scope:new_commander - } - scope:new_commander = { - assign_random_nickname_effect = yes - add_character_flag = { - flag = blocked_from_leaving - years = 25 + any_in_list = { + list = three_fair_courtiers_list } } - if = { - limit = { - scope:new_commander = { + every_in_list = { + list = three_fair_courtiers_list + assign_random_nickname_effect = yes + if = { + limit = { NOT = { is_courtier_of = scope:root_scope } } + scope:root_scope = { + add_courtier = scope:new_commander + } + } + add_character_flag = { + flag = blocked_from_leaving + years = 25 + } + save_scope_as = new_commander # for the localization + scope:root_scope = { + send_interface_message = { + title = nomad_character_recruited.t + left_icon = prev + custom_tooltip = commander_recruited.desc + } } - add_courtier = scope:new_commander - } - send_interface_message = { - title = nomad_character_recruited.t - left_icon = scope:new_commander - custom_tooltip = commander_recruited.desc } } } @@ -4953,7 +4973,7 @@ mpo_war_vassal_tributary_effect = { holder ?= { add_to_list = target_holder } - add_to_list = target_titles + add_to_list = titles_taken } } @@ -4965,12 +4985,12 @@ mpo_war_vassal_tributary_effect = { } every_in_list = { - list = target_titles + list = titles_taken add_to_list = prestige_gain_list } ordered_in_list = { - list = target_titles + list = titles_taken order_by = tier max = 1 save_scope_as = war_goal_title @@ -4983,8 +5003,8 @@ mpo_war_vassal_tributary_effect = { limit = { NOT = { any_held_county = { - exists = duchy - NOT = { is_in_list = target_titles } + is_landless_type_title = no + NOT = { is_in_list = titles_taken } } } NOR = { @@ -4996,14 +5016,7 @@ mpo_war_vassal_tributary_effect = { } if = { limit = { - NOR = { - this = scope:attacker - top_liege = scope:attacker - top_suzerain ?= scope:attacker - } - scope:attacker = { - vassal_count >= vassal_limit - } + scope:attacker.vassal_count >= vassal_limit } start_tributary_from_war_effect = { TRIBUTARY = scope:defender @@ -5022,40 +5035,30 @@ mpo_war_vassal_tributary_effect = { } } } - else_if = { - limit = { - NOR = { - this = scope:attacker - top_liege = scope:attacker - top_suzerain ?= scope:attacker - } - } + else = { change_liege = { liege = scope:attacker change = scope:change } } every_in_list = { - list = target_titles + list = titles_taken limit = { - holder ?= { this = scope:current_target_holder } + holder ?= scope:current_target_holder } - remove_from_list = target_titles + remove_from_list = titles_taken } } } every_in_list = { - list = target_titles + list = titles_taken limit = { - OR = { - NOT = { exists = holder } - holder ?= { - NOR = { - this = scope:attacker - any_liege_or_above = { this = scope:attacker } - top_suzerain ?= scope:attacker - } + holder ?= { + NOR = { + this = scope:attacker + any_liege_or_above = { this = scope:attacker } + top_suzerain ?= scope:attacker } } } @@ -5142,47 +5145,44 @@ mpo_war_vassal_tributary_effect = { #Called from game start on action #inside domicile scope add_random_yurt_external_building_effect = { - if = { - limit = { owner = { NOT = { government_has_flag = government_allows_nomad_domicile_titles } } } - random_list = { - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = herd_welfare_yurt_01 } - } - add_domicile_building = herd_welfare_yurt_01 - } - 1 = { - trigger = { - NOT = { has_domicile_building_or_higher = character_warfare_yurt_01 } - } - add_domicile_building = character_warfare_yurt_01 - } - 1 = { - trigger = { - NOT = { has_domicile_building_or_higher = mass_warfare_yurt_01 } - } - add_domicile_building = mass_warfare_yurt_01 - } - 1 = { - trigger = { - NOT = { has_domicile_building_or_higher = court_yurt_01 } - } - add_domicile_building = court_yurt_01 - } - 1 = { - trigger = { - NOT = { has_domicile_building_or_higher = family_yurt_01 } - } - add_domicile_building = family_yurt_01 - } - 1 = { - trigger = { - NOT = { has_domicile_building_or_higher = mystical_yurt_01 } - } - add_domicile_building = mystical_yurt_01 - } - } - } + random_list = { + 10 = { + trigger = { + NOT = { has_domicile_building_or_higher = herd_welfare_yurt_01 } + } + add_domicile_building = herd_welfare_yurt_01 + } + 1 = { + trigger = { + NOT = { has_domicile_building_or_higher = character_warfare_yurt_01 } + } + add_domicile_building = character_warfare_yurt_01 + } + 1 = { + trigger = { + NOT = { has_domicile_building_or_higher = mass_warfare_yurt_01 } + } + add_domicile_building = mass_warfare_yurt_01 + } + 1 = { + trigger = { + NOT = { has_domicile_building_or_higher = court_yurt_01 } + } + add_domicile_building = court_yurt_01 + } + 1 = { + trigger = { + NOT = { has_domicile_building_or_higher = family_yurt_01 } + } + add_domicile_building = family_yurt_01 + } + 1 = { + trigger = { + NOT = { has_domicile_building_or_higher = mystical_yurt_01 } + } + add_domicile_building = mystical_yurt_01 + } + } } #Called from game start on action @@ -5669,6 +5669,7 @@ de_jure_shifting_effect = { value = 1 } max = 3 + check_range_bounds = no list = de_jure_shifted_title show_as_tooltip = { set_de_jure_liege_title = root.primary_title @@ -6127,15 +6128,39 @@ expanding_steppe_effect = { } } # East - scope:world_steppe_tarim = { + scope:dlc_mpo_steppe_hexi_tarim_expansion = { expanding_steppe_add_region_effect = { SUB_REGION = east - REGION = world_steppe_tarim + REGION = dlc_mpo_steppe_hexi_tarim_expansion } tgp_silk_road_expand_steppe_effect = { SUB_REGION = central_asia } tgp_silk_road_expand_steppe_effect = { SUB_REGION = transcaspia } tgp_silk_road_expand_steppe_effect = { SUB_REGION = occident } } + scope:dlc_mpo_steppe_north_china_expansion = { + expanding_steppe_add_region_effect = { + SUB_REGION = east + REGION = dlc_mpo_steppe_north_china_expansion + } + } + scope:dlc_mpo_steppe_central_china_expansion = { + expanding_steppe_add_region_effect = { + SUB_REGION = east + REGION = dlc_mpo_steppe_central_china_expansion + } + } + scope:world_asia_korea = { + expanding_steppe_add_region_effect = { + SUB_REGION = east + REGION = world_asia_korea + } + } + scope:world_asia_japan = { + expanding_steppe_add_region_effect = { + SUB_REGION = east + REGION = world_asia_japan + } + } } } @@ -6573,3 +6598,83 @@ mpo_abuse_authority_county_effect = { } } } + +mpo_release_herder_land_effect = { + # Save scope of character triggering the effect + save_scope_as = trigger_character + every_top_realm_border_county = { + limit = { + title_province = { + this != scope:trigger_character.capital_province + } + } + add_to_list = target_titles + } + while = { + limit = { # Loop over list of target titles until there are no more titles to grant + list_size = { + name = target_titles + value >= 1 + } + } + random_in_list = { + list = target_titles + if = { + limit = { + title_province = { has_holding_type = nomad_holding } + } + title_province = { set_holding_type = herder_holding } + } + + save_scope_as = county_of_origin + + create_character = { + template = herder_character + dynasty = none + location = scope:county_of_origin.title_province + culture = scope:county_of_origin.culture + faith = scope:county_of_origin.faith + gender_female_chance = { + if = { + limit = { scope:county_of_origin.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 20 + } + else_if = { + limit = { scope:county_of_origin.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 80 + } + else = { + add = 50 + } + } + save_scope_as = new_herder + } + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder_include_vassals = { + holder = scope:new_herder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + remove_from_list = target_titles + } + scope:new_herder = { + change_government = herder_government + if = { + limit = { is_independent_ruler = no } + #De-vassalise him. + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = no + } + becomes_independent = { change = scope:change } + resolve_title_and_vassal_change = scope:change + } + } + } +} diff --git a/common/scripted_effects/tgp_debate_scripted_effects.txt b/common/scripted_effects/tgp_debate_scripted_effects.txt index 8abd17dc..287a5f34 100644 --- a/common/scripted_effects/tgp_debate_scripted_effects.txt +++ b/common/scripted_effects/tgp_debate_scripted_effects.txt @@ -372,7 +372,9 @@ debate_host_rewards_effect = { situation_top_has_catalyst = catalyst_movement_gained_power_pro_hegemon } } - trigger_situation_catalyst = catalyst_movement_gained_power_pro_hegemon + situation:dynastic_cycle = { + trigger_situation_catalyst = catalyst_movement_gained_power_pro_hegemon + } } } advancement_movement = { @@ -382,7 +384,9 @@ debate_host_rewards_effect = { situation_top_has_catalyst = catalyst_movement_gained_power_advancement } } - trigger_situation_catalyst = catalyst_movement_gained_power_advancement + situation:dynastic_cycle = { + trigger_situation_catalyst = catalyst_movement_gained_power_advancement + } } } expansion_movement = { @@ -392,7 +396,9 @@ debate_host_rewards_effect = { situation_top_has_catalyst = catalyst_movement_gained_power_expansion } } - trigger_situation_catalyst = catalyst_movement_gained_power_expansion + situation:dynastic_cycle = { + trigger_situation_catalyst = catalyst_movement_gained_power_expansion + } } } conservative_movement = { @@ -402,7 +408,9 @@ debate_host_rewards_effect = { situation_top_has_catalyst = catalyst_movement_gained_power_conservative } } - trigger_situation_catalyst = catalyst_movement_gained_power_conservative + situation:dynastic_cycle = { + trigger_situation_catalyst = catalyst_movement_gained_power_conservative + } } } } @@ -442,7 +450,7 @@ debate_host_rewards_effect = { ordered_in_list = { variable = debate_disciples order_by = learning - position = 1 + position = 0 save_scope_as = disciple_2 } } diff --git a/common/scripted_effects/tgp_imperial_examination_scripted_effects.txt b/common/scripted_effects/tgp_imperial_examination_scripted_effects.txt index 90e65b7a..d7794f14 100644 --- a/common/scripted_effects/tgp_imperial_examination_scripted_effects.txt +++ b/common/scripted_effects/tgp_imperial_examination_scripted_effects.txt @@ -434,6 +434,20 @@ imperial_examination_disburse_activity_entrant_rewards = { } remove_character_flag = failed_imperial_examination } + if = { + limit = { + has_character_flag = exam_cheat_intent + NOR = { + has_variable = been_caught_cheating + has_variable = been_caught_cheating_longterm + } + government_allows = merit + } + add_secret = { + target = scope:host + type = secret_exam_cheater + } + } } #Failees else = { @@ -575,6 +589,20 @@ local_examination_disburse_activity_entrant_rewards = { desc = msg_provincial_exam_close_family_passed_desc } } + if = { + limit = { + has_character_flag = exam_cheat_intent + NOR = { + has_variable = been_caught_cheating + has_variable = been_caught_cheating_longterm + } + government_allows = merit + } + add_secret = { + target = scope:host + type = secret_exam_cheater + } + } } #Failees else = { @@ -1284,15 +1312,11 @@ imperial_examination_gather_entrants_effect = { NOR = { this = scope:host is_in_guest_subset = { name = imperial_examiners } - has_court_position = travel_leader_court_position - has_court_position = bodyguard_court_position # If you are a player, 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 } - # Remove diarchs from the list. - bannable_serving_diarch_trigger = no is_adult = yes } save_temporary_scope_as = temp_character @@ -1355,8 +1379,6 @@ local_examination_gather_entrants_effect = { NOR = { this = scope:host is_in_guest_subset = { name = imperial_examiners } - has_court_position = travel_leader_court_position - has_court_position = bodyguard_court_position # You have passed the any of the higher level exams has_character_flag = passed_metropolitan_exam # You have already passed the Provincial @@ -1364,8 +1386,6 @@ local_examination_gather_entrants_effect = { has_trait = devoted has_trait = eunuch } - # Remove diarchs from the list. - bannable_serving_diarch_trigger = no is_adult = yes } save_temporary_scope_as = temp_character @@ -1474,8 +1494,6 @@ imperial_examination_gather_stray_entrants_effect = { is_holy_order = no } } - # Remove diarchs from the list. - bannable_serving_diarch_trigger = no tgp_gender_can_be_exam_entrant_trigger = yes } add_to_list = entourage_entrants @@ -1513,8 +1531,6 @@ imperial_examination_gather_stray_entrants_effect = { is_holy_order = no } } - # Remove diarchs from the list. - bannable_serving_diarch_trigger = no tgp_gender_can_be_exam_entrant_trigger = yes } add_to_list = entourage_entrants @@ -1582,30 +1598,24 @@ metropolitan_examination_scoreboard_setup_effect = { } } #Add the fresh entrants to the scoreboard - while = { - count = 1 - ordered_attending_character = { - limit = { - or = { - is_in_guest_subset = { name = entrants } - } - NOR = { - is_in_guest_subset = { name = scoreboard } - scope:activity = { - any_guest_subset = { - name = scoreboard - count = scope:activity.var:scoreboard_size - } + every_attending_character = { + limit = { + is_in_guest_subset = { name = entrants } + NOR = { + is_in_guest_subset = { name = scoreboard } + scope:activity = { + any_guest_subset = { + name = scoreboard + count = scope:activity.var:scoreboard_size } } } - order_by = imperial_examination_score_value - save_temporary_scope_as = temp_character - scope:activity = { - add_to_guest_subset = { - name = scoreboard - target = scope:temp_character - } + } + save_temporary_scope_as = temp_character + scope:activity = { + add_to_guest_subset = { + name = scoreboard + target = scope:temp_character } } } @@ -1642,28 +1652,24 @@ palace_examination_scoreboard_setup_effect = { } } #Add the fresh entrants to the scoreboard - while = { - count = 1 - ordered_attending_character = { - limit = { - is_in_guest_subset = { name = palace_entrants } - NOR = { - is_in_guest_subset = { name = scoreboard } - scope:activity = { - any_guest_subset = { - name = scoreboard - count = scope:activity.var:scoreboard_size - } + every_attending_character = { + limit = { + is_in_guest_subset = { name = palace_entrants } + NOR = { + is_in_guest_subset = { name = scoreboard } + scope:activity = { + any_guest_subset = { + name = scoreboard + count = scope:activity.var:scoreboard_size } } } - order_by = imperial_examination_score_value - save_temporary_scope_as = temp_character - scope:activity = { - add_to_guest_subset = { - name = scoreboard - target = scope:temp_character - } + } + save_temporary_scope_as = temp_character + scope:activity = { + add_to_guest_subset = { + name = scoreboard + target = scope:temp_character } } } @@ -1720,6 +1726,7 @@ imperial_examination_determine_exam_outcome_effect = { # If we don't have enough, let some of the failees pass. ordered_guest_subset = { name = entrants + check_range_bounds = no limit = { has_trait = education_martial has_variable = failee_to_be_removed @@ -1990,4 +1997,4 @@ exam_grab_entrant_position_effect = { name = your_exam_position value = list_size:exam_position_list } -} \ No newline at end of file +} diff --git a/common/scripted_effects/tgp_mandala_scripted_effects.txt b/common/scripted_effects/tgp_mandala_scripted_effects.txt index 67114ab1..7fe352bc 100644 --- a/common/scripted_effects/tgp_mandala_scripted_effects.txt +++ b/common/scripted_effects/tgp_mandala_scripted_effects.txt @@ -93,7 +93,7 @@ contributed_slabs_of_sandstone_effect = { mandala_contributor_laterite_blocks_reward_effect = { add_prestige = mandala_contribution_medium_prestige_reward - add_piety_experience = mandala_contribution_minor_dynasty_reward + add_piety_experience = medium_piety_value } contributed_laterite_blocks_effect = { custom_description_no_bullet = { text = contributed_laterite_blocks } @@ -188,7 +188,7 @@ contributed_ornate_reliefs_effect = { } mandala_contributor_family_shrine_reward_effect = { - dynasty = { add_dynasty_prestige = medium_dynasty_prestige_value } + dynasty ?= { add_dynasty_prestige = medium_dynasty_prestige_value } player_heir ?= { add_piety_experience = medium_piety_value } } contributed_family_shrine_effect = { @@ -347,7 +347,7 @@ contributed_decorated_domes_effect = { } mandala_contributor_family_statues_reward_effect = { - dynasty = { add_dynasty_prestige = major_dynasty_prestige_value } + dynasty ?= { add_dynasty_prestige = major_dynasty_prestige_value } player_heir ?= { add_piety_experience = major_piety_value } @@ -621,7 +621,7 @@ contributed_gilded_domes_effect = { } mandala_contributor_family_temple_compound_reward_effect = { - dynasty = { add_dynasty_prestige = major_dynasty_prestige_value } + dynasty ?= { add_dynasty_prestige = major_dynasty_prestige_value } player_heir ?= { add_piety_experience = massive_piety_value } @@ -952,7 +952,7 @@ mandala_contributor_bejeweled_reliefs_reward_effect = { if = { limit = { scope:owner = { - house ?= { has_house_power_parameter = aspect_of_creation } + house ?= { has_house_aspiration_parameter = aspect_of_creation } } } custom_tooltip = mandala_contributor_bejeweled_reliefs_creator_reward_artifact_effect_tt @@ -968,7 +968,7 @@ mandala_contributor_bejeweled_reliefs_reward_effect = { else_if = { limit = { scope:owner = { - house ?= { has_house_power_parameter = aspect_of_serenity } + house ?= { has_house_aspiration_parameter = aspect_of_serenity } } } custom_tooltip = mandala_contributor_bejeweled_reliefs_serenity_reward_artifact_effect_tt @@ -984,7 +984,7 @@ mandala_contributor_bejeweled_reliefs_reward_effect = { else_if = { limit = { scope:owner = { - house ?= { has_house_power_parameter = aspect_of_destruction } + house ?= { has_house_aspiration_parameter = aspect_of_destruction } } } custom_tooltip = mandala_contributor_bejeweled_reliefs_destruction_reward_artifact_effect_tt @@ -1001,7 +1001,7 @@ mandala_contributor_bejeweled_reliefs_reward_effect = { else_if = { limit = { scope:owner = { - house ?= { has_house_power_parameter = aspect_of_trickery } + house ?= { has_house_aspiration_parameter = aspect_of_trickery } } } custom_tooltip = mandala_contributor_bejeweled_reliefs_trickery_reward_artifact_effect_tt @@ -1032,7 +1032,7 @@ mandala_contributor_bejeweled_reliefs_reward_effect = { else_if = { limit = { this = { - house ?= { has_house_power_parameter = aspect_of_creation } + house ?= { has_house_aspiration_parameter = aspect_of_creation } } } custom_tooltip = mandala_contributor_bejeweled_reliefs_creator_reward_pre_artifact_effect_tt @@ -1040,7 +1040,7 @@ mandala_contributor_bejeweled_reliefs_reward_effect = { else_if = { limit = { this = { - house ?= { has_house_power_parameter = aspect_of_serenity } + house ?= { has_house_aspiration_parameter = aspect_of_serenity } } } custom_tooltip = mandala_contributor_bejeweled_reliefs_serenity_reward_pre_artifact_effect_tt @@ -1048,7 +1048,7 @@ mandala_contributor_bejeweled_reliefs_reward_effect = { else_if = { limit = { this = { - house ?= { has_house_power_parameter = aspect_of_destruction } + house ?= { has_house_aspiration_parameter = aspect_of_destruction } } } custom_tooltip = mandala_contributor_bejeweled_reliefs_destruction_reward_pre_artifact_effect_tt @@ -1056,7 +1056,7 @@ mandala_contributor_bejeweled_reliefs_reward_effect = { else_if = { limit = { this = { - house ?= { has_house_power_parameter = aspect_of_trickery } + house ?= { has_house_aspiration_parameter = aspect_of_trickery } } } custom_tooltip = mandala_contributor_bejeweled_reliefs_trickery_reward_pre_artifact_effect_tt @@ -1230,7 +1230,7 @@ mandala_peacemaker_perk_serenity_effect = { if = { limit = { government_has_flag = government_is_mandala - house ?= { has_house_power_parameter = aspect_of_serenity } + house ?= { has_house_aspiration_parameter = aspect_of_serenity } is_house_head = yes has_perk = peacemaker_perk } @@ -1243,6 +1243,24 @@ mandala_peacemaker_perk_serenity_effect = { change_to_mandala_government_effect = { change_government = mandala_government change_to_mandala_government_decree_effect = yes + save_scope_as = root_scope + primary_title.title_province = { + if = { + limit = { geographical_region = geographical_region:mpo_region_permafrost } + scope:root_scope = { + every_realm_county = { + if = { + limit = { has_county_modifier = mpo_siberian_permafrost_modifier } + remove_county_modifier = mpo_siberian_permafrost_modifier + } + else_if = { + limit = { has_county_modifier = mpo_siberian_permafrost_modifier_bad } + remove_county_modifier = mpo_siberian_permafrost_modifier_bad + } + } + } + } + } } change_to_mandala_government_and_citadel_effect = { @@ -1320,36 +1338,55 @@ change_capital_holding_to_citadel_effect = { change_tribal_holdings_to_citadels_effect = { custom_tooltip = all_tribal_holdings_will_change_to_citadels save_scope_as = current_tribal_holder - hidden_effect_new_object = { - every_directly_owned_province = { - limit = { has_holding_type = tribal_holding } - set_variable = { - name = tribal_to_mandala_building_level - value = combined_building_level - days = 1 + if = { + limit = { + any_directly_owned_province = { + has_holding_type = tribal_holding + count >= 1 } - set_holding_type = temple_citadel_holding - #We need to set the holding type BEFORE we can change to the government, lest it invalidates - scope:current_tribal_holder = { - if = { - limit = { - NOT = { government_has_flag = government_is_mandala } - } - change_to_mandala_government_effect = yes - } - } - #We need to set the government type BEFORE we generate buildings, otherwise basically none are valid - while = { - limit = { var:tribal_to_mandala_building_level > 0 } - generate_building = yes - change_variable = { + } + hidden_effect_new_object = { + every_directly_owned_province = { + limit = { has_holding_type = tribal_holding } + set_variable = { name = tribal_to_mandala_building_level - subtract = 1 + value = combined_building_level + days = 1 } + set_holding_type = temple_citadel_holding + #We need to set the holding type BEFORE we can change to the government, lest it invalidates + scope:current_tribal_holder = { + if = { + limit = { + NOT = { government_has_flag = government_is_mandala } + } + change_to_mandala_government_effect = yes + } + } + #We need to set the government type BEFORE we generate buildings, otherwise basically none are valid + while = { + limit = { var:tribal_to_mandala_building_level > 0 } + generate_building = yes + change_variable = { + name = tribal_to_mandala_building_level + subtract = 1 + } + } + remove_variable = tribal_to_mandala_building_level } - remove_variable = tribal_to_mandala_building_level } } + #You're somehow a tribal with all your holdings being Temple Citadels? Good for you. + else = { + scope:current_tribal_holder = { + if = { + limit = { + NOT = { government_has_flag = government_is_mandala } + } + change_to_mandala_government_effect = yes + } + } + } } mandala_nuke_realm_laws_effect = { @@ -1978,7 +2015,7 @@ creator_mandala_built_regular_building_piety_effect = { if = { limit = { government_has_flag = government_is_mandala - house ?= { has_house_power_parameter = aspect_of_creation } + house ?= { has_house_aspiration_parameter = aspect_of_creation } is_house_head = yes } add_piety = { @@ -2000,7 +2037,7 @@ creator_mandala_built_regular_duchy_building_t1_piety_effect = { if = { limit = { government_has_flag = government_is_mandala - house ?= { has_house_power_parameter = aspect_of_creation } + house ?= { has_house_aspiration_parameter = aspect_of_creation } is_house_head = yes } add_piety = { @@ -2022,7 +2059,7 @@ creator_mandala_built_regular_duchy_building_t2_piety_effect = { if = { limit = { government_has_flag = government_is_mandala - house ?= { has_house_power_parameter = aspect_of_creation } + house ?= { has_house_aspiration_parameter = aspect_of_creation } is_house_head = yes } add_piety = { @@ -2044,7 +2081,7 @@ creator_mandala_built_regular_duchy_building_t3_piety_effect = { if = { limit = { government_has_flag = government_is_mandala - house ?= { has_house_power_parameter = aspect_of_creation } + house ?= { has_house_aspiration_parameter = aspect_of_creation } is_house_head = yes } add_piety = { @@ -2066,7 +2103,7 @@ creator_mandala_built_regular_holding_piety_effect = { if = { limit = { government_has_flag = government_is_mandala - house ?= { has_house_power_parameter = aspect_of_creation } + house ?= { has_house_aspiration_parameter = aspect_of_creation } is_house_head = yes } add_piety = { @@ -2088,7 +2125,7 @@ creator_mandala_upgraded_regular_holding_piety_effect = { if = { limit = { government_has_flag = government_is_mandala - house ?= { has_house_power_parameter = aspect_of_creation } + house ?= { has_house_aspiration_parameter = aspect_of_creation } is_house_head = yes } add_piety = { @@ -2454,7 +2491,7 @@ mandala_trickster_increment_successful_schemes_effect = { if = { limit = { government_has_flag = government_is_mandala - house ?= { has_house_power_parameter = aspect_of_trickery } + house ?= { has_house_aspiration_parameter = aspect_of_trickery } } increment_variable_effect = { VAR = num_successful_schemes @@ -2467,7 +2504,7 @@ mandala_trickster_increment_gold_ransomed_effect = { if = { limit = { government_has_flag = government_is_mandala - house ?= { has_house_power_parameter = aspect_of_trickery } + house ?= { has_house_aspiration_parameter = aspect_of_trickery } } increment_variable_effect = { VAR = amount_of_gold_ransomed @@ -2521,7 +2558,7 @@ mandala_travel_to_contract_location_effect = { modifier = { add = 100 scope:court_owner.house = { - has_house_power_parameter = aspect_of_creation + has_house_aspiration_parameter = aspect_of_creation } OR = { is_child_of = scope:court_owner @@ -2533,26 +2570,26 @@ mandala_travel_to_contract_location_effect = { modifier = { add = 10 scope:court_owner.house = { - has_house_power_parameter = aspect_of_creation + has_house_aspiration_parameter = aspect_of_creation } is_close_or_extended_family_of = scope:court_owner } modifier = { add = diplomacy scope:court_owner.house = { - has_house_power_parameter = aspect_of_serenity + has_house_aspiration_parameter = aspect_of_serenity } } modifier = { add = prowess scope:court_owner.house = { - has_house_power_parameter = aspect_of_destruction + has_house_aspiration_parameter = aspect_of_destruction } } modifier = { add = intrigue scope:court_owner.house = { - has_house_power_parameter = aspect_of_trickery + has_house_aspiration_parameter = aspect_of_trickery } } modifier = { @@ -2577,7 +2614,7 @@ mandala_travel_to_contract_location_effect = { modifier = { add = 100 scope:court_owner.house = { - has_house_power_parameter = aspect_of_creation + has_house_aspiration_parameter = aspect_of_creation } OR = { is_child_of = scope:court_owner @@ -2589,26 +2626,26 @@ mandala_travel_to_contract_location_effect = { modifier = { add = 10 scope:court_owner.house = { - has_house_power_parameter = aspect_of_creation + has_house_aspiration_parameter = aspect_of_creation } is_close_or_extended_family_of = scope:court_owner } modifier = { add = diplomacy scope:court_owner.house = { - has_house_power_parameter = aspect_of_serenity + has_house_aspiration_parameter = aspect_of_serenity } } modifier = { add = prowess scope:court_owner.house = { - has_house_power_parameter = aspect_of_destruction + has_house_aspiration_parameter = aspect_of_destruction } } modifier = { add = intrigue scope:court_owner.house = { - has_house_power_parameter = aspect_of_trickery + has_house_aspiration_parameter = aspect_of_trickery } } } @@ -2631,7 +2668,7 @@ mandala_travel_to_contract_location_effect = { modifier = { add = 100 scope:court_owner.house = { - has_house_power_parameter = aspect_of_creation + has_house_aspiration_parameter = aspect_of_creation } OR = { is_child_of = scope:court_owner @@ -2643,26 +2680,26 @@ mandala_travel_to_contract_location_effect = { modifier = { add = 10 scope:court_owner.house = { - has_house_power_parameter = aspect_of_creation + has_house_aspiration_parameter = aspect_of_creation } is_close_or_extended_family_of = scope:court_owner } modifier = { add = diplomacy scope:court_owner.house = { - has_house_power_parameter = aspect_of_serenity + has_house_aspiration_parameter = aspect_of_serenity } } modifier = { add = prowess scope:court_owner.house = { - has_house_power_parameter = aspect_of_destruction + has_house_aspiration_parameter = aspect_of_destruction } } modifier = { add = intrigue scope:court_owner.house = { - has_house_power_parameter = aspect_of_trickery + has_house_aspiration_parameter = aspect_of_trickery } } } @@ -2686,7 +2723,7 @@ mandala_travel_to_contract_location_effect = { modifier = { add = 100 scope:court_owner.house = { - has_house_power_parameter = aspect_of_creation + has_house_aspiration_parameter = aspect_of_creation } OR = { is_child_of = scope:court_owner @@ -2698,26 +2735,26 @@ mandala_travel_to_contract_location_effect = { modifier = { add = 10 scope:court_owner.house = { - has_house_power_parameter = aspect_of_creation + has_house_aspiration_parameter = aspect_of_creation } is_close_or_extended_family_of = scope:court_owner } modifier = { add = diplomacy scope:court_owner.house = { - has_house_power_parameter = aspect_of_serenity + has_house_aspiration_parameter = aspect_of_serenity } } modifier = { add = prowess scope:court_owner.house = { - has_house_power_parameter = aspect_of_destruction + has_house_aspiration_parameter = aspect_of_destruction } } modifier = { add = intrigue scope:court_owner.house = { - has_house_power_parameter = aspect_of_trickery + has_house_aspiration_parameter = aspect_of_trickery } } } @@ -2742,7 +2779,7 @@ mandala_travel_to_contract_location_effect = { modifier = { add = 100 scope:court_owner.house = { - has_house_power_parameter = aspect_of_creation + has_house_aspiration_parameter = aspect_of_creation } OR = { is_child_of = scope:court_owner @@ -2754,26 +2791,26 @@ mandala_travel_to_contract_location_effect = { modifier = { add = 10 scope:court_owner.house = { - has_house_power_parameter = aspect_of_creation + has_house_aspiration_parameter = aspect_of_creation } is_close_or_extended_family_of = scope:court_owner } modifier = { add = diplomacy scope:court_owner.house = { - has_house_power_parameter = aspect_of_serenity + has_house_aspiration_parameter = aspect_of_serenity } } modifier = { add = prowess scope:court_owner.house = { - has_house_power_parameter = aspect_of_destruction + has_house_aspiration_parameter = aspect_of_destruction } } modifier = { add = intrigue scope:court_owner.house = { - has_house_power_parameter = aspect_of_trickery + has_house_aspiration_parameter = aspect_of_trickery } } } @@ -2957,6 +2994,7 @@ mandala_contract_legitimacy_reward_display_effect = { } add_all_valid_mandala_contract_provinces_to_list_effect = { + save_scope_as = mandala_ruler every_sub_realm_county = { every_county_province = { limit = { @@ -2990,6 +3028,7 @@ add_all_valid_mandala_contract_provinces_to_list_effect = { } add_all_valid_mandala_contract_provinces_with_crocodiles_to_list_effect = { + save_scope_as = mandala_ruler every_sub_realm_county = { every_county_province = { limit = { @@ -3025,6 +3064,7 @@ add_all_valid_mandala_contract_provinces_with_crocodiles_to_list_effect = { } add_all_valid_mandala_contract_provinces_with_neighbor_to_list_effect = { + save_scope_as = mandala_ruler every_sub_realm_county = { limit = { any_neighboring_county = { @@ -3078,6 +3118,7 @@ add_all_valid_mandala_contract_provinces_with_neighbor_to_list_effect = { } add_all_valid_mandala_contract_provinces_no_holding_to_list_effect = { + save_scope_as = mandala_ruler every_sub_realm_county = { every_county_province = { limit = { diff --git a/common/scripted_effects/tgp_tribute_mission_scripted_effects.txt b/common/scripted_effects/tgp_tribute_mission_scripted_effects.txt index b761d543..3a0e1485 100644 --- a/common/scripted_effects/tgp_tribute_mission_scripted_effects.txt +++ b/common/scripted_effects/tgp_tribute_mission_scripted_effects.txt @@ -234,9 +234,7 @@ tribute_mission_decision_effect = { GIVER = root CHARACTER = scope:tribute_mission_target } - has_any_disease_trigger = no - has_easily_mocked_physical_attribute_trigger = no - NOT = { is_heir_of = root } + tribute_mission_is_available_concubine_trigger = yes } add_to_list = potential_concubine_tribute_list random_in_list = { diff --git a/common/scripted_triggers/00_building_requirement_triggers.txt b/common/scripted_triggers/00_building_requirement_triggers.txt index 8a103f60..9a11aef7 100644 --- a/common/scripted_triggers/00_building_requirement_triggers.txt +++ b/common/scripted_triggers/00_building_requirement_triggers.txt @@ -204,7 +204,16 @@ building_orchards_requirement_terrain = { } building_farm_estates_requirement_terrain = { - terrain = farmlands + OR = { + terrain = farmlands + AND = { + OR = { + terrain = hills + terrain = jungle + } + county.culture = { has_cultural_parameter = rice_cultivators_can_construct_paddy_fields_in_hills_and_jungle } + } + } } building_tell_mines_requirement_terrain = { @@ -804,11 +813,19 @@ eastern_special_building_trigger = { has_building = shwedagon_pagoda_01 has_building = ananda_temple_01 has_building = khajuraho_01 + has_building = angkor_wat_01 + has_building = my_son_sanctuary_01 + has_building = stone_pagoda_01 + has_building = muara_takus_01 + has_building = three_pagodas_dali_01 + has_building = pyramid_lingapura_01 + has_building = buddha_kamakura_01 has_building_or_higher = jokhang_01 has_building_or_higher = konark_temple_01 has_building_or_higher = vatapi_caves_01 has_building_or_higher = sanchi_stupa_01 has_building_or_higher = boudhanath_01 + has_building_or_higher = temples_angkor_01 } } @@ -835,6 +852,7 @@ religious_special_building_exclusion_trigger = { # checks if any special buildin has_building = holy_site_japanese_temple_01 has_building = holy_site_chinese_temple_01 has_building = holy_site_se_asia_pagan_temple_01 + has_building = izumo_taisha_01 } } AND = { # Islamic @@ -855,6 +873,7 @@ religious_special_building_exclusion_trigger = { # checks if any special buildin barony.holder.religion = religion:buddhism_religion barony.holder.religion = religion:jainism_religion barony.holder.religion = religion:taoism_religion + barony.holder.religion = religion:confucianism_religion barony.holder.religion = religion:zoroastrianism_religion } eastern_special_building_trigger = yes @@ -871,6 +890,21 @@ religious_special_building_exclusion_trigger = { # checks if any special buildin } } +building_monastic_schools_holding_level_requirement_trigger = { + trigger_if = { + limit = { scope:holder.faith = { has_doctrine_parameter = monastic_schools_allowed_in_every_holding_type } } + OR = { + has_building_or_higher = castle_$LEVEL$ + has_building_or_higher = city_$LEVEL$ + has_building_or_higher = temple_$LEVEL$ + has_building_or_higher = temple_citadel_$LEVEL$ + } + } + trigger_else = { + has_building_or_higher = temple_$LEVEL$ + } +} + building_murex_farm_requirement_terrain = { is_county_capital = yes is_coastal = yes @@ -902,6 +936,7 @@ building_spice_plantation_requirement_terrain = { geographical_region = world_asia_sulawesi_maluku geographical_region = world_asia_indonesia geographical_region = world_india + geographical_region = world_burma } OR = { terrain = jungle @@ -920,19 +955,19 @@ building_examination_hall_requirement_terrain = { } building_breweries_requirement = { - OR = { - AND = { + trigger_if = { + limit = { has_building_or_higher = temple_$NUMBER$ - OR = { - faith = faith:catholic - faith = { has_doctrine_parameter = allows_brewery } - } } - AND = { - has_building_or_higher = city_$NUMBER$ - culture = { has_cultural_parameter = allows_brewery } + OR = { + faith = faith:catholic + faith = { has_doctrine_parameter = allows_brewery } } } + trigger_else = { + building_requirement_castle_city_church = { LEVEL = $NUMBER$ } + culture = { has_cultural_parameter = allows_brewery } + } } #building_powder_magazine_requirement = { diff --git a/common/scripted_triggers/00_clothing_triggers.txt b/common/scripted_triggers/00_clothing_triggers.txt index a23a6e9b..c94665e1 100644 --- a/common/scripted_triggers/00_clothing_triggers.txt +++ b/common/scripted_triggers/00_clothing_triggers.txt @@ -62,13 +62,6 @@ portrait_wear_no_headgear_trigger = { has_character_flag = roaming_character - AND = { # No headgear for characters without crowns - exists = this - portrait_wear_no_crown_trigger = yes - # Should still wear armor when going to war - portrait_wear_armor_trigger = no - } - AND = { OR = { should_be_naked_trigger = yes # Deliberately not the "fully naked" one since dropping your crown's intended even if nudity is disabled @@ -126,20 +119,6 @@ portrait_wear_armor_trigger = { limit = { portrait_sickness_trigger = yes } is_in_army = yes } - trigger_if = { - limit = { government_allows = barter } - OR = { - is_at_war = yes - involved_activity = { has_activity_type = activity_tournament } - # Serving Varangian - has_character_flag = is_currently_varangian - # In a Duel - has_character_flag = single_combat_duel_armor - has_character_flag = forced_knight_armor - # In a Tournament - activity_tournament_armor_trigger = yes - } - } OR = { # Mercenaries, Holy Orders, Adventurers AND = { @@ -214,7 +193,6 @@ portrait_wear_armor_trigger = { OR = { vassal_contract_has_flag = celestial_province_protectorate vassal_contract_has_flag = celestial_province_military - vassal_contract_has_flag = meritocratic_province_protectorate vassal_contract_has_flag = meritocratic_province_military has_title = title:e_minister_grand_marshal } @@ -252,20 +230,6 @@ portrait_wear_armor_currently_in_army_trigger = { is_commanding_army = yes exists = knight_army } - trigger_if = { - limit = { government_allows = barter } - OR = { - is_at_war = yes - involved_activity = { has_activity_type = activity_tournament } - # Serving Varangian - has_character_flag = is_currently_varangian - # In a Duel - has_character_flag = single_combat_duel_armor - has_character_flag = forced_knight_armor - # In a Tournament - activity_tournament_armor_trigger = yes - } - } } portrait_wear_no_armor_trigger = { @@ -285,7 +249,6 @@ portrait_accoladed_knight_trigger = { highest_held_title_tier = tier_duchy } accolade = { - is_accolade_active = yes accolade_rank >= 5 } } @@ -294,7 +257,6 @@ portrait_accoladed_knight_trigger = { highest_held_title_tier = tier_kingdom } accolade = { - is_accolade_active = yes accolade_rank >= 3 } } @@ -302,9 +264,6 @@ portrait_accoladed_knight_trigger = { liege ?= { highest_held_title_tier = tier_empire } - accolade = { - is_accolade_active = yes - } } } } @@ -328,20 +287,6 @@ portrait_wear_helmet_trigger = { # Different from Armor, as (crowned) Kings and limit = { portrait_sickness_trigger = yes } is_in_army = yes } - trigger_if = { - limit = { government_allows = barter } - OR = { - is_at_war = yes - involved_activity = { has_activity_type = activity_tournament } - # Serving Varangian - has_character_flag = is_currently_varangian - # In a Duel - has_character_flag = single_combat_duel_armor - has_character_flag = forced_knight_armor - # In a Tournament - activity_tournament_armor_trigger = yes - } - } OR = { # Adventurers AND = { @@ -422,7 +367,6 @@ portrait_wear_helmet_trigger = { # Different from Armor, as (crowned) Kings and OR = { vassal_contract_has_flag = celestial_province_protectorate vassal_contract_has_flag = celestial_province_military - vassal_contract_has_flag = meritocratic_province_protectorate vassal_contract_has_flag = meritocratic_province_military has_title = title:e_minister_grand_marshal } @@ -460,10 +404,12 @@ portrait_wear_helmet_trigger = { # Different from Armor, as (crowned) Kings and portrait_wear_no_crown_trigger = { # Rulers should be coronated to wear a crown barring exceptions exists = this OR = { + is_governor = yes + trigger_if = { # No crowns for uncoronated characters limit = { has_ach_dlc_trigger = yes } has_realm_law = uncrowned - NOT = { coronation_proper_artifact_regalia_trigger = yes } #don't take off your fancy hat if you care about regalia. But do take it off if you care about crowns AND regalia + NOT = { coronation_proper_artifact_regalia_trigger = yes } #don't take off your fancy hat if you care about regalia. But do take it off if you care about crowns AND regalia } trigger_if = { # Unlanded spouses of uncoronated ruler's shouldn't have crowns @@ -528,6 +474,7 @@ should_use_fat_animation = { } AND = { # Fat non dwarf scope:current_weight >= 40 + scope:current_weight <= 80 is_dwarf_height = no } AND = { # Pregnant non dwarf @@ -2150,7 +2097,7 @@ portrait_high_nobles_headgear_trigger = { limit = { culture = { has_clothing_gfx = japanese_clothing_gfx } } tgp_japanese_high_nobility_clothing_trigger = yes } - trigger_else = { highest_held_title_tier >= tier_duchy } + trigger_else = { highest_held_title_tier = tier_duchy } AND = { government_has_flag = government_is_republic primary_title.tier > tier_county @@ -2163,6 +2110,17 @@ portrait_high_nobles_headgear_trigger = { highest_held_title_tier >= tier_kingdom is_governor = yes } + AND = { # Uncoronated kings and emperors can use high nobility headgear + OR = { + portrait_royalty_trigger = { + CULTURE_INPUT = $CULTURE_INPUT$ + } + portrait_imperial_trigger = { + CULTURE_INPUT = $CULTURE_INPUT$ + } + } + portrait_wear_no_crown_trigger = yes + } } NOR = { # Blocked for mercenaries and adventurers government_has_flag = government_is_mercenary @@ -2291,6 +2249,11 @@ portrait_royalty_trigger = { OR = { is_ruler = no highest_held_title_tier = tier_barony + AND = { + is_landed = no + exists = primary_spouse + target_is_liege_or_above = primary_spouse + } } primary_spouse ?= { is_governor = no @@ -2342,6 +2305,13 @@ portrait_royalty_clothing_trigger = { portrait_wear_no_armor_trigger = yes } +portrait_royalty_headgear_trigger = { + portrait_royalty_trigger = { + CULTURE_INPUT = $CULTURE_INPUT$ + } + portrait_wear_no_crown_trigger = no +} + portrait_royalty_african_headgear_trigger = { trigger_if = { limit = { exists = this } @@ -2486,6 +2456,13 @@ portrait_imperial_clothing_trigger = { portrait_wear_no_armor_trigger = yes } +portrait_imperial_headgear_trigger = { + portrait_imperial_trigger = { + CULTURE_INPUT = $CULTURE_INPUT$ + } + portrait_wear_no_crown_trigger = no +} + portrait_imperial_nobles_headgear_trigger = { trigger_if = { limit = { exists = this } @@ -3168,9 +3145,11 @@ portrait_religious_african_trigger = { ### DDE HRE ### portrait_reichskrone_trigger = { + exists = this OR = { has_primary_title = title:e_european_union } + portrait_wear_no_crown_trigger = no } diff --git a/common/scripted_triggers/00_councillor_triggers.txt b/common/scripted_triggers/00_councillor_triggers.txt index f82e5245..ab66629f 100644 --- a/common/scripted_triggers/00_councillor_triggers.txt +++ b/common/scripted_triggers/00_councillor_triggers.txt @@ -21,6 +21,25 @@ can_be_councillor_basics_trigger = { limit = { has_variable = block_hire_councillor } NOT = { var:block_hire_councillor = liege } } + custom_tooltip = { + text = not_travel_option_character + NOT = { has_character_flag = travel_option_added_character } + } +} + +can_be_councillor_gender_trigger = { + OR = { + is_ruler = yes + has_variable = can_be_councillor_override + AND = { + is_female = yes + $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = male_dominated_council } } + } + AND = { + is_male = yes + $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = female_dominated_council } } + } + } } can_be_chancellor_trigger = { @@ -39,17 +58,7 @@ can_be_chancellor_trigger = { liege = { has_diarchy_active_parameter = diarchy_is_vizierate } } } - OR = { - is_ruler = yes - AND = { - is_female = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = male_dominated_council } } - } - AND = { - is_male = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = female_dominated_council } } - } - } + can_be_councillor_gender_trigger = { COURT_OWNER = $COURT_OWNER$ } } can_be_steward_trigger = { @@ -68,17 +77,7 @@ can_be_steward_trigger = { liege = { has_diarchy_active_parameter = diarchy_is_vizierate } } } - OR = { - is_ruler = yes - AND = { - is_female = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = male_dominated_council } } - } - AND = { - is_male = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = female_dominated_council } } - } - } + can_be_councillor_gender_trigger = { COURT_OWNER = $COURT_OWNER$ } } can_be_marshal_trigger = { @@ -99,15 +98,7 @@ can_be_marshal_trigger = { } } OR = { - is_ruler = yes - AND = { - is_female = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = male_dominated_council } } - } - AND = { - is_male = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = female_dominated_council } } - } + can_be_councillor_gender_trigger = { COURT_OWNER = $COURT_OWNER$ } AND = { has_trait = shieldmaiden $COURT_OWNER$.culture = { has_cultural_parameter = has_access_to_shieldmaidens } @@ -185,6 +176,20 @@ can_be_spouse_councillor_trigger = { } } +can_be_vizier_councillor_trigger = { + can_be_councillor_basics_trigger = yes + save_temporary_scope_as = confidant + + $COUNCIL_OWNER$ = { + OR = { + scope:confidant = diarch + any_consort = { + scope:confidant = this + } + } + } +} + can_be_kurultai_trigger = { can_be_councillor_basics_trigger = yes exists = $COURT_OWNER$ @@ -324,6 +329,31 @@ councillor_loyalty_trigger = { } } +councillor_spouse_can_fire = { always = no } +councillor_spouse_can_reassign = { always = no } +councillor_spouse_valid_position = { + AND = { + NOT = { + has_diarchy_type = vizierate + } + any_spouse = { + OR = { + court_owner = root + AND = { + is_ruler = yes + liege ?= root + } + } + } + } + NOT = { government_has_flag = government_is_landless_adventurer } + # Celestial hegemons have access to the ministry instead, so no spouse + tgp_has_access_to_ministry_trigger = no +} + +councillor_vizier_can_fire = { always = yes } +councillor_vizier_can_reassign = { always = yes } + ############################ #SPOUSE COUNCILLOR TRIGGERS# ############################ @@ -342,20 +372,13 @@ is_blocked_from_being_fired_from_council_trigger = { OR = { # Check in code if the court owner is prevented from firing the councilor # can_fire_position must take a council task as input, but checks the councilor behind the task. - AND = { - exists = this.council_task - this.council_task = { can_fire_position = no } - } + council_task ?= { can_fire_position = no } # Check for variable preventing the firing of a councilor set by script - AND = { - has_variable = block_fire_councillor - var:block_fire_councillor = $COURT_OWNER$ - } + var:block_fire_councillor ?= $COURT_OWNER$ } } } - can_be_fired_from_council_trigger = { NOT = { is_blocked_from_being_fired_from_council_trigger = { COURT_OWNER = $COURT_OWNER$ } @@ -363,6 +386,7 @@ can_be_fired_from_council_trigger = { trigger_if = { limit = { has_council_position = councillor_court_chaplain + liege = { tgp_has_access_to_ministry_trigger = no } } faith = { OR = { diff --git a/common/scripted_triggers/00_government_triggers.txt b/common/scripted_triggers/00_government_triggers.txt index d2f2d91f..c594438f 100644 --- a/common/scripted_triggers/00_government_triggers.txt +++ b/common/scripted_triggers/00_government_triggers.txt @@ -73,15 +73,9 @@ should_use_temple_character_background_trigger = { } has_mandala_culture_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_austronesian - has_cultural_pillar = heritage_tai - has_cultural_pillar = heritage_mon_khmer - has_cultural_pillar = heritage_viet - has_cultural_pillar = heritage_indo_aryan - has_cultural_pillar = heritage_burman - } + OR = { + culture_has_south_asian_heritage_pillar_trigger = yes + culture_has_southeast_asian_heritage_pillar_trigger = yes } } diff --git a/common/scripted_triggers/00_illustration_triggers.txt b/common/scripted_triggers/00_illustration_triggers.txt index d3c27c81..41adadf3 100644 --- a/common/scripted_triggers/00_illustration_triggers.txt +++ b/common/scripted_triggers/00_illustration_triggers.txt @@ -15,6 +15,7 @@ has_graphical_mena_culture_group_trigger = { has_graphical_india_culture_group_trigger = { OR = { has_building_gfx = indian_building_gfx + has_building_gfx = tibetan_building_gfx has_building_gfx = southeast_asian_building_gfx } } @@ -22,7 +23,7 @@ has_graphical_india_culture_group_trigger = { has_graphical_east_asia_culture_group_trigger = { OR = { has_building_gfx = chinese_building_gfx - has_building_gfx = japanese_building_gfx + has_building_gfx = japanese_building_gfx } } @@ -38,6 +39,7 @@ has_graphical_mediterranean_culture_group_trigger = { OR = { has_building_gfx = mediterranean_building_gfx has_building_gfx = byzantine_building_gfx + has_building_gfx = caucasian_building_gfx } } @@ -716,9 +718,10 @@ steppe_building_gfx_use_southeast_asian_trigger = { } high_tier_throne_room_trigger = { + tgp_is_ceremonial_regent_trigger = no # Not 'actual' ruler OR = { AND = { - tgp_is_ceremonial_regent_trigger = no # Not 'actual' ruler + is_governor = no primary_title ?= { tier >= tier_kingdom } } tgp_is_ceremonial_liege_trigger = yes diff --git a/common/scripted_triggers/00_laamp_triggers.txt b/common/scripted_triggers/00_laamp_triggers.txt index 354a3e0a..11aec229 100644 --- a/common/scripted_triggers/00_laamp_triggers.txt +++ b/common/scripted_triggers/00_laamp_triggers.txt @@ -173,6 +173,20 @@ is_valid_for_laampdom = { } is_landless_ruler = no # Admin gov vassals should not become laamps } + trigger_if = { + limit = { tgp_realm_has_ceremonial_liege_trigger = yes } + custom_tooltip = { + text = tgp_japan_imperial_branch_decision_imperial_heir_trigger + NOT = { + top_liege.primary_title.var:administrative_ui_special_title = { + place_in_line_of_succession = { + target = scope:potential_laamp_temp + value <= 4 + } + } + } + } + } trigger_if = { limit = { is_ai = yes } trigger_if = { @@ -193,6 +207,11 @@ is_valid_for_laampdom = { ai_boldness >= low_negative_ai_value ai_energy >= low_negative_ai_value } + NOR = { + has_trait = content # Too chill to adventure + has_trait = craven # Too scared to adventure + has_trait = lazy # Too lazy to adventure + } # Block admin members of noble families NOT = { house ?= { @@ -461,7 +480,16 @@ valid_laamp_basic_accept_only_trigger = { employer_has_treasury_to_offer_job_trigger = { trigger_if = { limit = { is_ai = no } - scope:employer.treasury_or_gold >= 50 + scope:employer = { + OR = { + treasury_or_gold >= 50 + trigger_if = { + limit = { government_allows = barter } + # no define:NBarter|BARTER_GOODS_TO_LOOT_MULT here. wanua rulers start as lower than 100 barter goods + barter_goods >= 50 + } + } + } } } diff --git a/common/scripted_triggers/00_marriage_triggers.txt b/common/scripted_triggers/00_marriage_triggers.txt index 16451d34..bbb4f6e9 100644 --- a/common/scripted_triggers/00_marriage_triggers.txt +++ b/common/scripted_triggers/00_marriage_triggers.txt @@ -18,6 +18,7 @@ can_marry_common_trigger = { is_alive = yes NOT = { has_trait_with_flag = can_not_marry } + NOT = { has_variable = can_not_marry } trigger_if = { limit = { @@ -61,16 +62,16 @@ can_marry_trigger = { allowed_to_marry_same_sex_trigger = { has_game_rule = accepted_same_sex_marriage - faith = { + faith = { NOR = { - has_doctrine_parameter = homosexuality_shunned + has_doctrine_parameter = homosexuality_shunned has_doctrine_parameter = homosexuality_illegal } } } can_have_children_with = { - sex_opposite_of = $CHARACTER$ # Only opposite sex since for now + sex_opposite_of = $CHARACTER$ # Only opposite sex since for now } allowed_to_marry_character_gender_trigger = { @@ -129,25 +130,6 @@ could_marry_character_trigger = { #} } } - trigger_if = { - limit = { - any_close_or_extended_family_member = { - any_spouse = { this = $CHARACTER$ } - } - } - faith = { has_doctrine = doctrine_consanguinity_unrestricted } - $CHARACTER$ = { - faith = { has_doctrine = doctrine_consanguinity_unrestricted } - NOT = { - any_spouse = { - is_close_or_extended_family_of = scope:can_marry_check - NOT = { - faith = { has_doctrine = doctrine_consanguinity_unrestricted } - } - } - } - } - } # Cannot marry self NOT = { scope:can_marry_check = { is_spouse_of = $CHARACTER$ } @@ -282,7 +264,7 @@ can_become_concubine_of_character_trigger = { could_marry_character_trigger = { CHARACTER = $CHARACTER$ } #Gender, recent divorce, allowed to marry, no illegal incest etc. } -# Same as above, switching out could_marry_character_trigger for can_take_as_concubine_character_trigger, in order to better inform the player that they cannot take their ex-spouse as a concubine +# Same as above, switching out could_marry_character_trigger for can_take_as_concubine_character_trigger, in order to better inform the player that they cannot take their ex-spouse as a concubine can_become_concubine_of_character_valid_trigger = { is_available_quick = { adult = yes @@ -596,7 +578,7 @@ wants_young_wife = { count >= 2 is_alive = yes NOT = { has_trait = bastard } - } + } } } @@ -612,7 +594,7 @@ will_not_be_young_wife = { will_not_be_fertile_wife = { is_female = yes - is_aging_character = yes + is_aging_character = yes } is_ruler_or_close_family = { @@ -620,8 +602,8 @@ is_ruler_or_close_family = { is_ruler = yes any_close_family_member = { even_if_dead = yes - is_ruler = yes - } + is_ruler = yes + } } } @@ -633,3 +615,88 @@ can_have_concubines_trigger = { } } } + +# if $CHARACTER$ has the right to break betrothal or receive interaction for breaking betrothal? +break_betrothal_valid_target_trigger = { + is_betrothed = yes + # yourself, your courtier, or your child vassal and you were the matchmaker + trigger_if = { + limit = { + this != $CHARACTER$ + } + is_ai = yes + OR = { + AND = { + is_child_of = $CHARACTER$ + target_is_liege_or_above = $CHARACTER$ + NOT = { + matchmaker = { + is_parent_of = prev + this != $CHARACTER$ + } + } + } + AND = { + is_playable_character = no + liege = $CHARACTER$ + } + } + } +} + +cost_prestige_for_break_betrothal_trigger = { + OR = { + scope:rejected_betrothed = { + OR = { + is_close_family_of = scope:actor + AND = { + exists = dynasty + exists = scope:actor.dynasty + dynasty = scope:actor.dynasty + } + } + } + scope:rejecting_betrothed = { + OR = { + is_close_family_of = scope:actor + AND = { + exists = dynasty + exists = scope:actor.dynasty + dynasty = scope:actor.dynasty + } + } + } + scope:actor = { + yields_alliance = { + candidate = scope:rejecting_betrothed + target = scope:rejected_betrothal_owner + target_candidate = scope:rejected_betrothed + } + } + } +} + +has_proper_reason_to_break_betrothal_trigger = { + OR = { + scope:rejecting_betrothed = { + OR = { + is_eunuch_trigger = yes + has_trait_with_flag = can_not_marry + AND = { + allowed_to_marry_same_sex_trigger = no + sex_same_as = scope:rejected_betrothed + } + } + } + scope:rejected_betrothed = { + OR = { + is_eunuch_trigger = yes + has_trait_with_flag = can_not_marry + AND = { + allowed_to_marry_same_sex_trigger = no + sex_same_as = scope:rejecting_betrothed + } + } + } + } +} diff --git a/common/scripted_triggers/00_relation_triggers.txt b/common/scripted_triggers/00_relation_triggers.txt index 0254714c..2844f211 100644 --- a/common/scripted_triggers/00_relation_triggers.txt +++ b/common/scripted_triggers/00_relation_triggers.txt @@ -345,7 +345,7 @@ has_important_relationship_with_character_trigger = { } } -has_friendly_relationship_with_character_trigger = { +has_any_moderate_good_relationship_with_character_trigger = { OR = { has_relation_lover = $CHARACTER$ has_relation_friend = $CHARACTER$ @@ -364,13 +364,6 @@ has_any_mild_good_relationship_with_character_trigger = { } } -has_any_moderate_good_relationship_with_character_trigger = { - OR = { - has_relation_lover = $CHARACTER$ - has_relation_friend = $CHARACTER$ - } -} - has_any_only_moderate_good_relationship_with_character_trigger = { has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = $CHARACTER$ } # Exclude the max-tier positive relationships if we're being this specific. @@ -505,7 +498,7 @@ has_important_relationship_with_root_trigger = { } has_friendly_relationship_with_root_trigger = { - has_friendly_relationship_with_character_trigger = { CHARACTER = root } + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root } } has_any_good_relationship_with_root_trigger = { @@ -577,12 +570,19 @@ is_of_major_interest_trigger = { OR = { is_heir_of = $CHARACTER$ is_diarch_of_target = $CHARACTER$ + liege ?= $CHARACTER$ + betrothed ?= $CHARACTER$ + is_spouse_of = $CHARACTER$ + has_relation_soulmate = $CHARACTER$ + has_relation_nemesis = $CHARACTER$ + has_relation_best_friend = $CHARACTER$ + has_relation_blood_brother = $CHARACTER$ + is_child_of = $CHARACTER$ + AND = { - exists = $CHARACTER$.liege - this = $CHARACTER$.liege + is_theocratic_lessee = yes + is_councillor_of = $CHARACTER$ } - is_consort_of = $CHARACTER$ - is_councillor_of = $CHARACTER$ #They are the head of our faith AND = { @@ -590,14 +590,6 @@ is_of_major_interest_trigger = { this = $CHARACTER$.faith.religious_head } - trigger_if = { - limit = { - exists = liege - exists = $CHARACTER$.liege - } - is_powerful_vassal = yes - liege = $CHARACTER$.liege - } trigger_if = { limit = { top_liege = this @@ -613,7 +605,6 @@ is_of_major_interest_trigger = { } this = $CHARACTER$.house.house_head } - is_child_of = $CHARACTER$ # Activity Intents trigger_if = { limit = { @@ -628,7 +619,8 @@ is_of_major_interest_trigger = { is_of_minor_interest_trigger = { NOT = { this = $CHARACTER$ } OR = { - betrothed ?= $CHARACTER$ + is_consort_of = $CHARACTER$ + is_councillor_of = $CHARACTER$ has_relation_lover = $CHARACTER$ has_relation_rival = $CHARACTER$ has_relation_friend = $CHARACTER$ @@ -641,6 +633,14 @@ is_of_minor_interest_trigger = { NOT = { this = $CHARACTER$.liege } } is_close_or_extended_family_of = $CHARACTER$ + trigger_if = { + limit = { + exists = liege + exists = $CHARACTER$.liege + } + is_powerful_vassal = yes + liege = $CHARACTER$.liege + } } } diff --git a/common/scripted_triggers/00_religious_triggers.txt b/common/scripted_triggers/00_religious_triggers.txt index 3ae5377e..3f0d89f7 100644 --- a/common/scripted_triggers/00_religious_triggers.txt +++ b/common/scripted_triggers/00_religious_triggers.txt @@ -1874,7 +1874,7 @@ christianity_or_syncretic_with_christianity_trigger = { faith = { OR = { religion = religion:catholic_religion - religion = religion:orthodox_religion + religion = religion:eastern_orthodox_religion religion = religion:protestant_religion has_doctrine = tenet_christian_syncretism } diff --git a/common/scripted_triggers/00_scripted_rule_triggers.txt b/common/scripted_triggers/00_scripted_rule_triggers.txt index edc34f1d..517b1026 100644 --- a/common/scripted_triggers/00_scripted_rule_triggers.txt +++ b/common/scripted_triggers/00_scripted_rule_triggers.txt @@ -49,6 +49,7 @@ can_raid_trigger = { } ## Without restrictions. has_trait_with_flag = trait_enable_raiding_without_restrictions + has_variable = enable_raiding_without_restrictions } # Some faiths prohibit this. OR = { @@ -68,8 +69,7 @@ can_raid_trigger = { # Here so that you can plug in whatever dynasty modifiers you want without overwriting the whole scripted rule trigger. can_raid_dynasty_modifiers_that_enable_raiding_overseas_list_trigger = { # Yes, I realise the OR is redundant till someone else puts something in here. Shoosh. - has_dynasty_modifier = fp1_legacy_of_piracy_modifier - + has_dynasty_modifier = fp1_legacy_of_piracy_modifier } can_raid_dynasty_modifiers_that_enable_raiding_overland_list_trigger = { OR = { diff --git a/common/scripted_triggers/00_war_and_peace_triggers.txt b/common/scripted_triggers/00_war_and_peace_triggers.txt index 68c13223..869bebb2 100644 --- a/common/scripted_triggers/00_war_and_peace_triggers.txt +++ b/common/scripted_triggers/00_war_and_peace_triggers.txt @@ -309,6 +309,7 @@ can_be_warrior_trigger = { } } +# referenced in KNIGHT_RESTRICTIONS_TT, update when changing this trigger can_be_knight_trigger = { is_available_quick = { ai = yes @@ -317,10 +318,10 @@ can_be_knight_trigger = { can_be_warrior_trigger = { ARMY_OWNER = $ARMY_OWNER$ } trigger_if = { # Admin governors cannot be knights limit = { - $ARMY_OWNER$ = { government_allows = administrative } - is_courtier = no + government_allows = administrative + exists = primary_title } - primary_title ?= { + primary_title = { tier < tier_duchy trigger_if = { limit = { is_noble_family_title = yes } @@ -370,6 +371,15 @@ can_be_knight_trigger = { } this != liege.diarch } + # knight permissions for players + trigger_if = { + limit = { + $ARMY_OWNER$ = { + is_ai = no + } + } + is_knight_permitted = $ARMY_OWNER$ + } } # If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. @@ -577,7 +587,7 @@ special_invasion_cb_seize_land_in_region_trigger = { } } trigger_if = { - # If our de jure liege is an existing duchy that would have been siezed in the duchy step, do not transfer the county (it has already been transferred). + # If our de jure liege is an existing duchy that would have been seized in the duchy step, do not transfer the county (it has already been transferred). limit = { de_jure_liege ?= { exists = holder @@ -903,6 +913,7 @@ herders_and_tributary_constraints = { # You cannot attack your Confederation buddies tributaries trigger_if = { limit = { + exists = suzerain suzerain != this scope:attacker = { is_confederation_member = yes } suzerain = { is_confederation_member = yes } @@ -915,6 +926,7 @@ herders_and_tributary_constraints = { is_tributary_of_suzerain_or_above = scope:defender # can't attack your own suzerain trigger_if = { limit = { + exists = suzerain suzerain != this scope:defender = { is_confederation_member = yes } suzerain = { is_confederation_member = yes } diff --git a/common/scripted_triggers/02_ep1_scripted_triggers.txt b/common/scripted_triggers/02_ep1_scripted_triggers.txt index 71d71a9d..2f232b68 100644 --- a/common/scripted_triggers/02_ep1_scripted_triggers.txt +++ b/common/scripted_triggers/02_ep1_scripted_triggers.txt @@ -307,15 +307,7 @@ target_of_powerful_faction_trigger = { province_has_no_holding_trigger = { # province has no holding has_ongoing_construction = no - NOR = { - has_holding_type = castle_holding - has_holding_type = tribal_holding - has_holding_type = city_holding - has_holding_type = church_holding - has_holding_type = herder_holding - has_holding_type = nomad_holding - has_holding_type = temple_citadel_holding - } + has_holding = no } county_has_all_holding_types = { # county has all three holding types diff --git a/common/scripted_triggers/03_fp2_scripted_triggers.txt b/common/scripted_triggers/03_fp2_scripted_triggers.txt index 246be199..516d9af8 100644 --- a/common/scripted_triggers/03_fp2_scripted_triggers.txt +++ b/common/scripted_triggers/03_fp2_scripted_triggers.txt @@ -39,21 +39,18 @@ fp2_character_uninvolved_in_struggle_trigger = { eligible_for_fp2_dynasty_legacies_trigger = { has_fp2_dlc_trigger = yes - dynasty = { + dynasty.dynast = { OR = { - dynast = { - OR = { - any_character_struggle = { - involvement = involved - is_struggle_type = iberian_struggle - } - culture = { - has_cultural_pillar = heritage_iberian - } - capital_province ?= { - geographical_region = world_europe_west_iberia - } - } + game_rule_unrestricted_dynasty_legacies_trigger = yes + any_character_struggle = { + involvement = involved + is_struggle_type = iberian_struggle + } + culture = { + has_cultural_pillar = heritage_iberian + } + capital_province ?= { + geographical_region = world_europe_west_iberia } } } diff --git a/common/scripted_triggers/07_ep3_triggers.txt b/common/scripted_triggers/07_ep3_triggers.txt index 78ce882f..9d928602 100644 --- a/common/scripted_triggers/07_ep3_triggers.txt +++ b/common/scripted_triggers/07_ep3_triggers.txt @@ -1,4 +1,19 @@ -ep3_should_use_byzantine_graphics_trigger = { +eligible_for_ep3_administrative_legacy_trigger = { + has_ep3_dlc_trigger = yes + OR = { + game_rule_unrestricted_dynasty_legacies_trigger = yes + dynasty = { + OR = { + dynast = { + government_allows = administrative + } + has_dynasty_perk = ep3_administrative_legacy_1 + } + } + } +} + +ep3_should_use_byzantine_graphics_trigger = { OR = { culture = { has_building_gfx = byzantine_building_gfx } culture = { has_building_gfx = caucasian_building_gfx } @@ -1027,19 +1042,23 @@ can_recruit_archer_cavalry_trigger = { custom_tooltip = { text = can_recruit_archer_cavalry_trigger_desc OR = { - can_create_maa = horse_archers - can_create_maa = mangudai - can_create_maa = asawira - can_create_maa = accolade_maa_horse_archers - can_create_maa = emishi_horse_archers - can_create_maa = japanese_horse_archers - can_create_maa = kheshig - can_create_maa = heavy_horse_archers - can_create_maa = heavy_horse_archers + has_access_to_maa = horse_archers + has_access_to_maa = mangudai + has_access_to_maa = asawira + has_access_to_maa = accolade_maa_horse_archers + has_access_to_maa = emishi_horse_archers + has_access_to_maa = japanese_horse_archers + has_access_to_maa = kheshig + has_access_to_maa = heavy_horse_archers } } } + +## Is this contract a transport contract? +# +# root (task contract) – The contract to be checked. +# ep3_transport_contract_trigger = { OR = { has_task_contract_type = laamp_transport_vip @@ -1785,3 +1804,53 @@ influence_candidacy_valid_succession_law_trigger = { has_$TYPE$_law = japanese_regency_succession_law } } + +laamp_as_mercenary_payout_trigger = { + save_temporary_scope_as = merc_temp + $WAR$ = { save_temporary_scope_as = war_temp } + scope:merc_temp ?= { + var:joined_as_mercenary ?= { + is_leader_in_war = scope:war_temp + trigger_if = { + limit = { is_attacker_in_war = scope:war_temp } + scope:merc_temp = { is_attacker_in_war = scope:war_temp } + } + trigger_else = { + scope:merc_temp = { is_attacker_in_war = scope:war_temp } + } + } + NOT = { is_leader_in_war = scope:war_temp } + OR = { + has_raised_armies = yes + scope:war_temp = { + war_contribution = { + target = scope:merc_temp + value > 0 + } + } + } + } +} + +laamp_as_mercenary_payout_last_war_trigger = { + save_temporary_scope_as = merc_temp + $WAR$ = { save_temporary_scope_as = war_temp } + scope:merc_temp ?= { + # ENSURE THIS IS THE LAST WAR YOU ARE FIGHTING IN WITH THE EMPLOYER + NOT = { + any_character_war = { + NOT = { this = scope:war_temp } + is_war_leader = scope:merc_temp.var:joined_as_mercenary + trigger_if = { + limit = { is_attacker = scope:merc_temp.var:joined_as_mercenary } + is_attacker = scope:merc_temp + } + trigger_else = { + is_defender = scope:merc_temp + } + } + } + } +} + + diff --git a/common/scripted_triggers/09_mpo_greatest_of_khans_triggers.txt b/common/scripted_triggers/09_mpo_greatest_of_khans_triggers.txt index 37ad4d01..8b27fb31 100644 --- a/common/scripted_triggers/09_mpo_greatest_of_khans_triggers.txt +++ b/common/scripted_triggers/09_mpo_greatest_of_khans_triggers.txt @@ -20,6 +20,7 @@ mpo_has_gok_mongol_empire_trigger = { text = gok_title_trigger exists = global_var:greatest_of_khans_title any_held_title = { + title_tier = empire this = global_var:greatest_of_khans_title } } diff --git a/common/scripted_triggers/10_ach_scripted_triggers.txt b/common/scripted_triggers/10_ach_scripted_triggers.txt index 2e197fb6..fb7b48f5 100644 --- a/common/scripted_triggers/10_ach_scripted_triggers.txt +++ b/common/scripted_triggers/10_ach_scripted_triggers.txt @@ -2,33 +2,25 @@ has_ach_dlc_trigger = yes is_landed = yes highest_held_title_tier >= tier_kingdom - OR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_tribal - AND = { - government_has_flag = government_is_special_administrative - is_independent_ruler = yes - } - government_has_flag = government_is_nomadic - government_has_flag = government_is_clan - AND = { - government_has_flag = government_is_meritocratic - is_independent_ruler = yes - } - AND = { - government_has_flag = government_is_celestial - is_independent_ruler = yes - } - AND = { - government_has_flag = government_is_steppe_admin - is_independent_ruler = yes - } - AND = { - government_is_japanese_trigger = yes - has_title = title:e_japan + # Governments where independent king+ rulers can hold Coronations + trigger_if = { + limit = { tgp_realm_has_ceremonial_liege_trigger = yes } + custom_tooltip = { + text = tgp_ceremonial_liege_coronation_trigger tgp_has_ceremonial_liege_title_trigger = yes } - government_has_flag = government_is_mandala + } + trigger_if = { + limit = { government_allows = administrative } + is_independent_ruler = yes + } + trigger_else = { + NOR = { + government_has_flag = government_is_theocracy + government_has_flag = government_is_republic + government_has_flag = government_is_mercenary + government_has_flag = government_is_holy_order + } } } @@ -88,8 +80,10 @@ is_important_hof_trigger = { coronation_has_proper_artifact_trigger = { trigger_if = { limit = { - coronation_proper_artifact_crown_trigger = yes - coronation_proper_artifact_regalia_trigger = no + faith = { + coronation_proper_artifact_crown_trigger = yes + coronation_proper_artifact_regalia_trigger = no + } } any_character_artifact = { artifact_slot_type = helmet @@ -97,8 +91,10 @@ coronation_has_proper_artifact_trigger = { } trigger_else_if = { limit = { - coronation_proper_artifact_regalia_trigger = yes - coronation_proper_artifact_crown_trigger = no + faith = { + coronation_proper_artifact_regalia_trigger = yes + coronation_proper_artifact_crown_trigger = no + } } any_character_artifact = { artifact_slot_type = regalia @@ -115,7 +111,7 @@ coronation_has_proper_artifact_trigger = { } coronation_proper_artifact_crown_trigger = { - faith.religion = { + religion = { OR = { this = religion:baltic_religion this = religion:bon_religion @@ -136,7 +132,7 @@ coronation_proper_artifact_crown_trigger = { } coronation_proper_artifact_regalia_trigger = { - faith.religion = { + religion = { OR = { this = religion:buddhism_religion this = religion:finno_ugric_religion diff --git a/common/scripted_triggers/10_tgp_triggers.txt b/common/scripted_triggers/10_tgp_triggers.txt index 3ab948a7..9a386e68 100644 --- a/common/scripted_triggers/10_tgp_triggers.txt +++ b/common/scripted_triggers/10_tgp_triggers.txt @@ -1,4 +1,49 @@ - +eligible_for_tgp_china_legacy_trigger = { + has_tgp_dlc_trigger = yes + OR = { + game_rule_unrestricted_dynasty_legacies_trigger = yes + dynasty = { + OR = { + dynast = { + government_has_flag = government_has_merit + } + has_dynasty_perk = tgp_chinese_legacy_1 + } + } + } +} +eligible_for_tgp_japan_legacy_trigger = { + has_tgp_dlc_trigger = yes + OR = { + game_rule_unrestricted_dynasty_legacies_trigger = yes + dynasty = { + OR = { + dynast = { + government_is_japanese_trigger = yes + } + has_dynasty_perk = tgp_japan_legacy_1 + } + } + } +} +eligible_for_tgp_sea_legacy_trigger = { + has_tgp_dlc_trigger = yes + OR = { + game_rule_unrestricted_dynasty_legacies_trigger = yes + dynasty = { + OR = { + dynast = { + OR = { + government_has_flag = government_is_mandala + government_has_flag = government_is_wanua + } + } + has_dynasty_perk = tgp_sea_legacy_1 + } + } + } +} + tgp_distant_realm_marriage_trigger = { $RECIPIENT_SPOUSE$ = { culture = { has_cultural_parameter = reduced_marriage_acceptance_distant_realms } @@ -67,6 +112,10 @@ tgp_has_access_to_ministry_trigger = { tgp_is_any_minister = { liege ?= { tgp_has_access_to_ministry_trigger = yes } + tgp_has_minister_title = yes +} + +tgp_has_minister_title = { OR = { has_title = title:e_minister_chancellor has_title = title:e_minister_censor @@ -80,6 +129,46 @@ tgp_is_any_minister = { } } +tgp_has_civilian_minister_title = { + OR = { + has_title = title:e_minister_chancellor + has_title = title:e_minister_censor + has_title = title:e_minister_of_personnel + has_title = title:e_minister_of_revenue + has_title = title:e_minister_of_rites + has_title = title:e_minister_of_war + has_title = title:e_minister_of_justice + has_title = title:e_minister_of_works + } +} + +tgp_is_civilian_minister_title = { + OR = { + this = title:e_minister_chancellor + this = title:e_minister_censor + this = title:e_minister_of_personnel + this = title:e_minister_of_revenue + this = title:e_minister_of_rites + this = title:e_minister_of_war + this = title:e_minister_of_justice + this = title:e_minister_of_works + } +} + +tgp_is_minister_title = { + OR = { + this = title:e_minister_chancellor + this = title:e_minister_censor + this = title:e_minister_grand_marshal + this = title:e_minister_of_personnel + this = title:e_minister_of_revenue + this = title:e_minister_of_rites + this = title:e_minister_of_war + this = title:e_minister_of_justice + this = title:e_minister_of_works + } +} + tgp_can_be_a_minister_trigger = { can_be_councillor_basics_trigger = yes # Has to be celestial or a non-ruler @@ -89,6 +178,7 @@ tgp_can_be_a_minister_trigger = { } # Gender is based on laws of the liege OR = { + has_variable = can_be_councillor_override AND = { is_female = yes $COURT_OWNER$ = { @@ -127,21 +217,6 @@ tgp_can_be_a_minister_trigger = { tgp_can_be_grand_marshal_trigger = { can_be_councillor_basics_trigger = yes - $COURT_OWNER$ ?= { - NOT = { government_has_flag = government_is_nomadic } - } - NAND = { - has_council_position = councillor_court_chaplain - faith = { has_doctrine_parameter = clerical_appointment_fixed } - } - NOR = { - has_council_position = councillor_spouse - AND = { - this = liege.diarch - liege = { has_diarchy_active_parameter = diarchy_is_vizierate } - } - has_trait = devoted - } # Has to be celestial or a non-ruler OR = { is_ruler = no @@ -152,6 +227,9 @@ tgp_can_be_grand_marshal_trigger = { } tgp_is_above_retirement_age_trigger = { + $REALM_OWNER$.top_liege = { + has_realm_law_flag = celestial_retirement_law + } trigger_if = { limit = { $REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_4 } @@ -203,7 +281,7 @@ tgp_is_above_retirement_age_trigger = { } custom_tooltip = { text = tgp_is_above_retirement_age_5 - always = no + always = yes } } trigger_else = { @@ -313,8 +391,8 @@ tgp_realm_has_ceremonial_liege_trigger = { tgp_is_ceremonial_liege_trigger = { custom_tooltip = { text = tgp_is_ceremonial_liege_tt + this != top_liege tgp_has_ceremonial_liege_title_trigger = yes - is_independent_ruler = no } } @@ -326,21 +404,39 @@ tgp_portrait_liege_or_ceremonial_liege_emperor_trigger = { primary_title.holder.top_liege.highest_held_title_tier >= tier_empire } # Standard Liege - trigger_else = { - scope:highest_held_title_tier >= tier_empire - is_independent_ruler = yes + trigger_else = { + trigger_if = { + limit = { + is_alive = yes + } + highest_held_title_tier >= tier_empire + is_independent_ruler = yes + } + trigger_else = { + scope:highest_held_title_tier >= tier_empire + } } } tgp_portrait_liege_or_ceremonial_liege_king_trigger = { - # Ceremonial Liege + # Ceremonial Liege trigger_if = { limit = { tgp_realm_has_ceremonial_liege_trigger = yes } tgp_has_ceremonial_liege_title_trigger = yes primary_title.holder.top_liege.highest_held_title_tier = tier_kingdom } # Standard Liege - trigger_else = { highest_held_title_tier = tier_kingdom } + trigger_else = { + trigger_if = { + limit = { + is_alive = yes + } + highest_held_title_tier = tier_kingdom + } + trigger_else = { + scope:highest_held_title_tier = tier_kingdom + } + } } # Check if a character has a ceremonial liege title (but not if they are actually a ceremonial liege) @@ -377,8 +473,7 @@ tgp_ceremonial_liege_scope_trigger = { tgp_is_in_ceremonial_house_trigger = { custom_tooltip = { text = tgp_is_in_ceremonial_house_tt - exists = house - top_liege.primary_title.var:administrative_ui_special_title.holder.house ?= house + house.house_head.top_liege.primary_title.var:administrative_ui_special_title.holder.house ?= house } } @@ -433,15 +528,15 @@ tgp_should_become_meritocratic_trigger = { } tgp_can_become_japan_administrative_trigger = { - top_liege = { - OR = { - government_is_japanese_trigger = yes - has_character_flag = tgp_japan_restore_japanese_government_flag - culture = culture:japanese - culture = { - any_parent_culture_or_above = { this = culture:japanese } + OR = { + top_liege = { + OR = { + government_is_japanese_trigger = yes + has_character_flag = tgp_japan_restore_japanese_government_flag } } + government_is_japanese_trigger = yes + has_character_flag = tgp_japan_restore_japanese_government_flag } } @@ -450,9 +545,8 @@ tgp_can_become_celestial_trigger = { OR = { has_government = celestial_government has_title = title:h_china - culture = culture:han culture = { - any_parent_culture_or_above = { this = culture:han } + culture_is_or_has_ancestor_trigger = { CULTURE = culture:han } } } } @@ -527,7 +621,7 @@ tgp_japanese_high_nobility_clothing_family_trigger = { is_lowborn = no OR = { highest_held_title_tier >= tier_county - court_owner = { highest_held_title_tier >= tier_county } + court_owner ?= { highest_held_title_tier >= tier_county } } } } @@ -856,45 +950,94 @@ take_vows_available_trigger = { } } -tgp_capital_not_in_chinese_naming_region = { - capital_county.title_province ?= { - NOR = { - geographical_region = tgp_ba_region - geographical_region = tgp_cai_region - geographical_region = tgp_cao_region - geographical_region = tgp_chen_region - geographical_region = tgp_chu_region - geographical_region = tgp_dai_region - geographical_region = tgp_dian_region - geographical_region = tgp_gan_region - geographical_region = tgp_gui_region - geographical_region = tgp_han_region - geographical_region = tgp_huai_region - geographical_region = tgp_jin_region - geographical_region = tgp_jing_region - geographical_region = tgp_lai_region - geographical_region = tgp_liang_region - geographical_region = tgp_lu_region - geographical_region = tgp_min_region - geographical_region = tgp_qi_region - geographical_region = tgp_qian_region - geographical_region = tgp_shu_region - geographical_region = tgp_song_region - geographical_region = tgp_sui_region - geographical_region = tgp_tang_region - geographical_region = tgp_wei_region - geographical_region = tgp_wu_region - geographical_region = tgp_xia_region - geographical_region = tgp_xiang_region - geographical_region = tgp_xing_region - geographical_region = tgp_xu_region - geographical_region = tgp_yang_region - geographical_region = tgp_yin_region - geographical_region = tgp_yong_region - geographical_region = tgp_yue_region - geographical_region = tgp_zhao_region - geographical_region = tgp_zheng_region - geographical_region = tgp_zhou_region +tgp_use_chinese_naming_trigger = { + government_has_flag = government_is_celestial +} + +tgp_is_in_chinese_naming_region = { + OR = { + # whole startup h_china + geographical_region = world_asia_china + # outside h_china + geographical_region = tgp_bao_region + geographical_region = tgp_kang_region + geographical_region = tgp_liao_region + geographical_region = tgp_yuan_ferghana_region + # partly outside + geographical_region = tgp_liang_west_region + geographical_region = tgp_cheng_region + } +} + +tgp_has_cultural_naming_in_chinese = { + OR = { + has_cultural_pillar = heritage_viet + has_cultural_pillar = heritage_japonic + has_cultural_pillar = heritage_tibetan + has_cultural_pillar = heritage_buyeo + has_cultural_pillar = heritage_korean + has_name_list = name_list_jurchen + has_cultural_pillar = heritage_mongolic + culture_is_or_has_ancestor_trigger = { CULTURE = culture:bouxcuengh } + culture_is_or_has_ancestor_trigger = { CULTURE = culture:bai } + culture_is_or_has_ancestor_trigger = { CULTURE = culture:yi } + culture_is_or_has_ancestor_trigger = { CULTURE = culture:tai } + culture_is_or_has_ancestor_trigger = { CULTURE = culture:yughur } + culture_is_or_has_ancestor_trigger = { CULTURE = culture:uyghur } + has_cultural_pillar = heritage_hmongic + culture_is_or_has_ancestor_trigger = { CULTURE = culture:cham } + has_cultural_pillar = heritage_byzantine + culture_is_or_has_ancestor_trigger = { CULTURE = culture:roman } + culture_is_or_has_ancestor_trigger = { CULTURE = culture:avar } + } +} + +tgp_has_unique_chinese_naming = { + OR = { + capital_county.title_province ?= { tgp_is_in_chinese_naming_region = yes } + scope:title.capital_county.title_province ?= { tgp_is_in_chinese_naming_region = yes } + culture = { tgp_has_cultural_naming_in_chinese = no } + } +} + +tgp_chinese_naming_tier_trigger = { + save_temporary_scope_as = ruler_temp + OR = { + capital_county.title_province ?= { + trigger_if = { + limit = { + geographical_region = tgp_county_chinese_naming_region + } + scope:ruler_temp.highest_held_title_tier >= tier_county + } + trigger_else_if = { + limit = { + geographical_region = tgp_duchy_chinese_naming_region + } + scope:ruler_temp.highest_held_title_tier >= tier_duchy + } + trigger_else = { + scope:ruler_temp.highest_held_title_tier >= tier_kingdom + } + } + scope:title ?= { + capital_county.title_province ?= { + trigger_if = { + limit = { + geographical_region = tgp_county_chinese_naming_region + } + scope:ruler_temp.highest_held_title_tier >= tier_county + } + trigger_else_if = { + limit = { + geographical_region = tgp_duchy_chinese_naming_region + } + scope:ruler_temp.highest_held_title_tier >= tier_duchy + } + trigger_else = { + scope:ruler_temp.highest_held_title_tier >= tier_kingdom + } + } } } } @@ -918,8 +1061,8 @@ farm_estates_3_4_trigger = { } AND = { building_paddy_fields_requirement_terrain = yes - scope:holder.culture = { - has_innovation = innovation_champa_rice + scope:holder.culture = { + has_innovation = innovation_champa_rice has_innovation = innovation_manorialism } building_requirement_castle_city_church = { LEVEL = 02 } diff --git a/common/scripted_triggers/mpo_scripted_triggers.txt b/common/scripted_triggers/mpo_scripted_triggers.txt index ec851386..117f8c9b 100644 --- a/common/scripted_triggers/mpo_scripted_triggers.txt +++ b/common/scripted_triggers/mpo_scripted_triggers.txt @@ -2,6 +2,21 @@ # TRIGGER LIST # ################################################# +eligible_for_mpo_nomad_legacy_trigger = { + has_mpo_dlc_trigger = yes + OR = { + game_rule_unrestricted_dynasty_legacies_trigger = yes + dynasty = { + OR = { + dynast = { + government_has_flag = government_is_nomadic + } + has_dynasty_perk = mpo_nomad_legacy_1 + } + } + } +} + valid_confederation_member_trigger = { is_playable_character = yes is_tributary = no @@ -43,7 +58,7 @@ valid_confederation_member_trigger = { is_confederation_member = no } -confedration_foe_sub_trigger = { +confederation_foe_sub_trigger = { NOT = { is_allied_to = $CHARACTER$ } OR = { has_trait = conqueror @@ -88,27 +103,27 @@ confederation_foe_trigger = { kingdom = { any_de_jure_county = { holder.top_liege = { - confedration_foe_sub_trigger = { CHARACTER = $CHARACTER$ } + confederation_foe_sub_trigger = { CHARACTER = $CHARACTER$ } } } } } #Threat borders you or your tributaries any_land_neighboring_realm_with_tributaries_owner = { - confedration_foe_sub_trigger = { CHARACTER = $CHARACTER$ } + confederation_foe_sub_trigger = { CHARACTER = $CHARACTER$ } } #You border threat's direct tributaries any_land_neighboring_realm_with_tributaries_owner = { exists = suzerain suzerain = { - confedration_foe_sub_trigger = { CHARACTER = $CHARACTER$ } + confederation_foe_sub_trigger = { CHARACTER = $CHARACTER$ } } } #You border threat's lower level tributaries any_land_neighboring_realm_with_tributaries_owner = { is_tributary = yes top_suzerain = { - confedration_foe_sub_trigger = { CHARACTER = $CHARACTER$ } + confederation_foe_sub_trigger = { CHARACTER = $CHARACTER$ } } } } @@ -121,20 +136,20 @@ confederation_neighboring_foe_trigger = { OR = { #Threat borders you or your tributaries any_land_neighboring_realm_with_tributaries_owner = { - confedration_foe_sub_trigger = { CHARACTER = $CHARACTER$ } + confederation_foe_sub_trigger = { CHARACTER = $CHARACTER$ } } #You border threat's direct tributaries any_land_neighboring_realm_with_tributaries_owner = { exists = suzerain suzerain = { - confedration_foe_sub_trigger = { CHARACTER = $CHARACTER$ } + confederation_foe_sub_trigger = { CHARACTER = $CHARACTER$ } } } #You border threat's lower level tributaries any_land_neighboring_realm_with_tributaries_owner = { is_tributary = yes top_suzerain = { - confedration_foe_sub_trigger = { CHARACTER = $CHARACTER$ } + confederation_foe_sub_trigger = { CHARACTER = $CHARACTER$ } } } } @@ -615,7 +630,7 @@ mpo_overrunning_willing_vassal_trigger = { } highest_held_title_tier >= tier_county government_has_flag = government_is_nomadic - highest_held_title_tier < tier_kingdom + highest_held_title_tier < tier_duchy NOT = { government_has_flag = government_is_herder } } @@ -628,13 +643,8 @@ is_tsagaan_sar = { } } has_eligible_artifact_trigger = { - any_artifact = { - artifact_owner = root - NOR = { - has_variable = banner_house - has_variable = banner_dynasty - has_variable = 1025_treasure_map - } + any_character_artifact = { + artifact_can_be_gift_advance_trigger = yes count >= 2 } } @@ -648,15 +658,7 @@ can_gift_anything_trigger = { domicile ?= { herd < max_herd } } } - any_artifact = { - artifact_owner = root - NOR = { - has_variable = banner_house - has_variable = banner_dynasty - has_variable = 1025_treasure_map - } - count >= 2 - } + has_eligible_artifact_trigger = yes } } @@ -1395,24 +1397,12 @@ mpo_blood_brother_loving_trigger = { } has_bad_season_nomadic_capital_root_trigger = { - any_county_situation = { + any_county_situation_sub_region = { OR = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_white_zud_season - situation_sub_region_has_county = root.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_cold_zud_season - situation_sub_region_has_county = root.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_severe_drought_season - situation_sub_region_has_county = root.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_havsarsan_zud_season - situation_sub_region_has_county = root.capital_county - } + sub_region_current_phase = situation_steppe_white_zud_season + sub_region_current_phase = situation_steppe_cold_zud_season + sub_region_current_phase = situation_steppe_severe_drought_season + sub_region_current_phase = situation_steppe_havsarsan_zud_season } } } @@ -1479,24 +1469,12 @@ has_bad_season_nomadic_capital_character_trigger = { } has_bad_season_in_county_trigger = { - any_county_situation = { + any_county_situation_sub_region = { OR = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_white_zud_season - situation_sub_region_has_county = $COUNTY$ - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_cold_zud_season - situation_sub_region_has_county = $COUNTY$ - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_severe_drought_season - situation_sub_region_has_county = $COUNTY$ - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_havsarsan_zud_season - situation_sub_region_has_county = $COUNTY$ - } + sub_region_current_phase = situation_steppe_white_zud_season + sub_region_current_phase = situation_steppe_cold_zud_season + sub_region_current_phase = situation_steppe_severe_drought_season + sub_region_current_phase = situation_steppe_havsarsan_zud_season } } } @@ -1541,21 +1519,11 @@ has_good_season_nomadic_capital_character_trigger = { } has_good_season_in_county_trigger = { - any_county_situation = { + any_county_situation_sub_region = { OR = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_abundant_grazing_season - situation_sub_region_has_county = $COUNTY$ - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_warm_nights_season - situation_sub_region_has_county = $COUNTY$ - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_sky_blessing_season - situation_sub_region_has_county = $COUNTY$ - - } + sub_region_current_phase = situation_steppe_abundant_grazing_season + sub_region_current_phase = situation_steppe_warm_nights_season + sub_region_current_phase = situation_steppe_sky_blessing_season } } } @@ -1882,3 +1850,197 @@ county_ready_for_abuse_trigger = { } } +mpo_nomad_invasion_war_ai_trigger = { + OR = { + has_realm_law = nomadic_authority_3 + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + is_independent_ruler = yes + is_at_war = no + gold > 0 + NOT = { + has_realm_law = uncrowned + } + OR = { + #China is in division + AND = { + situation:dynastic_cycle ?= { situation_current_phase = situation_dynastic_cycle_phase_chaos } + NOT = { + exists = title:h_china.holder + } + capital_province = { + geographical_region = world_steppe_east + } + } + #Byzantium or China are actually somehow a viable target + title:e_byzantium.holder ?= { + in_diplomatic_range = $NOMAD$ + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = $NOMAD$ } + is_allied_to = $NOMAD$ + is_tributary_of = $NOMAD$ + $NOMAD$ = { + is_tributary_of_suzerain_or_above = prev + } + $NOMAD$ = { + has_truce = prev + } + } + #Fulfills strength comparison + current_military_strength < $NOMAD$.seventy_percent_of_current_military_strength + OR = { + gold <= $NOMAD$.fifty_percent_of_current_gold + current_military_strength <= $NOMAD$.forty_percent_of_current_military_strength + } + } + title:h_china.holder ?= { + in_diplomatic_range = $NOMAD$ + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = $NOMAD$ } + is_allied_to = $NOMAD$ + is_tributary_of = $NOMAD$ + $NOMAD$ = { + is_tributary_of_suzerain_or_above = prev + } + $NOMAD$ = { + has_truce = prev + } + } + #Fulfills strength comparison + current_military_strength < $NOMAD$.seventy_percent_of_current_military_strength + OR = { + gold <= $NOMAD$.fifty_percent_of_current_gold + current_military_strength <= $NOMAD$.forty_percent_of_current_military_strength + } + } + # Havsaran zud? Leave the steppe! + capital_county ?= { + any_county_situation_sub_region = { + sub_region_current_phase = situation_steppe_havsarsan_zud_season + } + } + #Landless and heavily herded + AND = { + is_landed = no + domicile.herd >= 8000 + } + #Family has held title without ascendance for a while + AND = { + ai_energy > low_negative_ai_value + is_gurkhan = no + sub_realm_size <= 30 + domicile ?= { herd <= two_thirds_max_herd_value } + + exists = $NOMAD$.house + primary_title = { + previous_holder ?= { + house ?= $NOMAD$.house + } + any_past_holder = { + count >= 2 + NOT = { + this = $NOMAD$ + } + house ?= $NOMAD$.house + trigger_if = { + limit = { + is_alive = no + } + time_since_death = { + years <= 120 + } + } + } + } + } + #Is "pushed out" by stronger neighbor + AND = { + ai_vengefulness < low_positive_ai_value + is_gurkhan = no + any_neighboring_realm_with_tributaries_owner = { + NOT = { is_tributary_of_suzerain_or_above = $NOMAD$ } + OR = { + #Is personally scary + AND = { + government_has_flag = government_is_nomadic + seventy_percent_of_current_military_strength >= $NOMAD$.current_military_strength + NOR = { + is_allied_to = $NOMAD$ + has_truce = $NOMAD$ + } + } + #Suzerain is scary + AND = { + is_tributary = yes + top_suzerain = { + NOT = { this = $NOMAD$ } + government_has_flag = government_is_nomadic + seventy_percent_of_current_military_strength > $NOMAD$.current_military_strength + NOR = { + is_tributary_of = $NOMAD$ + is_allied_to = $NOMAD$ + has_truce = $NOMAD$ + } + } + } + } + } + } + } +} + +mpo_nomad_duchy_invasion_war_ai_trigger = { + is_independent_ruler = yes + is_at_war = no + gold > 0 + NOT = { + has_realm_law = uncrowned + } + has_realm_law = nomadic_authority_2 + OR = { + #China is in division + AND = { + situation:dynastic_cycle ?= { situation_current_phase = situation_dynastic_cycle_phase_chaos } + NOT = { + exists = title:h_china.holder + } + } + # Havsaran zud? Leave the steppe! + capital_county ?= { + any_county_situation_sub_region = { + sub_region_current_phase = situation_steppe_havsarsan_zud_season + } + } + #Landless and heavily herded + AND = { + is_landed = no + domicile.herd >= 4000 + } + #Family has held title without ascendance for a while + AND = { + ai_energy >= 0 + is_gurkhan = no + sub_realm_size <= 3 + domicile ?= { herd <= two_thirds_max_herd_value } + + exists = $NOMAD$.house + primary_title = { + previous_holder ?= { + house ?= $NOMAD$.house + } + any_past_holder = { + count >= 2 + this != $NOMAD$ + house ?= $NOMAD$.house + OR = { + is_alive = yes + time_since_death = { + years <= 120 + } + } + } + } + } + } +} diff --git a/common/situation/catalysts/10_tgp_dynastic_cycle_catalysts.txt b/common/situation/catalysts/10_tgp_dynastic_cycle_catalysts.txt index 0f0d57e9..76fe023f 100644 --- a/common/situation/catalysts/10_tgp_dynastic_cycle_catalysts.txt +++ b/common/situation/catalysts/10_tgp_dynastic_cycle_catalysts.txt @@ -71,6 +71,7 @@ catalyst_hegemon_apocalyptic_epidemic = {} catalyst_requested_incursion = {} # Imperial Treasury +catalyst_imperial_treasury_depleted = {} catalyst_imperial_treasury_raided = {} catalyst_imperial_treasury_debt = {} catalyst_cleared_treasury_debt = {} diff --git a/common/situation/situation_group_types/00_situation_group_types.txt b/common/situation/situation_group_types/00_situation_group_types.txt index c3263067..ab3d8cea 100644 --- a/common/situation/situation_group_types/00_situation_group_types.txt +++ b/common/situation/situation_group_types/00_situation_group_types.txt @@ -26,6 +26,10 @@ natural_disasters = { sort_order = 9 } +story_cycles = { + sort_order = 5 +} + debug = { # referred to in code (DO NOT REMOVE) sort_order = -1 } diff --git a/common/situation/situations/the_great_steppe.txt b/common/situation/situations/the_great_steppe.txt index e01bef04..e93f8185 100644 --- a/common/situation/situations/the_great_steppe.txt +++ b/common/situation/situations/the_great_steppe.txt @@ -59,7 +59,7 @@ if = { limit = { is_ai = no - NOT = { has_variable = mpo_the_great_steppe_events_0001_var } + NOT = { has_character_flag = mpo_the_great_steppe_events_0001_var } } trigger_event = mpo_the_great_steppe.0001 } @@ -82,7 +82,7 @@ if = { limit = { is_ai = no - NOT = { has_variable = mpo_the_great_steppe_events_0001_var } + NOT = { has_character_flag = mpo_the_great_steppe_events_0001_var } } trigger_event = mpo_the_great_steppe.0001 } diff --git a/common/subject_contracts/contracts/_subject_contracts.info b/common/subject_contracts/contracts/_subject_contracts.info index cc24b2b8..bc0e5436 100644 --- a/common/subject_contracts/contracts/_subject_contracts.info +++ b/common/subject_contracts/contracts/_subject_contracts.info @@ -28,7 +28,7 @@ subject_contract = { # Scopes available: # scope:liege the liege or suzerain in the contract # scope:subject the subject in the contract - # scope:vassal the subject in the contract. Same as scope:subject. Kept in for backwards compatability. + # scope:vassal the subject in the contract. Same as scope:subject. Kept in for backwards compatibility. # scope:opinion_of_liege set if uses_opinion_of_liege = yes # scope:tax_slot the slot they are in/are being considered to be placed in # scope:tax_collector the collector for the above/the potential new collector diff --git a/common/subject_contracts/contracts/administrative.txt b/common/subject_contracts/contracts/administrative.txt index 911a1f09..b7d504c5 100644 --- a/common/subject_contracts/contracts/administrative.txt +++ b/common/subject_contracts/contracts/administrative.txt @@ -251,7 +251,7 @@ administrative_themes = { is_valid = { scope:liege = { - highest_held_title_tier = tier_empire + highest_held_title_tier >= tier_empire } custom_tooltip = { text = admin_theme_imperial_valid_desc @@ -406,7 +406,10 @@ administrative_salary_rank = { parent = administrative_salary_rank_none is_valid = { scope:subject = { - highest_held_title_tier = tier_duchy + any_held_title = { + is_noble_family_title = no + tier = tier_duchy + } } } diff --git a/common/subject_contracts/contracts/celestial.txt b/common/subject_contracts/contracts/celestial.txt index 37cc60d5..3f3f1033 100644 --- a/common/subject_contracts/contracts/celestial.txt +++ b/common/subject_contracts/contracts/celestial.txt @@ -603,17 +603,7 @@ celestial_ministry_obligations = { defaults_to_highest_valid_level = yes is_shown = { scope:subject = { - OR = { - has_title = title:e_minister_chancellor - has_title = title:e_minister_censor - has_title = title:e_minister_grand_marshal - has_title = title:e_minister_of_personnel - has_title = title:e_minister_of_revenue - has_title = title:e_minister_of_rites - has_title = title:e_minister_of_war - has_title = title:e_minister_of_justice - has_title = title:e_minister_of_works - } + tgp_has_minister_title = yes } } can_be_changed = { diff --git a/common/subject_contracts/contracts/meritocratic.txt b/common/subject_contracts/contracts/meritocratic.txt index 7579babd..e904c00b 100644 --- a/common/subject_contracts/contracts/meritocratic.txt +++ b/common/subject_contracts/contracts/meritocratic.txt @@ -61,6 +61,7 @@ meritocratic_provinces = { flag = meritocratic_province_standard flag = meritocratic_civil_appointment + appointment_trait_flag = civilian_province } meritocratic_province_industrial = { position = { 1 0 } @@ -141,6 +142,7 @@ meritocratic_provinces = { flag = meritocratic_province_industrial flag = meritocratic_civil_appointment flag = obligation_high_taxes + appointment_trait_flag = civilian_province } meritocratic_province_military = { position = { 0 1 } @@ -245,6 +247,7 @@ meritocratic_provinces = { flag = meritocratic_province_military flag = meritocratic_military_appointment flag = obligation_high_levies + appointment_trait_flag = military_province } } } diff --git a/common/task_contracts/laamp_base_contracts.txt b/common/task_contracts/laamp_base_contracts.txt index 77aa30b1..533e7da7 100644 --- a/common/task_contracts/laamp_base_contracts.txt +++ b/common/task_contracts/laamp_base_contracts.txt @@ -2091,8 +2091,10 @@ laamp_base_5051 = { } } } - task_contract_employer = { is_landed = yes } - NOT = { scope:employer = { government_has_flag = government_is_herder } } + task_contract_employer = { + is_landed = yes + NOT = { government_has_flag = government_is_herder } + } } valid_to_keep = { # Standard triggers. @@ -2100,8 +2102,10 @@ laamp_base_5051 = { EMPLOYER = root.task_contract_employer LAAMP = root.task_contract_taker } - task_contract_employer = { is_landed = yes } - NOT = { scope:employer = { government_has_flag = government_is_herder } } + task_contract_employer = { + is_landed = yes + NOT = { government_has_flag = government_is_herder } + } } # On_actions diff --git a/common/task_contracts/laamp_extra_contracts.txt b/common/task_contracts/laamp_extra_contracts.txt index 0244931a..3e3e3998 100644 --- a/common/task_contracts/laamp_extra_contracts.txt +++ b/common/task_contracts/laamp_extra_contracts.txt @@ -3438,6 +3438,11 @@ laamp_legitimist_support_contract = { } } scope:employer.primary_title.tier >= tier_kingdom + any_claim = { + exists = holder + tier >= tier_kingdom + holder != scope:employer + } } valid_to_continue = { diff --git a/common/task_contracts/laamp_transport_contracts.txt b/common/task_contracts/laamp_transport_contracts.txt index b2dcf096..29ccb487 100644 --- a/common/task_contracts/laamp_transport_contracts.txt +++ b/common/task_contracts/laamp_transport_contracts.txt @@ -17,7 +17,7 @@ ################################################## # -# laamp_transport_vip - Escort Emissary - Escort a charachter's Courtier to another character +# laamp_transport_vip - Escort Emissary - Escort a character's Courtier to another character # laamp_transport_artifact - Artifact Delivery - Transfer an artifact from one character to another # laamp_transport_gold - A Golden Gift - Transfer gold from one character to another # laamp_transport_ward - Ward Transfer - Escorting a Ward to a Guardian @@ -51,7 +51,7 @@ laamp_transport_vip = { scope:employer = { any_courtier = { is_ai = yes - is_available_allow_travelling = yes + is_available = yes is_adult = yes is_lowborn = no } @@ -66,6 +66,7 @@ laamp_transport_vip = { exists = root.var:task_contract_object var:task_contract_object = { is_courtier_of = root.task_contract_employer + is_available = yes } } valid_to_accept = { @@ -104,7 +105,7 @@ laamp_transport_vip = { random_courtier = { limit = { is_ai = yes - is_available_allow_travelling = yes + is_available = yes is_adult = yes is_lowborn = no } @@ -379,6 +380,7 @@ laamp_transport_artifact = { scope:employer = { any_character_artifact = { NOR = { + has_variable = artifact_succession_title has_variable = historical_unique_artifact has_variable = banner_house has_variable = banner_dynasty @@ -404,6 +406,7 @@ laamp_transport_artifact = { scope:employer = { any_character_artifact = { NOR = { + has_variable = artifact_succession_title has_variable = historical_unique_artifact has_variable = banner_house has_variable = banner_dynasty @@ -445,9 +448,8 @@ laamp_transport_artifact = { limit = { NOR = { has_variable = historical_unique_artifact - has_variable = banner_house - has_variable = banner_dynasty } + artifact_can_be_gift_advance_trigger = yes } save_scope_as = escorted_artifact } @@ -1023,7 +1025,7 @@ laamp_transport_ward = { scope:employer = { any_child = { is_ai = yes - is_available_child_allow_travel = yes + is_available_child = yes OR = { num_of_relation_guardian = 0 any_relation = { @@ -1062,7 +1064,9 @@ laamp_transport_ward = { } } valid_to_keep = { - exists = root.var:task_contract_object + root.var:task_contract_object ?= { + is_available_child = yes + } } valid_to_accept = { # Standard triggers. @@ -1100,7 +1104,7 @@ laamp_transport_ward = { } random_child = { limit = { - is_available_child_allow_travel = yes + is_available_child = yes OR = { num_of_relation_guardian = 0 any_relation = { diff --git a/common/task_contracts/tgp_natural_disaster_contracts.txt b/common/task_contracts/tgp_natural_disaster_contracts.txt index 93cf2c59..a7e3abfe 100644 --- a/common/task_contracts/tgp_natural_disaster_contracts.txt +++ b/common/task_contracts/tgp_natural_disaster_contracts.txt @@ -463,6 +463,8 @@ tgp_medieval_medicine = { #Treating the Unfortunate medical_assistance_failure = { visible = no effect = { + task_contract_taker = { play_sound_effect = "event:/DLC/EP3/SFX/UI/Contracts/ep3_ui_contracts_failure_on_contract" } + save_scope_as = task_contract task_contract_taker ?= { send_interface_toast = { title = tgp_natural_disaster_contract_event.0011.b.tt.failure diff --git a/common/traits/00_traits.txt b/common/traits/00_traits.txt index c88433cc..0f820c56 100644 --- a/common/traits/00_traits.txt +++ b/common/traits/00_traits.txt @@ -13,7 +13,7 @@ education_intrigue_1 = { intrigue = 2 category = education monthly_intrigue_lifestyle_xp_gain_mult = 0.1 - monthly_influence = 0.25 + domain_limit = -1 ruler_designer_cost = 0 @@ -44,7 +44,6 @@ education_intrigue_2 = { intrigue = 4 category = education monthly_intrigue_lifestyle_xp_gain_mult = 0.2 - monthly_influence = 0.5 ruler_designer_cost = 20 @@ -70,7 +69,7 @@ education_intrigue_3 = { intrigue = 6 category = education monthly_intrigue_lifestyle_xp_gain_mult = 0.3 - monthly_influence = 0.75 + domain_limit = 1 ruler_designer_cost = 40 @@ -96,7 +95,7 @@ education_intrigue_4 = { intrigue = 8 category = education monthly_intrigue_lifestyle_xp_gain_mult = 0.4 - monthly_influence = 1 + domain_limit = 2 ruler_designer_cost = 80 @@ -126,7 +125,7 @@ education_intrigue_5 = { monthly_diplomacy_lifestyle_xp_gain_mult = 0.25 owned_hostile_scheme_success_chance_max_add = 10 flag = agent_acceptance_25 - monthly_influence = 1.5 + domain_limit = 3 ruler_designer_cost = 150 @@ -155,7 +154,7 @@ education_diplomacy_1 = { diplomacy = 2 category = education monthly_diplomacy_lifestyle_xp_gain_mult = 0.1 - monthly_influence = 0.25 + domain_limit = -1 ruler_designer_cost = 0 @@ -186,7 +185,6 @@ education_diplomacy_2 = { diplomacy = 4 category = education monthly_diplomacy_lifestyle_xp_gain_mult = 0.2 - monthly_influence = 0.5 ruler_designer_cost = 20 @@ -212,7 +210,7 @@ education_diplomacy_3 = { diplomacy = 6 category = education monthly_diplomacy_lifestyle_xp_gain_mult = 0.3 - monthly_influence = 0.75 + domain_limit = 1 ruler_designer_cost = 40 @@ -238,7 +236,7 @@ education_diplomacy_4 = { diplomacy = 8 category = education monthly_diplomacy_lifestyle_xp_gain_mult = 0.4 - monthly_influence = 1 + domain_limit = 2 ruler_designer_cost = 80 @@ -278,7 +276,7 @@ education_diplomacy_5 = { owned_personal_scheme_success_chance_max_add = 10 flag = offer_vassalisation_25 flag = better_war_hostages - monthly_influence = 1.5 + domain_limit = 3 ruler_designer_cost = 150 @@ -316,6 +314,7 @@ education_stewardship_1 = { #Indulgent wastrel stewardship = 2 category = education monthly_stewardship_lifestyle_xp_gain_mult = 0.1 + domain_limit = -1 ruler_designer_cost = 0 @@ -371,6 +370,7 @@ education_stewardship_3 = { #Fortune builder stewardship = 6 category = education monthly_stewardship_lifestyle_xp_gain_mult = 0.3 + domain_limit = 1 ruler_designer_cost = 40 @@ -396,6 +396,7 @@ education_stewardship_4 = { stewardship = 8 category = education monthly_stewardship_lifestyle_xp_gain_mult = 0.4 + domain_limit = 2 culture_modifier = { parameter = elephant_bonuses_for_rank_4_education @@ -432,6 +433,7 @@ education_stewardship_5 = { monthly_stewardship_lifestyle_xp_gain_mult = 0.5 monthly_learning_lifestyle_xp_gain_mult = 0.25 vassal_tax_mult = 0.25 + domain_limit = 3 culture_modifier = { parameter = elephant_bonuses_for_rank_4_education @@ -468,6 +470,7 @@ education_martial_1 = { martial = 2 category = education monthly_martial_lifestyle_xp_gain_mult = 0.1 + domain_limit = -1 culture_modifier = { parameter = poorly_educated_leaders_distrusted @@ -548,6 +551,7 @@ education_martial_3 = { #Skilled tactician martial = 6 category = education monthly_martial_lifestyle_xp_gain_mult = 0.3 + domain_limit = 1 culture_modifier = { parameter = prowess_from_martial_education @@ -585,6 +589,7 @@ education_martial_4 = { #Brilliant strategist martial = 8 category = education monthly_martial_lifestyle_xp_gain_mult = 0.4 + domain_limit = 2 culture_modifier = { parameter = prowess_from_martial_education @@ -634,6 +639,7 @@ education_martial_5 = { monthly_stewardship_lifestyle_xp_gain_mult = 0.25 army_siege_value_mult = 0.5 movement_speed = 0.2 + domain_limit = 3 culture_modifier = { parameter = prowess_from_martial_education @@ -682,6 +688,7 @@ education_learning_1 = { learning = 2 category = education monthly_learning_lifestyle_xp_gain_mult = 0.1 + domain_limit = -1 culture_modifier = { parameter = poorly_educated_leaders_distrusted @@ -779,6 +786,7 @@ education_learning_3 = { learning = 6 category = education monthly_learning_lifestyle_xp_gain_mult = 0.3 + domain_limit = 1 culture_modifier = { parameter = prowess_from_religious_traits @@ -825,6 +833,7 @@ education_learning_4 = { learning = 8 category = education monthly_learning_lifestyle_xp_gain_mult = 0.4 + domain_limit = 2 culture_modifier = { parameter = prowess_from_religious_traits @@ -885,6 +894,7 @@ education_learning_5 = { monthly_intrigue_lifestyle_xp_gain_mult = 0.25 development_growth = 0.1 county_fertility_growth_mult = small_county_fertility_growth_gain + domain_limit = 3 culture_modifier = { parameter = prowess_from_religious_traits @@ -989,6 +999,7 @@ family_first = { dynasty_house_opinion = 10 close_relative_opinion = 15 stress_loss_mult = 0.2 + domain_limit = 1 ruler_designer_cost = 50 @@ -1085,7 +1096,6 @@ lifestyle_reveler = { parameter = reveler_traits_more_valued monthly_prestige = 0.25 } - monthly_influence = 0.25 track = { 50 = { @@ -1209,7 +1219,6 @@ lifestyle_blademaster = { parameter = blademaster_traits_give_learning learning = 2 } - monthly_influence = 0.25 track = { 50 = { @@ -1479,7 +1488,6 @@ strategist = { parameter = martial_traits_give_out_hcav_bonus heavy_cavalry_damage_mult = 0.1 } - monthly_influence = 0.25 ruler_designer_cost = 50 @@ -1551,7 +1559,6 @@ gallant = { parameter = martial_traits_give_out_hcav_bonus heavy_cavalry_toughness_mult = 0.1 } - monthly_influence = 0.25 ruler_designer_cost = 50 @@ -1617,7 +1624,6 @@ administrator = { vassal_opinion = 5 tributary_opinion = 5 epidemic_resistance = 10 - monthly_influence = 0.75 ruler_designer_cost = 50 @@ -1700,7 +1706,6 @@ schemer = { intrigue = 5 hostile_scheme_phase_duration_add = medium_scheme_phase_duration_bonus_value - monthly_influence = 1.25 ruler_designer_cost = 50 @@ -1733,7 +1738,6 @@ seducer = { intrigue = 3 attraction_opinion = 40 fertility = 0.2 - monthly_influence = 0.5 ruler_designer_cost = 50 @@ -1880,6 +1884,7 @@ theologian = { learning = 3 monthly_piety_gain_mult = 0.2 + domain_limit = 1 ruler_designer_cost = 50 @@ -2350,7 +2355,6 @@ gluttonous = { opposite_opinion = -10 ruler_designer_cost = 20 - monthly_influence = -0.25 desc = { @@ -2546,7 +2550,6 @@ lazy = { stress_loss_mult = 0.5 ruler_designer_cost = -10 - monthly_influence = -0.5 desc = { first_valid = { @@ -2590,7 +2593,6 @@ diligent = { parochial_opinion = 5 stress_loss_mult = -0.5 - monthly_influence = 0.5 culture_modifier = { parameter = hard_working_traits_more_valued @@ -2688,7 +2690,6 @@ wrathful = { courtly_opinion = -10 dread_baseline_add = 20 - monthly_influence = -0.75 culture_modifier = { parameter = forest_trait_bonuses @@ -2757,7 +2758,7 @@ calm = { } diplomacy = 1 intrigue = 1 - scheme_discovery_chance_mult = 0.1 + enemy_scheme_secrecy_add = -10 opposite_opinion = -10 same_opinion = 10 @@ -2840,7 +2841,6 @@ patient = { enemy_hostile_scheme_phase_duration_add = minor_scheme_phase_duration_malus_value parochial_opinion = 10 liege_opinion = 5 - monthly_influence = 0.25 culture_modifier = { parameter = winter_trait_bonuses @@ -2987,7 +2987,6 @@ arrogant = { opinion_of_liege = -5 opinion_of_vassal = -5 opposite_opinion = -15 - monthly_influence = -0.25 ruler_designer_cost = 20 @@ -3129,7 +3128,10 @@ deceitful = { jungle_advantage = 2 } - monthly_influence = 0.25 + culture_modifier = { + parameter = palace_politics_trait_bonuses + monthly_influence = 0.25 + } opposite_opinion = -10 @@ -3175,7 +3177,6 @@ honest = { diplomacy = 2 intrigue = -4 - monthly_influence = -0.25 courtly_opinion = 5 opposite_opinion = -10 same_opinion = 10 @@ -3298,7 +3299,6 @@ brave = { opposite_opinion = -10 same_opinion = 10 - monthly_influence = 0.25 culture_modifier = { parameter = trait_county_opinion_modifiers county_opinion_add = 10 @@ -3390,7 +3390,10 @@ shy = { monthly_piety_gain_mult = 0.1 } - monthly_influence = -0.25 + culture_modifier = { + parameter = palace_politics_trait_maluses + monthly_influence = -0.25 + } ruler_designer_cost = -10 @@ -3440,7 +3443,7 @@ gregarious = { same_opinion = 10 courtly_opinion = 5 - monthly_influence = 0.25 + monthly_influence = 0.1 culture_modifier = { parameter = trait_county_opinion_modifiers @@ -3530,7 +3533,10 @@ ambitious = { same_culture_opinion = -15 } - monthly_influence = 0.75 + culture_modifier = { + parameter = palace_politics_trait_bonuses + monthly_influence = 0.35 + } opinion_of_liege = -15 same_opinion = -15 @@ -3596,7 +3602,6 @@ content = { ai_war_chance = -0.25 ruler_designer_cost = 20 - monthly_influence = -0.25 culture_modifier = { parameter = craven_and_content_traits_looked_down_upon @@ -3666,7 +3671,10 @@ arbitrary = { stress_gain_mult = -0.5 dread_baseline_add = 15 - monthly_influence = 0.15 + culture_modifier = { + parameter = palace_politics_trait_bonuses + monthly_influence = 0.15 + } vassal_opinion = -5 @@ -3718,7 +3726,6 @@ just = { opposite_opinion = -10 same_opinion = 10 flag = initial_legitimacy_boost - monthly_influence = 0.25 culture_modifier = { parameter = just_trait_gives_bonuses @@ -3910,7 +3917,7 @@ paranoid = { stress_gain_mult = 1 dread_gain_mult = 0.25 - scheme_discovery_chance_mult = 0.1 + enemy_scheme_secrecy_add = -10 enemy_personal_scheme_success_chance_add = -25 character_travel_speed = -10 @@ -3934,7 +3941,10 @@ paranoid = { hills_min_combat_roll = 2 } - monthly_influence = 0.15 + culture_modifier = { + parameter = palace_politics_trait_bonuses + monthly_influence = 0.15 + } opinion_of_vassal = -10 @@ -3993,7 +4003,10 @@ trusting = { character_travel_safety = -10 flag = can_offer_strong_hook_to_agents - monthly_influence = -0.25 + culture_modifier = { + parameter = palace_politics_trait_maluses + monthly_influence = -0.25 + } ruler_designer_cost = 10 @@ -4721,7 +4734,6 @@ drunkard = { # Substance Abuse (Alcohol) character_travel_safety = -10 ruler_designer_cost = -10 - monthly_influence = -0.5 desc = { first_valid = { @@ -4752,7 +4764,6 @@ hashishiyah = { # Substance Abuse (Hashish) same_opinion = 10 ruler_designer_cost = 5 - monthly_influence = -0.5 desc = { first_valid = { @@ -4784,7 +4795,6 @@ rakish = { # Brothel-frequenter. attraction_opinion = -5 ruler_designer_cost = 0 - monthly_influence = -0.5 desc = { first_valid = { @@ -4817,7 +4827,6 @@ reclusive = { # Hides away from relationships and responsibilities. epidemic_resistance = 10 ruler_designer_cost = -5 - monthly_influence = -0.25 desc = { first_valid = { @@ -4856,7 +4865,6 @@ irritable = { # Prone to outbursts and tantrums. flag = can_duel_anyone_interaction ruler_designer_cost = 0 - monthly_influence = -0.25 desc = { first_valid = { @@ -4990,7 +4998,6 @@ contrite = { # Compulsively reveals own/other's Secrets. If no known Secrets, ma stress_loss_mult = 0.2 ruler_designer_cost = -5 - monthly_influence = -0.90 desc = { first_valid = { @@ -5255,7 +5262,6 @@ lunatic_1 = { # Highly event driven, Schizophrenia enemy_hostile_scheme_phase_duration_add = minor_scheme_phase_duration_malus_value health = -0.25 category = health - monthly_influence = -1 shown_in_ruler_designer = no @@ -5285,7 +5291,6 @@ lunatic_genetic = { # Highly event driven, Schizophrenia group_equivalence = lunatic level = 2 health = -0.25 - monthly_influence = -1 vassal_opinion = -10 attraction_opinion = -10 @@ -5325,7 +5330,6 @@ possessed_1 = { # Highly event driven, Temporal lobe epilepsy attraction_opinion = -10 same_opinion = 15 - monthly_influence = -0.5 shown_in_ruler_designer = no @@ -5357,7 +5361,6 @@ possessed_genetic = { # Highly event driven, Temporal lobe epilepsy monthly_learning_lifestyle_xp_gain_mult = 0.1 health = -0.5 - monthly_influence = -0.75 attraction_opinion = -10 same_opinion = 15 @@ -5390,7 +5393,7 @@ ill = { health = -1 elderly_health = -1 - prowess = -4 + prowess_mult = -0.4 fertility = -0.2 category = health @@ -5432,7 +5435,7 @@ pneumonic = { learning = -2 health = -3 elderly_health = -2 - prowess = -8 + prowess_mult = -0.8 fertility = -0.5 category = health @@ -5551,7 +5554,7 @@ lovers_pox = { leper = { health = -1.5 - prowess = -8 + prowess_mult = -0.8 fertility = -0.95 category = health @@ -5851,17 +5854,16 @@ disfigured = { } infirm = { - diplomacy = -3 - martial = -3 - stewardship = -3 - intrigue = -3 - learning = -3 - prowess = -6 - health = -1 - fertility = -0.3 - - dread_baseline_add = -15 - dread_loss_mult = 1 + diplomacy = -1 + martial = -1 + prowess_mult = -0.2 + health = -0.25 + fertility = -0.1 + ai_energy = -10 + + flag = infirm_random_xp_gain + flag = age_related_ailment + flag = is_healthy_trigger_flag category = health @@ -5880,19 +5882,322 @@ infirm = { desc = trait_infirm_character_desc } } - - ai_energy = -30 + tracks = { + infirm = { + 25 = { + diplomacy = -1 + martial = -1 + stewardship = -1 + prowess_mult = -0.2 + health = -0.25 + fertility = -0.1 + dread_baseline_add = -5 + dread_loss_mult = 0.25 + attraction_opinion = -5 + ai_energy = -10 + } + 50 = { + diplomacy = -2 + martial = -2 + stewardship = -2 + prowess_mult = -0.2 + health = -0.25 + fertility = -0.1 + dread_baseline_add = -10 + dread_loss_mult = 0.25 + attraction_opinion = -5 + ai_energy = -10 + } + 75 = { + diplomacy = -2 + martial = -2 + stewardship = -2 + prowess_mult = -0.2 + health = -0.25 + fertility = -0.1 + dread_baseline_add = -10 + dread_loss_mult = 0.25 + attraction_opinion = -5 + ai_energy = -10 + } + 100 = { + diplomacy = -2 + martial = -2 + stewardship = -2 + prowess_mult = -0.2 + health = -0.25 + fertility = -0.1 + dread_baseline_add = -10 + dread_loss_mult = 0.25 + attraction_opinion = -5 + ai_energy = -10 + } + } + } +} + +withering_mind = { + learning = -2 + monthly_lifestyle_xp_gain_mult = -0.25 + stress_gain_mult = 0.2 + ai_rationality = -25 + + flag = withering_mind_random_xp_gain + flag = incapable_on_max_level + flag = age_related_ailment flag = is_healthy_trigger_flag + + category = health + + ruler_designer_cost = -20 + + desc = { + first_valid = { + triggered_desc = { + trigger = { + NOT = { exists = this } + } + desc = trait_withering_mind_desc + } + desc = trait_withering_mind_character_desc + } + } + + tracks = { + withering_mind = { + 25 = { + diplomacy_mult = -0.25 + martial_mult = -0.25 + stewardship_mult = -0.25 + intrigue_mult = -0.25 + learning_mult = -0.25 + monthly_lifestyle_xp_gain_mult = -0.25 + stress_gain_mult = 0.2 + ai_rationality = -25 + } + 50 = { + diplomacy_mult = -0.25 + martial_mult = -0.25 + stewardship_mult = -0.25 + intrigue_mult = -0.25 + learning_mult = -0.25 + monthly_lifestyle_xp_gain_mult = -0.25 + stress_gain_mult = 0.2 + ai_rationality = -25 + } + 75 = { + diplomacy_mult = -0.25 + martial_mult = -0.25 + stewardship_mult = -0.25 + intrigue_mult = -0.25 + learning_mult = -0.25 + monthly_lifestyle_xp_gain_mult = -0.5 + stress_gain_mult = 0.2 + ai_rationality = -25 + } + 100 = { + diplomacy_mult = -0.25 + martial_mult = -0.25 + stewardship_mult = -0.25 + intrigue_mult = -0.25 + learning_mult = -0.25 + monthly_lifestyle_xp_gain_mult = -0.5 + stress_gain_mult = 0.2 + ai_rationality = -25 + } + } + } +} + +clouded_eyes = { + martial = -1 + prowess = -2 + + flag = clouded_eyes_random_xp_gain + flag = age_related_ailment + flag = is_healthy_trigger_flag + flag = blind_on_max_level + + category = health + + ruler_designer_cost = -20 + + desc = { + first_valid = { + triggered_desc = { + trigger = { + NOT = { exists = this } + } + desc = trait_clouded_eyes_desc + } + desc = trait_clouded_eyes_character_desc + } + } + + tracks = { + clouded_eyes = { + 25 = { + martial = -1 + prowess = -2 + } + 50 = { + martial = -1 + prowess = -2 + } + 75 = { + martial = -1 + stewardship = -1 + intrigue = -1 + prowess = -2 + + dread_baseline_add = -5 + + attraction_opinion = -5 + } + 100 = { + martial = -2 + stewardship = -1 + intrigue = -1 + prowess = -2 + + health = -0.25 + + dread_baseline_add = -5 + + attraction_opinion = -5 + } + } + } +} + +faltering_heart = { + health = -0.1 + prowess = -1 + character_travel_safety = -2 + stress_gain_mult = 0.2 + stress_loss_mult = -0.2 + + flag = faltering_heart_random_xp_gain + flag = age_related_ailment + flag = is_healthy_trigger_flag + flag = death_on_max_level + + category = health + + ruler_designer_cost = -20 + + desc = { + first_valid = { + triggered_desc = { + trigger = { + NOT = { exists = this } + } + desc = trait_faltering_heart_desc + } + desc = trait_faltering_heart_character_desc + } + } + + tracks = { + faltering_heart = { + 25 = { + health = -0.1 + prowess = -1 + character_travel_safety = -2 + stress_gain_mult = 0.2 + stress_loss_mult = -0.2 + } + 50 = { + health = -0.1 + prowess = -1 + character_travel_safety = -2 + stress_gain_mult = 0.2 + stress_loss_mult = -0.2 + } + 75 = { + health = -0.1 + prowess = -1 + character_travel_safety = -2 + stress_gain_mult = 0.2 + stress_loss_mult = -0.2 + } + 100 = { + health = -100 + } + } + } +} + +fragile_bones = { + character_travel_speed_mult = -0.1 + prowess_mult = -0.1 + advantage = -3 + life_expectancy = -3 + enemy_hostile_scheme_success_chance_max_add = 5 + + flag = fragile_bones_random_xp_gain + flag = age_related_ailment + flag = is_healthy_trigger_flag + flag = wounds_twice_as_bad + + category = health + + ruler_designer_cost = -20 + + desc = { + first_valid = { + triggered_desc = { + trigger = { + NOT = { exists = this } + } + desc = trait_fragile_bones_desc + } + desc = trait_fragile_bones_character_desc + } + } + + tracks = { + fragile_bones = { + 25 = { + character_travel_speed_mult = -0.1 + prowess_mult = -0.1 + advantage = -3 + life_expectancy = -3 + enemy_hostile_scheme_success_chance_max_add = 10 + } + 50 = { + character_travel_speed_mult = -0.1 + prowess_mult = -0.1 + advantage = -3 + life_expectancy = -3 + enemy_hostile_scheme_success_chance_max_add = 10 + } + 75 = { + character_travel_speed_mult = -0.1 + prowess_mult = -0.1 + advantage = -5 + life_expectancy = -5 + enemy_hostile_scheme_success_chance_max_add = 15 + } + 100 = { + character_travel_speed_mult = -0.1 + prowess_mult = -0.1 + advantage = -10 + life_expectancy = -10 + enemy_hostile_scheme_success_chance_max_add = 15 + } + } + } } incapable = { - diplomacy = -6 - intrigue = -6 - stewardship = -6 - martial = -6 - learning = -6 - prowess = -12 + diplomacy_mult = -1 + martial_mult = -1 + stewardship_mult = -1 + intrigue_mult = -1 + learning_mult = -1 + prowess_mult = -1 health = -2 dread_baseline_add = -25 @@ -5925,9 +6230,9 @@ incapable = { } gout_ridden = { - diplomacy = -2 - martial = -1 - prowess = -2 + diplomacy_mult = -0.1 + martial_mult = -0.1 + prowess_mult = -0.2 health = -1 dread_baseline_add = -5 @@ -5959,7 +6264,7 @@ consumption = { # Tuberculosis diplomacy = -2 stewardship = -1 intrigue = -2 - prowess = -2 + prowess_mult = -0.4 health = -2.5 child_health = -1 elderly_health = -2 @@ -6028,7 +6333,7 @@ typhus = { stewardship = -2 intrigue = -1 learning = -2 - prowess = -4 + prowess_mult = -0.8 health = -4.5 elderly_health = -1 fertility = -0.2 @@ -6069,7 +6374,7 @@ bubonic_plague = { stewardship = -2 intrigue = -3 learning = -2 - prowess = -10 + prowess_mult = -0.8 health = -7 elderly_health = -2 fertility = -0.50 @@ -6108,7 +6413,7 @@ smallpox = { diplomacy = -2 stewardship = -1 learning = -2 - prowess = -10 + prowess_mult = -0.8 health = -4.5 elderly_health = -1.5 fertility = -0.25 @@ -6148,7 +6453,7 @@ measles = { stewardship = -1 intrigue = -1 learning = -2 - prowess = -4 + prowess_mult = -0.4 health = -3 child_health = -3 @@ -6185,7 +6490,7 @@ dysentery = { # Bloody Flux diplomacy = -2 martial = -1 intrigue = -2 - prowess = -8 + prowess_mult = -0.8 health = -3.5 elderly_health = -2 @@ -6560,7 +6865,6 @@ beauty_bad_1 = { random_creation = 0.5 attraction_opinion = -10 - monthly_influence = -0.1 group = beauty_bad level = 1 @@ -6600,7 +6904,6 @@ beauty_bad_2 = { random_creation = 0.25 attraction_opinion = -20 - monthly_influence = -0.2 group = beauty_bad level = 2 @@ -6640,7 +6943,6 @@ beauty_bad_3 = { fertility = -0.3 attraction_opinion = -30 - monthly_influence = -0.3 group = beauty_bad level = 3 @@ -6680,7 +6982,6 @@ beauty_good_1 = { random_creation = 0.5 attraction_opinion = 10 - monthly_influence = 0.1 group = beauty_good level = 1 @@ -6723,7 +7024,6 @@ beauty_good_2 = { random_creation = 0.25 attraction_opinion = 20 - monthly_influence = 0.2 # pretty if female # handsome if male @@ -6781,7 +7081,6 @@ beauty_good_3 = { fertility = 0.3 attraction_opinion = 30 - monthly_influence = 0.3 group = beauty_good level = 3 @@ -6823,7 +7122,6 @@ intellect_bad_1 = { stewardship = -2 intrigue = -2 learning = -2 - monthly_influence = -0.2 monthly_lifestyle_xp_gain_mult = -0.1 @@ -6878,7 +7176,6 @@ intellect_bad_2 = { stewardship = -4 intrigue = -4 learning = -4 - monthly_influence = -0.4 monthly_lifestyle_xp_gain_mult = -0.2 @@ -6935,7 +7232,6 @@ intellect_bad_3 = { stewardship = -8 intrigue = -8 learning = -8 - monthly_influence = -0.8 monthly_lifestyle_xp_gain_mult = -0.3 @@ -6995,7 +7291,6 @@ intellect_good_1 = { group = intellect_good level = 1 - monthly_influence = 0.2 ai_rationality = high_positive_ai_value @@ -7043,7 +7338,6 @@ intellect_good_2 = { stewardship = 3 intrigue = 3 learning = 3 - monthly_influence = 0.4 monthly_lifestyle_xp_gain_mult = 0.2 @@ -7102,7 +7396,6 @@ intellect_good_3 = { stewardship = 5 intrigue = 5 learning = 5 - monthly_influence = 0.8 monthly_lifestyle_xp_gain_mult = 0.3 @@ -7436,14 +7729,13 @@ physique_good_3 = { ################# PHYSICAL (GOOD) ################ pure_blooded = { physical = yes - fertility = -2 - health = -2 - inbreeding_chance = 5 - genetic = yes - enables_inbred = yes + fertility = 0.1 + health = 0.25 + inbreeding_chance = -0.5 inherit_chance = 15 both_parent_has_trait_inherit_chance = 75 + good = yes ruler_designer_cost = 50 @@ -10102,7 +10394,7 @@ varangian = { } lifestyle_poet = { - category = fame + category = lifestyle diplomacy_per_prestige_level = 1 stress_loss_mult = 0.1 @@ -11309,7 +11601,10 @@ loyal = { monthly_prestige = 0.1 } - monthly_influence = 0.1 + culture_modifier = { + parameter = palace_politics_trait_bonuses + monthly_influence = 0.1 + } culture_modifier = { parameter = scholar_official_trait_bonuses @@ -14877,6 +15172,7 @@ tourney_participant = { } lifestyle_traveler = { + category = lifestyle icon = "traveler.dds" monthly_wanderer_lifestyle_xp_gain_mult = 0.1 @@ -15088,7 +15384,7 @@ fp3_struggle_supporter = { # TRAITS TO TRACK HIPPODROME FACTION MEMBERS charioteer_blue = { - category = lifestyle + category = fame icon = "charioteer_blue.dds" opposites = { charioteer_green @@ -15152,7 +15448,7 @@ charioteer_blue = { } charioteer_green = { - category = lifestyle + category = fame icon = "charioteer_green.dds" opposites = { charioteer_blue @@ -15216,7 +15512,7 @@ charioteer_green = { } charioteer_white = { - category = lifestyle + category = fame icon = "charioteer_white.dds" opposites = { charioteer_blue @@ -15280,7 +15576,7 @@ charioteer_white = { } charioteer_red = { - category = lifestyle + category = fame icon = "charioteer_red.dds" opposites = { charioteer_blue @@ -15353,15 +15649,30 @@ governor = { 25 = { monthly_influence = 1 stewardship = 1 + + culture_modifier = { + parameter = governor_trait_gives_counter_resistance + counter_resistance = governor_trait_counter_bonus_value + } } 50 = { monthly_influence = 1 diplomacy = 1 + + culture_modifier = { + parameter = governor_trait_gives_counter_resistance + counter_resistance = governor_trait_counter_bonus_value + } } 75 = { monthly_influence = 1 martial = 1 intrigue = 1 + + culture_modifier = { + parameter = governor_trait_gives_counter_resistance + counter_resistance = governor_trait_counter_bonus_value + } } 100 = { monthly_influence = 2 @@ -15369,6 +15680,11 @@ governor = { martial = 1 stewardship = 1 intrigue = 1 + + culture_modifier = { + parameter = governor_trait_gives_counter_resistance + counter_resistance = governor_trait_counter_bonus_value + } } } diff --git a/events/_events.info b/events/_events.info index f1cbf182..631d2eb2 100644 --- a/events/_events.info +++ b/events/_events.info @@ -1,14 +1,49 @@ -=== Structure === + Structure === -Note: this is very very incomplete... +Note: May not be exhaustive. -event_namespace.42 = { - type = character_event/letter_event/court_event/activity_event # Default to character, what type of event this is - scope = scope_type # Optional, defaults to character, will make this event fire with a different expected root scope. none can be used to have no scopes set up. - window = window_name # Optional, what special event file and widget in gui/event_windows should this event use, only used for character events +Event IDs are namespaced. In each events file, define a namespace once at the top: + namespace = my_events +Then define events as: + my_events.1001 = { ... } - # If you have a cooldown, the recipient will get a variable saved with that duration. The variable name will be the event ID - # Anything that checks that an event is legal to fire will also check that the recipient doesn't have that variable +my_events.1001 = { + type = character_event/letter_event/court_event/activity_event # Optional, defaults to character_event + scope = scope_type # Overrides the events root scope. Optional, defaults to character scope. Use scope = none for no root scope, scope = artifact for events centered around artifacts, etc. + + # Optional custom event window name. + # For character/letter events this is the popup window in gui/event_windows. + # For activity events this is used by activity event inserts. + window = window_name + # anonymous_letter_event - letter_event, but without sender portrait and sigil widget + # big_event_window - used for task_contracts, bookmark events, decision outcomes, story cycles, black plague, etc. + # character_event - default + # duel_event - used in single combat events + # fullscreen_event - use splash screen queue + # letter_event - used for responses to character_interactions, between characters that are not in the same location + # scheme_conclusion_window - big_event_window, however we always use one of the sub-types: + # scheme_failed_event - scheme_conclusion_window, but with failure header + # scheme_preparations_event - scheme_conclusion_window, but with scheme_preparation widget + # scheme_successful_event - scheme_conclusion_window, but with successful header + # scheme_conclusion_event_no_header + # scheme_conclusion_window, but without header + #visit_settlement_window - big_event_window, used by laamp visit settlement decision + + # Basic event text/effects (commonly used) + title = my_event_title # Dynamic Description syntax, see bottom of document + desc = my_event_desc # Dynamic Description syntax, see bottom of document + trigger = { ... } + immediate = { ... } + after = { ... } + hidden = yes/no # If yes, no event window is shown + major = yes/no + major_trigger = { ... } + + # Non-character scoped events generally need to be hidden or major. + + # If you have a cooldown, the recipient root gets a saved variable with that duration. + # The variable name is based on the event ID. + # Trigger legality checks include cooldown. cooldown = { days/weeks/months/years = script value } @@ -23,89 +58,112 @@ event_namespace.42 = { lower_left_portrait = X lower_center_portrait = X lower_right_portrait = X - sender = X # for letter events, required + sender = X # required for letter events # X can be one of: X = event target X = { character = event target - trigger = ... # optional, a trigger saying whether this portrait should be visible, in the scope of the portrait character, the event scope is accessible as root scope - animation = animation name # optional, the animation to show for this portrait. It's used if no triggered animations pass their trigger. The default animation will be used if nothing is this item is not specified. - scripted_animation = key_of_scripted_animation # optional, instead of 'animation' you can also define a 'scripted_animation' + trigger = ... # optional, controls visibility for this portrait in the scope of the portrait character + animation = animation name # optional default animation, used if no triggered animations pass their trigger. See animations.txt for all possible animations, in-game: toggle event tools in the event or open portrait editor through the console. + scripted_animation = key_of_scripted_animation # optional alternative to animation - # A list of triggered animations. The first triggered animation that passes the trigger check will be used. + # First triggered animation whose trigger passes is used. triggered_animation = { trigger = ... animation = animation name - # Instead of 'animation' you can also define a 'scripted_animation' + # Or use scripted_animation instead of animation scripted_animation = key_of_scripted_animation - - ### brief: camera ( database key, optional ) - # A camera type defined for a triggered animation will override the default - # camera defined for the event portrait if that animation is chosen - # - camera = camera_name + camera = camera_name # optional, overrides portrait camera when chosen } triggered_animation = ... - - # A list of triggered outfits. The first triggered otfit that passes the trigger check will be used. + + # First triggered outfit whose trigger passes is used. triggered_outfit = { trigger = ... outfit_tags = ... remove_default_outfit = ... - hide_info = ... } triggered_outfit = ... - # Override camera to be used instead of the normal event ones + # Optional portrait behavior toggles camera = camera_key - - outfit_tags = { tag1 tag2 } # Specifies outfit tags for this portrait in ascending priority (i.e. tag2 will "override" tag1 here if anything with tag2 is found in a specific portrait modifier category) - remove_default_outfit = yes/no # If set to yes, portrait modifier categories in which nothing matches any of the event tags will be disabled completely (no by default) - hide_info = yes/no # If set to yes, only the portrait will be shown, with no identifiable elements (no CoA, tooltips, clicks...) (no by default) + override_imprisonment_visuals = yes/no + animate_if_dead = yes/no + + outfit_tags = { tag1 tag2 } # Specifies outfit tags for this portrait in ascending priority (i.e. tag2 will "override" tag1 here if anything with tag2 is found in a specific portrait modifier category) + remove_default_outfit = yes/no # If set to yes, portrait modifier categories in which nothing matches any of the event tags will be disabled completely (no by default) + hide_info = yes/no # If set to yes, only the portrait will be shown, with no identifiable elements (no CoA, tooltips, clicks...) (no by default) } - + # Specify an artifact to appear in the event on the specified position artifact = { target = event target position = lower_left_portrait/lower_center_portrait/lower_right_portrait - # Can't be in the same position as a portrait - trigger = ... # Optional, as for character portraits + # Cannot share the same position as a portrait + trigger = ... # Optional, as for portraits } - # This will be run if a queued event (or one triggered immediately from script) does not fulfil its trigger - # Events failing to trigger from an on-action will *not* run this + # Letter events should define an opening text + opening = my_letter_opening # Localization key or dynamic desc block + + # Court events may define court scene behavior + court_scene = { + button_position_character = scope:a_character + court_owner = scope:a_character + court_event_force_open = yes/no + show_timeout_info = yes/no + should_pause_time = yes/no + roles = { + scope:a_character = { + role = some_court_scene_role # or group = some_court_scene_group + animation = some_animation + scripted_animation = some_scripted_animation + } + } + } + + # Runs if a queued/instant event fails trigger checks. + # Events selected from on_actions are filtered by validity before queuing, so this is typically not run for that path. on_trigger_fail = { some effect } - # Specify custom widgets to embed in the event. See section about Custom Widgets below. + # Specify custom widgets to embed in the event. See Custom Widgets below. widgets = { widget = { - # Trigger that controls the availability of the widget. Scope: same as the event, after immediate effect. Default: always = yes + # Scope: event scope after immediate effect. Default: always = yes is_shown = {} - # Name of the widget to use. Must be at the path /.gui + # Widget file at /.gui gui = "" - # Name of the widget where this custome widget will be insert + # Parent container widget name in the event window container = "" - # Some widgets require a custom controller (see below). Default: default + + # Controller syntax: + # Simple form: controller = - # Effect to set up the scope as required by the controller. Scope: same as the event, after immediate effect, doesn't modify the event scope, though. Default: {} + # Structured form (used by some controllers, e.g. text): + # controller = { + # type = + # data = { ... } + # } + + # Optional scope setup effect for controller expectations setup_scope = {} } } - widget = { ... } # alternative syntax for a single widget. Follows the same info as the widget in the widgets parameter - + widget = { ... } # alternative syntax for one widget + option = { # An option the player/AI can pick - # Localization key for the event option button text - name = X - - # The effects that will be run when picking the options. Written directly here with no label + # Localization key or dynamic name block + name = X # Dynamic Description syntax, see bottom of document + + # Effects run when this option is picked (inline, no label) X.. - # A trigger that has to be fulfilled for this option to be valid. + # Trigger required for option to be valid trigger = {} - # If the event is invalid, but this trigger is valid, then the option will be shown (but disabled). + # If the option is invalid, but this trigger is valid, then the option will be shown (but disabled). # This behavior is also influenced by the EVENT_OPTIONS_SHOWN_HIDE_UNAVAILABLE or SCHEME_PREPARATION_OPTIONS_SHOWN_HIDE_UNAVAILABLE defines depending on event type. show_as_unavailable = {} @@ -113,9 +171,19 @@ event_namespace.42 = { highlight_portrait = scope:a_character reason = # Special reason for why this option is unlocked, can be any arbitrary string, is be checked in the UI to show special by reason + skill = diplomacy/martial/stewardship/intrigue/learning/prowess # Marks this option as skill-relevant in unlock reason UI (if shown); you still have to specify the skill and level in the trigger to unlock it + trait = some_trait # Marks this option as trait-relevant in unlock reason UI (if shown); you still have to specify the trait in the trigger to unlock it - # Parameters to impact the way ai-characters pick options to resolve their events - # We have 2 mutually exclusive parameters; ai_chance, and ai_will_select where the only difference is the syntax for calculating the value + # Misc option behavior + show_unlock_reason = yes/no # Controls whether unlock reason UI is shown for this option + is_cancel_option = yes/no # Marks this option as a cancel/back-out style option (used by some widgets/controllers) + clicksound = "sound_event" # Sound to play when selecting this option + fallback = yes/no # If no regular options are valid, fallback options are considered + exclusive = yes/no # If any exclusive option is valid, non-exclusive options are ignored + + # Parameters to impact the way ai-characters pick options to resolve their events. + # We have 2 mutually exclusive parameters; ai_chance, and ai_will_select where the only difference is the syntax for calculating the value. + # In practice if both are present, ai_will_select is used. ai_chance = { # See common/scripted_modifiers/_scripted_modifiers.info for more details base = 10 modifier = { @@ -145,20 +213,20 @@ event_namespace.42 = { } } - theme = "" # Theme to use in the event. For a list, check: 00_event_themes.txt - override_background = { # A background that can be shown when the event pops up. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones inthe theme will be checked after. + theme = "" # Theme to use in the event. For a list, check: 00_event_themes.txt + override_background = { # A background that can be shown when the event pops up. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones in the theme will be checked after. trigger = {} # Receives the event scope to check if it's valid. reference = "" # Path to the texture } - override_transition = { # A transition that can be shown when the event pops up, before the event options and backgrounds. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones inthe theme will be checked after. + override_transition = { # A transition that can be shown when the event pops up, before the event options and backgrounds. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones in the theme will be checked after. trigger = {} # Receives the event scope to check if it's valid. reference = "" # Path to the texture } - override_effect_2d = { # A 2d effect that can be put on top of the background. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones inthe theme will be checked after. + override_effect_2d = { # A 2d effect that can be put on top of the background. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones in the theme will be checked after. trigger = {} # Receives the event scope to check if it's valid. reference = "" # key to the effect } - override_icon = { # An icon that can be shown when the event pops up. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones inthe theme will be checked after. + override_icon = { # An icon that can be shown when the event pops up. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones in the theme will be checked after. trigger = {} # Receives the event scope to check if it's valid. reference = "" # Path to the texture } @@ -166,10 +234,11 @@ event_namespace.42 = { trigger = {} reference = "" } - override_sound = { # A sound that can be played when the event pops up. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones inthe theme will be checked after. + override_sound = { # A sound that can be played when the event pops up. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones in the theme will be checked after. trigger = {} # Receives the event scope to check if it's valid. reference = "" # Reference of the sound } + orphan = yes # The game will not log an error about this event being unreferenced. Useful for debug events } @@ -189,7 +258,139 @@ Controller Type | Data Context Name | Notes ------------------------+----------------------------------------+------------------------------------------------------------------------------------------------------------- default | EventWindowWidget | Default controller, no special behavior name_character | EventWindowWidgetNameCharacter | Changes a character's name. Scope must have the name_character_target saved scope. -text | EventWindowWidgetEnterText | Saves some text onto the character. +text | EventWindowWidgetEnterText | Saves some text onto the character. May use controller = { type = text data = { ... } } and setup_scope for text_target. event_chain_progress | EventWindowWidgetChainProgress | Displays progress through an event chain, needs event_chain_length and event_chain_progress scope values set struggle_info | EventWindowCustomWidgetStruggleInfo | Displays information for the struggle, needs "start" scope value set situation_info | EventWindowCustomWidgetSituationInfo | Displays information for the situation + +=== Dynamic Description Appendix === + +Dynamic descriptions are supported by event `title`, `desc`, `opening`, and option `name` (with special notes for option names below). +They resolve localization keys at runtime using current event scopes. + +High-level behavior: +- A plain localization key is valid: + - `desc = my_event.desc` +- A block is also valid: + - `desc = { ... }` +- In blocks, entries are evaluated in script order. +- Each selected piece is appended to the final text with automatic spacing between pieces. +- Missing localization keys are logged as errors. + +Core block members (CDynamicDescription): + +1) `desc` +- Appends text to output. +- Accepts either a key or another nested dynamic description block. + +Example: + desc = { + desc = my_event.intro + desc = my_event.outro + } + +2) `triggered_desc` +- Conditional description node. +- Body may only contain: + - `trigger = { ... }` (optional; if omitted, always valid) + - `desc = ` or `desc = { ... }` +- If trigger passes, its `desc` content is appended. + +Example: + triggered_desc = { + trigger = { has_trait = brave } + desc = my_event.brave_line + } + +3) `first_valid` +- Checks child entries in order. +- Uses only the first child whose validity is true. +- Typical fallback pattern is placing a plain `desc = some_fallback_key` last. + +Example: + first_valid = { + triggered_desc = { + trigger = { has_trait = brave } + desc = my_event.brave + } + triggered_desc = { + trigger = { has_trait = craven } + desc = my_event.craven + } + desc = my_event.fallback + } + +4) `random_valid` +- Collects all valid children, then picks random entries from that set. +- Default picks: `count = 1` +- Optional: `count = N` picks up to N unique valid children (no replacement). +- If fewer than N are valid, all valid children are used. +- Chosen entries are appended by the random order. + +Example: + random_valid = { + count = 2 + desc = my_event.random_a + triggered_desc = { + trigger = { has_trait = patient } + desc = my_event.random_b + } + desc = my_event.random_c + } + +5) `switch` +- Value-based branching for description selection. +- Structure: + - `trigger = ` + - ` = ` + - `fallback = ` (optional) +- First matching case is used. +- If no case matches and no `fallback` exists, nothing is appended. +- Case values are written as keys/tokens that match what the switch trigger returns. + +Example: + switch = { + trigger = scope:rite_memory.var:rites_of_passage_type + flag:dueling_rite_memory = { desc = bp2_yearly.7029.desc_duel } + flag:scarification_rite_memory = { desc = bp2_yearly.7029.desc_scarification } + fallback = { desc = bp2_yearly.7029.desc } + } + +Composition and nesting: +- Nodes can be nested arbitrarily (`desc` in `desc`, `first_valid` inside `random_valid`, etc.). + +Option name specifics: +- Option names support two forms: + - `name = my_option_text_key` + - `name = { text = trigger = { ... } }` +- `trigger` inside `name = { ... }` gates whether that name candidate is available. +- Multiple `name = { ... }` blocks are allowed per option. + - If more than one candidate is valid, one valid candidate is chosen randomly. + - If none are valid, first defined candidate is used as fallback. +- Important limitation: name candidates are separate sibling `name` entries; you cannot nest multiple `name` nodes inside one `name` block. + +Known-good vanilla patterns to copy: +- Multi-chunk nested assembly with `random_valid`, `first_valid`, and `triggered_desc`: + - `game/events/board_game_events.txt` (e.g. event `board_games.0041`) + - `game/events/relations_events/adultery_events.txt` (e.g. event `adultery.4001`) +- Standard fallback chain in `first_valid`: + - `game/events/relations_events/adultery_events.txt` (e.g. event `adultery.1006`) +- Letter `opening` using dynamic desc block: + - `game/events/interaction_events/marriage_interaction_events.txt` (e.g. event `marriage_interaction.0001`) +- Dynamic description `switch`: + - `game/events/dlc/bp2/bp2_yearly_7.txt` (e.g. event `bp2_yearly.7029`) + +Practical authoring checklist: +- Always include a safe fallback path (`desc` fallback in `first_valid`, or `fallback` in `switch`). +- Keep localization keys flat and explicit; nesting controls selection, loc does the prose. +- When building long descriptions, split into semantic chunks and compose with nested blocks. +- Prefer `first_valid` for deterministic branching and `random_valid` for variation. +- For option names, prefer multiple gated `name` entries over overly complex single-entry nesting. + +COMMON GOTCHA WHEN BUILDING DYNAMIC DESCRIPTIONS, FOR INTERNAL DESIGNERS: If you're building a complex loc string that includes dialogue, it's common to end up with keys that contains an odd number of citation marks. In these cases you may need to escape the odd citation marks using double-backslash to pass the sanity checking git hook before you commit your work. E.g.: + +my_cool_event_desc.intro: "The guy says, \\"Hey " +my_cool_event_desc.intro.friend: "friend" +my_cool_event_desc.intro.buddy: "buddy" +my_cool_event_desc.intro.idiot: "idiot" +my_cool_event_desc.intro.outro: ", watch where you're going!\\" I pay him no mind and continue on my way." diff --git a/events/accolade_events.txt b/events/accolade_events.txt index 15147b76..932ddfc1 100644 --- a/events/accolade_events.txt +++ b/events/accolade_events.txt @@ -150,742 +150,3 @@ accolade.0002 = { } } } - -#Accolade becomes idle -# by Jason Cantalini -accolade.0003 = { - hidden = yes - - trigger = { - has_dlc_feature = accolades - } - - immediate = { - send_interface_toast = { - type = msg_accolade_active - title = accolade.0003.accolade_becomes_idle.tt - custom_tooltip = accolade.0003.accolade_becomes_idle_effects.tt - } - } -} - -#Accolade succession with unchanged types -# by Jason Cantalini -accolade.0004 = { - hidden = yes - - trigger = { - has_dlc_feature = accolades - } - - immediate = { - send_interface_toast = { - type = msg_accolade_succession - title = accolade.0004.new_acclaimed_knight.tt - left_icon = scope:new_acclaimed_knight - custom_tooltip = accolade.0004.new_acclaimed_knight_name.tt - custom_tooltip = accolade.glory_loss.tt - } - } -} - -#Accolade succession with new secondary type -# by Jason Cantalini -accolade.0005 = { - hidden = yes - - trigger = { - has_dlc_feature = accolades - } - - immediate = { - send_interface_toast = { - type = msg_accolade_succession_toast - title = accolade.0005.new_acclaimed_knight_new_type.tt - left_icon = scope:new_acclaimed_knight - custom_tooltip = accolade.0005.new_accolade_type.tt - custom_tooltip = accolade.0005.new_acclaimed_knight_succeeds.tt - custom_tooltip = accolade.glory_loss.tt - } - } -} - -#Find Accolade Successor knight creation event -accolade.0006 = { - hidden = yes - - trigger = { - exists = scope:accolade_in_need - exists = root.capital_province - highest_held_title_tier >= tier_county - NOT = { government_has_flag = government_is_theocracy } - } - - immediate = { - # try to find a pool character first - every_courtier_or_guest = { - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - is_healthy = yes - save_temporary_scope_as = temp_knight - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = scope:temp_knight - } - } - add_to_list = potential_knights - } - every_pool_character = { - province = root.capital_province - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - is_healthy = yes - save_temporary_scope_as = temp_knight - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = scope:temp_knight - } - } - add_to_list = potential_knights - } - random_in_list = { - list = potential_knights - save_scope_as = chosen_knight - } - - # create a character if needed - if = { - limit = { - NOT = { exists = scope:chosen_knight } - } - #if = { # Balance testing variables - # limit = { - # NOT = { - # exists = global_var:accolade_fail - # } - # } - # set_global_variable = { - # name = accolade_fail - # value = 1 - # } - #} - #else = { - # change_global_variable = { - # name = accolade_fail - # add = 1 - # } - #} - accolade_character_creation_effect = yes - } - #else = { # Balance testing variables - # if = { - # limit = { - # NOT = { - # exists = global_var:accolade_success - # } - # } - # set_global_variable = { - # name = accolade_success - # value = 1 - # } - # } - # else = { - # change_global_variable = { - # name = accolade_success - # add = 1 - # } - # } - #} - - if = { - limit = { - exists = scope:chosen_knight - } - if = { - limit = { - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = scope:chosen_knight - } - # make sure the chosen knight is not already a courtier - scope:chosen_knight ?= { - NOT = { is_courtier_of = root } - } - } - add_courtier = scope:chosen_knight - } - - trigger_event = { - id = accolade.0007 - days = 1 - } - } - - } -} - -#Find Accolade Successor join event -accolade.0007 = { - hidden = yes - - immediate = { - if = { - limit = { - exists = scope:accolade_in_need - exists = scope:chosen_knight - exists = root.capital_province - highest_held_title_tier >= tier_county - NOT = { government_has_flag = government_is_theocracy } - } - - #SEND A TOAST NOTIFICATION - send_interface_toast = { - type = event_toast_effect_neutral - title = accolade.0007.notification - left_icon = scope:chosen_knight - custom_tooltip = accolade_call_acclaimed_knight_tooltip - hidden_effect = { - scope:chosen_knight = { - if = { - limit = { - NOT = { is_knight_of = root } - } - } - } - } - } - } - else = { - send_interface_message = { - type = event_accolade_bad_text - title = accolade.0007.notification_fail - desc = accolade_find_successor_fail_notification_tooltip - } - } - } -} - -#Call Acclaimed Knight first knight -accolade.0008 = { - hidden = yes - - trigger = { - exists = scope:empty_accolade_1 - exists = root.capital_province - highest_held_title_tier >= tier_county - NOT = { government_has_flag = government_is_theocracy } - } - - immediate = { - # try to find a pool character first - scope:empty_accolade_1 = { - save_scope_as = accolade_in_need - } - every_courtier_or_guest = { - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_healthy = yes - } - add_to_list = potential_knights - } - every_pool_character = { - province = root.capital_province - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_healthy = yes - } - add_to_list = potential_knights - } - random_in_list = { - list = potential_knights - save_scope_as = chosen_knight - } - - # create a character if needed - if = { - limit = { - NOT = { exists = scope:chosen_knight } - } - accolade_character_creation_effect = yes - } - - if = { - limit = { - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = scope:chosen_knight - } - } - add_courtier = scope:chosen_knight - } - - trigger_event = { - id = accolade.0013 - days = 1 - } - } -} - -#Call Acclaimed Knight second knight -accolade.0009 = { - hidden = yes - - trigger = { - exists = scope:empty_accolade_2 - exists = root.capital_province - highest_held_title_tier >= tier_county - NOT = { government_has_flag = government_is_theocracy } - } - - immediate = { - # try to find a pool character first - scope:empty_accolade_2 = { - save_scope_as = accolade_in_need - } - every_courtier_or_guest = { - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_clergy = no - is_healthy = yes - } - add_to_list = potential_knights - } - every_pool_character = { - province = root.capital_province - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_clergy = no - is_healthy = yes - } - add_to_list = potential_knights - } - random_in_list = { - list = potential_knights - save_scope_as = chosen_knight - } - - # create a character if needed - if = { - limit = { - NOT = { exists = scope:chosen_knight } - } - accolade_character_creation_effect = yes - } - - if = { - limit = { - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = scope:chosen_knight - } - } - add_courtier = scope:chosen_knight - } - trigger_event = { - id = accolade.0013 - days = 1 - } - } -} - -#Call Acclaimed Knight third knight -accolade.0010 = { - hidden = yes - - trigger = { - exists = scope:empty_accolade_3 - exists = root.capital_province - highest_held_title_tier >= tier_county - NOT = { government_has_flag = government_is_theocracy } - } - - immediate = { - # try to find a pool character first - scope:empty_accolade_3 = { - save_scope_as = accolade_in_need - } - every_courtier_or_guest = { - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_healthy = yes - } - add_to_list = potential_knights - } - every_pool_character = { - province = root.capital_province - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_healthy = yes - } - add_to_list = potential_knights - } - random_in_list = { - list = potential_knights - save_scope_as = chosen_knight - } - - # create a character if needed - if = { - limit = { - NOT = { exists = scope:chosen_knight } - } - accolade_character_creation_effect = yes - } - - if = { - limit = { - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = scope:chosen_knight - } - } - add_courtier = scope:chosen_knight - } - trigger_event = { - id = accolade.0013 - days = 1 - } - } -} - -#Call Acclaimed Knight fourth knight -accolade.0011 = { - hidden = yes - - trigger = { - exists = scope:empty_accolade_4 - exists = root.capital_province - highest_held_title_tier >= tier_county - NOT = { government_has_flag = government_is_theocracy } - } - - immediate = { - # try to find a pool character first - scope:empty_accolade_4 = { - save_scope_as = accolade_in_need - } - every_courtier_or_guest = { - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_healthy = yes - } - add_to_list = potential_knights - } - every_pool_character = { - province = root.capital_province - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_healthy = yes - } - add_to_list = potential_knights - } - random_in_list = { - list = potential_knights - save_scope_as = chosen_knight - } - - # create a character if needed - if = { - limit = { - NOT = { exists = scope:chosen_knight } - } - accolade_character_creation_effect = yes - } - - - if = { - limit = { - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = scope:chosen_knight - } - } - add_courtier = scope:chosen_knight - } - trigger_event = { - id = accolade.0013 - days = 1 - } - } -} - -#Call Acclaimed Knight fifth knight -accolade.0012 = { - hidden = yes - - trigger = { - exists = scope:empty_accolade_5 - exists = root.capital_province - highest_held_title_tier >= tier_county - NOT = { government_has_flag = government_is_theocracy } - } - - immediate = { - # try to find a pool character first - scope:empty_accolade_5 = { - save_scope_as = accolade_in_need - } - every_courtier_or_guest = { - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_healthy = yes - } - add_to_list = potential_knights - } - every_pool_character = { - province = root.capital_province - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_healthy = yes - } - add_to_list = potential_knights - } - random_in_list = { - list = potential_knights - save_scope_as = chosen_knight - } - - # create a character if needed - if = { - limit = { - NOT = { exists = scope:chosen_knight } - } - accolade_character_creation_effect = yes - } - - - if = { - limit = { - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = scope:chosen_knight - } - } - add_courtier = scope:chosen_knight - } - trigger_event = { - id = accolade.0013 - days = 1 - } - } -} - -#Call Accolade Knight join event -accolade.0013 = { - hidden = yes - - immediate = { - if = { - limit = { - exists = scope:accolade_in_need - exists = scope:chosen_knight - exists = root.capital_province - highest_held_title_tier >= tier_county - NOR = { - government_has_flag = government_is_theocracy - has_character_flag = had_accolade_successor_notification - } - } - - #SEND A TOAST NOTIFICATION - send_interface_toast = { - type = event_toast_effect_neutral - title = accolade.0013.notification - left_icon = scope:chosen_knight - custom_tooltip = accolade_call_acclaimed_knight_tooltip - hidden_effect = { - scope:chosen_knight = { - if = { - limit = { - NOT = { is_knight_of = root } - } - set_knight_status = force - } - } - } - } - add_character_flag = { - flag = had_accolade_successor_notification - months = 6 - } - } - else_if = { - limit = { - exists = scope:accolade_in_need - exists = scope:chosen_knight - exists = root.capital_province - highest_held_title_tier >= tier_county - NOT = { government_has_flag = government_is_theocracy } - } - - #SEND A FEED NOTIFICATION FOR NEXT KNIGHTS - send_interface_message = { - type = event_accolade_good_with_text - title = accolade.0013.notification - desc = accolade_call_acclaimed_knight_tooltip - left_icon = scope:chosen_knight - scope:chosen_knight = { - if = { - limit = { - NOT = { is_knight_of = root } - } - set_knight_status = force - } - } - } - } - else = { - send_interface_message = { - type = event_accolade_bad_text - title = accolade.0013.notification_fail - desc = accolade_call_acclaimed_knight_fail_notification_tooltip - } - } - } -} diff --git a/events/activities/coronation_activity/coronation_events.txt b/events/activities/coronation_activity/coronation_events.txt index 7fc0bc96..cefe69f2 100644 --- a/events/activities/coronation_activity/coronation_events.txt +++ b/events/activities/coronation_activity/coronation_events.txt @@ -891,8 +891,6 @@ coronation_events.0100 = { trigger_event = coronation_events.0110 } } - # Cleanup of variable checks - remove_variable = learning_oath_1_university_exists if = { limit = { @@ -1071,7 +1069,30 @@ coronation_events.0110 = { } # Other - desc = coronation_events.0110.desc.fallback + triggered_desc = { + trigger = { + scope:host = { + ai_compassion >= low_positive_ai_value + } + } + desc = coronation_events.0110.desc.fallback_compassionate + } + triggered_desc = { + trigger = { + scope:host = { + ai_honor > low_positive_ai_value + } + } + desc = coronation_events.0110.desc.fallback_honorable + } + triggered_desc = { + trigger = { + scope:host = { + ai_energy < low_negative_ai_value + } + } + desc = coronation_events.0110.desc.fallback_feckless + } } desc = coronation_events.0110.desc.outro } @@ -1410,54 +1431,89 @@ coronation_events.0175 = { trigger = scope:find_oath flag:diplomacy_oath_1 = { coronation_oath_reward_effect = { VARIABLE = diplomacy_oath_1 } + add_character_modifier = oath_of_alliances } flag:diplomacy_oath_2 = { coronation_oath_reward_effect = { VARIABLE = diplomacy_oath_2 } + add_character_modifier = oath_of_children } flag:martial_oath_1 = { coronation_oath_reward_effect = { VARIABLE = martial_oath_1 } + add_character_modifier = oath_of_reconquest } flag:martial_oath_2 = { coronation_oath_reward_effect = { VARIABLE = martial_oath_2 } + add_character_modifier = oath_of_conquest } flag:stewardship_oath_1 = { coronation_oath_reward_effect = { VARIABLE = stewardship_oath_1 } + add_character_modifier = oath_of_peace } flag:stewardship_oath_2 = { coronation_oath_reward_effect = { VARIABLE = stewardship_oath_2 } + add_character_modifier = oath_of_buildings } flag:learning_oath_1 = { coronation_oath_reward_effect = { VARIABLE = learning_oath_1 } } flag:purge_pretenders_oath = { coronation_oath_reward_effect = { VARIABLE = purge_pretenders_oath } + add_character_modifier = oath_of_purge_pretenders + if = { + limit = { + government_has_flag = government_is_administrative + } + house ?= { + add_house_modifier = oath_of_purge_pretenders_house + } + } } flag:end_the_struggle_oath = { coronation_oath_reward_effect = { VARIABLE = end_the_struggle_oath } + add_character_modifier = oath_of_end_the_struggle } flag:greatest_hunter_oath = { coronation_oath_reward_effect = { VARIABLE = greatest_hunter_oath } + add_character_modifier = oath_greatest_hunter } flag:heir_preparation_oath = { coronation_oath_reward_effect = { VARIABLE = heir_preparation_oath } + add_character_modifier = oath_heir_preparation + + primary_heir ?= { + add_character_modifier = oath_heir_preparation_heir + } } flag:install_claimants_oath = { coronation_oath_reward_effect = { VARIABLE = install_claimants_oath } + add_character_modifier = oath_install_claimants } flag:mend_the_fracture_oath = { coronation_oath_reward_effect = { VARIABLE = mend_the_fracture_oath } + add_character_modifier = oath_mend_the_fracture + + culture = { + add_culture_tradition = oath_mend_the_fracture_tradition + } + var:mend_the_fracture_oath_target_culture = { + add_culture_tradition = oath_mend_the_fracture_tradition + } } flag:provide_for_the_warriors_oath = { coronation_oath_reward_effect = { VARIABLE = provide_for_the_warriors_oath } + add_character_modifier = oath_provide_for_the_warriors } flag:provide_for_the_faithful_oath = { coronation_oath_reward_effect = { VARIABLE = provide_for_the_faithful_oath } + add_character_modifier = oath_provide_for_the_faithful } flag:provide_for_the_poor_oath = { coronation_oath_reward_effect = { VARIABLE = provide_for_the_poor_oath } + add_character_modifier = oath_provide_for_the_poor } flag:repent_oath = { coronation_oath_reward_effect = { VARIABLE = repent_oath } + add_character_modifier = oath_repent } } } @@ -2110,6 +2166,7 @@ coronation_events.0205 = { geographical_region = graphical_india culture ?= { has_building_gfx = iranian_building_gfx } culture ?= { has_building_gfx = indian_building_gfx } + culture ?= { has_building_gfx = tibetan_building_gfx } AND = { geographical_region = world_europe_west_iberia faith ?= { religion = religion:islam_religion } @@ -2175,6 +2232,7 @@ coronation_events.0205 = { save_scope_as = value_target } activity_location = { save_scope_as = location } + activity_host = { save_scope_as = bg_override_char } #Guards for orderly east asian ceremonies in the palace if = { limit = { @@ -5019,19 +5077,19 @@ coronation_events.0312 = { #Guest ending event trigger = { exists = scope:high_magnificence } - desc = coronation_events.0310.desc.high_magnificence + desc = coronation_events.0312.desc.high_magnificence } triggered_desc = { trigger = { exists = scope:mid_magnificence } - desc = coronation_events.0310.desc.mid_magnificence + desc = coronation_events.0312.desc.mid_magnificence } triggered_desc = { trigger = { exists = scope:low_magnificence } - desc = coronation_events.0310.desc.low_magnificence + desc = coronation_events.0312.desc.low_magnificence } } } @@ -5170,3 +5228,30 @@ coronation_events.0400 = { # HoF supports anointment } } } + +#Invalidated from host's primary title change +coronation_events.0401 = { + type = letter_event + opening = { + desc = coronation_events.0401.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + highest_held_title_tier >= tier_kingdom + } + } + desc = coronation_events.0401.desc + } + desc = coronation_events.0401.desc_title_loss + } + } + + sender = scope:host + + option = { + name = coronation_events.0401.a + } +} diff --git a/events/activities/coronation_activity/coronation_events_1.txt b/events/activities/coronation_activity/coronation_events_1.txt index 431b2343..4eb49728 100644 --- a/events/activities/coronation_activity/coronation_events_1.txt +++ b/events/activities/coronation_activity/coronation_events_1.txt @@ -618,18 +618,15 @@ coronation_events.1004 = { } } save_scope_as = confidant + random_secret = { + limit = { + is_known_by = root + } + save_scope_as = secret_to_reveal + } } } - random_known_secret = { - limit = { - secret_owner = scope:confidant - is_known_by = root - } - - save_scope_as = secret_to_reveal - } - create_character = { template = intrigue_court_position_holder_template location = root.location @@ -1925,22 +1922,30 @@ coronation_events.1013 = { coronation_busy_effect = yes scope:activity.activity_host ?= { save_scope_as = host } - add_character_flag = { - flag = poor_activity_option_accident - years = 5 - } - + if = { limit = { - this = scope:host + scope:activity = { + has_activity_type = activity_coronation + } } - custom_tooltip = coronation_tt_negative - scope:activity = { activity_special_type_progression_negative = yes } - coronation_add_magnificence_log_effect = { - VALUE = flag:negative - CHAR = root + add_character_flag = { + flag = poor_activity_option_accident + years = 5 } + if = { + limit = { + this = scope:host + } + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + + } } if = { limit = { @@ -2026,12 +2031,7 @@ coronation_events.1013 = { } } - if = { - limit = { - has_activity_intent = coronation_weaken_detractors - } - coronation_weaken_detractors_opinion_effect = yes - } + coronation_weaken_detractors_opinion_effect = yes stress_impact = { base = medium_stress_impact_loss @@ -2129,6 +2129,9 @@ coronation_events.1013 = { } if = { limit = { + scope:activity = { + has_activity_type = activity_coronation + } OR = { is_ai = no this = scope:activity.activity_host @@ -2200,6 +2203,9 @@ coronation_events.1013 = { add_prestige = minor_prestige_gain if = { limit = { + scope:activity = { + has_activity_type = activity_coronation + } OR = { is_ai = no this = scope:activity.activity_host @@ -2324,6 +2330,17 @@ coronation_events.1014 = { cooldown = { years = 5 } trigger = { + scope:activity = { + any_attending_character = { + is_ai = yes + is_adult = yes + NOR = { + this = root + this = scope:host + involved_activity.var:officiator ?= this + } + } + } trigger_if = { limit = { scope:activity = { @@ -2377,37 +2394,18 @@ coronation_events.1014 = { } } - if = { - limit = { - is_ai = yes - } - scope:activity = { - random_attending_character = { - limit = { - is_ai = yes - is_adult = yes - NOT = { - this = root - this = scope:host - involved_activity.var:officiator ?= this - } + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOT = { + this = root + this = scope:host + involved_activity.var:officiator ?= this } - save_scope_as = guest - } - } - } - else = { - scope:activity = { - random_attending_character = { - limit = { - is_ai = yes - is_adult = yes - NOT = { - this = root - } - } - save_scope_as = guest } + save_scope_as = guest } } } @@ -2492,8 +2490,8 @@ coronation_events.1014 = { activity_special_type_progression_tiny = yes every_attending_character = { limit = { - NOR = { this = scope:host } - this = root + this != scope:host + this != root } custom = custom.every_attending_character add_opinion = { @@ -2507,7 +2505,10 @@ coronation_events.1014 = { else = { scope:activity = { every_attending_character = { - limit = { NOT = { this = scope:host } } + limit = { + this != scope:host + this != root + } custom = custom.every_attending_character add_opinion = { target = root @@ -4773,6 +4774,9 @@ coronation_events.1022 = { } any_memory = { has_memory_category = positive + NOT = { + has_memory_type = had_sex + } has_memory_participant = root } } @@ -4801,6 +4805,9 @@ coronation_events.1022 = { } any_memory = { has_memory_category = positive + NOT = { + has_memory_type = had_sex + } has_memory_participant = root } is_ai = yes @@ -6359,7 +6366,21 @@ coronation_events.1026 = { } add_prestige = medium_prestige_gain - add_legitimacy = minor_legitimacy_gain + if = { + limit = { + has_legitimacy = yes + } + add_legitimacy = minor_legitimacy_gain + } + else_if = { + limit = { + government_has_flag = government_has_merit + } + change_merit = medium_merit_gain + } + else = { + add_prestige = minor_prestige_gain + } scope:activity = { every_attending_character = { @@ -7577,7 +7598,7 @@ coronation_events.1028 = { name = coronation_events.1028.b # Politely decline alternative blessings trigger = { - NOT = { + NOR = { has_trait = zealous has_trait = cynical } @@ -7614,96 +7635,6 @@ coronation_events.1028 = { } } - option = { - name = coronation_events.1028.c # Publicly rebuke the request - add_piety = major_piety_gain - scope:clergy_representative = { - add_opinion = { - target = root - modifier = insulted_opinion - opinion = -25 - } - } - if = { - limit = { - scope:clergy_representative = { is_courtier_of = root } - } - remove_courtier_or_guest = scope:clergy_representative - } - - scope:activity = { - every_attending_character = { - limit = { - NOR = { - this = scope:clergy_representative - this = root - } - has_trait = zealous - faith = root.faith - } - custom = coronation_events.1028.c.tt - add_opinion = { - target = root - modifier = pious_opinion - opinion = 20 - } - } - } - random = { - chance = { - value = 10 - if = { - limit = { - scope:clergy_representative.faith = { - faith_hostility_level = { - target = root.faith - value >= faith_astray_level - } - } - } - add = 10 - } - else_if = { - limit = { - scope:clergy_representative.faith = { - faith_hostility_level = { - target = root.faith - value >= faith_hostile_level - } - } - } - add = 20 - } - else_if = { - limit = { - scope:clergy_representative.faith = { - faith_hostility_level = { - target = root.faith - value >= faith_evil_level - } - } - } - add = 30 - } - } - add_trait = holy_warrior - } - - stress_impact = { - zealous = minor_stress_impact_loss - cynical = major_stress_impact_gain - compassionate = minor_stress_impact_gain - } - - ai_chance = { - base = 30 - ai_value_modifier = { - ai_zeal = high_chance_impact_positive_ai_value - ai_sociability = high_chance_impact_negative_ai_value - } - } - } - option = { name = coronation_events.1028.d # Evade the question entirely if = { @@ -7949,8 +7880,6 @@ coronation_events.1029 = { diplomacy < medium_skill_rating } - skill = diplomacy - custom_tooltip = coronation_tt_positive_tiny scope:activity = { activity_special_type_progression_tiny = yes @@ -8519,6 +8448,7 @@ coronation_events.1031 = { is_in_guest_subset = { name = detractor } has_trait = compassionate } + this != root } custom = every_attending_detractor_or_compassionate add_opinion = { @@ -9448,6 +9378,10 @@ coronation_events.1034 = { add_diplomacy_lifestyle_xp = minor_lifestyle_xp + add_merit_if_relevant_effect = { + MERIT = minor_merit_value + } + add_opinion = { target = scope:host modifier = respect_opinion @@ -10127,10 +10061,8 @@ coronation_events.1037 = { } # Ongoing plague any_sub_realm_county = { - any_county_province = { - any_province_epidemic = { - outbreak_intensity > minor - } + any_county_province_epidemic = { + outbreak_intensity > minor } } } @@ -10285,6 +10217,19 @@ coronation_events.1037 = { add_learning_lifestyle_xp = minor_lifestyle_xp } + if = { + limit = { + scope:respected_elder = { + num_of_relation_disciple < disciples_limit_value + } + } + set_elder_relation_effect = { + ELDER = scope:respected_elder + DISCIPLE = root + MERIT = minor_merit_gain + } + } + stress_impact = { zealous = minor_stress_impact_loss temperate = minor_stress_impact_loss @@ -10381,3 +10326,794 @@ coronation_events.1037 = { coronation_ready_effect = yes } } + +coronation_events.1038 = { + type = activity_event + title = coronation_events.1038.t + desc = coronation_events.1038.desc + theme = coronation_activity + cooldown = { years = 10 } + + override_background = { + reference = temple + } + + override_effect_2d = { + reference = smoke + } + + left_portrait = { + character = root + animation = emperor + camera = camera_event_center_pointing_right + } + + right_portrait = { + character = scope:rite_official + animation = hunting_knife_start + camera = camera_event_very_left + } + + trigger = { + has_title = title:h_china + scope:activity = { + any_attending_character = { + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + is_ai = yes + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + scope:activity = { + random_attending_character = { + limit = { + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + is_ai = yes + } + save_scope_as = rite_official + } + } + scope:rite_official = { + random_secret ?= { + limit = { + is_known_by = root + } + save_scope_as = secret + } + } + } + + option = { + name = coronation_events.1038.e # Cite the rites and leave + flavor = coronation_events.1038.e.flavor + trigger = { + has_trait = confucian_education + } + + add_piety = minor_piety_gain + + add_trait_xp = { + trait = confucian_education + value = lifestyle_confucian_education_xp_gain_medium_value + } + + stress_impact = { + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + + ai_chance = { + base = 35 + modifier = { + add = 25 + has_trait = confucian_education + } + modifier = { + add = 25 + has_trait = zealous + } + modifier = { + add = -15 + has_trait = cynical + } + } + } + + option = { + name = coronation_events.1038.a # Destroy rite official + trigger = { + scope:rite_official = { + is_in_guest_subset = { name = detractor } + } + } + scope:rite_official = { + add_stress = major_stress_gain + change_merit = medium_merit_loss + add_opinion = { + modifier = contempt_opinion + target = root + opinion = -20 + } + } + + if = { + limit = { + has_activity_intent = coronation_weaken_detractors + } + coronation_weaken_detractors_opinion_effect = yes + } + + add_intrigue_lifestyle_xp = minor_lifestyle_xp + + stress_impact = { + compassionate = minor_stress_impact_gain + callous = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + } + + ai_chance = { + base = 40 + modifier = { + add = -20 + has_trait = compassionate + } + modifier = { + add = 10 + has_trait = callous + } + modifier = { + add = 10 + has_trait = arrogant + } + modifier = { + add = 20 + has_activity_intent = coronation_weaken_detractors + } + } + } + + option = { + name = coronation_events.1038.b # Bond with rite official + + trigger = { + scope:rite_official = { + is_in_guest_subset = { name = detractor } + } + } + + add_diplomacy_lifestyle_xp = minor_lifestyle_xp + + coronation_move_towards_supporter_effect = { CHARACTER = scope:rite_official } + if = { + limit = { + has_activity_intent = coronation_embrace_supporters + } + coronation_embrace_supporters_opinion_effect = yes + } + + stress_impact = { + gregarious = minor_stress_impact_loss + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 30 + modifier = { + add = 30 + has_trait = gregarious + } + modifier = { + add = -20 + has_trait = callous + } + } + } + + option = { + name = coronation_events.1038.c # Use the situation to improve the ceremony + + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + + if = { + limit = { + has_activity_intent = coronation_impress_attendees + } + coronation_impress_attendees_opinion_effect = yes + } + + stress_impact = { + diligent = minor_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 25 + modifier = { + add = 30 + has_trait = diligent + } + modifier = { + add = -20 + has_trait = lazy + } + } + + } + + option = { + name = coronation_events.1038.d # Make sure to mention your formidable house + + dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } + + if = { + limit = { + has_activity_intent = coronation_exalt_crown + } + coronation_exalt_crown_opinion_effect = yes + } + + stress_impact = { + diligent = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 20 + modifier = { + add = 20 + has_trait = vengeful + } + modifier = { + add = -15 + has_trait = forgiving + } + modifier = { + add = -10 + has_trait = just + } + } + } + after = { + # For MP + coronation_ready_effect = yes + } +} + +coronation_events.1039 = { + type = activity_event + title = coronation_events.1039.t + desc = coronation_events.1039.desc + theme = coronation_activity + cooldown = { years = 10 } + + override_background = { + reference = temple + } + + left_portrait = { + character = root + animation = personality_zealous + camera = camera_event_center_pointing_right + } + + center_portrait = { + character = scope:supporter + animation = prayer + camera = camera_event_very_left_fov35 + } + + trigger = { + government_is_japanese_trigger = yes + is_independent_ruler = yes + trigger_if = { + limit = { tgp_realm_has_ceremonial_liege_trigger = yes } + tgp_has_ceremonial_liege_title_trigger = yes + } + scope:activity = { + any_guest_subset = { + name = supporter + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + is_ai = yes + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + scope:activity = { + random_guest_subset = { + name = supporter + limit = { + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + is_ai = yes + } + save_scope_as = supporter + } + } + } + + option = { + name = coronation_events.1039.d # "Compose a poem on harmony." + flavor = coronation_events.1039.d.flavor + trigger = { + has_trait = lifestyle_poet + } + + save_scope_as = owner + custom_tooltip = coronation_events.1039.d.tt + hidden_effect_new_object = { + + get_artifact_quality_effect = yes + get_artifact_wealth_effect = yes + + scope:owner = { + create_artifact = { + name = coronation_events_1039_poem_name + creator = scope:owner + description = coronation_events_1039_poem_desc + visuals = scroll + type = miscellaneous + modifier = artifact_monthly_minor_prestige_1_modifier + modifier = artifact_attraction_opinion_1_modifier + save_scope_as = newly_created_artifact + wealth = scope:wealth + quality = scope:quality + } + } + + scope:newly_created_artifact = { + add_scaled_artifact_modifier_piety_effect = yes + add_scaled_artifact_modifier_majesty_effect = yes + } + } + + stress_impact = { + diligent = minor_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + modifier = { + add = 20 + has_trait = diligent + } + modifier = { + add = -15 + has_trait = lazy + } + } + } + + option = { + name = coronation_events.1039.a # "The good of the realm." + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + + if = { + limit = { + has_activity_intent = coronation_embrace_supporters + } + coronation_embrace_supporters_opinion_effect = yes + } + + stress_impact = { + just = minor_stress_impact_loss + callous = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + modifier = { + add = 20 + has_trait = just + } + modifier = { + add = -15 + has_trait = callous + } + modifier = { + add = -10 + has_trait = arrogant + } + } + } + + option = { + name = coronation_events.1039.b # "I will make a statement." + + custom_tooltip = coronation_tt_positive_medium + scope:activity = { activity_special_type_progression_medium = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 30 + modifier = { + add = -20 + has_trait = humble + } + modifier = { + add = 15 + has_trait = arrogant + } + } + } + + option = { + name = coronation_events.1039.c # "I will keep everything a secret." + add_intrigue_lifestyle_xp = major_lifestyle_xp + + stress_impact = { + deceitful = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 25 + modifier = { + add = 25 + has_trait = deceitful + } + modifier = { + add = -20 + has_trait = honest + } + modifier = { + add = 10 + has_trait = gregarious + } + } + } + after = { + # For MP + coronation_ready_effect = yes + } +} + +scripted_trigger coronation_events_1040_neighbor_trigger = { + highest_held_title_tier <= root.highest_held_title_tier + is_tributary = no + is_at_war = no + NOR = { + has_trait = conqueror + has_trait = greatest_of_khans + has_trait = ambitious + has_trait = arrogant + has_trait = paranoid + } + opinion = { + target = root + value > -20 + } +} + +coronation_events.1040 = { + type = activity_event + title = coronation_events.1040.t + desc = coronation_events.1040.desc + theme = coronation_activity + cooldown = { years = 10 } + + override_background = { + reference = throne_room + } + + left_portrait = { + character = root + animation = chaplain + camera = camera_event_center_pointing_right + } + + center_portrait = { + character = scope:tributary_1 + animation = debating + camera = camera_event_center_pointing_left + } + + right_portrait = { + character = scope:tributary_2 + animation = personality_zealous + } + + trigger = { + has_government = mandala_government + scope:activity = { + any_guest_subset = { + name = supporter + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + is_ai = yes + } + } + any_neighboring_top_liege_realm_owner = { + coronation_events_1040_neighbor_trigger = yes + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + every_neighboring_top_liege_realm_owner = { + limit = { + coronation_events_1040_neighbor_trigger = yes + } + add_to_list = potential_tributaries + } + random_in_list = { + list = potential_tributaries + save_scope_as = tributary_1 + } + + if = { + limit = { + any_in_list = { + list = potential_tributaries + count > 1 + } + } + random_in_list = { + list = potential_tributaries + limit = { + NOT = { this = scope:tributary_1 } + } + save_scope_as = tributary_2 + } + } + } + + option = { # Special — Reuse one you found earlier + name = coronation_events.1040.special + + trigger = { + learning >= high_skill_rating + } + + add_learning_lifestyle_xp = medium_lifestyle_xp + custom_tooltip = coronation_tt_positive_medium + scope:activity = { activity_special_type_progression_medium = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + + if = { + limit = { exists = scope:tributary_1 } + scope:tributary_1 = { + start_tributary_interaction_effect = { + TRIBUTARY = this + SUZERAIN = root + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + } + + if = { + limit = { exists = scope:tributary_2 } + scope:tributary_2 = { + start_tributary_interaction_effect = { + TRIBUTARY = this + SUZERAIN = root + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + } + + stress_impact = { + arrogant = medium_stress_impact_gain + greedy = minor_stress_impact_loss + humble = medium_stress_impact_loss + } + + ai_chance = { + base = 40 + modifier = { + add = 50 + learning >= high_skill_rating + } + modifier = { + add = 20 + has_trait = greedy + } + modifier = { + add = 20 + has_trait = humble + } + modifier = { + add = -10 + has_trait = arrogant + } + modifier = { + add = 10 + has_trait = diligent + } + } + } + + option = { # A — Spare no Expense + name = coronation_events.1040.a + + add_piety = massive_piety_loss + custom_tooltip = coronation_tt_positive_medium + scope:activity = { activity_special_type_progression_medium = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + + if = { + limit = { exists = scope:tributary_1 } + scope:tributary_1 = { + start_tributary_interaction_effect = { + TRIBUTARY = this + SUZERAIN = root + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + } + + if = { + limit = { exists = scope:tributary_2 } + scope:tributary_2 = { + start_tributary_interaction_effect = { + TRIBUTARY = this + SUZERAIN = root + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + } + + stress_impact = { + diligent = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 40 + modifier = { + add = -40 + has_trait = greedy + } + modifier = { + add = 20 + has_trait = diligent + } + modifier = { + add = 20 + has_trait = arrogant + } + } + } + + option = { # B — Simple Mandala + name = coronation_events.1040.b + + add_piety = major_piety_loss + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + + if = { + limit = { exists = scope:tributary_1 } + scope:tributary_1 = { + start_tributary_interaction_effect = { + TRIBUTARY = this + SUZERAIN = root + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + } + + stress_impact = { + diligent = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + modifier = { + add = -20 + has_trait = greedy + } + modifier = { + add = 10 + has_trait = arrogant + } + modifier = { + add = 10 + has_trait = diligent + } + } + } + + option = { # C — That's wasteful + name = coronation_events.1040.c + + add_piety = minor_piety_gain + + stress_impact = { + diligent = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + greedy = medium_stress_impact_loss + } + + ai_chance = { + base = 40 + modifier = { + add = 20 + has_trait = greedy + } + modifier = { + add = -10 + has_trait = arrogant + } + modifier = { + add = -10 + has_trait = diligent + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} \ No newline at end of file diff --git a/events/activities/coronation_activity/coronation_events_6.txt b/events/activities/coronation_activity/coronation_events_6.txt index 71df0ce4..59b15f75 100644 --- a/events/activities/coronation_activity/coronation_events_6.txt +++ b/events/activities/coronation_activity/coronation_events_6.txt @@ -35,7 +35,7 @@ scripted_trigger coronation_events_6000_valid_switch_title_trigger = { this = root.primary_title } } - + } } } @@ -54,7 +54,7 @@ scripted_trigger coronation_events_6000_valid_switch_title_trigger = { } } duchy = scope:host.capital_county.duchy - } + } } #Every county is in realm any_de_jure_county = { @@ -77,13 +77,13 @@ scripted_effect coronation_events_6000_confederation_de_jure_effect = { } } } - + #Switch de jure every_in_list = { list = new_confederation_de_jure set_de_jure_liege_title = scope:host.primary_title } - + if = { limit = { root = scope:loyal_vassal @@ -111,7 +111,7 @@ scripted_effect coronation_events_6000_confederation_de_jure_effect = { } } } - + #If this is the Confederation's first de jure duchy, give liege chance to confirm and remove "destroy on gain same tier" if = { limit = { @@ -147,7 +147,7 @@ scripted_effect coronation_events_6000_confederation_de_jure_effect = { } } } - + scope:activity = { add_activity_log_entry = { key = coronation_confederation_de_jure_log @@ -584,9 +584,7 @@ coronation_events.6000 = { every_vassal = { custom = custom.every_fellow_vassal limit = { - NOT = { - this = root - } + this != root } add_opinion = { target = root @@ -696,7 +694,7 @@ coronation_events.6001 = { primary_title = { de_jure_liege = { save_scope_as = old_de_jure - } + } } } } @@ -820,7 +818,7 @@ coronation_events.6001 = { } } } - + if = { limit = { primary_title = { @@ -902,7 +900,7 @@ coronation_events.6001 = { } } } - + stress_impact = { humble = medium_stress_impact_gain just = medium_stress_impact_gain @@ -999,7 +997,7 @@ scripted_effect coronation_events_6010_defender_effect = { } add_to_variable_list = { name = confed_vassals_defensive - target = scope:loyal_vassal + target = scope:loyal_vassal } } #Gain alliance with liege @@ -1088,7 +1086,7 @@ coronation_events.6010 = { reference = burning_building } override_effect_2d = { - reference = smoke + reference = smoke } theme = coronation_activity @@ -1106,7 +1104,7 @@ coronation_events.6010 = { has_title_law = confederation_elective_succession_law } highest_held_title_tier = tier_kingdom - any_neighboring_top_liege_realm_owner = { + any_land_neighboring_realm_with_tributaries_owner = { coronation_events_6010_assailant_trigger = yes } } @@ -1123,7 +1121,7 @@ coronation_events.6010 = { VALUE = flag:negative CHAR = root } - scope:activity.activity_location = { + scope:activity.activity_location = { if = { limit = { root = { is_ai = no } @@ -1141,7 +1139,7 @@ coronation_events.6010 = { primary_heir ?= { save_scope_as = confederation_heir } - ordered_neighboring_top_liege_realm_owner = { + ordered_land_neighboring_realm_with_tributaries_owner = { order_by = { value = "opinion(scope:host)" multiply = -1 @@ -1191,7 +1189,7 @@ coronation_events.6010 = { add_character_flag = need_military_outfit } } - + #I will fight beside the Confederation king! option = { name = coronation_events.6010.a @@ -1397,7 +1395,7 @@ coronation_events.6010 = { show_in_conclusion = yes } } - + } else = { add_character_flag = { @@ -1414,7 +1412,7 @@ coronation_events.6010 = { } } } - + #Disrupt loyalists bonus if = { limit = { @@ -1435,7 +1433,7 @@ coronation_events.6010 = { house ?= scope:host.house } AND = { - exists = involved_activity + exists = involved_activity is_in_guest_subset = { name = supporter } } } @@ -1521,9 +1519,7 @@ coronation_events.6010 = { } every_vassal = { limit = { - NOT = { - this = root - } + this != root } reverse_add_opinion = { target = root @@ -1546,9 +1542,7 @@ coronation_events.6010 = { every_vassal = { custom = custom.every_fellow_vassal limit = { - NOT = { - this = root - } + this != root } add_opinion = { target = root @@ -1607,9 +1601,7 @@ scripted_trigger coronation_events_6011_trigger = { has_variable = coronation_events_6011_liege } var:coronation_events_6011_liege = { - NOT = { - this = $CHARACTER$ - } + this != $CHARACTER$ } } prowess >= low_skill_rating @@ -1736,7 +1728,7 @@ coronation_events.6011 = { } } } - scope:warrior_youth = { + scope:warrior_youth ?= { add_character_flag = need_military_outfit } scope:loyal_vassal = { @@ -1903,7 +1895,7 @@ coronation_events.6011 = { has_building_or_higher = warrior_lodges_01 has_building_or_higher = palisades_01 has_building_or_higher = war_camps_01 - } + } } if = { limit = { @@ -1939,7 +1931,7 @@ coronation_events.6011 = { has_building_or_higher = warrior_lodges_01 has_building_or_higher = palisades_01 has_building_or_higher = war_camps_01 - } + } } if = { limit = { @@ -1996,7 +1988,7 @@ coronation_events.6011 = { } } } - + #Yes, we all should fight! In fact, send your youths to join a warband led by my kin option = { trigger = { @@ -2062,8 +2054,8 @@ coronation_events.6011 = { gold = medium_gold_value } } - - + + add_realm_law = camp_purpose_mercenaries # Debug tracking if = { @@ -2088,7 +2080,7 @@ coronation_events.6011 = { debug_log_scopes = yes } } - + add_courtier = scope:warrior_youth_vassal hidden_effect = { scope:warrior_youth_vassal = { @@ -2287,7 +2279,7 @@ coronation_events.6011 = { limit = { has_activity_intent = coronation_exalt_crown } - dynasty = { + dynasty ?= { add_dynasty_prestige = miniscule_dynasty_prestige_value } custom_tooltip = improved_because_intent_tt @@ -2361,12 +2353,8 @@ scripted_trigger coronation_events_6020_foe_trigger = { } $CHARACTER$ = { NOR = { - var:coronation_war_foe ?= { - this = scope:foe_temp - } - var:coronation_war_foe_2 ?= { - this = scope:foe_temp - } + var:coronation_war_foe ?= scope:foe_temp + var:coronation_war_foe_2 ?= scope:foe_temp } } is_ruler = yes @@ -2374,9 +2362,7 @@ scripted_trigger coronation_events_6020_foe_trigger = { limit = { exists = scope:activity.var:officiator } - NOT = { - this = scope:activity.var:officiator - } + this != scope:activity.var:officiator } highest_held_title_tier >= tier_county current_military_strength <= $CHARACTER$.current_military_strength @@ -2459,11 +2445,11 @@ scripted_trigger coronation_events_6020_supporter_trigger = { ##Borders vassal to attack or independent ruler to attack OR = { any_neighboring_top_liege_realm_owner = { - coronation_events_6020_foe_trigger = {CHARACTER = scope:supporter_temp } + coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter_temp } } root = { any_vassal = { - NOT = { this = scope:supporter_temp } + this != scope:supporter_temp coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter_temp } } } @@ -2524,7 +2510,7 @@ scripted_effect coronation_events_6020_mass_mobilization_effect = { } #Tribal era just does development progress else = { - + custom_tooltip = mass_mob_dev_tt hidden_effect = { every_held_title = { @@ -2543,7 +2529,7 @@ scripted_effect coronation_events_6020_mass_mobilization_effect = { } } } - + if = { limit = { scope:supporter.capital_county = { @@ -2979,7 +2965,7 @@ scripted_effect coronation_events_6020_declare_war_effect = { } } } - + tier >= tier_county } save_scope_as = claim @@ -3006,7 +2992,7 @@ scripted_effect coronation_events_6020_declare_war_effect = { show_in_conclusion = yes } } - + } #A supporter wants to be unleashed against your foes @@ -3092,7 +3078,7 @@ coronation_events.6020 = { any_guest_subset = { name = supporter coronation_events_6020_supporter_trigger = yes - + OR = { root = { #Realm law does not restrict war @@ -3144,7 +3130,7 @@ coronation_events.6020 = { } } } - + } } } @@ -3162,7 +3148,7 @@ coronation_events.6020 = { scope:activity = { ordered_guest_subset = { order_by = current_military_strength - + name = supporter limit = { coronation_events_6020_supporter_trigger = yes @@ -3216,7 +3202,7 @@ coronation_events.6020 = { name = detractor limit = { coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter } - NOT = { this = scope:foe } + this != scope:foe } save_scope_as = foe_2 } @@ -3230,7 +3216,7 @@ coronation_events.6020 = { } limit = { coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter } - NOT = { this = scope:foe } + this != scope:foe } save_scope_as = foe_2 } @@ -3243,7 +3229,7 @@ coronation_events.6020 = { } limit = { coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter } - NOT = { this = scope:foe } + this != scope:foe } save_scope_as = foe_2 } @@ -3281,7 +3267,7 @@ coronation_events.6020 = { add = -0.5 } multiply = domain_size - } + } } } } @@ -3309,7 +3295,7 @@ coronation_events.6020 = { add = -1 } multiply = domain_size - } + } } } } @@ -3338,7 +3324,7 @@ coronation_events.6020 = { value = { add = var:mass_mobilitization_development_value multiply = domain_size - } + } } } } @@ -3412,7 +3398,7 @@ coronation_events.6020 = { coronation_events_6020_mass_mobilization_effect = yes scope:supporter = { coronation_events_6020_declare_war_effect = { FOE = scope:foe } - if = { + if = { limit = { exists = scope:title_claim_1 } @@ -3502,7 +3488,7 @@ coronation_events.6020 = { scope:supporter = { coronation_events_6020_declare_war_effect = { FOE = scope:foe_2 } - if = { + if = { limit = { exists = scope:title_claim_2 } @@ -3587,7 +3573,7 @@ coronation_events.6020 = { scope:supporter = { coronation_events_6020_declare_war_effect = { FOE = scope:foe } - if = { + if = { limit = { exists = scope:title_claim_1 } @@ -3641,7 +3627,7 @@ coronation_events.6020 = { scope:supporter = { coronation_events_6020_declare_war_effect = { FOE = scope:foe_2 } - if = { + if = { limit = { exists = scope:title_claim_2 } @@ -3753,19 +3739,7 @@ coronation_events.6020 = { } } -scripted_effect coronation_events_6030_choose_courtesan_effect = { - had_sex_with_effect = { - CHARACTER = $COURTESAN$ - PREGNANCY_CHANCE = pregnancy_chance - } - - #Add to court - add_courtier = $COURTESAN$ - #Add progress to lover relation - set_relation_lover = { - reason = lover_coronation_courtesan - target = $COURTESAN$ - } +scripted_effect coronation_events_6030_accept_courtesan_effect = { if = { limit = { NOT = { @@ -3789,6 +3763,21 @@ scripted_effect coronation_events_6030_choose_courtesan_effect = { custom_tooltip = host_has_courtesan_hooks_tt } } +} + +scripted_effect coronation_events_6030_choose_courtesan_effect = { + had_sex_with_effect = { + CHARACTER = $COURTESAN$ + PREGNANCY_CHANCE = pregnancy_chance + } + + #Add to court + add_courtier = $COURTESAN$ + #Add progress to lover relation + set_relation_lover = { + reason = lover_coronation_courtesan + target = $COURTESAN$ + } $COURTESAN$ = { add_character_flag = { flag = picked_courtesan @@ -3838,9 +3827,7 @@ coronation_events.6030 = { trigger = { is_adult = yes is_playable_character = yes - NOT = { - this = involved_activity.activity_host - } + this != involved_activity.activity_host trigger_if = { limit = { is_ai = yes @@ -3876,7 +3863,7 @@ coronation_events.6030 = { value > 0 } } - + NOR = { has_contagious_deadly_disease_trigger = yes has_trait = leper @@ -4037,16 +4024,16 @@ coronation_events.6030 = { location = root.location template = experienced_courtesan_character gender = female - faith = scope:host.faith - culture = scope:host.culture + faith = location.faith + culture = location.culture save_scope_as = experienced_courtesan } create_character = { location = root.location template = funny_courtesan_character gender = female - faith = scope:host.faith - culture = scope:host.culture + faith = location.faith + culture = location.culture mother = scope:experienced_courtesan save_scope_as = funny_courtesan_1 } @@ -4057,8 +4044,8 @@ coronation_events.6030 = { location = root.location template = funny_courtesan_character gender = female - faith = scope:host.faith - culture = scope:host.culture + faith = location.faith + culture = location.culture mother = scope:experienced_courtesan save_scope_as = funny_courtesan_2 } @@ -4097,8 +4084,8 @@ coronation_events.6030 = { location = root.location template = experienced_courtesan_character gender = male - faith = scope:host.faith - culture = scope:host.culture + faith = location.faith + culture = location.culture save_scope_as = experienced_courtesan } create_character = { @@ -4106,8 +4093,8 @@ coronation_events.6030 = { template = funny_courtesan_character gender = male father = scope:experienced_courtesan - faith = scope:host.faith - culture = scope:host.culture + faith = location.faith + culture = location.culture save_scope_as = funny_courtesan_1 } scope:funny_courtesan_1 = { @@ -4118,8 +4105,8 @@ coronation_events.6030 = { template = funny_courtesan_character gender = male father = scope:experienced_courtesan - faith = scope:host.faith - culture = scope:host.culture + faith = location.faith + culture = location.culture save_scope_as = funny_courtesan_2 } scope:funny_courtesan_2 = { @@ -4129,8 +4116,8 @@ coronation_events.6030 = { location = root.location template = cunning_courtesan_character gender = male - faith = scope:host.faith - culture = scope:host.culture + faith = location.faith + culture = location.culture save_scope_as = cunning_courtesan } scope:cunning_courtesan = { @@ -4242,6 +4229,7 @@ coronation_events.6030 = { add_prowess_skill = 1 coronation_events_6030_choose_courtesan_effect = { COURTESAN = scope:fearsome_courtesan } + coronation_events_6030_accept_courtesan_effect = yes stress_impact = { just = minor_stress_impact_gain @@ -4284,6 +4272,7 @@ coronation_events.6030 = { add_intrigue_lifestyle_xp = medium_lifestyle_xp coronation_events_6030_choose_courtesan_effect = { COURTESAN = scope:cunning_courtesan } + coronation_events_6030_accept_courtesan_effect = yes stress_impact = { just = minor_stress_impact_gain @@ -4326,6 +4315,7 @@ coronation_events.6030 = { add_stewardship_lifestyle_xp = medium_lifestyle_xp coronation_events_6030_choose_courtesan_effect = { COURTESAN = scope:experienced_courtesan } + coronation_events_6030_accept_courtesan_effect = yes stress_impact = { just = minor_stress_impact_gain @@ -4367,25 +4357,10 @@ coronation_events.6030 = { flavor = coronation_events.6030.d_flavor add_diplomacy_lifestyle_xp = medium_lifestyle_xp + save_scope_as = no_sex_memory coronation_events_6030_choose_courtesan_effect = { COURTESAN = scope:funny_courtesan_1 } - #Courtesan 2 - had_sex_with_effect = { - CHARACTER = scope:funny_courtesan_2 - PREGNANCY_CHANCE = pregnancy_chance - } - #Add to court - add_courtier = scope:funny_courtesan_2 - #Add progress to lover relation - set_relation_lover = { - reason = lover_coronation_courtesan - target = scope:funny_courtesan_2 - } - scope:funny_courtesan_2 = { - add_character_flag = { - flag = picked_courtesan - days = 30 - } - } + coronation_events_6030_choose_courtesan_effect = { COURTESAN = scope:funny_courtesan_2 } + coronation_events_6030_accept_courtesan_effect = yes create_character_memory = { type = had_a_threesome_memory @@ -4700,7 +4675,7 @@ coronation_events.6030 = { } scope:host = { is_ai = yes - intrigue > root.intrigue + intrigue > root.intrigue } } add_opinion = { @@ -4731,7 +4706,7 @@ coronation_events.6100 = { desc = { #Middle is faith dependent first_valid = { - triggered_desc = { + triggered_desc = { trigger = { scope:activity.var:activity_special_type_progression >= 25 scope:host.faith.religion = { @@ -4753,7 +4728,7 @@ coronation_events.6100 = { } desc = coronation_events.6100.desc_byzantine } - triggered_desc = { + triggered_desc = { trigger = { scope:activity.var:activity_special_type_progression >= 25 scope:host.faith.religion = { @@ -4774,19 +4749,19 @@ coronation_events.6100 = { } desc = coronation_events.6100.desc_byzantine_femme } - triggered_desc = { + triggered_desc = { trigger = { scope:activity.var:activity_special_type_progression >= 75 } desc = coronation_events.6100.desc_high } - triggered_desc = { + triggered_desc = { trigger = { scope:activity.var:activity_special_type_progression < 25 } desc = coronation_events.6100.desc_low } - triggered_desc = { + triggered_desc = { trigger = { scope:host.faith.religion = { this = religion:christianity_religion @@ -4876,7 +4851,7 @@ coronation_events.6100 = { desc = { #Middle is faith dependent first_valid = { - triggered_desc = { + triggered_desc = { trigger = { scope:activity.var:activity_special_type_progression >= 25 scope:host.faith.religion = { @@ -4898,7 +4873,7 @@ coronation_events.6100 = { } desc = coronation_events.6100.desc_byzantine_guest } - triggered_desc = { + triggered_desc = { trigger = { scope:activity.var:activity_special_type_progression >= 25 scope:host.faith.religion = { @@ -4919,19 +4894,19 @@ coronation_events.6100 = { } desc = coronation_events.6100.desc_byzantine_femme_guest } - triggered_desc = { + triggered_desc = { trigger = { scope:activity.var:activity_special_type_progression >= 75 } desc = coronation_events.6100.desc_high_guest } - triggered_desc = { + triggered_desc = { trigger = { scope:activity.var:activity_special_type_progression < 25 } desc = coronation_events.6100.desc_low_guest } - triggered_desc = { + triggered_desc = { trigger = { scope:host.faith.religion = { this = religion:christianity_religion @@ -5115,13 +5090,13 @@ coronation_events.6100 = { trigger = { scope:activity.var:activity_special_type_progression >= 75 } - reference = legend_glow + reference = legend_glow } override_effect_2d = { trigger = { scope:activity.var:activity_special_type_progression < 25 } - reference = flies + reference = flies } theme = coronation_activity @@ -5234,7 +5209,7 @@ coronation_events.6100 = { save_scope_as = crowner } } - + #Get wife to be next to you if = { limit = { @@ -5294,9 +5269,7 @@ coronation_events.6100 = { name = { trigger = { scope:activity.var:activity_special_type_progression >= 25 - NOT = { - this = scope:host - } + this != scope:host } text = coronation_events.6100.a_guest } @@ -5330,9 +5303,7 @@ coronation_events.6100 = { triggered_desc = { trigger = { scope:activity.var:activity_special_type_progression < 25 - NOT = { - this = scope:host - } + this != scope:host } desc = coronation_events.6100.a_flavor_low_guest } @@ -5348,38 +5319,23 @@ coronation_events.6100 = { if = { limit = { this = scope:host - #Is only player at this coronation - NOT = { - scope:activity = { - any_attending_character = { - NOT = { - this = scope:host - } - is_ai = no - } - } - } } - scope:host = { - if = { - limit = { - exists = scope:crowning_artifact - can_equip_artifact = scope:crowning_artifact - scope:crowning_artifact = { is_equipped = no } - } - scope:crowning_artifact = { equip_artifact_to_owner = yes } + if = { + limit = { + scope:crowning_artifact ?= { is_equipped = no } + can_equip_artifact = scope:crowning_artifact } - coronation_change_law_effect = yes + scope:crowning_artifact = { equip_artifact_to_owner = yes } } + coronation_change_law_effect = yes } else = { show_as_tooltip = { scope:host = { if = { limit = { - exists = scope:crowning_artifact + scope:crowning_artifact ?= { is_equipped = no } can_equip_artifact = scope:crowning_artifact - scope:crowning_artifact = { is_equipped = no } } scope:crowning_artifact = { equip_artifact_to_owner = yes } } @@ -5411,18 +5367,11 @@ coronation_events.6100 = { #Need to equip crown after guests get this event if = { limit = { - scope:activity = { - any_attending_character = { - NOT = { - this = scope:host - } - is_ai = no - } - } + this != scope:host + is_ai = no } trigger_event = { id = coronation_events.6103 - days = 5 } } } @@ -5430,7 +5379,7 @@ coronation_events.6100 = { scripted_effect coronation_events_6101_self_crowning_effect = { add_prestige = medium_prestige_gain - if = { + if = { limit = { scope:activity = { has_activity_option = { @@ -5463,9 +5412,7 @@ scripted_effect coronation_events_6101_self_crowning_effect = { custom = custom.every_zealot_vassal limit = { has_vassal_stance = zealot - NOT = { - this = scope:judger - } + this != scope:judger } add_opinion = { target = scope:host @@ -5489,9 +5436,7 @@ scripted_effect coronation_events_6101_self_crowning_effect = { custom = custom.every_zealot_vassal limit = { has_vassal_stance = zealot - NOT = { - this = scope:judger - } + this != scope:judger } add_opinion = { target = scope:host @@ -5515,9 +5460,7 @@ scripted_effect coronation_events_6101_self_crowning_effect = { custom = custom.every_zealot_vassal limit = { has_vassal_stance = zealot - NOT = { - this = scope:judger - } + this != scope:judger } add_opinion = { target = scope:host @@ -5554,7 +5497,7 @@ coronation_events.6101 = { #Priests' dissent is leveled by magnificence first_valid = { triggered_desc = { - trigger = { + trigger = { scope:host = { coronation_proper_artifact_crown_trigger = yes OR = { @@ -5572,13 +5515,13 @@ coronation_events.6101 = { desc = coronation_events.6101.desc_crowning_priests_iberian } triggered_desc = { - trigger = { + trigger = { scope:activity.var:activity_special_type_progression >= 75 } desc = coronation_events.6101.desc_crowning_priests_high } triggered_desc = { - trigger = { + trigger = { scope:activity.var:activity_special_type_progression < 25 } desc = coronation_events.6101.desc_crowning_priests_low @@ -5622,7 +5565,7 @@ coronation_events.6101 = { has_trait = greedy } } - + } desc = coronation_events.6101.desc_ending_humble } @@ -5645,7 +5588,7 @@ coronation_events.6101 = { #Priests' dissent is leveled by magnificence first_valid = { triggered_desc = { - trigger = { + trigger = { scope:host = { coronation_proper_artifact_crown_trigger = yes OR = { @@ -5672,13 +5615,13 @@ coronation_events.6101 = { desc = coronation_events.6101.desc_crowning_priests_iberian } triggered_desc = { - trigger = { + trigger = { scope:activity.var:activity_special_type_progression >= 75 } desc = coronation_events.6101.desc_crowning_priests_high_guest } triggered_desc = { - trigger = { + trigger = { scope:activity.var:activity_special_type_progression < 25 } desc = coronation_events.6101.desc_crowning_priests_low_guest @@ -5856,13 +5799,13 @@ coronation_events.6101 = { trigger = { scope:activity.var:activity_special_type_progression >= 75 } - reference = legend_glow + reference = legend_glow } override_effect_2d = { trigger = { scope:activity.var:activity_special_type_progression < 25 } - reference = flies + reference = flies } theme = coronation_activity @@ -5981,16 +5924,14 @@ coronation_events.6101 = { #Get a councillor to be next to you scope:activity = { ordered_attending_character = { - order_by = "opinion(scope:host)" + order_by = "opinion(scope:host)" limit = { is_councillor_of = scope:host trigger_if = { limit = { exists = scope:anointer } - NOT = { - this = scope:anointer - } + this != scope:anointer } } save_scope_as = observer @@ -6006,16 +5947,14 @@ coronation_events.6101 = { } scope:activity = { ordered_attending_character = { - order_by = "opinion(scope:host)" + order_by = "opinion(scope:host)" limit = { is_vassal_of = scope:host trigger_if = { limit = { exists = scope:anointer } - NOT = { - this = scope:anointer - } + this != scope:anointer } } save_scope_as = observer @@ -6031,9 +5970,8 @@ coronation_events.6101 = { coronation_ceremony_opinion_effect = yes if = { limit = { - exists = scope:crowning_artifact + scope:crowning_artifact ?= { is_equipped = no } can_equip_artifact = scope:crowning_artifact - scope:crowning_artifact = { is_equipped = no } } scope:crowning_artifact = { equip_artifact_to_owner = yes } } @@ -6044,9 +5982,8 @@ coronation_events.6101 = { coronation_ceremony_opinion_effect = yes if = { limit = { - exists = scope:crowning_artifact + scope:crowning_artifact ?= { is_equipped = no } can_equip_artifact = scope:crowning_artifact - scope:crowning_artifact = { is_equipped = no } } scope:crowning_artifact = { equip_artifact_to_owner = yes } } @@ -6062,7 +5999,7 @@ coronation_events.6101 = { first_valid = { triggered_desc = { trigger = { - NOT = { this = scope:host } + this != scope:host OR = { has_activity_intent = coronation_disrupt_loyalists has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } @@ -6076,7 +6013,7 @@ coronation_events.6101 = { } triggered_desc = { trigger = { - NOT = { this = scope:host } + this != scope:host OR = { has_activity_intent = coronation_offer_support has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } @@ -6092,7 +6029,7 @@ coronation_events.6101 = { } triggered_desc = { trigger = { - NOT = { this = scope:host } + this != scope:host } desc = coronation_events.6101.a_guest } @@ -6117,7 +6054,7 @@ coronation_events.6101 = { desc = coronation_events.6101.a } } - } + } scope:host = { #Prestige gain and possible cleric opinion loss from self crowning if = { @@ -6212,7 +6149,7 @@ coronation_events.6102 = { has_trait = greedy } } - + } desc = coronation_events.6101.desc_ending_humble } @@ -6543,13 +6480,13 @@ coronation_events.6102 = { trigger = { scope:activity.var:activity_special_type_progression >= 75 } - reference = legend_glow + reference = legend_glow } override_effect_2d = { trigger = { scope:activity.var:activity_special_type_progression < 25 } - reference = flies + reference = flies } theme = coronation_activity @@ -6658,7 +6595,7 @@ coronation_events.6102 = { #Get a councillor to be next to you scope:activity = { ordered_attending_character = { - order_by = "opinion(scope:host)" + order_by = "opinion(scope:host)" limit = { is_councillor_of = scope:host #spouse might feel strange here idk @@ -6679,9 +6616,7 @@ coronation_events.6102 = { limit = { exists = scope:anointer } - NOT = { - this = scope:anointer - } + this != scope:anointer } } save_scope_as = observer @@ -6697,16 +6632,14 @@ coronation_events.6102 = { } scope:activity = { ordered_attending_character = { - order_by = "opinion(scope:host)" + order_by = "opinion(scope:host)" limit = { is_vassal_of = scope:host trigger_if = { limit = { exists = scope:anointer } - NOT = { - this = scope:anointer - } + this != scope:anointer } } save_scope_as = observer @@ -6722,10 +6655,7 @@ coronation_events.6102 = { coronation_ceremony_opinion_effect = yes if = { limit = { - exists = scope:crowning_artifact - scope:crowning_artifact = { - is_equipped = no - } + scope:crowning_artifact ?= { is_equipped = no } can_equip_artifact = scope:crowning_artifact } scope:crowning_artifact = { equip_artifact_to_owner = yes } @@ -6737,9 +6667,8 @@ coronation_events.6102 = { coronation_ceremony_opinion_effect = yes if = { limit = { - exists = scope:crowning_artifact + scope:crowning_artifact ?= { is_equipped = no } can_equip_artifact = scope:crowning_artifact - scope:crowning_artifact = { is_equipped = no } } scope:crowning_artifact = { equip_artifact_to_owner = yes } } @@ -6755,7 +6684,7 @@ coronation_events.6102 = { first_valid = { triggered_desc = { trigger = { - NOT = { this = scope:host } + this != scope:host OR = { has_activity_intent = coronation_disrupt_loyalists has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } @@ -6779,14 +6708,14 @@ coronation_events.6102 = { has_trait = craven } } - NOT = { this = scope:host } + this != scope:host scope:activity.var:activity_special_type_progression >= 25 } desc = coronation_events.6102.a_guest_pos } triggered_desc = { trigger = { - NOT = { this = scope:host } + this != scope:host } desc = coronation_events.6102.a_guest } @@ -6949,7 +6878,7 @@ scripted_effect coronation_events_6110_artifact_reward_effect = { show_in_conclusion = yes } } - + } #Coronation artifact needs to become artifact OF TITLE @@ -7105,7 +7034,7 @@ coronation_events.6110 = { activity_host = { save_temporary_scope_as = host_temp #Save whether it needs to be helmet or nah - trigger_if = { + trigger_if = { limit = { coronation_proper_artifact_crown_trigger = yes coronation_proper_artifact_regalia_trigger = no @@ -7250,7 +7179,7 @@ coronation_events.6110 = { } } #Save whether it needs to be helmet or nah - if = { + if = { limit = { scope:host = { coronation_proper_artifact_crown_trigger = yes @@ -7272,7 +7201,7 @@ coronation_events.6110 = { ordered_character_artifact = { order_by = artifact_rarity limit = { - trigger_if = { + trigger_if = { limit = { exists = scope:needs_crown } @@ -7290,7 +7219,7 @@ coronation_events.6110 = { artifact_slot_type = regalia } } - + has_variable = artifact_succession_title var:artifact_succession_title ?= root.primary_title } @@ -7301,7 +7230,7 @@ coronation_events.6110 = { ordered_character_artifact = { order_by = artifact_rarity limit = { - trigger_if = { + trigger_if = { limit = { exists = scope:needs_crown } @@ -7338,7 +7267,7 @@ coronation_events.6110 = { ordered_character_artifact = { order_by = artifact_rarity limit = { - trigger_if = { + trigger_if = { limit = { exists = scope:needs_crown } @@ -7356,9 +7285,7 @@ coronation_events.6110 = { artifact_slot_type = regalia } } - NOT = { - this = scope:crowning_artifact - } + this != scope:crowning_artifact trigger_if = { limit = { has_variable = artifact_succession_title @@ -7379,7 +7306,7 @@ coronation_events.6110 = { ordered_character_artifact = { order_by = artifact_rarity limit = { - trigger_if = { + trigger_if = { limit = { exists = scope:needs_crown } @@ -7421,7 +7348,7 @@ coronation_events.6110 = { ordered_character_artifact = { order_by = artifact_rarity limit = { - trigger_if = { + trigger_if = { limit = { exists = scope:needs_crown } @@ -7465,7 +7392,7 @@ coronation_events.6110 = { ordered_character_artifact = { order_by = artifact_rarity limit = { - trigger_if = { + trigger_if = { limit = { exists = scope:needs_crown } @@ -7555,9 +7482,7 @@ coronation_events.6110 = { if = { limit = { cp:councillor_court_chaplain ?= { - NOT = { - this = scope:blesser - } + this != scope:blesser is_alive = yes is_imprisoned = no is_incapable = no @@ -7816,7 +7741,7 @@ coronation_events.6110 = { } text = coronation_events.6110.f_replacing } - + custom_tooltip = coronation_artifact_unaltered_succession_tt if = { limit = { @@ -8020,7 +7945,7 @@ coronation_events.6120 = { trigger = { scope:activity.var:activity_special_type_progression < 25 } - reference = flies + reference = flies } theme = coronation_activity @@ -8044,7 +7969,7 @@ coronation_events.6120 = { religious_head = { save_scope_as = hof } } } - + #Save holy men if = { limit = { @@ -8108,9 +8033,7 @@ coronation_events.6120 = { if = { limit = { cp:councillor_court_chaplain ?= { - NOT = { - this = scope:oather_1 - } + this != scope:oather_1 is_alive = yes is_imprisoned = no is_incapable = no @@ -8133,9 +8056,7 @@ coronation_events.6120 = { order_by = max_military_strength limit = { government_has_flag = government_is_theocracy - NOT = { - this = scope:oather_1 - } + this != scope:oather_1 } save_scope_as = oather_2 } @@ -8206,7 +8127,7 @@ coronation_events.6120 = { add_trait = holy_warrior } } - + } } stress_impact = { @@ -8404,7 +8325,7 @@ coronation_events.6120 = { has_trait = fickle } } - + } text = coronation_events.6120.c } @@ -8468,7 +8389,7 @@ scripted_trigger coronation_events_6121_minority_trigger = { government_has_flag = government_is_herder } culture = { - NOT = { this = root.culture } + this != root.culture cultural_acceptance = { target = root.culture value <= 80 @@ -8608,7 +8529,7 @@ coronation_events.6121 = { trigger = { scope:activity.var:activity_special_type_progression < 25 } - reference = flies + reference = flies } theme = coronation_activity @@ -8753,9 +8674,7 @@ coronation_events.6121 = { order_by = max_military_strength limit = { is_vassal_of = root - NOT = { - this = scope:vassal_1 - } + this != scope:vassal_1 NOR = { is_at_war_with = root government_has_flag = government_is_theocracy @@ -8818,13 +8737,11 @@ coronation_events.6121 = { } ordered_in_list = { list = detractor_allies - order_by = current_military_strength + order_by = current_military_strength limit = { - NOT = { - this = scope:detractor_ally_1 - } + this != scope:detractor_ally_1 } - + save_scope_as = detractor_ally_2 } #Overwrite vassals we already saved, these are more relevant @@ -8857,9 +8774,7 @@ coronation_events.6121 = { government_has_flag = government_is_theocracy government_has_flag = government_is_herder } - NOT = { - this = scope:vassal_1 - } + this != scope:vassal_1 } save_scope_as = vassal_2 } @@ -8901,9 +8816,7 @@ coronation_events.6121 = { order_by = max_military_strength limit = { coronation_events_6121_minority_trigger = yes - NOT = { - this = scope:vassal_1 - } + this != scope:vassal_1 opinion = { target = root value >= -20 @@ -8915,15 +8828,11 @@ coronation_events.6121 = { target = root value >= -60 } - NOT = { - this = scope:vassal_1 - } + this != scope:vassal_1 } alternative_limit = { coronation_events_6121_minority_trigger = yes - NOT = { - this = scope:vassal_1 - } + this != scope:vassal_1 } save_scope_as = vassal_2 } @@ -9069,7 +8978,7 @@ coronation_events.6121 = { coronation_move_towards_detractor_effect = { CHARACTER = scope:detractor_ally_2 } } } - + stress_impact = { vengeful = miniscule_stress_impact_loss @@ -9106,8 +9015,10 @@ coronation_events.6121 = { trigger = { has_activity_intent = coronation_impress_attendees stewardship >= decent_skill_rating - any_vassal = { - count >= 2 + scope:vassal_1 = { + coronation_events_6121_minority_trigger = yes + } + scope:vassal_2 = { coronation_events_6121_minority_trigger = yes } } @@ -9406,8 +9317,8 @@ coronation_events.6121 = { target = scope:vassal_2 } } - - + + custom_tooltip = coronation_events.6121_duel_tt configure_start_single_combat_effect = { SC_INITIATOR = root @@ -9692,7 +9603,7 @@ coronation_events.6122 = { trigger = { scope:activity.var:activity_special_type_progression < 25 } - reference = flies + reference = flies } theme = coronation_activity @@ -9828,7 +9739,7 @@ coronation_events.6122 = { } } } - + stress_impact = { sadistic = minor_stress_impact_loss compassionate = major_stress_impact_gain @@ -10204,7 +10115,7 @@ coronation_events.6123 = { trigger = { scope:activity.var:activity_special_type_progression < 25 } - reference = flies + reference = flies } theme = coronation_activity @@ -10223,6 +10134,7 @@ coronation_events.6123 = { involved_activity = { activity_location = { save_scope_as = location } activity_host = { save_scope_as = host } + save_scope_as = activity } scope:host = { show_as_tooltip = { @@ -10351,7 +10263,7 @@ coronation_events.6123 = { scope:host = { random_held_title = { limit = { - tier = tier_county + tier = tier_county any_county_province = { barony = { exists = holder @@ -10452,16 +10364,20 @@ coronation_events.6123 = { NOT = { exists = scope:priest } - cp:councillor_court_chaplain ?= { - is_alive = yes - is_imprisoned = no - is_incapable = no - has_contagious_deadly_disease_trigger = no + scope:host = { + cp:councillor_court_chaplain ?= { + is_alive = yes + is_imprisoned = no + is_incapable = no + has_contagious_deadly_disease_trigger = no + } } } #SAVE COURT CHAPLAIN - cp:councillor_court_chaplain = { - save_scope_as = priest + scope:host = { + cp:councillor_court_chaplain = { + save_scope_as = priest + } } } if = { @@ -10575,7 +10491,7 @@ coronation_events.6123 = { } add_legitimacy = minor_legitimacy_gain } - + if = { limit = { government_allows = administrative @@ -10645,7 +10561,7 @@ coronation_events.6123 = { add_prestige = { value = miniscule_prestige_gain multiply = 0.5 - } + } } } } @@ -10699,154 +10615,163 @@ coronation_events.6123 = { has_activity_intent = coronation_offer_support } #Bigger opinion gain if you're sticking your neck out for supporters - if = { - limit = { - scope:activity = { + scope:activity = { + if = { + limit = { number_of_supporters_activity <= number_of_detractors_activity } - } - scope:host = { - add_opinion = { - target = root - modifier = support_opinion - opinion = 35 - } - } - scope:activity = { - every_guest_subset = { - name = supporter - custom = every_supporter_activity - limit = { - NOT = { - this = root - } - } + scope:host = { add_opinion = { target = root - modifier = fellow_supporter_opinion + modifier = support_opinion opinion = 35 } } - } - } - else = { - scope:host = { - add_opinion = { - target = root - modifier = support_opinion - opinion = 25 - } - } - scope:activity = { - every_guest_subset = { - name = supporter - custom = every_supporter_activity - limit = { - NOT = { - this = root + if = { + limit = { any_guest_subset = { name = supporter } } + every_guest_subset = { + name = supporter + custom = every_supporter_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = fellow_supporter_opinion + opinion = 35 } } + } + } + else = { + scope:host = { add_opinion = { target = root - modifier = fellow_supporter_opinion + modifier = support_opinion opinion = 25 } } - } - } - scope:activity = { - every_guest_subset = { - name = detractor - custom = every_detractor_activity - limit = { - NOT = { - this = root + if = { + limit = { any_guest_subset = { name = supporter } } + every_guest_subset = { + name = supporter + custom = every_supporter_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = fellow_supporter_opinion + opinion = 25 + } } } - add_opinion = { - target = root - modifier = rival_supporter_opinion - opinion = -35 + } + if = { + limit = { any_guest_subset = { name = detractor } } + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = rival_supporter_opinion + opinion = -35 + } } } } } else = { #Bigger opinion gain if you're sticking your neck out for supporters - if = { - limit = { - scope:activity = { + scope:activity = { + if = { + limit = { number_of_supporters_activity <= number_of_detractors_activity } - } - scope:host = { - add_opinion = { - target = root - modifier = support_opinion - opinion = 25 - } - } - scope:activity = { - every_guest_subset = { - name = supporter - custom = every_supporter_activity - limit = { - NOT = { - this = root - } - } + scope:host = { add_opinion = { target = root - modifier = fellow_supporter_opinion + modifier = support_opinion opinion = 25 } } - } - } - else = { - scope:host = { - add_opinion = { - target = root - modifier = support_opinion - opinion = 15 - } - } - scope:activity = { - every_guest_subset = { - name = supporter - custom = every_supporter_activity - limit = { - NOT = { - this = root + if = { + limit = { any_guest_subset = { name = supporter } } + every_guest_subset = { + name = supporter + custom = every_supporter_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = fellow_supporter_opinion + opinion = 25 } } + } + } + else = { + scope:host = { add_opinion = { target = root - modifier = fellow_supporter_opinion + modifier = support_opinion opinion = 15 } } - } - } - scope:activity = { - every_guest_subset = { - name = detractor - custom = every_detractor_activity - limit = { - NOT = { - this = root + if = { + limit = { any_guest_subset = { name = supporter } } + every_guest_subset = { + name = supporter + custom = every_supporter_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = fellow_supporter_opinion + opinion = 15 + } } } - add_opinion = { - target = root - modifier = rival_supporter_opinion - opinion = -30 + } + if = { + limit = { any_guest_subset = { name = detractor } } + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = rival_supporter_opinion + opinion = -30 + } } } } } } } + if = { + limit = { + has_variable = supporters_pledge_var + } + change_variable = { + name = supporters_pledge_var + add = 1 + } + } + else = { + set_variable = { + name = supporters_pledge_var + value = 1 + } + } } if = { limit = { @@ -10970,7 +10895,7 @@ coronation_events.6123 = { } } } - + if = { limit = { government_allows = administrative @@ -11158,59 +11083,57 @@ coronation_events.6123 = { } } scope:activity = { - every_guest_subset = { - name = supporter - custom = every_supporter_activity + if = { limit = { - NOT = { - this = root - } + any_guest_subset = { name = supporter } } - add_opinion = { - target = root - modifier = rival_detractor_opinion - opinion = -30 - } - } - } - #Bigger opinion gain if you are sticking your neck out for detractors - if = { - limit = { - scope:activity = { - number_of_detractors_activity <= number_of_supporters_activity - } - } - scope:activity = { every_guest_subset = { - name = detractor - custom = every_detractor_activity + name = supporter + custom = every_supporter_activity limit = { - NOT = { - this = root - } + this != root } add_opinion = { target = root - modifier = fellow_detractor_opinion - opinion = 45 + modifier = rival_detractor_opinion + opinion = -30 } } } - } - else = { - scope:activity = { - every_guest_subset = { - name = detractor - custom = every_detractor_activity + if = { + limit = { + any_guest_subset = { name = detractor } + } + #Bigger opinion gain if you are sticking your neck out for detractors + if = { limit = { - NOT = { - this = root + number_of_detractors_activity <= number_of_supporters_activity + } + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = fellow_detractor_opinion + opinion = 45 } } - add_opinion = { - target = root - modifier = fellow_detractor_opinion - opinion = 35 + } + else = { + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = fellow_detractor_opinion + opinion = 35 + } } } } @@ -11229,9 +11152,7 @@ coronation_events.6123 = { name = supporter custom = every_supporter_activity limit = { - NOT = { - this = root - } + this != root } add_opinion = { target = root @@ -11239,45 +11160,40 @@ coronation_events.6123 = { opinion = -25 } } - } - #Bigger opinion gain if you are sticking your neck out for detractors - if = { - limit = { - scope:activity = { - number_of_detractors_activity <= number_of_supporters_activity + if = { + limit = { + any_guest_subset = { name = supporter } } - } - scope:activity = { - every_guest_subset = { - name = detractor - custom = every_detractor_activity + #Bigger opinion gain if you are sticking your neck out for detractors + if = { limit = { - NOT = { - this = root + number_of_detractors_activity <= number_of_supporters_activity + } + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = fellow_detractor_opinion + opinion = 35 } } - add_opinion = { - target = root - modifier = fellow_detractor_opinion - opinion = 35 - } } - } - } - else = { - scope:activity = { - every_guest_subset = { - name = detractor - custom = every_detractor_activity - limit = { - NOT = { - this = root + else = { + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = fellow_detractor_opinion + opinion = 20 } - } - add_opinion = { - target = root - modifier = fellow_detractor_opinion - opinion = 20 } } } @@ -11285,6 +11201,21 @@ coronation_events.6123 = { } } } + if = { + limit = { + has_variable = detractors_scorned_pledge_var + } + change_variable = { + name = detractors_scorned_pledge_var + add = 1 + } + } + else = { + set_variable = { + name = detractors_scorned_pledge_var + value = 1 + } + } } if = { limit = { @@ -11306,7 +11237,7 @@ coronation_events.6123 = { shy = minor_stress_impact_gain trusting = minor_stress_impact_gain } - + ai_chance = { base = 100 ai_value_modifier = { @@ -11660,9 +11591,7 @@ scripted_trigger coronation_events_6130_dharmic_trigger = { faith.religion = { AND = { is_in_family = rf_eastern - NOT = { - this = religion:zoroastrianism_religion - } + this != religion:zoroastrianism_religion } } root.involved_activity.activity_location = { @@ -11824,9 +11753,7 @@ coronation_events.6130 = { scope:host.faith.religion = religion:eastern_orthodox_religion scope:host.faith.religion = religion:catholic_religion scope:host.faith.religion = religion:protestant_religion } scope:anointer = { - NOT = { - this = scope:host.cp:councillor_court_chaplain - } + this != scope:host.cp:councillor_court_chaplain is_landed = yes } } @@ -11939,7 +11866,7 @@ coronation_events.6130 = { desc = coronation_events.6130.ending_dharmic_guest } } - + center_portrait = { character = scope:host animation = throne_room_bow_3 @@ -11958,7 +11885,7 @@ coronation_events.6130 = { animation = wedding_priest camera = camera_event_very_right } - + override_background = { trigger = { scope:host.capital_county = title:c_byzantion @@ -11983,13 +11910,13 @@ coronation_events.6130 = { } } } - reference = legend_glow + reference = legend_glow } override_effect_2d = { trigger = { scope:activity.var:activity_special_type_progression < 25 } - reference = flies + reference = flies } cooldown = { days = 20 } @@ -11998,9 +11925,8 @@ coronation_events.6130 = { trigger = { involved_activity ?= { activity_host = { - NAND = { - exists = faith.religious_head - this = faith.religious_head + NOT = { + faith.religious_head ?= this } } OR = { @@ -12017,32 +11943,9 @@ coronation_events.6130 = { } } on_trigger_fail = { - if = { - limit = { - coronation_being_crowned_trigger = yes - } - #Skip to crowning - trigger_event = { - id = coronation_events.6100 - days = 3 - } - } - else_if = { - limit = { - coronation_self_crowning_trigger = yes - } - #Skip to crowning self - trigger_event = { - id = coronation_events.6101 - days = 3 - } - } - else = { - #Skip to enthroning - trigger_event = { - id = coronation_events.6102 - days = 3 - } + trigger_event = { + id = coronation_events.6131 + days = 3 } } immediate = { @@ -12066,9 +11969,7 @@ coronation_events.6130 = { scope:host = { if = { limit = { - faith = { - fervor >= 90 - } + faith.fervor >= 90 } every_vassal = { custom = custom.every_same_faith_vassal @@ -12098,9 +11999,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor >= 80 - } + faith.fervor >= 80 } every_vassal = { custom = custom.every_same_faith_vassal @@ -12130,9 +12029,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor >= 70 - } + faith.fervor >= 70 } every_vassal = { custom = custom.every_same_faith_vassal @@ -12162,9 +12059,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor >= 60 - } + faith.fervor >= 60 } every_vassal = { custom = custom.every_same_faith_vassal @@ -12191,9 +12086,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor < 30 - } + faith.fervor < 30 } every_vassal = { custom = custom.every_different_faith_vassal @@ -12223,9 +12116,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor < 20 - } + faith.fervor < 20 } every_vassal = { custom = custom.every_different_faith_vassal @@ -12255,9 +12146,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor < 10 - } + faith.fervor < 10 } every_vassal = { custom = custom.every_different_faith_vassal @@ -12299,9 +12188,7 @@ coronation_events.6130 = { #Scale rewards based on fervor if = { limit = { - faith = { - fervor >= 100 - } + faith.fervor >= 100 } every_vassal = { custom = custom.every_zealot_vassal @@ -12323,9 +12210,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor >= 80 - } + faith.fervor >= 80 } every_vassal = { custom = custom.every_zealot_vassal @@ -12338,7 +12223,7 @@ coronation_events.6130 = { add_legitimacy = { value = medium_legitimacy_gain multiply = 1.8 - } + } add_piety = { value = major_piety_gain multiply = 1.8 @@ -12347,9 +12232,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor >= 60 - } + faith.fervor >= 60 } every_vassal = { custom = custom.every_zealot_vassal @@ -12362,7 +12245,7 @@ coronation_events.6130 = { add_legitimacy = { value = medium_legitimacy_gain multiply = 1.6 - } + } add_piety = { value = major_piety_gain multiply = 1.6 @@ -12371,9 +12254,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor >= 40 - } + faith.fervor >= 40 } every_vassal = { custom = custom.every_zealot_vassal @@ -12386,7 +12267,7 @@ coronation_events.6130 = { add_legitimacy = { value = medium_legitimacy_gain multiply = 1.4 - } + } add_piety = { value = major_piety_gain multiply = 1.4 @@ -12395,9 +12276,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor >= 20 - } + faith.fervor >= 20 } every_vassal = { custom = custom.every_zealot_vassal @@ -12447,9 +12326,7 @@ coronation_events.6130 = { NOT = { has_trait = faith_warrior } - faith = { - fervor >= 75 - } + faith.fervor >= 75 trigger_if = { limit = { scope:activity = { @@ -12556,7 +12433,7 @@ coronation_events.6130 = { } name = coronation_events.6130.b - + #conversion interactions acceptance bonus if = { limit = { @@ -12574,7 +12451,7 @@ coronation_events.6130 = { custom_tooltip = conversion_acceptance_bonus_low_tt add_character_flag = conversion_acceptance_bonus_low } - + stress_impact = { zealous = major_stress_impact_loss content = minor_stress_impact_gain @@ -12677,7 +12554,7 @@ coronation_events.6130 = { has_trait = arrogant } } - } + } } option = { name = { @@ -12740,7 +12617,7 @@ coronation_events.6130 = { if = { limit = { faith = scope:host.faith - NOT = { this = scope:host } + this != scope:host scope:activity = { has_activity_option = { category = special_type @@ -12787,7 +12664,7 @@ coronation_events.6130 = { #To show audience else_if = { limit = { - NOT = { this = root } + this != root scope:activity = { has_activity_option = { category = special_type @@ -12811,7 +12688,7 @@ coronation_events.6130 = { } else_if = { limit = { - NOT = { this = root } + this != root } show_as_tooltip = { add_piety = medium_piety_gain @@ -12834,32 +12711,34 @@ coronation_events.6130 = { # For MP coronation_ready_effect = yes + trigger_event = { + id = coronation_events.6131 + days = 3 + } + } +} + +coronation_events.6131 = { + type = activity_event + hidden = yes + immediate = { if = { limit = { coronation_being_crowned_trigger = yes } #crowning - trigger_event = { - id = coronation_events.6100 - days = 3 - } + trigger_event = coronation_events.6100 } else_if = { limit = { coronation_self_crowning_trigger = yes } #self-crowning - trigger_event = { - id = coronation_events.6101 - days = 3 - } + trigger_event = coronation_events.6101 } else = { #enthroning - trigger_event = { - id = coronation_events.6102 - days = 3 - } + trigger_event = coronation_events.6102 } } } @@ -12875,9 +12754,7 @@ scripted_effect coronation_events_6140_spouse_effects = { } if = { limit = { - NOT = { - this = root - } + this != root is_ai = yes OR = { has_trait = arrogant @@ -12909,9 +12786,7 @@ scripted_effect coronation_events_6140_spouse_effects = { every_attending_character = { custom = custom.every_attending_character limit = { - NOT = { - this = scope:spouse - } + this != scope:spouse } add_opinion = { target = scope:spouse @@ -12940,9 +12815,7 @@ coronation_events.6140 = { trigger = { scope:host = { any_consort = { - NOT = { - this = scope:spouse - } + this != scope:spouse } } } @@ -13053,9 +12926,7 @@ coronation_events.6140 = { trigger = { scope:host = { any_consort = { - NOT = { - this = scope:spouse - } + this != scope:spouse } } } @@ -13294,7 +13165,7 @@ coronation_events.6140 = { animation = chancellor camera = camera_event_very_right } - + override_background = { trigger = { NOT = { @@ -13331,13 +13202,13 @@ coronation_events.6140 = { trigger = { scope:activity.var:activity_special_type_progression >= 75 } - reference = legend_glow + reference = legend_glow } override_effect_2d = { trigger = { scope:activity.var:activity_special_type_progression < 25 } - reference = flies + reference = flies } cooldown = { days = 20 } @@ -13513,13 +13384,13 @@ coronation_events.6140 = { send_interface_toast = { type = event_toast_effect_good title = coronation_events.6140.aa_success - right_icon = scope:spouse - + right_icon = scope:spouse + scope:spouse = { set_character_faith = scope:host.faith } } - } + } #She is not convinced 45 = { compare_modifier = { @@ -13615,7 +13486,7 @@ coronation_events.6140 = { send_interface_toast = { type = event_toast_effect_bad title = coronation_events.6140.aa_fail - right_icon = scope:spouse + right_icon = scope:spouse scope:spouse = { add_opinion = { @@ -13623,7 +13494,7 @@ coronation_events.6140 = { target = scope:host opinion = -15 } - + } } } @@ -13660,6 +13531,59 @@ coronation_events.6140 = { } } } + #Yay! MAI WIFE + option = { + trigger = { + this = scope:host + } + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_relation_lover = scope:spouse + has_relation_soulmate = scope:spouse + opinion = { + target = scope:spouse + value >= 90 + } + } + } + desc = coronation_events.6140.b_like + } + triggered_desc = { + trigger = { + OR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse } + opinion = { + target = scope:spouse + value < -60 + } + } + } + desc = coronation_events.6140.b_dislike + } + desc = coronation_events.6140.b + } + } + } + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:spouse + opinion = 15 + } + hidden_effect = { + add_opinion = { + modifier = grateful_opinion + target = scope:spouse + opinion = 5 + } + } + ai_chance = { + base = 100 + } + } #I must get rid of this person... option = { trigger = { @@ -13727,7 +13651,7 @@ coronation_events.6140 = { name = spouse_hostile_scheme_bonus value = scope:spouse } - + hidden_effect = { add_opinion = { target = scope:spouse @@ -13748,7 +13672,7 @@ coronation_events.6140 = { sadistic = medium_stress_impact_loss lustful = minor_stress_impact_loss arrogant = minor_stress_impact_loss - + compassionate = major_stress_impact_gain just = medium_stress_impact_gain forgiving = medium_stress_impact_gain @@ -13763,7 +13687,7 @@ coronation_events.6140 = { sadistic = medium_stress_impact_loss lustful = minor_stress_impact_loss arrogant = minor_stress_impact_loss - + compassionate = major_stress_impact_gain just = medium_stress_impact_gain forgiving = medium_stress_impact_gain @@ -13799,7 +13723,7 @@ coronation_events.6140 = { is_allied_to = scope:host } } - + } } modifier = { @@ -13822,65 +13746,12 @@ coronation_events.6140 = { has_trait = forgiving has_trait = honest has_trait = humble - has_trait = content + has_trait = content has_any_good_relationship_with_character_trigger = { CHARACTER = scope:spouse } } } } } - #Yay! MAI WIFE - option = { - trigger = { - this = scope:host - } - name = { - text = { - first_valid = { - triggered_desc = { - trigger = { - OR = { - has_relation_lover = scope:spouse - has_relation_soulmate = scope:spouse - opinion = { - target = scope:spouse - value >= 90 - } - } - } - desc = coronation_events.6140.b_like - } - triggered_desc = { - trigger = { - OR = { - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse } - opinion = { - target = scope:spouse - value < -60 - } - } - } - desc = coronation_events.6140.b_dislike - } - desc = coronation_events.6140.b - } - } - } - reverse_add_opinion = { - modifier = grateful_opinion - target = scope:spouse - opinion = 15 - } - hidden_effect = { - add_opinion = { - modifier = grateful_opinion - target = scope:spouse - opinion = 5 - } - } - ai_chance = { - base = 100 - } - } #I am the spouse option = { trigger = { @@ -14221,9 +14092,7 @@ coronation_events.6150 = { is_confederation_member = yes suzerain ?= { is_confederation_member = yes - NOT = { - this = root - } + this != root } } } @@ -14335,7 +14204,7 @@ coronation_events.6150 = { faith = { faith_hostility_level = { target = root.faith - value <= faith.faith_hostile_level + value <= faith_hostile_level } } } @@ -14348,7 +14217,7 @@ coronation_events.6150 = { faith = { faith_hostility_level = { target = root.faith - value <= faith.faith_hostile_level + value <= faith_hostile_level } } } @@ -14417,7 +14286,7 @@ coronation_events.6150 = { } save_scope_as = confederate add_to_list = confederation_members - + confederation = { save_scope_as = confederation } } scope:confederation = { @@ -14575,9 +14444,7 @@ coronation_events.6150 = { scope:neighbor.confederation = { every_confederation_member = { limit = { - NOT = { - this = scope:confederate - } + this != scope:confederate } send_interface_toast = { type = event_toast_effect_bad @@ -14589,7 +14456,7 @@ coronation_events.6150 = { } } } - + #Diplomacy duel scope:advisor = { duel = { @@ -14675,9 +14542,7 @@ coronation_events.6150 = { list = confederation_members order_by = ai_greed limit = { - NOT = { - this = scope:confederate - } + this != scope:confederate } confederation = { remove_confederation_member = prev @@ -15169,7 +15034,7 @@ coronation_events.6150 = { } } } - + } 50 = { desc = coronation_events.6150.d.fail @@ -15384,58 +15249,12 @@ coronation_events.6150 = { } } } - custom_tooltip = coronation_councillor_unity_tooltip - hidden_effect = { - if = { - limit = { - has_council_position = councillor_chancellor - } - add_character_modifier = { - modifier = councillor_unity_modifier_diplomacy - years = 5 - } - } - else_if = { - limit = { - has_council_position = councillor_steward - } - add_character_modifier = { - modifier = councillor_unity_modifier_stewardship - years = 5 - } - } - else_if = { - limit = { - has_council_position = councillor_spymaster - } - add_character_modifier = { - modifier = councillor_unity_modifier_intrigue - years = 5 - } - } - else_if = { - limit = { - has_council_position = councillor_court_chaplain - } - add_character_modifier = { - modifier = councillor_unity_modifier_learning - years = 5 - } - } - else_if = { - limit = { - has_council_position = councillor_marshal - } - add_character_modifier = { - modifier = councillor_unity_modifier_martial - years = 5 - } - } - else = { - #Add highest skill to spouse... and other council positions I don't know about I guess + else = { + custom_tooltip = coronation_councillor_unity_tooltip + hidden_effect = { if = { limit = { - highest_skill = diplomacy + has_council_position = councillor_chancellor } add_character_modifier = { modifier = councillor_unity_modifier_diplomacy @@ -15444,7 +15263,7 @@ coronation_events.6150 = { } else_if = { limit = { - highest_skill = stewardship + has_council_position = councillor_steward } add_character_modifier = { modifier = councillor_unity_modifier_stewardship @@ -15453,7 +15272,7 @@ coronation_events.6150 = { } else_if = { limit = { - highest_skill = intrigue + has_council_position = councillor_spymaster } add_character_modifier = { modifier = councillor_unity_modifier_intrigue @@ -15462,19 +15281,67 @@ coronation_events.6150 = { } else_if = { limit = { - highest_skill = learning + has_council_position = councillor_court_chaplain } add_character_modifier = { modifier = councillor_unity_modifier_learning years = 5 } } - else = { + else_if = { + limit = { + has_council_position = councillor_marshal + } add_character_modifier = { modifier = councillor_unity_modifier_martial years = 5 } } + else = { + #Add highest skill to spouse... and other council positions I don't know about I guess + if = { + limit = { + highest_skill = diplomacy + } + add_character_modifier = { + modifier = councillor_unity_modifier_diplomacy + years = 5 + } + } + else_if = { + limit = { + highest_skill = stewardship + } + add_character_modifier = { + modifier = councillor_unity_modifier_stewardship + years = 5 + } + } + else_if = { + limit = { + highest_skill = intrigue + } + add_character_modifier = { + modifier = councillor_unity_modifier_intrigue + years = 5 + } + } + else_if = { + limit = { + highest_skill = learning + } + add_character_modifier = { + modifier = councillor_unity_modifier_learning + years = 5 + } + } + else = { + add_character_modifier = { + modifier = councillor_unity_modifier_martial + years = 5 + } + } + } } } } diff --git a/events/activities/hold_court_activity/hold_court_events_general.txt b/events/activities/hold_court_activity/hold_court_events_general.txt index cecf175d..d958591e 100644 --- a/events/activities/hold_court_activity/hold_court_events_general.txt +++ b/events/activities/hold_court_activity/hold_court_events_general.txt @@ -911,7 +911,7 @@ hold_court.1021 = { scripted_trigger hold_court_3000_vassal_trigger = { basic_is_available_ai = yes is_adult = yes - short_term_gold >= standard_activity_cost + short_term_gold >= standard_activity_base_cost has_court_event_flag = no NOT = { has_hook_of_type = { @@ -1024,7 +1024,7 @@ hold_court.3000 = { } pay_short_term_gold = { target = root - gold = standard_activity_cost + gold = standard_activity_base_cost } } custom_tooltip = hold_court.3000.a.tt @@ -1080,7 +1080,7 @@ hold_court.3000 = { } pay_short_term_gold = { target = root - gold = standard_activity_cost + gold = standard_activity_base_cost } } custom_tooltip = hold_court.3000.a.tt @@ -2750,7 +2750,8 @@ hold_court.3060 = { target = root opinion = 20 } - fire_councillor = scope:cp_steward + fire_councillor = scope:cp_steward + scope:cp_steward_replacement = { set_employer = prev } assign_councillor_type = { type = councillor_steward target = scope:cp_steward_replacement @@ -3101,11 +3102,6 @@ hold_court.3090 = { desc = cultural_acceptance_gain_hold_court_event_outcome } } - reverse_add_opinion = { - modifier = pleased_opinion - target = scope:different_culture_vassal - opinion = 20 - } if = { limit = { any_vassal = { @@ -3119,17 +3115,22 @@ hold_court.3090 = { culture = scope:different_culture_vassal.culture } add_opinion = { - target = root - opinion = 5 modifier = respect_opinion + target = root + opinion = 5 } } } + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:different_culture_vassal + opinion = 20 + } stress_impact = { - greedy = medium_stress_loss - arrogant = medium_stress_loss - generous = medium_stress_gain - humble = medium_stress_gain + greedy = medium_stress_gain + arrogant = medium_stress_gain + generous = medium_stress_loss + humble = medium_stress_loss } ai_chance = { @@ -4023,11 +4024,11 @@ hold_court.4600 = { has_trait = sadistic AND = { is_witch_trigger = yes - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = witch GENDER_CHARACTER = root } + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = trait:witch GENDER_CHARACTER = root } } AND = { is_cannibal_trigger = yes - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = cannibal GENDER_CHARACTER = root } + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = trait:cannibal GENDER_CHARACTER = root } } } OR = { # I care about dread @@ -6211,6 +6212,7 @@ hold_court.6040 = { title = hold_court_6040_b_generic add_learning_skill = 1 add_prestige = minor_prestige_gain + random_dummy_gender_effect = yes create_artifact_book_effect = { OWNER = root CREATOR = scope:dummy_gender @@ -8299,22 +8301,28 @@ hold_court.6100 = { immediate = { random_vassal = { - limit = { vassal_war_char_trigger = yes } + limit = { + vassal_war_char_trigger = yes + any_character_war = { vassal_war_conflict_trigger = yes } + } random_character_war = { limit = { vassal_war_conflict_trigger = yes } save_scope_as = vassal_war } } scope:vassal_war = { - primary_attacker = { + casus_belli = { + primary_attacker = { + court_event_character_flag_effect = yes save_scope_as = 6100_vassal_1 - court_event_character_flag_effect = yes + } + primary_defender = { + court_event_character_flag_effect = yes + save_scope_as = 6100_vassal_2 + } } - primary_defender = { - save_scope_as = 6100_vassal_2 - court_event_character_flag_effect = yes - } } + if = { limit = { employs_court_position = court_jester_court_position @@ -10185,7 +10193,16 @@ hold_court.6140 = { scripted_trigger hold_court_6160_valid_bankrupt_vassal_trigger = { has_court_event_flag = no is_available_ai_adult = yes - gold < 0 + OR = { + AND = { + has_treasury = yes + treasury < 0 + } + AND = { + has_treasury = no + gold < 0 + } + } } scripted_trigger hold_court_6160_valid_hook_trigger = { @@ -10382,12 +10399,12 @@ hold_court.6160 = { limit = { is_ai = yes } - short_term_gold >= major_gold_value + short_term_treasury_or_gold >= major_gold_value } } - pay_short_term_gold = { + pay_treasury_or_gold = { target = scope:6160_vassal - gold = medium_gold_value + value = medium_treasury_or_gold_value } add_hook = { type = indebted_hook @@ -10404,7 +10421,7 @@ hold_court.6160 = { ai_chance = { base = 100 modifier = { - gold < medium_gold_value + short_term_treasury_or_gold < medium_treasury_or_gold_value add = -95 } modifier = { @@ -10428,15 +10445,15 @@ hold_court.6160 = { limit = { is_ai = yes } - short_term_gold >= major_gold_value + short_term_treasury_or_gold >= major_gold_value } } scope:6160_vassal = { remove_hook = { target = root } } - pay_short_term_gold = { + pay_treasury_or_gold = { target = scope:6160_vassal - gold = medium_gold_value + value = medium_treasury_or_gold_value } reverse_add_opinion = { target = scope:6160_vassal @@ -10449,7 +10466,7 @@ hold_court.6160 = { ai_chance = { base = 120 modifier = { - gold < medium_gold_value + short_term_treasury_or_gold < medium_treasury_or_gold_value add = -95 } modifier = { @@ -10477,12 +10494,12 @@ hold_court.6160 = { limit = { is_ai = yes } - short_term_gold >= major_gold_value + short_term_treasury_or_gold >= major_treasury_or_gold_value } } - pay_short_term_gold = { + pay_treasury_or_gold = { target = scope:6160_vassal - gold = medium_gold_value + value = medium_treasury_or_gold_value } add_prestige = major_prestige_gain change_current_court_grandeur = medium_court_grandeur_gain @@ -10499,7 +10516,7 @@ hold_court.6160 = { ai_chance = { base = 100 modifier = { - gold < medium_gold_value + treasury_or_gold < medium_treasury_or_gold_value add = -95 } modifier = { @@ -10530,12 +10547,12 @@ hold_court.6160 = { limit = { is_ai = yes } - short_term_gold >= major_gold_value + short_term_treasury_or_gold >= major_treasury_or_gold_value } } - pay_short_term_gold = { + pay_treasury_or_gold = { target = scope:6160_vassal - gold = major_gold_value + value = major_treasury_or_gold_value } add_piety = major_piety_gain change_current_court_grandeur = major_court_grandeur_gain @@ -10555,7 +10572,7 @@ hold_court.6160 = { ai_chance = { base = 100 modifier = { - gold < major_gold_value + short_term_treasury_or_gold < major_treasury_or_gold_value add = -95 } modifier = { @@ -10586,7 +10603,7 @@ hold_court.6160 = { limit = { is_ai = yes } - short_term_gold >= major_gold_value + short_term_treasury_or_gold >= major_treasury_or_gold_value } } if = { @@ -10626,7 +10643,7 @@ hold_court.6160 = { ai_chance = { base = 120 modifier = { - gold < medium_treasury_or_gold_value + short_term_treasury_or_gold < medium_treasury_or_gold_value add = -95 } modifier = { @@ -10654,7 +10671,7 @@ hold_court.6160 = { ai_chance = { base = 100 modifier = { - gold < medium_gold_value + short_term_treasury_or_gold < medium_treasury_or_gold_value add = 95 } modifier = { @@ -17135,8 +17152,9 @@ hold_court.8090 = { } } scope:vassal = { - court_position_generator_effect = { VAR = target EMPLOYER = root } - court_position_generator_effect = { VAR = backup EMPLOYER = root } + court_position_generator_effect = { VAR = target EMPLOYER = root ONLY_EMPTY = no } + # SECONDARY OPTIONS SHOULD BE EMPTY + court_position_generator_effect = { VAR = backup EMPLOYER = root ONLY_EMPTY = yes } } # Trigger next event in chain. hold_court_queue_next_event_effect = yes @@ -23104,6 +23122,9 @@ hold_court.8180 = { any_character_artifact = { exists = yes } } ordered_character_artifact = { + limit = { + artifact_can_be_gift_to_trigger = { RECIPIENT = root } + } order_by = artifact_rarity save_scope_as = vassal_artifact } @@ -24868,6 +24889,7 @@ scripted_trigger hold_court_8210_vassal_trigger = { any_held_title = { title_tier = county any_neighboring_county = { + NOT = { this = root.capital_county } holder = { this = root NOR = { diff --git a/events/activities/pilgrimage_activity/pilgrimage_events.txt b/events/activities/pilgrimage_activity/pilgrimage_events.txt index ad3ccce3..2adbc28b 100644 --- a/events/activities/pilgrimage_activity/pilgrimage_events.txt +++ b/events/activities/pilgrimage_activity/pilgrimage_events.txt @@ -286,8 +286,8 @@ scripted_trigger pilgrimage_0500_valid_holy_site_trigger = { NOR = { this = root.location.barony AND = { - exists = capital_province - this = capital_province.barony + exists = root.capital_province + this = root.capital_province.barony } } } @@ -1900,7 +1900,7 @@ pilgrimage.1130 = { pilgrimage_1130_anti_character_trigger = yes is_of_major_interest_to_root_trigger = yes } - limit = { + alternative_limit = { pilgrimage_1130_anti_character_trigger = yes is_of_minor_interest_to_root_trigger = yes } @@ -2934,12 +2934,14 @@ pilgrimage.2005 = { character = scope:rude_pilgrim animation = laugh } - cooldown = { years = 2 } + cooldown = { years = 5 } trigger = { is_location_valid_for_travel_event_on_land = yes current_travel_plan ?= { any_entourage_character = { is_physically_able_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + is_ruler = no this != root NOT = { is_courtier_of = root } } @@ -2951,6 +2953,8 @@ pilgrimage.2005 = { random_entourage_character = { limit = { is_physically_able_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + is_ruler = no this != root NOT = { is_courtier_of = root } } @@ -4721,7 +4725,7 @@ pilgrimage.2030 = { option = { name = pilgrimage.2030.c trigger = { has_activity_intent = reflection_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent bonus_to_all_types_effect = yes add_piety = miniscule_piety_gain if = { @@ -5420,7 +5424,7 @@ pilgrimage.2101 = { limit = { NOT = { government_has_flag = government_is_mandala - house ?= { has_house_power_parameter = aspect_of_creation } + house ?= { has_house_aspiration_parameter = aspect_of_creation } } } random = { @@ -5480,7 +5484,7 @@ pilgrimage.2101 = { limit = { NOT = { government_has_flag = government_is_mandala - house ?= { has_house_power_parameter = aspect_of_creation } + house ?= { has_house_aspiration_parameter = aspect_of_creation } } } random = { @@ -5686,6 +5690,7 @@ pilgrimage.2501 = { immediate = { create_character = { age = 31 + dynasty = none gender_female_chance = 0.5 trait = education_intrigue_1 trait = stubborn @@ -6335,6 +6340,7 @@ pilgrimage.3001 = { desc = pilgrimage.3001.desc theme = travel_pilgrimage override_background = { reference = terrain_travel } + widget = { gui = event_window_widget_vfx_rain_storm container = foreground_shader_vfx_container } left_portrait = { character = root triggered_animation = { @@ -6349,7 +6355,7 @@ pilgrimage.3001 = { } right_portrait = { character = scope:zealous_priest - animation = personality_zealous + animation = debating outfit_tags = { bishop_outfit } } cooldown = { years = 15 } @@ -6362,6 +6368,7 @@ pilgrimage.3001 = { random_dummy_gender_clergy_effect = yes create_character = { age = 40 + dynasty = none gender = scope:dummy_clergy_gender location = root.location faith = root.faith @@ -6490,6 +6497,7 @@ pilgrimage.3002 = { immediate = { create_character = { age = 40 + dynasty = none gender_female_chance = 50 location = root.location faith = faith:adamites @@ -6522,6 +6530,12 @@ pilgrimage.3002 = { worldly_type_option_effect = yes add_piety = massive_piety_loss set_character_faith = faith:adamites + if = { + limit = { + faith:adamites = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } add_to_entourage_court_and_activity_effect = { CHAR_TO_ADD = scope:naked_preacher NEW_COURT_OWNER = root @@ -6696,7 +6710,7 @@ pilgrimage.3004 = { } right_portrait = { character = scope:doomsayer - animation = personality_zealous + animation = debating outfit_tags = { monk_outfit } } cooldown = { years = 15 } @@ -6709,6 +6723,7 @@ pilgrimage.3004 = { random_dummy_gender_clergy_effect = yes create_character = { age = 40 + dynasty = none trait = devoted gender = scope:dummy_clergy_gender location = root.location @@ -7094,6 +7109,7 @@ pilgrimage.3301 = { random_dummy_gender_clergy_effect = yes create_character = { age = 80 + dynasty = none gender = scope:dummy_clergy_gender location = root.location faith = root.faith @@ -7187,6 +7203,7 @@ pilgrimage.3302 = { immediate = { create_character = { age = 80 + dynasty = none template = default_mystic_character location = root.location culture = root.location.county.culture @@ -7200,7 +7217,7 @@ pilgrimage.3302 = { factor = 2 OR = { #you're in a reflection journey has_activity_intent = reflection_intent - scope:activity = { + involved_activity = { has_activity_option = { category = special_type option = pilgrimage_type_pious @@ -7226,7 +7243,7 @@ pilgrimage.3302 = { } } } - #Humble Relection + #Humble Reflection option = { name = pilgrimage.3302.b pious_type_option_effect = yes @@ -7315,7 +7332,7 @@ pilgrimage.3303 = { factor = 2 OR = { #you're in a reflection journey has_activity_intent = reflection_intent - scope:activity = { + involved_activity = { has_activity_option = { category = special_type option = pilgrimage_type_pious @@ -7491,7 +7508,7 @@ pilgrimage.3401 = { factor = 2 OR = { #you're in a reflection journey has_activity_intent = reflection_intent - scope:activity = { + involved_activity = { has_activity_option = { category = special_type option = pilgrimage_type_pious @@ -8180,6 +8197,7 @@ pilgrimage.6007 = { immediate = { play_music_cue = "mx_cue_sacredrite" create_character = { + dynasty = none location = root.location template = priest_character_template faith = root.faith @@ -10323,6 +10341,7 @@ pilgrimage.6530 = { #template = peasant_villager_foundling_character location = root.location age = { 5 10 } + dynasty = none random_traits = yes culture = root.location.county.culture faith = root.location.county.faith @@ -13891,6 +13910,9 @@ pilgrimage.6850 = { #Improve your spymaster's secret discovery chance option = { name = pilgrimage.6850.b + trigger = { + exists = cp:councillor_spymaster + } add_learning_lifestyle_xp = medium_lifestyle_xp add_character_modifier = { modifier = spymaster_eyes_modifier diff --git a/events/activities/tour_activity/tour_grounds_events_chad.txt b/events/activities/tour_activity/tour_grounds_events_chad.txt index 2e561d2d..ba109a32 100644 --- a/events/activities/tour_activity/tour_grounds_events_chad.txt +++ b/events/activities/tour_activity/tour_grounds_events_chad.txt @@ -192,7 +192,7 @@ tour_grounds_events.6000 = { trigger_if = { limit = { NOT = { is_incestuous_trigger = yes } - trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = root.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:incestuous FAITH = root.faith GENDER_CHARACTER = root } } NOT = { is_close_or_extended_family_of = scope:stop_host_scope } } @@ -392,6 +392,8 @@ scripted_trigger tg_6100_location_has_cathedral_trigger = { has_building_or_higher = holy_wisdom_01 has_building_or_higher = duomo_florence_01 has_building_or_higher = wawel_cathedral_01 + has_building_or_higher = holy_site_st_peters_basilica_01 + has_building_or_higher = mont_st_michel_02 } } @@ -404,6 +406,8 @@ scripted_trigger tg_6100_location_has_mosque_trigger = { has_building_or_higher = holy_site_great_mosque_of_samarra_01 has_building_or_higher = holy_site_prophetic_mosque_01 has_building_or_higher = damascus_mosque_01 + has_building_or_higher = qutb_minar_03 + has_building_or_higher = yazd_mosque_01 } } diff --git a/events/activities/tour_activity/tour_phase_cultural_festival.txt b/events/activities/tour_activity/tour_phase_cultural_festival.txt index 00c4e90a..3cc53fdf 100644 --- a/events/activities/tour_activity/tour_phase_cultural_festival.txt +++ b/events/activities/tour_activity/tour_phase_cultural_festival.txt @@ -2186,6 +2186,15 @@ cultural_festival.2060 = { } any_character_artifact = { #you bring something with you is_equipped = no + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:stop_host_scope } + trigger_if = { + limit = { + scope:stop_host_scope = { + highest_held_title_tier > tier_kingdom #No point in giving a court artifact if this is a character without a court. + } + } + ep1_artifact_is_court_artifact_trigger = no + } } } @@ -2212,6 +2221,7 @@ cultural_festival.2060 = { random_character_artifact = { limit = { is_equipped = no + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:stop_host_scope } trigger_if = { limit = { scope:stop_host_scope = { @@ -2236,6 +2246,7 @@ cultural_festival.2060 = { } alternative_limit = { is_equipped = no + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:stop_host_scope } trigger_if = { limit = { scope:stop_host_scope = { @@ -2248,6 +2259,7 @@ cultural_festival.2060 = { } alternative_limit = { is_equipped = no + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:stop_host_scope } trigger_if = { limit = { scope:stop_host_scope = { @@ -3551,7 +3563,7 @@ cultural_festival.2110 = { trigger = { has_activity_intent = reduce_stress_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent stress_impact = { base = major_stress_impact_loss #your reward callous = minor_stress_impact_gain @@ -5371,6 +5383,7 @@ cultural_festival.3040 = { artifact_type = dagger artifact_type = sword } + artifact_can_be_gift_advance_trigger = yes } } @@ -5384,6 +5397,7 @@ cultural_festival.3040 = { artifact_type = dagger artifact_type = sword } + artifact_can_be_gift_advance_trigger = yes } save_scope_as = sword_in_the_stone_scope } @@ -8819,12 +8833,15 @@ cultural_festival.4300 = { #Vassal: Decide which gift to give has_any_artifact = yes any_character_artifact = { category = inventory + NOT = { has_variable = historical_unique_artifact } + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:visiting_liege } } } random_character_artifact = { limit = { category = inventory NOT = { has_variable = historical_unique_artifact } + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:visiting_liege } } save_scope_as = existing_artifact } @@ -9171,21 +9188,20 @@ cultural_festival.4302 = { #Liege: Pick the gift for Vassal, mirror of cultural_ immediate = { if = { limit = { - root = { - has_any_artifact = yes - any_character_artifact = { - category = inventory - NOT = { has_variable = historical_unique_artifact } - NOT = { has_variable = received_as_cultural_gift } #make sure you don't give back the thing you just got - } + has_any_artifact = yes + any_character_artifact = { + category = inventory + NOT = { has_variable = historical_unique_artifact } + NOT = { has_variable = received_as_cultural_gift } #make sure you don't give back the thing you just got + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:stop_host_scope } } } random_character_artifact = { limit = { category = inventory - artifact_owner = root NOT = { has_variable = historical_unique_artifact } NOT = { has_variable = received_as_cultural_gift } + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:stop_host_scope } } save_scope_as = existing_artifact } diff --git a/events/activities/tour_activity/tour_travel_events.txt b/events/activities/tour_activity/tour_travel_events.txt index c9480143..05aac49c 100644 --- a/events/activities/tour_activity/tour_travel_events.txt +++ b/events/activities/tour_activity/tour_travel_events.txt @@ -1739,7 +1739,10 @@ tour_travel.3120 = { chance = 50 set_variable = inn_artifact_var scope:vassal_inn = { - random_character_artifact = { save_scope_as = vassal_artifact } + random_character_artifact = { + limit = { artifact_can_be_gift_to_trigger = { RECIPIENT = root } } + save_scope_as = vassal_artifact + } } } } @@ -2043,7 +2046,7 @@ tour_travel.3130 = { trigger = { has_activity_intent = justice_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent capital_province.county = { add_county_modifier = { modifier = peasant_influx_modifier @@ -2272,7 +2275,7 @@ tour_travel.3140 = { } ################################################## -# Danger! Ghino di Tacco-ish local ruler invites you to a banquet before stealing from you, then he confesses there are not that many options here to survive and needs money for his family and subjects. Changed the story so much that's almost unrecognisible, apologies. +# Danger! Ghino di Tacco-ish local ruler invites you to a banquet before stealing from you, then he confesses there are not that many options here to survive and needs money for his family and subjects. Changed the story so much that's almost unrecognizable, apologies. # by Veronica Pazos # 3110-3111 ################################################## diff --git a/events/artifacts/historical_artifacts_events.txt b/events/artifacts/historical_artifacts_events.txt index 23bb3f19..2c97ad38 100644 --- a/events/artifacts/historical_artifacts_events.txt +++ b/events/artifacts/historical_artifacts_events.txt @@ -78,7 +78,7 @@ historical_artifacts.0023 = { } # Court Artifacts: Buddhism while = { - count = 6 + count = 12 random_character_with_royal_court = { limit = { faith.religion = religion:buddhism_religion @@ -496,6 +496,165 @@ historical_artifacts.0023 = { create_artifact_spear_of_the_prophet_effect = { OWNER = this } } } + ### Banke no Hoken ~785 + if = { # Chrysanthemum Throne + limit = { + has_dlc_feature = royal_court + current_date >= 867.1.1 + exists = title:k_chrysanthemum_throne.holder + } + title:k_chrysanthemum_throne.holder = { + create_artifact_pedestal_sakanoue_sword_effect = { OWNER = this } + } + } + ### Higekiri ~950 + if = { # Seiwa + limit = { + current_date = 1066.9.15 + exists = title:c_nf_minamoto_seiwa.holder + } + title:c_nf_minamoto_seiwa.holder = { + create_artifact_higekiri_sword_effect = { OWNER = this } + } + } + else_if = { # Kawachi + limit = { + current_date >= 1178.10.1 + exists = title:c_nf_minamoto_kawachi.holder + } + title:c_nf_minamoto_kawachi.holder = { + create_artifact_higekiri_sword_effect = { OWNER = this } + } + } + ### Hizamaru ~950 + if = { # Kawachi + limit = { + current_date = 1066.9.15 + exists = title:c_nf_minamoto_kawachi.holder + } + title:c_nf_minamoto_kawachi.holder = { + create_artifact_hizamaru_sword_effect = { OWNER = this } + } + } + else_if = { # Yoshitsune + limit = { + current_date >= 1178.10.1 + exists = title:d_laamp_yoshitsune.holder + } + title:d_laamp_yoshitsune.holder = { + create_artifact_hizamaru_sword_effect = { OWNER = this } + } + } + ### Dojigiri ~880 + if = { # Uona + limit = { + current_date = 1066.9.15 + exists = title:c_nf_fujiwara_uona.holder + } + title:c_nf_fujiwara_uona.holder = { + create_artifact_dojigiri_sword_effect = { OWNER = this } + } + } + else_if = { # Oshu + limit = { + current_date >= 1178.10.1 + exists = title:c_nf_fujiwara_oshu.holder + } + title:c_nf_fujiwara_oshu.holder = { + create_artifact_dojigiri_sword_effect = { OWNER = this } + } + } + ### Mikazuki Munechika ~980 + if = { # Kan'in + limit = { + current_date = 1066.9.15 + exists = title:c_nf_fujiwara_kanin.holder + } + title:c_nf_fujiwara_kanin.holder = { + create_artifact_mikazuki_munechika_sword_effect = { OWNER = this } + } + } + else_if = { # Tokudaiji + limit = { + current_date >= 1178.10.1 + exists = title:c_nf_fujiwara_ashikaga.holder + } + title:c_nf_fujiwara_ashikaga.holder = { + create_artifact_mikazuki_munechika_sword_effect = { OWNER = this } + } + } + ### Ōtenta ~1082 + if = { # Kiso + limit = { + current_date >= 1178.10.1 + exists = title:c_nf_minamoto_kiso.holder + } + title:c_nf_minamoto_kiso.holder = { + create_artifact_odenta_sword_effect = { OWNER = this } + } + } + ### Hamayumi ~1145 + if = { # Chrysanthemum Throne + limit = { + has_dlc_feature = royal_court + current_date >= 1178.1.1 + exists = title:k_chrysanthemum_throne.holder + } + title:k_chrysanthemum_throne.holder = { + create_artifact_pedestal_hamayumi_bow_effect = { OWNER = this } + } + } + ### Shichishitō <500 + if = { # Chrysanthemum Throne + limit = { + current_date >= 867.1.1 + exists = title:k_chrysanthemum_throne.holder + } + title:k_chrysanthemum_throne.holder = { + create_artifact_pedestal_seven_branched_sword_effect = { OWNER = this } + } + } + ### Gyerim-ro dagger ~867 + if = { # Silla + limit = { + current_date = 867.1.1 # Only 867 + exists = title:k_silla.holder + } + title:k_silla.holder = { + create_artifact_pedestal_gyerimro_dagger_effect = { OWNER = this } + } + } + ### Nukemaru ~1120 + if = { # Taira + limit = { + current_date >= 1178.1.1 + exists = title:c_nf_taira_kanmu.holder + } + title:c_nf_taira_kanmu.holder = { + create_artifact_nukemaru_sword_effect = { OWNER = this } + } + } + ### Kogarasumaru ~945 + if = { # Taira + limit = { + current_date >= 1066.9.15 + exists = title:c_nf_taira_kanmu.holder + } + title:c_nf_taira_kanmu.holder = { + create_artifact_kogarasumaru_sword_effect = { OWNER = this } + } + } + ## Armor + ### Karakawa ~800 + if = { # Taira + limit = { + current_date >= 867.1.1 + exists = title:c_nf_taira_kanmu.holder + } + title:c_nf_taira_kanmu.holder = { + create_artifact_karakawa_armor_effect = { OWNER = this } + } + } ## Books, Scrolls, & Other Recorded Nerdery ### Konagamana if = { @@ -768,6 +927,84 @@ historical_artifacts.0023 = { } } } + #Imperial Seals + every_character_with_royal_court = { + limit = { + has_tgp_dlc_trigger = yes + is_independent_ruler = yes + government_allows = merit + } + create_artifact_dynastic_imperial_seal_effect = { + OWNER = this + SMITH = this + } + } + title:k_chrysanthemum_throne.holder ?= { + create_artifact_dynastic_imperial_seal_effect = { + OWNER = this + SMITH = this + } + } + #Heirloom Seal + #Only in 867 + if = { + limit = { + has_tgp_dlc_trigger = yes + exists = title:h_china.holder + current_date <= 940.1.1 + } + title:h_china.holder = { + create_artifact_heirloom_seal_effect = { + OWNER = this + } + } + } + #Armillary Sphere + if = { + limit = { + has_tgp_dlc_trigger = yes + } + title:h_china.holder = { + create_artifact_chinese_armillary_sphere_effect = { + OWNER = this + } + } + } + #Eight-Fold Chest + if = { + limit = { + has_tgp_dlc_trigger = yes + } + title:h_china.holder = { + create_artifact_eight_fold_chest_effect = { + OWNER = this + } + } + } + #Complete Military Classics + if = { + limit = { + has_tgp_dlc_trigger = yes + current_date > 1150.1.1 #Needs to be long past creation date for this to make sense + } + title:h_china.holder = { + create_artifact_military_classics_effect = { + OWNER = this + } + } + } + #Green Stone Amitabha Buddha Statue + if = { + limit = { + has_tgp_dlc_trigger = yes + current_date >= 1066.5.1 + } + title:k_viet.holder = { + create_artifact_statue_viet_green_amitabha_buddha_effect = { + OWNER = this + } + } + } } } diff --git a/events/birth_events.txt b/events/birth_events.txt index 63dc983c..fec4b52a 100644 --- a/events/birth_events.txt +++ b/events/birth_events.txt @@ -1499,8 +1499,8 @@ birth.1003 = { character = scope:second_adult animation = newborn } - lower_left_portrait = scope:child - lower_center_portrait = scope:child_2 + lower_center_portrait = scope:child + lower_right_portrait = scope:child_2 trigger = { OR = { scope:father = scope:real_father @@ -1510,10 +1510,8 @@ birth.1003 = { NOT = { any_known_secret = { secret_owner = scope:mother - AND = { - secret_type = secret_disputed_heritage - secret_target = scope:child - } + secret_type = secret_disputed_heritage + secret_target = scope:child } } } @@ -3326,12 +3324,18 @@ birth.8011 = { liege_has_co_emperorship_trigger = yes liege = { is_roman_emperor_trigger = yes - capital_county = title:c_byzantion #Must rule from the Bucoleon Palace. + OR = { + capital_county = title:c_byzantion #Must rule from the Bucoleon Palace. + capital_county = title:c_roma # ... or from Rome itself. + } } } trigger_else = { is_roman_emperor_trigger = yes - capital_county = title:c_byzantion #Must rule from the Bucoleon Palace. + OR = { + capital_county = title:c_byzantion #Must rule from the Bucoleon Palace. + capital_county = title:c_roma # ... or from Rome itself. + } } } mother = { @@ -3341,6 +3345,7 @@ birth.8011 = { exists = location # Security check OR = { location = title:c_byzantion.title_province + location = title:c_roma.title_province # Be a bit more lenient with co-emperors. AND = { is_diarch = yes @@ -3351,7 +3356,6 @@ birth.8011 = { liege_has_co_emperorship_trigger = yes } } - } AND = { #Landed rulers can be assumed to make the journey, unless they have some extremely pressing reason not to. is_ruler = yes diff --git a/events/bp1_dan_events.txt b/events/bp1_dan_events.txt index 4fcbf40b..3189a3e6 100644 --- a/events/bp1_dan_events.txt +++ b/events/bp1_dan_events.txt @@ -715,7 +715,7 @@ bp1_yearly.7003 = { option = { #Expose them name = bp1_yearly.7003.a trigger = { - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = deviant GENDER_CHARACTER = root } + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = trait:deviant GENDER_CHARACTER = root } } @@ -1830,10 +1830,6 @@ bp1_yearly.7052 = { } } - stress_impact = { - ambitious = minor_stress_impact_gain - } - progress_towards_friend_effect = { REASON = friend_story_by_fire CHARACTER = scope:story_friend @@ -1879,9 +1875,7 @@ bp1_yearly.7052 = { } stress_impact = { - shy = minor_stress_gain ambitious = minor_stress_loss - lazy = minor_stress_gain } ai_chance = { diff --git a/events/court_events/01_ep3_court_events_3.txt b/events/court_events/01_ep3_court_events_3.txt index 125fd7cb..f006bb03 100644 --- a/events/court_events/01_ep3_court_events_3.txt +++ b/events/court_events/01_ep3_court_events_3.txt @@ -2929,22 +2929,24 @@ court_events.3120 = { any_courtier_or_guest = { is_available = yes OR = { - AND = { - inspiration ?= { - NOR = { - has_inspiration_type = adventure_inspiration - has_inspiration_type = alchemy_inspiration - has_inspiration_type = book_inspiration - } + inspiration ?= { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + has_inspiration_type = smith_inspiration + has_inspiration_type = weaver_inspiration + has_inspiration_type = artisan_inspiration } } AND = { has_completed_inspiration = yes var:created_artifact_type ?= { - NOR = { - this = flag:adventure - this = flag:alchemy - this = flag:book + OR = { + this = flag:weapon + this = flag:armor + this = flag:smith + this = flag:weaver + this = flag:artisan } } } @@ -3025,23 +3027,24 @@ court_events.3120 = { limit = { is_available = yes OR = { - AND = { - exists = inspiration - inspiration ?= { - NOR = { - has_inspiration_type = adventure_inspiration - has_inspiration_type = alchemy_inspiration - has_inspiration_type = book_inspiration - } + inspiration ?= { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + has_inspiration_type = smith_inspiration + has_inspiration_type = weaver_inspiration + has_inspiration_type = artisan_inspiration } } AND = { has_completed_inspiration = yes var:created_artifact_type ?= { - NOR = { - this = flag:adventure - this = flag:alchemy - this = flag:book + OR = { + this = flag:weapon + this = flag:armor + this = flag:smith + this = flag:weaver + this = flag:artisan } } } diff --git a/events/court_events/court_events_general.txt b/events/court_events/court_events_general.txt index 43a4a128..6fbcfaca 100644 --- a/events/court_events/court_events_general.txt +++ b/events/court_events/court_events_general.txt @@ -2486,6 +2486,7 @@ court.3031 = { option = { name = court.3031.c every_sub_realm_county = { + custom = every_culture_county_3031 limit = { culture = scope:reference_county.culture } @@ -8734,6 +8735,7 @@ court.8010 = { limit = { any_character_artifact = { count > 1 + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:underequipped } artifact_slot_type = primary_armament } } @@ -8741,6 +8743,7 @@ court.8010 = { limit = { is_equipped = no artifact_slot_type = primary_armament + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:underequipped } } order_by = { value = 0 @@ -13412,13 +13415,41 @@ court.9300 = { } immediate = { + random_courtier = { + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + save_temporary_scope_as = another_courtier_check + root = { + any_courtier_or_guest = { + is_available_ai_adult = yes + has_court_event_flag = no + loves_food_trigger = yes + NOR = { + this = scope:another_courtier_check + is_of_major_interest_to_root_trigger = yes + } + is_of_minor_interest_to_root_trigger = yes + } + } + } + weight = { + base = 1 + modifier = { + add = 100 + is_knight = yes + } + } + save_scope_as = worried_courtier + court_event_character_flag_effect = yes + } random_courtier_or_guest = { limit = { is_available_ai_adult = yes has_court_event_flag = no loves_food_trigger = yes NOR = { - this = scope:another_courtier_check + this = scope:worried_courtier is_of_major_interest_to_root_trigger = yes } is_of_minor_interest_to_root_trigger = yes @@ -13439,21 +13470,6 @@ court.9300 = { save_scope_as = overindulger_target court_event_character_flag_effect = yes } - random_courtier = { - limit = { - is_available_ai_adult = yes - this != scope:overindulger_target - } - weight = { - base = 1 - modifier = { - add = 100 - is_knight = yes - } - } - save_scope_as = worried_courtier - court_event_character_flag_effect = yes - } } option = { # Stealing the King's treats, are we!? diff --git a/events/court_events/court_events_general_1.txt b/events/court_events/court_events_general_1.txt index 6391c4fa..1fbe000a 100644 --- a/events/court_events/court_events_general_1.txt +++ b/events/court_events/court_events_general_1.txt @@ -706,10 +706,7 @@ court_events.1010 = { scope:grander_ruler = { any_character_artifact = { ep1_artifact_is_court_artifact_trigger = yes - NOR = { - has_variable = banner_house - has_variable = banner_dynasty - } + artifact_can_be_gift_advance_trigger = yes } } } @@ -717,10 +714,7 @@ court_events.1010 = { random_character_artifact = { limit = { ep1_artifact_is_court_artifact_trigger = yes - NOR = { - has_variable = banner_house - has_variable = banner_dynasty - } + artifact_can_be_gift_advance_trigger = yes } save_scope_as = coveted_artifact } diff --git a/events/court_maintenance_events.txt b/events/court_maintenance_events.txt index 19ff1595..d31e9efa 100644 --- a/events/court_maintenance_events.txt +++ b/events/court_maintenance_events.txt @@ -292,8 +292,7 @@ court_maintenance.0011 = { # No owned house banner NOT = { any_character_artifact = { - has_variable = banner_house - var:banner_house = root.house + var:banner_house ?= root.house } } AND = { @@ -302,15 +301,14 @@ court_maintenance.0011 = { this = dynasty.dynast # Dynasty Head any_parent = { # Parent landless employer = prev - dynasty = prev.dynasty + dynasty ?= prev.dynasty this = dynasty.dynast } } # Dynasty banner does not exist NOT = { any_character_artifact = { - has_variable = banner_dynasty - var:banner_dynasty = root.dynasty + var:banner_dynasty ?= root.dynasty } } } diff --git a/events/decisions_events/east_europe_events.txt b/events/decisions_events/east_europe_events.txt index db76d256..b9bebf5b 100644 --- a/events/decisions_events/east_europe_events.txt +++ b/events/decisions_events/east_europe_events.txt @@ -30,12 +30,16 @@ #I united the western slavs east_europe.0001 = { #by Mathilda Bjarnehed type = character_event + window = big_event_window title = east_europe.0001.t desc = east_europe.0001.desc - theme = realm + theme = crown + override_effect_2d = { reference = legend_glow } + override_background = ep2_travel_farms left_portrait = { character = scope:western_slav_uniter - animation = personality_honorable + animation = sword_coup_degrace + camera = camera_event_center_very_large } immediate = { @@ -116,10 +120,14 @@ east_europe.0010 = { #by Mathilda Bjarnehed type = character_event title = east_europe.0010.t desc = east_europe.0010.desc - theme = realm + theme = crown + window = big_event_window + override_effect_2d = { reference = legend_glow } + override_background = courtyard left_portrait = { character = scope:slav_uniter - animation = personality_honorable + animation = jockey_wave + camera = camera_event_horse_right } immediate = { @@ -550,6 +558,12 @@ east_europe.0034 = { NOT = { religion = religion:magyar_religion } } set_character_faith_with_conversion = faith:magyar_pagan + if = { + limit = { + faith:magyar_pagan = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } } #Those who aren't pagans are probably horrified. @@ -1480,6 +1494,12 @@ east_europe.0116 = { #I'll just quietly convert by myself. set_character_faith = scope:hof.faith + if = { + limit = { + scope:hof.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } #Costs you some piety, but easier to flip back from. add_piety = minor_piety_loss #Set up scope:accuser loc. @@ -1527,6 +1547,12 @@ east_europe.0116 = { #The realm must join me! set_character_faith_with_conversion = scope:hof.faith + if = { + limit = { + scope:hof.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } #A pious act, from the POV of your new faith. add_piety = medium_piety_gain #Set up scope:accuser loc. @@ -2584,7 +2610,7 @@ east_europe.0125 = { #Default to yes. 100 = { trigger_event = { - id = east_europe.113 + id = east_europe.0113 days = { 7 14 } } diff --git a/events/decisions_events/iberia_north_africa_events.txt b/events/decisions_events/iberia_north_africa_events.txt index eedd45e4..5ded5411 100644 --- a/events/decisions_events/iberia_north_africa_events.txt +++ b/events/decisions_events/iberia_north_africa_events.txt @@ -1459,6 +1459,12 @@ iberia_north_africa.0122 = { } set_character_faith_with_conversion = scope:religious_leader.faith + if = { + limit = { + scope:religious_leader.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } show_as_tooltip = { scope:religious_leader = { favour_the_countryside_basques_decision_generic_effects_scripted_effect = yes diff --git a/events/decisions_events/mpo_greatest_of_khans_events.txt b/events/decisions_events/mpo_greatest_of_khans_events.txt index 5cde29eb..727f5244 100644 --- a/events/decisions_events/mpo_greatest_of_khans_events.txt +++ b/events/decisions_events/mpo_greatest_of_khans_events.txt @@ -1043,7 +1043,7 @@ mpo_greatest_of_khans.0001 = { add_dynasty_prestige = fought_gok_alone_value } } - mpo_add_golden_lineage_effect = { CHARACTER = root } + mpo_add_golden_lineage_effect = yes } option = { @@ -1143,7 +1143,7 @@ mpo_greatest_of_khans.0002 = { custom_tooltip = gok_threatening_powers_tt custom_tooltip = mongol_invasion.1002.genghis_khan_tt custom_tooltip = gok_time_limit_end_decision_other_players_tt - mpo_add_golden_lineage_effect = { CHARACTER = scope:genghis_khan } + mpo_add_golden_lineage_effect = yes } if = { limit = { @@ -2493,7 +2493,7 @@ mpo_greatest_of_khans.1001 = { custom_tooltip = genghis_khan_mongol_troops_tt custom_tooltip = gok_threatening_powers_tt custom_tooltip = mongol_invasion.1002.genghis_khan_tt - mpo_add_golden_lineage_effect = { CHARACTER = scope:temujin } + mpo_add_golden_lineage_effect = yes } if = { diff --git a/events/decisions_events/roman_restoration_events.txt b/events/decisions_events/roman_restoration_events.txt index d6a3bc14..4372e531 100644 --- a/events/decisions_events/roman_restoration_events.txt +++ b/events/decisions_events/roman_restoration_events.txt @@ -1218,6 +1218,12 @@ roman_restoration.0101 = { } } set_character_faith = scope:mending_faith + if = { + limit = { + scope:mending_faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } every_held_title = { title_tier = county set_county_faith = scope:mending_faith diff --git a/events/dlc/ach/ach_coronation_events.txt b/events/dlc/ach/ach_coronation_events.txt index 4aaa5aae..9dd7c393 100644 --- a/events/dlc/ach/ach_coronation_events.txt +++ b/events/dlc/ach/ach_coronation_events.txt @@ -4128,10 +4128,8 @@ scripted_trigger ach_coronation_0016_eligible_artifact = { NOR = { artifact_slot_type = helmet artifact_slot_type = regalia - has_variable = banner_house - has_variable = banner_dynasty - has_variable = 1025_treasure_map } + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:host } artifact_durability > 10 } @@ -4342,6 +4340,7 @@ ach_coronation.0016 = { } } ordered_character_artifact = { # Try and give away the worst one first + limit = { artifact_can_be_gift_to_trigger = { RECIPIENT = scope:host } } order_by = { value = 1 if = { @@ -5371,6 +5370,7 @@ scripted_trigger ach_coronation_0018_eligible_family_member_trigger = { scripted_trigger ach_coronation_0018_grantable_title_trigger = { tier = tier_county this != scope:host.capital_county + is_landless_type_title = no } scripted_effect ach_coronation_0018_choose_title_effect = { @@ -6356,6 +6356,13 @@ ach_coronation.0020 = { trigger = { involved_activity = { + activity_host = { + any_held_title = { + tier = tier_county + this != prev.capital_county + is_landless_type_title = no + } + } any_attending_character = { ach_coronation_0018_eligible_family_member_trigger = yes } @@ -6708,11 +6715,9 @@ ach_coronation.0022 = { # Ongoing plague any_sub_realm_county = { count >= 3 - any_county_province = { - any_province_epidemic = { - count >= 1 - outbreak_intensity > minor - } + any_county_province_epidemic = { + count >= 1 + outbreak_intensity > minor } } } @@ -6738,11 +6743,9 @@ ach_coronation.0022 = { # Ongoing plague any_sub_realm_county = { count >= 10 - any_county_province = { - any_province_epidemic = { - count >= 1 - outbreak_intensity > minor - } + any_county_province_epidemic = { + count >= 1 + outbreak_intensity > minor } } } @@ -6755,11 +6758,9 @@ ach_coronation.0022 = { # Ongoing plague any_sub_realm_county = { count >= 3 - any_county_province = { - any_province_epidemic = { - count >= 1 - outbreak_intensity > major - } + any_county_province_epidemic = { + count >= 1 + outbreak_intensity > major } } } @@ -6788,11 +6789,9 @@ ach_coronation.0022 = { limit = { any_sub_realm_county = { count >= 4 - any_county_province = { - any_province_epidemic = { - count >= 1 - outbreak_intensity = apocalyptic - } + any_county_province_epidemic = { + count >= 1 + outbreak_intensity = apocalyptic } } } @@ -6913,7 +6912,6 @@ ach_coronation.0022 = { } } } - custom_tooltip = available_because_intent_tt flavor = ach_coronation.0022.a.coronation_disrupt_loyalists.flavor reason = activity_intent skill = diplomacy @@ -7022,7 +7020,7 @@ ach_coronation.0022 = { option = { # It's not our goodly Host's fault! name = ach_coronation.0022.a.offer_support trigger = { has_activity_intent = coronation_offer_support } - custom_tooltip = available_because_intent_tt + reason = activity_intent flavor = ach_coronation.0022.a.offer_support.flavor add_piety = medium_piety_loss diff --git a/events/dlc/ach/ach_maintenance_events.txt b/events/dlc/ach/ach_maintenance_events.txt index c2167e80..3864adc4 100644 --- a/events/dlc/ach/ach_maintenance_events.txt +++ b/events/dlc/ach/ach_maintenance_events.txt @@ -684,7 +684,7 @@ ach_maintenance_events.0105 = { #Host excommunicated, notify guests } immediate = { - faith.religious_head = { save_scope_as = hof } + scope:host.faith.religious_head = { save_scope_as = hof } } option = { @@ -710,7 +710,7 @@ ach_maintenance_events.0106 = { #Host excommunicated, notify host } immediate = { - faith.religious_head = { save_scope_as = hof } + scope:hof.faith.religious_head = { save_scope_as = hof } } option = { diff --git a/events/dlc/bp3/bp3_journey_events.txt b/events/dlc/bp3/bp3_journey_events.txt index cbd89ed1..56b66d2a 100644 --- a/events/dlc/bp3/bp3_journey_events.txt +++ b/events/dlc/bp3/bp3_journey_events.txt @@ -5791,7 +5791,6 @@ bp3_journey.2200 = { is_available_healthy_ai_adult = yes bodyguard_validity_trigger = { EMPLOYER = root } } - is_valid_to_hire_court_position_type = master_of_spoils_camp_officer } random_pool_character = { province = scope:location diff --git a/events/dlc/bp3/bp3_survey_events.txt b/events/dlc/bp3/bp3_survey_events.txt index 72f2f6ef..a0cb139c 100644 --- a/events/dlc/bp3/bp3_survey_events.txt +++ b/events/dlc/bp3/bp3_survey_events.txt @@ -202,16 +202,13 @@ bp3_survey.0010 = { scope:inspection_location = { random_neighboring_county = { limit = { - exists = holder - holder.top_liege = root.location.county.holder.top_liege - NOT = { - holder = { - OR = { - is_vassal_of = root - this = root - } + holder = { + NOR = { + is_vassal_or_below_of = root + this = root } } + holder.top_liege = root.location.county.holder.top_liege } save_scope_as = claim_location } @@ -286,7 +283,8 @@ bp3_survey.0010 = { } } } - else = { # Not focused on Claims + else_if = { # Not focused on Claims + limit = { exists = scope:claim_location } scope:claim_location.duchy = { if = { limit = { @@ -685,35 +683,35 @@ bp3_survey.0010 = { value = major_merit_gain house ?= { if = { - limit = { has_house_power_parameter = inspection_activity_merit_bonus_5 } + limit = { has_house_aspiration_parameter = inspection_activity_merit_bonus_5 } multiply = { value = 1 add = inspection_activity_merit_bonus_5_value } } else_if = { - limit = { has_house_power_parameter = inspection_activity_merit_bonus_4 } + limit = { has_house_aspiration_parameter = inspection_activity_merit_bonus_4 } multiply = { value = 1 add = inspection_activity_merit_bonus_4_value } } else_if = { - limit = { has_house_power_parameter = inspection_activity_merit_bonus_3 } + limit = { has_house_aspiration_parameter = inspection_activity_merit_bonus_3 } multiply = { value = 1 add = inspection_activity_merit_bonus_3_value } } else_if = { - limit = { has_house_power_parameter = inspection_activity_merit_bonus_2 } + limit = { has_house_aspiration_parameter = inspection_activity_merit_bonus_2 } multiply = { value = 1 add = inspection_activity_merit_bonus_2_value } } else_if = { - limit = { has_house_power_parameter = inspection_activity_merit_bonus_1 } + limit = { has_house_aspiration_parameter = inspection_activity_merit_bonus_1 } multiply = { value = 1 add = inspection_activity_merit_bonus_1_value @@ -729,7 +727,7 @@ bp3_survey.0010 = { # If you have the governance aspiration, you gain some gold and a higher salary if = { limit = { - house ?= { has_house_power_parameter = inspection_activity_increases_salary } + house ?= { has_house_aspiration_parameter = inspection_activity_increases_salary } } scope:activity = { add_activity_log_entry = { @@ -852,35 +850,35 @@ bp3_survey.0010 = { value = minor_merit_gain house ?= { if = { - limit = { has_house_power_parameter = inspection_activity_merit_bonus_5 } + limit = { has_house_aspiration_parameter = inspection_activity_merit_bonus_5 } multiply = { value = 1 add = inspection_activity_merit_bonus_5_value } } else_if = { - limit = { has_house_power_parameter = inspection_activity_merit_bonus_4 } + limit = { has_house_aspiration_parameter = inspection_activity_merit_bonus_4 } multiply = { value = 1 add = inspection_activity_merit_bonus_4_value } } else_if = { - limit = { has_house_power_parameter = inspection_activity_merit_bonus_3 } + limit = { has_house_aspiration_parameter = inspection_activity_merit_bonus_3 } multiply = { value = 1 add = inspection_activity_merit_bonus_3_value } } else_if = { - limit = { has_house_power_parameter = inspection_activity_merit_bonus_2 } + limit = { has_house_aspiration_parameter = inspection_activity_merit_bonus_2 } multiply = { value = 1 add = inspection_activity_merit_bonus_2_value } } else_if = { - limit = { has_house_power_parameter = inspection_activity_merit_bonus_1 } + limit = { has_house_aspiration_parameter = inspection_activity_merit_bonus_1 } multiply = { value = 1 add = inspection_activity_merit_bonus_1_value @@ -896,7 +894,7 @@ bp3_survey.0010 = { # If you have the governance aspiration, you gain some gold and a higher salary - but less than if you were successful if = { limit = { - house ?= { has_house_power_parameter = inspection_activity_increases_salary } + house ?= { has_house_aspiration_parameter = inspection_activity_increases_salary } } scope:activity = { add_activity_log_entry = { diff --git a/events/dlc/ce1/epidemic_events.txt b/events/dlc/ce1/epidemic_events.txt index bc933f51..4e81bc37 100644 --- a/events/dlc/ce1/epidemic_events.txt +++ b/events/dlc/ce1/epidemic_events.txt @@ -90,6 +90,16 @@ epidemic_events.0100 = { title = epidemic_events.0100.t desc = epidemic_events.0100.desc theme = plague + override_background = { + trigger = { + NOT = { + capital_county = { + has_province_with_epidemic = { intensity = any } + } + } + } + reference = tavern + } left_portrait = { character = root animation = fear @@ -110,6 +120,16 @@ epidemic_events.0101 = { title = epidemic_events.0101.t desc = epidemic_events.0101.desc theme = plague + override_background = { + trigger = { + NOT = { + capital_county = { + has_province_with_epidemic = { intensity = any } + } + } + } + reference = courtyard + } left_portrait = { character = root animation = personality_content @@ -1833,7 +1853,7 @@ epidemic_events.1060 = { 20 = { trigger = { trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = witch + TRAIT = trait:witch FAITH = root.faith GENDER_CHARACTER = root } @@ -2514,7 +2534,7 @@ epidemic_events.1063 = { AND = { is_witch_trigger = yes trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = witch + TRAIT = trait:witch FAITH = root.faith GENDER_CHARACTER = root } @@ -2522,7 +2542,7 @@ epidemic_events.1063 = { AND = { is_incestuous_trigger = yes trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = incestuous + TRAIT = trait:incestuous FAITH = root.faith GENDER_CHARACTER = root } @@ -6719,7 +6739,7 @@ epidemic_events.5007 = { trigger = { is_available = yes trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = witch + TRAIT = trait:witch FAITH = root.faith GENDER_CHARACTER = root } @@ -6760,7 +6780,7 @@ epidemic_events.5007 = { is_available_healthy_ai_adult = yes is_ai = yes trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = witch + TRAIT = trait:witch FAITH = this.faith GENDER_CHARACTER = this } diff --git a/events/dlc/ce1/legend_events.txt b/events/dlc/ce1/legend_events.txt index 591f6c04..f937478c 100644 --- a/events/dlc/ce1/legend_events.txt +++ b/events/dlc/ce1/legend_events.txt @@ -473,13 +473,95 @@ legend_events.0010 = { character = root animation = personality_honorable } - center_portrait = { + right_portrait = { character = scope:chronicler animation = chancellor } - right_portrait = { - character = scope:potential_promoter - animation = chancellor + lower_center_portrait = scope:potential_promoter + + trigger = { + OR = { + scope:chronicler ?= { + is_alive = yes + has_court_position = chronicler_court_position + employer = root + } + employs_court_position = chronicler_court_position + } + OR = { + # Vassals + any_vassal_or_below = { + # No barons + highest_held_title_tier >= tier_county + # Not promoting their own legend + promoted_legend.legend_owner != root + promoted_legend != scope:liege.promoted_legend + is_ai = yes + } + # Neighbourinos + any_neighboring_and_across_water_top_liege_realm_owner = { + # Not promoting their own legend + promoted_legend.legend_owner != root + promoted_legend != scope:liege.promoted_legend + is_ai = yes + } + } + } + + immediate = { + if = { + limit = { + NOT = { + scope:chronicler ?= { + is_alive = yes + has_court_position = chronicler_court_position + employer = root + } + } + } + court_position:chronicler_court_position ?= { save_scope_as = chronicler } + } + random_list = { + # Vassals + 75 = { + trigger = { + any_vassal_or_below = { + highest_held_title_tier >= tier_county + promoted_legend.legend_owner != root + promoted_legend != scope:liege.promoted_legend + is_ai = yes + } + } + random_vassal_or_below = { + limit = { + highest_held_title_tier >= tier_county + promoted_legend.legend_owner != root + promoted_legend != scope:liege.promoted_legend + is_ai = yes + } + save_scope_as = potential_promoter + } + } + # Neighbourinos + 25 = { + trigger = { + any_neighboring_and_across_water_top_liege_realm_owner = { + promoted_legend.legend_owner != root + promoted_legend != scope:liege.promoted_legend + is_ai = yes + } + } + random_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + promoted_legend.legend_owner != root + promoted_legend != scope:liege.promoted_legend + is_ai = yes + } + save_scope_as = potential_promoter + } + } + } + } option = { # Diplo duel option @@ -497,8 +579,10 @@ legend_events.0010 = { scope:potential_promoter = { exists = promoted_legend } factor = 0.5 } + min = 10 send_interface_toast = { title = legend_events.0010.a.success + right_icon = scope:potential_promoter scope:potential_promoter = { set_promoted_legend = root.promoted_legend } @@ -514,8 +598,10 @@ legend_events.0010 = { scope:potential_promoter = { exists = promoted_legend } factor = 2 } + min = 10 send_interface_toast = { title = legend_events.0010.a.failure + right_icon = scope:potential_promoter add_prestige = minor_prestige_loss } } @@ -544,8 +630,10 @@ legend_events.0010 = { scope:potential_promoter = { exists = promoted_legend } factor = 0.5 } + min = 10 send_interface_toast = { title = legend_events.0010.a.success + right_icon = scope:potential_promoter scope:potential_promoter = { set_promoted_legend = root.promoted_legend } @@ -561,8 +649,10 @@ legend_events.0010 = { scope:potential_promoter = { exists = promoted_legend } factor = 2 } + min = 10 send_interface_toast = { title = legend_events.0010.a.failure + right_icon = scope:potential_promoter add_prestige = minor_prestige_loss } } diff --git a/events/dlc/ce1/legend_spread_events_nick.txt b/events/dlc/ce1/legend_spread_events_nick.txt index 5f5c4358..e43c0029 100644 --- a/events/dlc/ce1/legend_spread_events_nick.txt +++ b/events/dlc/ce1/legend_spread_events_nick.txt @@ -4460,7 +4460,7 @@ legend_spread_events.5230 = { } # Just to ensure people are actually freaked out by this trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { - TRAIT = cannibal + TRAIT = trait:cannibal GENDER_CHARACTER = root } } @@ -6307,10 +6307,8 @@ legend_spread_events.5320 = { random_character_artifact = { limit = { + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:vassal } NOR = { - #Ensure it's not trash - has_variable = unwanted_artifact - #And doesn't have a claim on it any_artifact_claimant = { is_alive = no diff --git a/events/dlc/ce1/physician_epidemic_events.txt b/events/dlc/ce1/physician_epidemic_events.txt index 8e95c668..58b5334b 100644 --- a/events/dlc/ce1/physician_epidemic_events.txt +++ b/events/dlc/ce1/physician_epidemic_events.txt @@ -1248,6 +1248,8 @@ physician_epidemic_events.1050 = { character = scope:enemy } + cooldown = { years = 20 } + trigger = { is_at_war = yes exists = court_position:court_physician_court_position diff --git a/events/dlc/ep1/ep1_court_position_events.txt b/events/dlc/ep1/ep1_court_position_events.txt index 2908de75..7dd66a63 100644 --- a/events/dlc/ep1/ep1_court_position_events.txt +++ b/events/dlc/ep1/ep1_court_position_events.txt @@ -114,7 +114,7 @@ court_position.9001 = { # FOR TARGET: Food taster dies to poison court_position.9002 = { type = character_event - window = scheme_target_event + window = scheme_conclusion_event_no_header title = court_position.9001.t desc = { desc = court_position.9002.desc @@ -291,7 +291,7 @@ court_position.9011 = { # FOR TARGET: Cup-bearer dies to poison court_position.9012 = { type = character_event - window = scheme_target_event + window = scheme_conclusion_event_no_header title = court_position.9011.t desc = { desc = court_position.9012.desc @@ -472,7 +472,7 @@ court_position.9021 = { # FOR TARGET: Bodyguard dies to assassin court_position.9022 = { type = character_event - window = scheme_target_event + window = scheme_conclusion_event_no_header title = court_position.9021.t desc = { desc = court_position.9022.desc diff --git a/events/dlc/ep1/ep1_flavor_events.txt b/events/dlc/ep1/ep1_flavor_events.txt index bd237da1..0afe9b7e 100644 --- a/events/dlc/ep1/ep1_flavor_events.txt +++ b/events/dlc/ep1/ep1_flavor_events.txt @@ -186,7 +186,7 @@ scripted_effect ep1_flavour_0001_reveal_secret_child_effect = { # Then, do the actual reveal. ## First the effects of the extra-marital sex. ### We regard this as the same as cheating actively for simplicity and the sake of the scale of the lie. - extramaritial_sex_exposure_consequences_with_had_recent_sex_var_effect = { SPOUSE_EVENT = no } + extramarital_sex_exposure_consequences_with_had_recent_sex_var_effect = { SPOUSE_EVENT = no } # Finally, deal with scope:scion_actual's transformation. scope:scion_actual = { # Then make scope:scion_actual a bastard. @@ -253,6 +253,7 @@ ep1_flavor.0001 = { cooldown = { years = 100 } trigger = { + is_ai = no # Standard checks. has_royal_court = yes has_dlc_feature = royal_court diff --git a/events/dlc/ep1/ep1_fund_inspiration_events.txt b/events/dlc/ep1/ep1_fund_inspiration_events.txt index a1290099..2d65ccfb 100644 --- a/events/dlc/ep1/ep1_fund_inspiration_events.txt +++ b/events/dlc/ep1/ep1_fund_inspiration_events.txt @@ -1033,6 +1033,16 @@ scripted_trigger fund_inspiration_0031_title_based_option_trigger = { global_var:flag_created_siam_kingdom = root NOT = { exists = scope:book_topic_creation } } + AND = { + exists = global_var:flag_created_brunei_kingdom + global_var:flag_created_brunei_kingdom = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_created_brunei_empire + global_var:flag_created_brunei_empire = root + NOT = { exists = scope:book_topic_creation } + } AND = { exists = global_var:flag_formed_rum_sultanate global_var:flag_formed_rum_sultanate = root @@ -2382,7 +2392,7 @@ fund_inspiration.0031 = { if = { limit = { NOT = { is_witch_trigger = yes } - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = root.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = root.faith GENDER_CHARACTER = root } } if = { limit = { @@ -2489,19 +2499,19 @@ fund_inspiration.0031 = { add = -70 exists = scope:lifestyle_option_witch NOT = { has_trait = witch } - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = root.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = root.faith GENDER_CHARACTER = root } } modifier = { # If it's hidden secrets it's rare that they write about it add = -70 exists = scope:lifestyle_option_deviant NOT = { has_trait = deviant } - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = root.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:deviant FAITH = root.faith GENDER_CHARACTER = root } } modifier = { # If it's hidden secrets it's rare that they write about it add = -70 exists = scope:lifestyle_option_cannibal NOT = { has_trait = cannibal } - trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = root.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:cannibal FAITH = root.faith GENDER_CHARACTER = root } } modifier = { #However, the might if they're arrogant add = 50 @@ -3586,11 +3596,7 @@ fund_inspiration.0043 = { } NOR = { any_artifact = { - trigger_if = { - limit = { exists = var:banner_dynasty } - var:banner_dynasty = root.dynasty - } - trigger_else = { always = no } + var:banner_dynasty ?= root.dynasty OR = { artifact_owner = root artifact_owner = { in_diplomatic_range = root } @@ -6811,15 +6817,15 @@ fund_inspiration.1031 = { OR = { AND = { scope:newly_created_artifact = { has_artifact_feature = book_subject_witch } - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = root.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = root.faith GENDER_CHARACTER = root } } AND = { scope:newly_created_artifact = { has_artifact_feature = book_subject_cannibal } - trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = root.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:cannibal FAITH = root.faith GENDER_CHARACTER = root } } AND = { scope:newly_created_artifact = { has_artifact_feature = book_subject_deviant } - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = root.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:deviant FAITH = root.faith GENDER_CHARACTER = root } } } } @@ -15002,7 +15008,7 @@ scripted_trigger fund_inspiration_3001_witch_topic_trigger = { exists = scope:inspiration_owner.var:book_subject scope:inspiration_owner.var:book_subject = flag:witch trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = witch + TRAIT = trait:witch GENDER_CHARACTER = root FAITH = root.faith } @@ -15011,7 +15017,7 @@ scripted_trigger fund_inspiration_3001_cannibal_topic_trigger = { exists = scope:inspiration_owner.var:book_subject scope:inspiration_owner.var:book_subject = flag:cannibal trait_is_criminal_in_faith_trigger = { - TRAIT = cannibal + TRAIT = trait:cannibal GENDER_CHARACTER = root FAITH = root.faith } @@ -15020,7 +15026,7 @@ scripted_trigger fund_inspiration_3001_deviant_topic_trigger = { exists = scope:inspiration_owner.var:book_subject scope:inspiration_owner.var:book_subject = flag:deviant trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = deviant + TRAIT = trait:deviant GENDER_CHARACTER = root FAITH = root.faith } @@ -18427,8 +18433,8 @@ scripted_trigger homosexual_poet_trigger = { has_sexuality = bisexual } OR = { - trait_is_shunned_in_faith_trigger = { TRAIT = sodomite FAITH = root.faith GENDER_CHARACTER = scope:inspiration_owner } - trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = root.faith GENDER_CHARACTER = scope:inspiration_owner } + trait_is_shunned_in_faith_trigger = { TRAIT = trait:sodomite FAITH = root.faith GENDER_CHARACTER = scope:inspiration_owner } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:sodomite FAITH = root.faith GENDER_CHARACTER = scope:inspiration_owner } } } @@ -18748,7 +18754,7 @@ fund_inspiration.6301 = { } triggered_desc = { trigger = { - trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = root.faith GENDER_CHARACTER = scope:inspiration_owner } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:sodomite FAITH = root.faith GENDER_CHARACTER = scope:inspiration_owner } } desc = fund_inspiration.6301.crime_desc } @@ -19898,7 +19904,7 @@ fund_inspiration.6513 = { if = { limit = { sex_same_as = scope:adventurer_lover - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = sodomite GENDER_CHARACTER = scope:inspiration_owner } + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = trait:sodomite GENDER_CHARACTER = scope:inspiration_owner } } if = { limit = { @@ -19919,7 +19925,7 @@ fund_inspiration.6513 = { if = { limit = { sex_same_as = scope:inspiration_owner - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = sodomite GENDER_CHARACTER = scope:adventurer_lover } + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = trait:sodomite GENDER_CHARACTER = scope:adventurer_lover } } if = { limit = { diff --git a/events/dlc/ep2/ep2_accolade_events.txt b/events/dlc/ep2/ep2_accolade_events.txt index 34c15bf2..820baf95 100644 --- a/events/dlc/ep2/ep2_accolade_events.txt +++ b/events/dlc/ep2/ep2_accolade_events.txt @@ -12,7 +12,6 @@ scripted_trigger ep2_accolade_events_0100_hunting_knight_trigger = { accolade ?= { - is_accolade_active = yes has_accolade_parameter = acclaimed_knight_trains_hunting } is_healthy = yes @@ -245,7 +244,6 @@ ep2_accolade_events.0100 = { scripted_trigger ep2_accolade_events_0200_blademaster_knight_trigger = { accolade ?= { - is_accolade_active = yes has_accolade_parameter = acclaimed_knight_trains_swordfighting } is_healthy = yes @@ -943,7 +941,6 @@ ep2_accolade_events.0200 = { scripted_trigger ep2_accolade_events_0300_reveler_knight_trigger = { accolade ?= { - is_accolade_active = yes has_accolade_parameter = acclaimed_knight_trains_reveling } is_healthy = yes @@ -1167,7 +1164,7 @@ ep2_accolade_events.0300 = { culture = { OR = { has_cultural_tradition = tradition_festivities - has_cultural_tradition = tradition_esteemed_hospitality + has_cultural_tradition = tradition_welcoming } } faith = { diff --git a/events/dlc/ep2/ep2_tournament_events.txt b/events/dlc/ep2/ep2_tournament_events.txt index f8dc3ada..8866b9b1 100644 --- a/events/dlc/ep2/ep2_tournament_events.txt +++ b/events/dlc/ep2/ep2_tournament_events.txt @@ -1,14526 +1,14716 @@ -namespace = ep2_tournament_events - -################################################## -# DUEL -# 0001 - 0999 -# -# MELEE -# 1000 - 1499 -# -# ARCHERY -# 1500 - 1999 -# -# WRESTLING/FISTFIGHTING -# 2000 - 2999 -# -# QUINTAIN (Locale) -# 3500 - 3999 -# -# JOUST -# 4000 - 4499 -# -# RACE -# 4500 - 4999 -# -# RECITAL -# 5500 - 5999 -# -################################################## - -######################### -### SHARED EVENTS ### -######################### - -############## -### DUEL ### -############## - -# Opponent is limping... you think -ep2_tournament_events.0001 = { - type = activity_event - title = ep2_tournament_events.0001.t - desc = ep2_tournament_events.0001.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = personality_cynical - } - right_portrait = { - character = scope:versus_contestant - animation = pain - } - cooldown = { years = 1 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" - contest_versus_player_vs_ai_scope_effect = yes - if = { - limit = { - scope:activity = { has_current_phase = tournament_phase_wrestling } - } - tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 0001 } - } - else_if = { - limit = { - scope:activity = { has_current_phase = tournament_phase_duel } - } - tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0001 } - } - } - - # Work it out via smarts - option = { - name = ep2_tournament_events.0001.a - trigger = { - OR = { - has_trait = intellect_good - has_trait = shrewd - } - } - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - custom_tooltip = ep2_tournament_events.0001.a.tt - - stress_impact = { - base = miniscule_stress_impact_loss - paranoid = minor_stress_impact_loss - trusting = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - } - } - - # Go for their leg - option = { - name = ep2_tournament_events.0001.b - - duel = { - skills = { intrigue prowess } - target = scope:versus_contestant - #Your intuition was correct - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.0001.b.tt.win - left_icon = root - right_icon = scope:versus_contestant - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - } - - desc = ep2_tournament_events.0001.b.tt.win - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_medium_value - } - } - - stress_impact = { - paranoid = minor_stress_impact_loss - trusting = minor_stress_impact_gain - } - } - #Your opponent was bluffing - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.0001.b.tt.lose - left_icon = root - right_icon = scope:versus_contestant - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - - desc = ep2_tournament_events.0001.b.tt.lose - - stress_impact = { - paranoid = minor_stress_impact_gain - trusting = minor_stress_impact_loss - } - } - } - - ai_chance = { - base = 100 - } - } - - # Ignore it - option = { - name = ep2_tournament_events.0001.c - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - - stress_impact = { - paranoid = minor_stress_impact_gain - trusting = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - } - } -} - -# Opponent plays to the crowd -ep2_tournament_events.0002 = { - type = activity_event - title = ep2_tournament_events.0002.t - desc = ep2_tournament_events.0002.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = personality_cynical - } - right_portrait = { - character = scope:versus_contestant - animation = throne_room_cheer_1 - } - cooldown = { years = 1 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_positive_reaction" - contest_versus_player_vs_ai_scope_effect = yes - if = { - limit = { - scope:activity = { has_current_phase = tournament_phase_wrestling } - } - tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 0002 } - } - else_if = { - limit = { - scope:activity = { has_current_phase = tournament_phase_duel } - } - tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0002 } - } - } - - # I'll show you! - option = { - name = ep2_tournament_events.0002.a - trigger = { - OR = { - has_trait = physique_good - has_trait = strong - } - } - custom_tooltip = ep2_tournament_events.0002.a.tt - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - add_prestige = minor_prestige_gain - - scope:activity = { - add_activity_log_entry = { - key = tournament_pose_off_log - tags = { good } - score = 5 - character = root - target = scope:versus_contestant - } - } - - stress_impact = { - base = minor_stress_impact_loss - arrogant = medium_stress_impact_loss - humble = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - } - } - - # Demand they face you - option = { - name = ep2_tournament_events.0002.b - - stress_impact = { - arrogant = minor_stress_impact_loss - humble = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - } - } - - # Attack them from behind - option = { - name = ep2_tournament_events.0002.c - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - accolade_minimal_glory_loss_with_checks_effect = yes - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = angry_opinion - opinion = -30 - } - - stress_impact = { - craven = medium_stress_impact_loss - brave = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - } - } -} - -scripted_trigger contest_versus_wants_to_resign_trigger = { - OR = { - dread_modified_ai_boldness = { - dreaded_character = root - value <= medium_negative_ai_value - } - AND = { - has_trait = wounded - has_trait = craven - } - AND = { - NOT = { has_trait = brave } - has_trait_rank = { - trait = wounded - rank >= 2 - } - } - } -} - -# Opponent wants to quit -ep2_tournament_events.0003 = { - type = activity_event - title = ep2_tournament_events.0003.t - desc = { - desc = ep2_tournament_events.0003.desc - first_valid = { - triggered_desc = { # Dread - trigger = { - scope:versus_contestant = { - has_dread_level_towards = { - target = root - level > 0 - } - } - } - desc = ep2_tournament_events.0003.desc.dread - } - triggered_desc = { #Wounded and Craven - trigger = { - scope:versus_contestant = { - has_trait = wounded - has_trait = craven - } - } - desc = ep2_tournament_events.0003.desc.craven - } - triggered_desc = { # Badly wounded, not brave - trigger = { - scope:versus_contestant = { - NOT = { has_trait = brave } - has_trait_rank = { - trait = wounded - rank >= 2 - } - } - } - desc = ep2_tournament_events.0003.desc.wounded - } - } - } - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - cooldown = { years = 1 } - - left_portrait = { - character = root - animation = personality_honorable - } - - right_portrait = { - character = scope:versus_contestant - animation = pain - } - - # Reasons for the opposition to quit: - # They dread you - # They have medium or high wounds and aren't brave - # They have any level of wounds and are craven - trigger = { - contest_versus_player_vs_ai_trigger = yes - trigger_if = { - limit = { this = scope:versus_matchee } - scope:versus_matcher = { contest_versus_wants_to_resign_trigger = yes } - } - trigger_else = { - scope:versus_matchee = { contest_versus_wants_to_resign_trigger = yes } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" - contest_versus_player_vs_ai_scope_effect = yes - if = { - limit = { - scope:activity = { has_current_phase = tournament_phase_wrestling } - } - tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 0003 } - } - else_if = { - limit = { - scope:activity = { has_current_phase = tournament_phase_duel } - } - tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0003 } - } - } - - # Mock their cowardice - option = { - name = ep2_tournament_events.0003.a - trigger = { - NOT = { has_trait = craven } - scope:versus_contestant = { has_trait = craven } - } - accolade_minimal_glory_loss_with_checks_effect = yes - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = tournament_mocked_opinion - opinion = -30 - } - - add_prestige = minor_prestige_gain - - scope:activity = { - add_activity_log_entry = { - key = tournament_mocked_cowardice_log - tags = { good } - score = 5 - character = root - target = scope:versus_contestant - } - } - - stress_impact = { - compassionate = minor_stress_impact_gain - sadistic = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - } - } - - # Understand their cowardice - option = { - name = ep2_tournament_events.0003.b - trigger = { - has_trait = craven - scope:versus_contestant = { has_trait = craven } - } - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = grateful_opinion - opinion = 20 - } - - stress_impact = { - craven = medium_stress_impact_loss - arrogant = minor_stress_impact_gain - compassionate = minor_stress_impact_loss - humble = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - } - } - - # Acknowledge their wounds - option = { - name = ep2_tournament_events.0003.c - trigger = { - scope:versus_contestant = { - NOT = { has_trait = brave } - OR = { - has_trait = wounded_2 - has_trait = wounded_3 - } - } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_wounded_quit_log - tags = { good } - score = 5 - character = root - target = scope:versus_contestant - } - } - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = respect_opinion - opinion = 20 - } - - stress_impact = { - compassionate = minor_stress_impact_loss - sadistic = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - } - } - - # Tell them never to challenge you again - option = { - name = ep2_tournament_events.0003.d - reverse_add_opinion = { - target = scope:versus_contestant - modifier = angry_opinion - opinion = -30 - } - - stress_impact = { - arrogant = minor_stress_impact_loss - compassionate = minor_stress_impact_gain - humble = minor_stress_impact_gain - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_mocked_cowardice_log - tags = { good } - score = 5 - character = root - target = scope:versus_contestant - } - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = compassionate - has_trait = humble - } - } - } - } - - # Tell them they fought well - option = { - name = ep2_tournament_events.0003.e - accolade_minimal_glory_gain_with_checks_effect = yes - reverse_add_opinion = { - target = scope:versus_contestant - modifier = compliment_opinion - opinion = 20 - } - - stress_impact = { - arrogant = minor_stress_impact_gain - compassionate = minor_stress_impact_loss - humble = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - has_trait = arrogant - } - } - } - - after = { - tournament_contest_versus_resignation_effect = { RESIGNER = scope:versus_contestant CONTEST = wrestling SKILL = pugilism } - } -} - -# Sword flies into the crowd -ep2_tournament_events.0004 = { - type = activity_event - title = ep2_tournament_events.0004.t - desc = ep2_tournament_events.0004.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - cooldown = { years = 1 } - - left_portrait = { - character = root - animation = worry - } - - right_portrait = { - character = scope:versus_contestant - animation = shock - } - - lower_center_portrait = { - character = scope:watching_crowd - } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - - scope:activity = { - any_guest_subset_current_phase = { - name = spectator - is_alive = yes - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0004 } - - scope:activity = { - random_guest_subset_current_phase = { - name = spectator - limit = { is_alive = yes } - save_scope_as = watching_crowd - } - } - - scope:watching_crowd = { - increase_wounds_no_death_effect = { REASON = death_spectator_injured } - - if = { - limit = { - NOT = { - has_trait = scarred - } - } - add_trait = scarred - } - add_trait_xp = { - trait = scarred - value = { - integer_range = { - min = 5 - max = 25 - } - } - } - } - } - - # Blame your opponent - option = { - name = ep2_tournament_events.0004.a - - trigger = { - has_trait = deceitful - } - - scope:watching_crowd = { - add_opinion = { - target = scope:versus_contestant - modifier = hurt_opinion - opinion = -50 - } - } - - scope:versus_contestant = { - add_prestige = minor_prestige_loss - - add_opinion = { - target = root - modifier = angry_opinion - opinion = -30 - } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_failed_defuse_duel_log - tags = { good } - score = 5 - character = root - target = scope:versus_contestant - } - } - - stress_impact = { - compassionate = medium_stress_impact_gain - just = medium_stress_impact_gain - sadistic = miniscule_stress_impact_loss - arbitrary = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = compassionate - has_trait = just - } - } - } - } - - # Apologise - option = { - name = ep2_tournament_events.0004.b - - duel = { - skill = diplomacy - value = high_skill_rating - 50 = { #They accept your apology - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - desc = ep2_tournament_events.0004.b.success - - send_interface_toast = { - title = ep2_tournament_events.0004.b.success - left_icon = root - right_icon = scope:watching_crowd - - scope:watching_crowd = { - add_opinion = { - target = root - modifier = forgiven_opinion - opinion = 15 - } - } - } - - desc = ep2_tournament_events.1001.c.success - } - 50 = { #They don't accept the apology - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - desc = ep2_tournament_events.0004.b.failure - - send_interface_toast = { - title = ep2_tournament_events.0004.b.failure - left_icon = root - right_icon = scope:watching_crowd - - scope:watching_crowd = { - add_opinion = { - target = root - modifier = angry_opinion - opinion = -35 - } - } - } - } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_duel_apology_log - tags = { bad } - score = 5 - character = root - target = scope:watching_crowd - } - } - - stress_impact = { - compassionate = miniscule_stress_impact_loss - just = miniscule_stress_impact_loss - honest = minor_stress_impact_loss - sadistic = medium_stress_impact_gain - arbitrary = medium_stress_impact_gain - deceitful = major_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = sadistic - has_trait = arbitrary - has_trait = deceitful - } - } - } - } - - # Take a swing at opponent whilst they're distracted - option = { - name = ep2_tournament_events.0004.c - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - accolade_minimal_glory_loss_with_checks_effect = yes - reverse_add_opinion = { - target = scope:versus_contestant - modifier = angry_opinion - opinion = -40 - } - - stress_impact = { - ambitious = miniscule_stress_impact_loss - craven = miniscule_stress_impact_loss - impatient = minor_stress_impact_loss - brave = medium_stress_impact_gain - patient = medium_stress_impact_gain - content = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = content - has_trait = patient - has_trait = brave - } - } - } - } -} - -# Kick opponent in the groin -ep2_tournament_events.0005 = { - type = activity_event - title = ep2_tournament_events.0005.t - desc = { - desc = ep2_tournament_events.0005.start - first_valid = { - triggered_desc = { - trigger = { - scope:versus_contestant = { is_eunuch_trigger = yes } - } - desc = ep2_tournament_events.0005.eunuch - } - triggered_desc = { - trigger = { - scope:versus_contestant = { is_eunuch_trigger = no } - } - desc = ep2_tournament_events.0005.pain - } - } - } - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - cooldown = { years = 1 } - - left_portrait = { - character = root - animation = worry - } - - right_portrait = { - character = scope:versus_contestant - triggered_animation = { # Normal - trigger = { - scope:versus_contestant = { is_eunuch_trigger = no } - } - animation = pain - } - triggered_animation = { # Unfettered by any weak spots. BUILT DIFFERENT. - trigger = { - scope:versus_contestant = { is_eunuch_trigger = yes } - } - animation = anger - } - } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - weight_multiplier = { - base = 1 - modifier = { - OR = { - has_trait = just - has_trait = compassionate - has_trait = gallant - } - add = -0.5 - } - modifier = { - OR = { - has_trait = arbitrary - has_trait = sadistic - has_trait = ambitious - } - add = 0.5 - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0005 } - } - - # Follow up - option = { - name = ep2_tournament_events.0005.a - - trigger = { - scope:versus_contestant = { is_eunuch_trigger = no } - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - accolade_minimal_glory_loss_with_checks_effect = yes - - add_prestige = minor_prestige_loss - - add_character_modifier = { - modifier = tournament_low_blower_modifier - years = 10 - } - - scope:versus_contestant = { - add_prestige = minor_prestige_loss - - add_opinion = { - target = root - modifier = angry_opinion - opinion = -50 - } - } - - stress_impact = { - compassionate = medium_stress_impact_gain - just = medium_stress_impact_gain - honest = medium_stress_impact_gain - sadistic = miniscule_stress_impact_loss - arbitrary = miniscule_stress_impact_loss - deceitful = miniscule_stress_impact_loss - gallant = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - ai_value_modifier = { - ai_compassion = -1 - ai_vengefulness = 1 - } - } - } - - # Apologise - option = { - name = ep2_tournament_events.0005.b - - trigger = { - scope:versus_contestant = { is_eunuch_trigger = no } - } - - accolade_minimal_glory_gain_with_checks_effect = yes - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = angry_opinion - opinion = -20 - } - - stress_impact = { - compassionate = miniscule_stress_impact_loss - just = miniscule_stress_impact_loss - honest = minor_stress_impact_loss - sadistic = medium_stress_impact_gain - arbitrary = medium_stress_impact_gain - deceitful = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - ai_value_modifier = { - ai_compassion = 1 - ai_vengefulness = -1 - } - } - } - - # Oh no, they're not susceptible to my secret technique! - option = { - name = ep2_tournament_events.0005.c - - trigger = { - scope:versus_contestant = { is_eunuch_trigger = yes } - } - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_miniscule } - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = dismissive_opinion - opinion = -25 - } - - stress_impact = { - ambitious = miniscule_stress_impact_loss - craven = miniscule_stress_impact_loss - impatient = minor_stress_impact_loss - brave = medium_stress_impact_gain - patient = medium_stress_impact_gain - content = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - ai_value_modifier = { - ai_compassion = 0.5 - ai_vengefulness = -0.5 - } - } - } -} - -# You have a chance to end them rightly -ep2_tournament_events.0006 = { - type = activity_event - title = ep2_tournament_events.0006.t - desc = ep2_tournament_events.0006.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - cooldown = { years = 1 } - - left_portrait = { - character = root - animation = scheme - } - - right_portrait = { - character = scope:versus_contestant - animation = worry - } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_positive_reaction" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0006 } - } - - # End them rightly! - option = { - name = ep2_tournament_events.0006.a - - flavor = ep2_tournament_events.0006.a.tt - - activity_tournament_change_contestant_score_effect = { SCORE = increase_miniscule } - - accolade_minimal_glory_gain_with_checks_effect = yes - - add_character_modifier = { - modifier = tournament_roguish_duelist_modifier - years = 25 - } - - scope:versus_contestant = { - send_interface_toast = { #Send an interface toast so it's not just completely random if it's not an AI - title = ep2_tournament_events.0006.a.toast - left_icon = scope:versus_contestant - right_icon = root - - add_prestige = medium_prestige_loss - - add_character_modifier = { - modifier = tournament_ended_rightly_modifier - years = 15 - } - } - - add_opinion = { - target = root - modifier = tournament_ended_rightly_opinion - opinion = -60 - } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_ended_rightly_log - tags = { good } - score = 5 - character = root - target = scope:versus_contestant - } - } - - stress_impact = { - compassionate = medium_stress_impact_gain - just = medium_stress_impact_gain - honest = medium_stress_impact_gain - sadistic = minor_stress_impact_loss - arbitrary = minor_stress_impact_loss - deceitful = minor_stress_impact_loss - } - - ai_chance = { - base = 30 #Deliberately lowered to ensure we don't see too much of this - ai_value_modifier = { - ai_compassion = -1 - ai_vengefulness = 1 - } - } - } - - # Just follow up normally - option = { - name = ep2_tournament_events.0006.b - - flavor = ep2_tournament_events.0006.b.tt - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - stress_impact = { - just = miniscule_stress_impact_loss - arbitrary = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - ai_value_modifier = { - ai_compassion = 1 - ai_vengefulness = -1 - } - } - } - - # Let them recover - option = { - name = ep2_tournament_events.0006.c - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_miniscule } - - accolade_minor_glory_gain_with_checks_effect = yes - - progress_towards_friend_effect = { - REASON = friend_duel_recovered - CHARACTER = scope:versus_contestant - OPINION = default_friend_opinion - } - - stress_impact = { - ambitious = medium_stress_impact_gain - craven = medium_stress_impact_gain - impatient = medium_stress_impact_gain - vengeful = minor_stress_impact_gain - brave = miniscule_stress_impact_loss - patient = miniscule_stress_impact_loss - content = miniscule_stress_impact_loss - forgiving = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - ai_value_modifier = { - ai_compassion = 0.5 - ai_vengefulness = -0.5 - } - } - } -} - -# Your opponent offers you money to take a dive -ep2_tournament_events.0007 = { - type = activity_event - title = ep2_tournament_events.0007.t - desc = ep2_tournament_events.0007.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - cooldown = { years = 1 } - - left_portrait = { - character = root - animation = worry - } - - right_portrait = { - character = scope:versus_contestant - animation = beg - } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - trigger_if = { - limit = { this = scope:versus_matcher } - scope:versus_matchee.gold > 100 - } - trigger_else = { scope:versus_matcher.gold > 100 } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" - contest_versus_player_vs_ai_scope_effect = yes - - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - - tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0007 } - } - - # Accept - option = { - name = ep2_tournament_events.0007.a - - scope:versus_contestant = { - pay_short_term_gold = { - target = root - gold = { - value = scope:versus_contestant.major_gold_value - max = 100 - } - } - - add_opinion = { - target = root - modifier = relieved_opinion - opinion = 30 - } - } - - save_scope_as = resigner - tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = duel SKILL = foot } - - scope:activity = { - add_activity_log_entry = { - key = tournament_suspicious_loss_log - tags = { bad } - score = 5 - character = root - target = scope:versus_contestant - } - } - - stress_impact = { - honest = medium_stress_impact_gain - just = medium_stress_impact_gain - ambitious = medium_stress_impact_gain - greedy = minor_stress_impact_loss - arbitrary = miniscule_stress_impact_loss - content = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - ai_value_modifier = { - ai_honor = -1 - ai_greed = 1 - } - } - } - - # Accept, but for a hook and half the gold - option = { - name = ep2_tournament_events.0007.b - - trigger = { - can_add_hook = { #Ensure they can be indebted to you - type = loyalty_hook - target = scope:versus_contestant - } - } - - add_hook = { - type = loyalty_hook - target = scope:versus_contestant - } - - save_scope_as = resigner - tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = duel SKILL = foot } - - scope:activity = { - add_activity_log_entry = { - key = tournament_suspicious_loss_log - tags = { bad } - score = 5 - character = root - target = scope:versus_contestant - } - } - - stress_impact = { - honest = medium_stress_impact_gain - greedy = minor_stress_impact_gain - deceitful = miniscule_stress_impact_loss - ambitious = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - ai_value_modifier = { - ai_honor = -1 - ai_energy = 1 - } - } - } - - # Refuse - option = { - name = ep2_tournament_events.0007.c - - scope:versus_contestant = { - add_opinion = { - target = root - modifier = disappointed_opinion - opinion = -30 - } - } - - stress_impact = { - arbitrary = medium_stress_impact_gain - just = miniscule_stress_impact_loss - greedy = medium_stress_impact_gain - ambitious = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - ai_value_modifier = { - ai_honor = 1 - ai_vengefulness = -1 - } - } - } -} - -# You try to read your opponent's move -ep2_tournament_events.0010 = { - type = activity_event - title = ep2_tournament_events.0010.t - desc = ep2_tournament_events.0010.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - cooldown = { years = 1 } - - left_portrait = { - character = root - animation = marshal - } - - right_portrait = { - character = scope:versus_contestant - animation = sword_coup_degrace - } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0010 } - } - - # Attempt a risky counter - option = { - name = ep2_tournament_events.0010.a - - duel = { - skills = { prowess intrigue } - target = scope:versus_contestant - 50 = { #You guess right - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - desc = ep2_tournament_events.0010.a.success - - modifier = { - has_trait = lifestyle_blademaster - add = 10 - } - - modifier = { - AND = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - } - add = 10 - } - - modifier = { - has_trait = shrewd - add = 2 - } - - send_interface_toast = { - title = ep2_tournament_events.0010.a.success - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = respect_opinion - opinion = 10 - } - } - min = 10 - } - 50 = { #You guess wrong - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - desc = ep2_tournament_events.0010.a.failure - - modifier = { - scope:versus_contestant = { - has_trait = lifestyle_blademaster - } - add = 5 - } - - modifier = { - scope:versus_contestant = { - AND = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - } - } - add = 5 - } - - send_interface_toast = { - title = ep2_tournament_events.0010.a.failure - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - - increase_wounds_no_death_effect = { REASON = duel } - - if = { - limit = { - NOT = { - has_trait = scarred - } - } - add_trait = scarred - } - add_trait_xp = { - trait = scarred - value = { - integer_range = { - min = 5 - max = 25 - } - } - } - } - min = 10 - } - } - - stress_impact = { - brave = miniscule_stress_impact_loss - ambitious = miniscule_stress_impact_loss - impatient = miniscule_stress_impact_loss - patient = minor_stress_impact_gain - content = minor_stress_impact_gain - craven = minor_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = 1 - ai_honor = 1 - } - } - } - - # Block it - option = { - name = ep2_tournament_events.0010.b - - duel = { - skills = { prowess martial } - target = scope:versus_contestant - 75 = { #It succeeds - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - desc = ep2_tournament_events.0010.b.success - - modifier = { - has_trait = lifestyle_blademaster - add = 10 - } - - modifier = { - AND = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - } - add = 10 - } - - send_interface_toast = { - title = ep2_tournament_events.0010.b.success - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = respect_opinion - opinion = 10 - } - } - min = 10 - } - 25 = { #It fails - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - desc = ep2_tournament_events.0010.a.failure - - modifier = { - scope:versus_contestant = { - has_trait = lifestyle_blademaster - } - add = 7 - } - - modifier = { - scope:versus_contestant = { - AND = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - } - } - add = 7 - } - - send_interface_toast = { - title = ep2_tournament_events.0010.a.failure - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - - increase_wounds_no_death_effect = { REASON = duel } - } - min = 10 - } - } - - stress_impact = { - fickle = miniscule_stress_impact_loss - patient = miniscule_stress_impact_loss - humble = miniscule_stress_impact_loss - stubborn = minor_stress_impact_gain - impatient = minor_stress_impact_gain - arrogant = minor_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = 0.5 - ai_honor = 0.5 - } - } - } - - # Sidestep the blow entirely - option = { - name = ep2_tournament_events.0010.c - - flavor = ep2_tournament_events.0010.c.tt - - accolade_minimal_glory_gain_with_checks_effect = yes - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_miniscule } - - stress_impact = { - brave = minor_stress_impact_gain - ambitious = minor_stress_impact_gain - impatient = minor_stress_impact_gain - patient = miniscule_stress_impact_loss - content = miniscule_stress_impact_loss - craven = miniscule_stress_impact_loss - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = -1 - ai_honor = -1 - } - } - } -} - -# You attempt to fight with your other hand to surprise your opponent -ep2_tournament_events.0011 = { - type = activity_event - title = ep2_tournament_events.0011.t - desc = ep2_tournament_events.0011.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - cooldown = { years = 1 } - - left_portrait = { - character = root - animation = aggressive_sword - } - - right_portrait = { - character = scope:versus_contestant - animation = sword_coup_degrace - } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - - NOT = { #For obvious reasons - has_trait = maimed - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_woosh" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0011 } - save_scope_value_as = { - name = weapon_range - value = { - integer_range = { - min = 1 - max = 15 - } - } - } - } - - # Pop it to your hand with the greatest of ease - option = { - name = ep2_tournament_events.0011.a - - trigger = { - OR = { - AND = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - } - has_trait = lifestyle_blademaster - has_trait = education_martial_prowess - } - } - - flavor = ep2_tournament_events.0011.a.tt - - add_character_modifier = tournament_ambidextrous_modifier - - accolade_minor_glory_gain_with_checks_effect = yes - - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - - scope:activity = { - add_activity_log_entry = { - key = tournament_ambidextrous_log - tags = { good } - score = 5 - character = root - target = scope:versus_contestant - } - } - - stress_impact = { - base = minor_stress_impact_loss - deceitful = miniscule_stress_impact_loss - arrogant = miniscule_stress_impact_loss - honest = minor_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = 1 - } - } - } - - # Attempt to throw your weapon to your other hand - option = { - name = ep2_tournament_events.0011.b - - trigger = { - NOR = { - AND = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - } - has_trait = lifestyle_blademaster - has_trait = education_martial_prowess - } - } - - flavor = ep2_tournament_events.0011.b.tt - - duel = { - skills = { prowess intrigue } - target = scope:versus_contestant - - 50 = { #It succeeds - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - desc = ep2_tournament_events.0011.b.success - - modifier = { - has_trait = athletic - add = 5 - } - - modifier = { - AND = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 15 - } - } - add = 5 - } - min = 5 - - modifier = { - has_trait = education_martial_prowess - add = 15 - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_ambidextrous_log - tags = { good } - score = 5 - character = root - target = scope:versus_contestant - } - } - - send_interface_toast = { - title = ep2_tournament_events.0011.b.success - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - add_character_modifier = { - modifier = tournament_ambidextrous_modifier - years = 25 - } - } - } - 40 = { #It fails - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - desc = ep2_tournament_events.0011.b.failure - - modifier = { - scope:versus_contestant = { - has_trait = lifestyle_blademaster - } - add = 7 - } - - modifier = { - scope:versus_contestant = { - AND = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - } - } - add = 7 - } - min = 4 - - send_interface_toast = { - title = ep2_tournament_events.0011.b.failure - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - } - - 10 = { #It fails horrendously - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - min = 1 - - desc = ep2_tournament_events.0011.b.criticalfailure - - scope:activity = { - add_activity_log_entry = { - key = tournament_ambisinister_log - tags = { bad } - score = 5 - character = root - target = scope:versus_contestant - } - } - - send_interface_toast = { - title = ep2_tournament_events.0011.b.criticalfailure - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } - - add_character_modifier = { - modifier = tournament_ambisinister_modifier - years = 25 - } - - increase_wounds_no_death_effect = { REASON = duel } - - if = { - limit = { - NOT = { - has_trait = scarred - } - } - add_trait = scarred - } - add_trait_xp = { - trait = scarred - value = { - integer_range = { - min = 5 - max = 25 - } - } - } - } - } - } - - stress_impact = { - deceitful = miniscule_stress_impact_loss - arrogant = miniscule_stress_impact_loss - honest = minor_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = 1 - } - } - } - - # Attempt to fight on, using your sword with two hands - option = { - name = ep2_tournament_events.0011.c - - flavor = ep2_tournament_events.0011.c.tt - - random_list = { - 50 = { - modifier = { #This is for fuzzying up the random list so it randomises it a bit - add = scope:weapon_range - } - - send_interface_toast = { - title = ep2_tournament_events.0011.c.success - left_icon = root - right_icon = scope:versus_contestant - - custom_tooltip = ep2_tournament_events.0011.c.opinion - - scope:activity = { - random_guest_subset_current_phase = { - name = spectator - limit = { is_alive = yes } - - hidden_effect = { - add_opinion = { - target = root - opinion = 5 - modifier = impressed_opinion - } - } - } - } - } - } - 50 = { - send_interface_toast = { - title = ep2_tournament_events.0011.c.failure - left_icon = root - right_icon = scope:versus_contestant - - increase_wounds_no_death_effect = { REASON = duel } - activity_tournament_change_contestant_score_effect = { SCORE = decrease_miniscule } - } - } - } - - stress_impact = { - brave = miniscule_stress_impact_loss - ambitious = miniscule_stress_impact_loss - wrathful = miniscule_stress_impact_loss - calm = minor_stress_impact_gain - content = minor_stress_impact_gain - craven = minor_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = -1 - } - } - } -} - -# GO GO GADGET DUELING CLOAK -# No but for real, it's taken from Di Grassi's manuals (yes, I know, slightly out of period, shhhh, rule of cool): -# "The cloak may be flung or thrown with the edge of the sword, when one standeth at the low ward, -# with the point of the sword turned backwards, on the left side and the left side with the cloak upon it, -# followed at large upon the arm up to the elbow: but not wrapped about it, and whilest he falseth a reverse, -# he may take the cloak on the edge of the sword and fling it towards his enemy, -# and then strike him with such a blow as shall be then most for his advantage deliver." -ep2_tournament_events.0012 = { - type = activity_event - title = ep2_tournament_events.0012.t - desc = ep2_tournament_events.0012.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - - left_portrait = { - character = root - animation = marshal - } - - right_portrait = { - character = scope:versus_contestant - animation = laugh - } - - cooldown = { years = 1 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - - has_character_flag = cloak_duelist_flag #Ensure you are wearing your DUELING CLOAK - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0012 } - } - - # Proudly fight in the cloak - option = { - name = ep2_tournament_events.0012.a - - trigger = { - has_trait = arrogant - } - - if = { - limit = { - NOT = { - has_character_modifier = tournament_fashionable_duelist_modifier - } - } - add_character_modifier = { - modifier = tournament_fashionable_duelist_modifier - years = 20 - } - } - else = { - add_prestige = medium_prestige_gain - } - - accolade_medium_glory_gain_with_checks_effect = yes - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_miniscule } - - stress_impact = { - base = medium_stress_impact_loss - stubborn = miniscule_stress_impact_loss - fickle = minor_stress_impact_gain - } - - ai_chance = { - base = 75 - ai_value_modifier = { - ai_boldness = 1 - ai_vengefulness = 0.5 - } - } - } - - # Throw the cloak at your enemy - option = { - name = ep2_tournament_events.0012.b - - trigger = { - intrigue > 8 - } - show_as_unavailable = { - always = yes - } - - flavor = ep2_tournament_events.0012.b.tt - - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - - scope:activity = { - add_activity_log_entry = { - key = tournament_dueling_cloak_log - tags = { good } - score = 5 - character = root - target = scope:versus_contestant - } - } - - stress_impact = { - deceitful = minor_stress_impact_loss - arbitrary = minor_stress_impact_loss - just = medium_stress_impact_gain - honest = medium_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = 0.5 - ai_vengefulness = 1 - } - } - } - - # Dis-cloak thyself - option = { - name = ep2_tournament_events.0012.c - - flavor = ep2_tournament_events.0012.c.tt - - stress_impact = { - ambitious = miniscule_stress_impact_loss - fickle = miniscule_stress_impact_loss - humble = miniscule_stress_impact_loss - content = medium_stress_impact_gain - stubborn = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = -1 - ai_honor = 0.5 - } - } - } - - # Insist on wearing it - option = { - name = ep2_tournament_events.0012.d - - trigger = { - NOT = { - has_trait = arrogant - } - } - - if = { - limit = { - NOT = { - has_character_modifier = tournament_fashionable_duelist_modifier - } - } - add_character_modifier = { - modifier = tournament_fashionable_duelist_modifier - years = 10 - } - } - else = { - add_prestige = medium_prestige_gain - } - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - - stress_impact = { - stubborn = miniscule_stress_impact_loss - fickle = minor_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = 1 - ai_honor = 1 - } - } - } - - after = { - remove_character_flag = cloak_duelist_flag - } -} - -# Try to distract your opponent with words -ep2_tournament_events.0020 = { - type = activity_event - title = ep2_tournament_events.0020.t - desc = { - desc = ep2_tournament_events.0020.desc - first_valid = { - triggered_desc = { - trigger = { - scope:secret = { - exists = this - } - } - desc = ep2_tournament_events.0020.secret - } - } - } - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = scheme - } - right_portrait = { - character = scope:versus_contestant - animation = aggressive_sword - } - cooldown = { years = 1 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0020 } - - scope:versus_contestant = { - random_secret = { - limit = { - is_known_by = root - } - save_scope_as = secret - } - } - } - - # Loudly reveal their secret - option = { - name = ep2_tournament_events.0020.a - - trigger = { - scope:secret = { - exists = this - } - OR = { - has_trait = sadistic - has_trait = callous - has_trait = arbitrary - } - } - - scope:secret = { - expose_secret = root - } - - scope:versus_contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } - } - - accolade_minor_glory_loss_with_checks_effect = yes - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = angry_opinion - opinion = -50 - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_secret_exposed_log - tags = { good } - score = 5 - character = root - target = scope:versus_contestant - } - } - - stress_impact = { - compassionate = medium_stress_impact_gain - just = medium_stress_impact_gain - sadistic = miniscule_stress_impact_loss - callous = miniscule_stress_impact_loss - arbitrary = miniscule_stress_impact_loss - } - - ai_chance = { - base = 50 - - modifier = { - factor = 0 - NOR = { - has_trait = compassionate - has_trait = just - } - } - } - } - - # I know your seeeecreeeet! - option = { - name = ep2_tournament_events.0020.b - - trigger = { - scope:secret = { - exists = this - } - } - - add_internal_flag = special - - scope:versus_contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - - accolade_minimal_glory_loss_with_checks_effect = yes - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = angry_opinion - opinion = -30 - } - - stress_impact = { - compassionate = minor_stress_impact_gain - just = minor_stress_impact_gain - sadistic = miniscule_stress_impact_loss - callous = miniscule_stress_impact_loss - arbitrary = miniscule_stress_impact_loss - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_vengefulness = 2 - ai_boldness = 2 - ai_honor = -2 - ai_compassion = -2 - } - } - } - - # Try to distract them - option = { - name = ep2_tournament_events.0020.c - - duel = { - skill = diplomacy - value = high_skill_rating - 50 = { #They accept your apology - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - desc = ep2_tournament_events.0020.c.success - - send_interface_toast = { - title = ep2_tournament_events.0020.c.success - left_icon = root - right_icon = scope:versus_contestant - - scope:versus_contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - } - } - } - 50 = { #They don't accept the apology - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - desc = ep2_tournament_events.0020.c.failure - - send_interface_toast = { - title = ep2_tournament_events.0020.c.failure - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - } - } - } - - stress_impact = { - just = medium_stress_impact_gain - honest = minor_stress_impact_gain - arbitrary = miniscule_stress_impact_gain - deceitful = miniscule_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = 1 - ai_honor = -1 - } - } - } - - # Decide against such underhanded tactics - option = { - name = ep2_tournament_events.0020.d - - accolade_minimal_glory_gain_with_checks_effect = yes - - stress_impact = { - just = miniscule_stress_impact_loss - honest = miniscule_stress_impact_loss - arbitrary = minor_stress_impact_gain - deceitful = minor_stress_impact_gain - } - - ai_chance = { - base = 75 - ai_value_modifier = { - ai_boldness = -0.5 - ai_honor = 1 - } - } - } -} - -# Remind your opponent you slept with their family member -ep2_tournament_events.0021 = { - type = activity_event - title = ep2_tournament_events.0021.t - desc = ep2_tournament_events.0021.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = scheme - } - right_portrait = { - character = scope:versus_contestant - animation = dismissal - } - cooldown = { years = 1 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - trigger_if = { - limit = { this = scope:versus_matcher } - scope:versus_matchee = { - any_close_family_member = { - OR = { - has_relation_lover = root - has_relation_soulmate = root - is_spouse_of = root - } - } - } - } - trigger_else = { - scope:versus_matcher = { - any_close_family_member = { - OR = { - has_relation_lover = root - has_relation_soulmate = root - is_spouse_of = root - } - } - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0021 } - - scope:versus_contestant = { - random_close_family_member = { - limit = { - OR = { - has_relation_lover = root - has_relation_soulmate = root - is_spouse_of = root - } - } - save_scope_as = family - } - } - } - - # CoD lobby trash talk, 2009 - option = { - name = ep2_tournament_events.0021.a - - trigger = { - OR = { - has_trait = sadistic - has_trait = arrogant - } - - NOR = { - has_trait = chaste - has_trait = celibate - } - } - - scope:versus_contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } - } - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = absolutely_horrified_opinion - opinion = -60 - } - - reverse_add_opinion = { - target = scope:family - modifier = insulted_opinion - opinion = -20 - } - - stress_impact = { - base = minor_stress_impact_loss - compassionate = medium_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_vengefulness = 2 - ai_boldness = 2 - ai_honor = -2 - ai_compassion = -2 - } - } - } - - # Thou hast undone our mother! - option = { - name = ep2_tournament_events.0021.b - - scope:versus_contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - - accolade_minimal_glory_gain_with_checks_effect = yes - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = angry_opinion - opinion = -40 - } - - stress_impact = { - compassionate = minor_stress_impact_gain - just = minor_stress_impact_gain - sadistic = miniscule_stress_impact_loss - arbitrary = miniscule_stress_impact_loss - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_vengefulness = 2 - ai_boldness = 2 - ai_honor = -2 - ai_compassion = -2 - } - } - } - - # Stay out of it - option = { - name = ep2_tournament_events.0021.c - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - - stress_impact = { - compassionate = miniscule_stress_impact_loss - just = miniscule_stress_impact_loss - content = miniscule_stress_impact_loss - ambitious = minor_stress_impact_gain - sadistic = minor_stress_impact_gain - arbitrary = minor_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_vengefulness = -2 - ai_boldness = -2 - ai_honor = 2 - ai_compassion = 2 - } - } - } -} - -############### -### MELEE ### -############### - -# Melee spills over into nearby town -ep2_tournament_events.1001 = { - type = activity_event - title = ep2_tournament_events.1001.t - desc = ep2_tournament_events.1001.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = worry - } - cooldown = { years = 1 } - - trigger = { - NOT = { - has_variable = tournament_village_destroyed - } - OR = { - involved_activity.activity_location = { - has_holding_type = church_holding - barony = { - lessee = { - this != root #it's not you - is_ai = yes - is_adult = yes - } - } - } - scope:activity.activity_location.province_owner != root - } - } - - immediate = { - play_sound_effect = "event:/SFX/Ambience/3DMapEmitters/Nature/sfx_amb_3d_fire" - scope:activity.activity_location.province_owner = { save_scope_as = mayor } - tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1001 } - } - - # Make everyone stop - option = { - name = ep2_tournament_events.1001.a - - trigger = { - has_trait = august - } - - add_prestige = medium_prestige_value - - stress_impact = { - craven = medium_stress_impact_gain - content = minor_stress_impact_gain - humble = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = craven - has_trait = content - has_trait = humble - } - } - } - } - - # Stubbornly refuse to leave - option = { - name = ep2_tournament_events.1001.b - - trigger = { - has_trait = stubborn - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - scope:activity.activity_location = { - add_province_modifier = { - modifier = village_destroyed_modifier - years = 10 - } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_village_burned_log - tags = { bad } - score = 5 - character = root - } - } - - stress_impact = { - craven = medium_stress_impact_gain - content = minor_stress_impact_gain - humble = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = craven - has_trait = content - has_trait = humble - } - } - } - } - - # Attempt to call a truce - option = { - name = ep2_tournament_events.1001.c - - duel = { - skill = diplomacy - value = high_skill_rating - - 50 = { #The contestants acquiesce - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.1001.c.success - left_icon = root - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - add_prestige = minor_prestige_gain - } - - desc = ep2_tournament_events.1001.c.success - } - 50 = { #Nobody listens - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.1001.c.success - left_icon = root - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - - add_prestige = minor_prestige_loss - } - - desc = ep2_tournament_events.1001.c.failure - - scope:activity = { - add_activity_log_entry = { - key = tournament_village_burned_log - tags = { bad } - score = 5 - character = root - } - } - - scope:activity.activity_location = { - add_province_modifier = { - modifier = village_destroyed_modifier - years = 10 - } - } - - set_variable = { - days = 150 #Want it to last the entire duration of a tournament - name = tournament_village_destroyed - } - } - } - - stress_impact = { - brave = medium_stress_impact_gain - ambitious = minor_stress_impact_gain - arrogant = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - } - } - - # Leave - option = { - name = ep2_tournament_events.1001.d - - set_variable = { - days = 150 #Want it to last the entire duration of a tournament - name = tournament_village_destroyed - } - - scope:activity.activity_location = { - add_province_modifier = { - modifier = village_destroyed_modifier - years = 10 - } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_village_burned_log - tags = { bad } - score = 5 - character = root - } - } - - stress_impact = { - craven = minor_stress_impact_loss - content = miniscule_stress_impact_loss - brave = medium_stress_impact_gain - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - - - modifier = { - factor = 0 - NOR = { - has_trait = brave - has_trait = ambitious - has_trait = arrogant - } - } - } - } -} - -# Village mayor approaches you furiously -ep2_tournament_events.1002 = { - type = activity_event - title = ep2_tournament_events.1002.t - desc = ep2_tournament_events.1002.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = worry - } - right_portrait = { - character = scope:mayor - animation = anger - } - cooldown = { years = 1 } - - trigger = { - has_variable = tournament_village_destroyed # ensure village actually got ruined - scope:activity.activity_location.province_owner != root - } - - immediate = { - scope:activity.activity_location.province_owner = { save_scope_as = mayor } - scope:activity.activity_location = { save_scope_as = holding } - } - - # Offer to rebuild using your expertise - option = { - name = ep2_tournament_events.1002.a - - trigger = { - has_trait = architect - } - - reverse_add_opinion = { - target = scope:mayor - opinion = 20 - modifier = pleased_opinion - } - - if = { - limit = { - this != scope:host - } - reverse_add_opinion = { - target = scope:host - opinion = 20 - modifier = pleased_opinion - } - } - - scope:holding = { - remove_province_modifier = village_destroyed_modifier - add_province_modifier = { - modifier = village_rebuilt_modifier - years = 10 - } - } - - stress_impact = { - content = minor_stress_impact_gain - humble = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = content - has_trait = humble - } - } - } - } - - # Intimidate the mayor - option = { - name = ep2_tournament_events.1002.b - - trigger = { - dread >= high_dread - } - - add_internal_flag = special - - reverse_add_opinion = { - target = scope:mayor - opinion = -30 - modifier = scared_opinion - } - - stress_impact = { - sadistic = minor_stress_impact_loss - content = minor_stress_impact_gain - humble = minor_stress_impact_gain - compassionate = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = content - has_trait = humble - has_trait = compassionate - } - } - } - } - - # Offer to pay for the damage - option = { - name = ep2_tournament_events.1002.c - - remove_short_term_gold = medium_gold_value - - scope:holding = { - remove_province_modifier = village_destroyed_modifier - } - - reverse_add_opinion = { - target = scope:mayor - opinion = 10 - modifier = kindness_opinion - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_village_paid_log - tags = { good } - score = 5 - character = root - target = scope:mayor - } - } - - stress_impact = { - greedy = major_stress_impact_gain - generous = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - has_trait = greedy - } - } - } - - # Send the mayor away - option = { - name = ep2_tournament_events.1002.d - - progress_towards_rival_effect = { - REASON = rival_melee_dismissed_mayor - CHARACTER = scope:mayor - OPINION = default_rival_opinion - } - - stress_impact = { - arrogant = miniscule_stress_impact_loss - compassionate = minor_stress_impact_gain - just = minor_stress_impact_gain - humble = minor_stress_impact_gain - honest = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - } - } -} - -# Your weapon is knocked from your grasp; retrieve it or switch to a reserve? -ep2_tournament_events.1003 = { - type = activity_event - title = ep2_tournament_events.1003.t - desc = ep2_tournament_events.1003.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = shock - } - artifact = { - target = scope:tournament_weapon - position = lower_center_portrait - } - cooldown = { years = 1 } - - trigger = { - exists = var:contest_aptitude - scope:activity = { - any_guest_subset_current_phase = { - name = qualified - this = root - } - any_guest_subset_current_phase = { # Just to make sure there's still some alive people - name = qualified - contest_event_general_contestant_valid_trigger = yes - } - } - any_character_artifact = { - is_equipped = yes - artifact_slot_type = primary_armament - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" - tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1003 } - random_character_artifact = { - limit = { - is_equipped = yes - artifact_slot_type = primary_armament - } - unequip_artifact_from_owner = yes - save_scope_as = tournament_weapon - } - - save_scope_value_as = { - name = weapon_range - value = { - integer_range = { - min = 0 - max = 5 - } - } - } - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - } - - # Dive for it - option = { - name = ep2_tournament_events.1003.a - - random_list = { - 10 = { #You successfully retrieve it - custom_tooltip = ep2_tournament_events.1003.a.tt.success - - modifier = { #Strong and Athletic are nice catch-all traits for having quick reflexes - add = 5 - - OR = { - has_trait = strong - has_trait = athletic - } - } - modifier = { #add a good physique too, for the same reasons - add = 2 - - has_trait = physique_good - } - - modifier = { #This is for fuzzying up the random list so it randomises it a bit - add = scope:weapon_range - } - - send_interface_toast = { - title = ep2_tournament_events.1003.a.tt.success - left_icon = root - - scope:tournament_weapon = { - equip_artifact_to_owner = yes - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - } - } - - stress_impact = { - base = miniscule_stress_impact_loss - - arrogant = miniscule_stress_impact_loss - content = minor_stress_impact_gain - lazy = minor_stress_impact_gain - } - } - - 10 = { #You have to go back later and find it - custom_tooltip = ep2_tournament_events.1003.a.tt.failure - - send_interface_toast = { - title = ep2_tournament_events.1003.a.tt.failure - left_icon = root - } - - stress_impact = { - base = miniscule_stress_impact_gain - - arrogant = minor_stress_impact_gain - content = miniscule_stress_impact_loss - lazy = miniscule_stress_impact_loss - } - } - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOT = { - has_trait = arrogant - } - } - } - } - - # Switch to a different weapon - option = { - name = ep2_tournament_events.1003.b - - flavor = ep2_tournament_events.1003.b.tt - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_medium_value - } - } - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - - stress_impact = { - arrogant = medium_stress_impact_gain - content = minor_stress_impact_gain - humble = minor_stress_impact_gain - } - - ai_chance = { #Get out option - base = 100 - } - } -} - -# A comely [non-martial gender] has taken a wrong turn and ended up in the melee! -ep2_tournament_events.1004 = { - type = activity_event - title = ep2_tournament_events.1004.t - desc = ep2_tournament_events.1004.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = personality_honorable - } - right_portrait = { - character = scope:comely_stray - animation = worry - } - lower_center_portrait = { - character = scope:rescuer_knight - } - cooldown = { years = 1 } - - trigger = { - exists = var:contest_aptitude - scope:activity = { - any_attending_character = { - count < 240 #Max is 250 but attendance is open so leaving some space - } - any_guest_subset_current_phase = { - name = qualified - this = root - } - any_guest_subset_current_phase = { - name = qualified - contest_event_general_contestant_valid_trigger = yes - is_knight_of = root - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" - tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1004 } - create_character = { - template = beautiful_peasant_character - age = { age_compared_to_root_minus_ten_always_adult age_compared_to_root_plus_ten_always_adult } - gender_female_chance = root_attraction_based_female_chance - location = scope:activity.activity_location - faith = root.location.faith - culture = root.location.culture - save_scope_as = comely_stray - - } - scope:comely_stray = { - hidden_effect = { - add_to_activity = scope:activity - } - } - scope:activity = { - random_guest_subset_current_phase = { - name = qualified - limit = { - contest_event_general_contestant_valid_trigger = yes - is_knight_of = root - } - save_scope_as = rescuer_knight - } - } - } - - # Lustful/Seducer option that has you escort them completely off the field of battle - option = { - name = ep2_tournament_events.1004.a - - trigger = { - OR = { - has_trait = lustful - has_trait = seducer - } - might_cheat_on_every_partner_trigger = yes - } - - flavor = ep2_tournament_events.1004.a.tt - - accolade_minor_glory_gain_with_checks_effect = yes - - had_sex_with_effect = { - CHARACTER = scope:comely_stray - PREGNANCY_CHANCE = 50 - } - - if = { - limit = { - can_set_relation_lover_trigger = { CHARACTER = scope:comely_stray } - } - set_relation_lover = { - TARGET = scope:comely_stray - REASON = lover_saved_melee - } - } - - remove_variable = contest_aptitude - - scope:activity = { - add_activity_log_entry = { - key = tournament_seducer_log - tags = { good } - score = 5 - character = root - target = scope:comely_stray - - # Effect - custom_description = { - text = tournament_contest_withdraw_tt - subject = root - } - } - } - - stress_impact = { - base = minor_stress_impact_loss - chaste = massive_stress_impact_gain #technically possible if you're a Seducer - content = minor_stress_impact_gain - lazy = minor_stress_impact_gain - compassionate = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = chaste - has_trait = brave - } - } - } - } - - # Well well, how would you like a dashing ladylord to sweep you off your feet? - option = { - name = ep2_tournament_events.1004.a # Same name as above to re-use loc - - trigger = { - NOR = { - has_trait = lustful - has_trait = seducer - } - } - - accolade_minimal_glory_gain_with_checks_effect = yes - - scope:comely_stray = { #Goodness, so dashing! - add_opinion = { - modifier = grateful_opinion - target = root - opinion = 40 - } - } - - add_courtier = scope:comely_stray - - if = { - limit = { - can_start_scheme = { - type = seduce - target_character = scope:comely_stray - } - } - start_scheme = { - type = seduce - target_character = scope:comely_stray - } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_swept_off_feet_log - tags = { good } - score = 5 - character = root - target = scope:comely_stray - } - } - - stress_impact = { - chaste = major_stress_impact_gain - content = minor_stress_impact_gain - lazy = minor_stress_impact_gain - compassionate = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = chaste - has_trait = brave - } - } - } - } - - # Send a knight to rescue them - option = { - name = ep2_tournament_events.1004.c - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - - scope:rescuer_knight = { - accolade_minor_glory_gain_with_checks_effect = yes - } - - scope:comely_stray = { - add_opinion = { - modifier = grateful_opinion - target = scope:rescuer_knight - opinion = 40 - } - } - - stress_impact = { - lustful = major_stress_impact_gain - arrogant = medium_stress_impact_gain - brave = medium_stress_impact_gain - humble = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = arrogant - has_trait = lustful - } - } - } - } - - # They can fend for themselves - option = { - name = ep2_tournament_events.1004.d - - scope:comely_stray = { - add_opinion = { - modifier = cruelty_opinion - target = root - opinion = -30 - } - } - - random_list = { - 7 = { #They escape unharmed - desc = ep2_tournament_events.1004.d.escape.tt - - show_chance = no #Make it uncertain for all three - - send_interface_toast = { - title = ep2_tournament_events.1004.d.escape.tt - left_icon = root - right_icon = scope:comely_stray - } - } - - 5 = { #They get injured - desc = ep2_tournament_events.1004.d.injured.tt - - show_chance = no - - send_interface_toast = { - title = ep2_tournament_events.1004.d.injured.tt - left_icon = root - right_icon = scope:comely_stray - - scope:comely_stray = { - increase_wounds_effect = { REASON = battle } - - if = { - limit = { - NOT = { - has_trait = scarred - } - } - add_trait = scarred - } - add_trait_xp = { - trait = scarred - value = { - integer_range = { - min = 35 - max = 100 - } - } - } - } - } - } - - 3 = { #They die - desc = ep2_tournament_events.1004.d.dead.tt - - show_chance = no - - scope:activity = { - add_activity_log_entry = { - key = tournament_melee_death_log - tags = { bad } - score = 5 - character = root - target = scope:comely_stray - } - } - - send_interface_toast = { - title = ep2_tournament_events.1004.d.dead.tt - left_icon = root - right_icon = scope:comely_stray - scope:comely_stray = { - death = { death_reason = death_wounds } - } - } - } - } - - stress_impact = { - lustful = major_stress_impact_gain - brave = medium_stress_impact_gain - compassionate = medium_stress_impact_gain - lazy = minor_stress_impact_loss - arbitrary = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = lustful - has_trait = brave - has_trait = compassionate - } - } - } - } -} - -# Death Event: You step into a throat strike -ep2_tournament_events.1005 = { - type = activity_event - title = ep2_tournament_events.1005.t - desc = ep2_tournament_events.1005.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = poison - } - cooldown = { years = 5 } - - trigger = { - scope:activity = { - any_guest_subset_current_phase = { - name = qualified - this = root - } - } - } - - # Die - option = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" - name = ep2_tournament_events.1005.a - - remove_variable = contest_aptitude - scope:activity = { - add_activity_log_entry = { - key = tournament_melee_death_log - tags = { bad } - score = 10 - character = root - } - } - - death = { - death_reason = death_tournament_melee_throat - } - - ai_chance = { - base = 100 - } - } -} - -# Ransom an opponent -ep2_tournament_events.1006 = { - type = activity_event - title = ep2_tournament_events.1006.t - desc = { - desc = ep2_tournament_events.1006.start - first_valid = { - triggered_desc = { - trigger = { - OR = { - has_relation_rival = scope:surrendering_knight - has_relation_nemesis = scope:surrendering_knight - } - } - desc = ep2_tournament_events.1006.rival - } - triggered_desc = { - trigger = { - AND = { - NOR = { - has_relation_rival = scope:surrendering_knight - has_relation_nemesis = scope:surrendering_knight - } - scope:surrendering_knight.gold < 5 - } - } - desc = { - desc = ep2_tournament_events.1006.normal - desc = ep2_tournament_events.1006.broke - } - } - triggered_desc = { - trigger = { - NOR = { - has_relation_rival = scope:surrendering_knight - has_relation_nemesis = scope:surrendering_knight - } - } - desc = ep2_tournament_events.1006.normal - } - } - } - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = sword_coup_degrace - } - right_portrait = { - character = scope:surrendering_knight - animation = sword_yield_start - } - cooldown = { years = 5 } - - trigger = { - scope:activity = { - any_guest_subset_current_phase = { - name = qualified - contest_event_general_contestant_valid_trigger = yes - root = this - } - any_guest_subset_current_phase = { - name = qualified - contest_event_general_contestant_valid_trigger = yes - is_ai = yes - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_positive_reaction" - tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1006 } - scope:activity = { - random_guest_subset_current_phase = { - name = qualified - limit = { - contest_event_general_contestant_valid_trigger = yes - is_ai = yes - } - save_scope_as = surrendering_knight - } - } - - save_scope_value_as = { #Save their gold - name = surrendering_knight_gold - value = scope:surrendering_knight.gold - } - - save_scope_value_as = { #Save a fifth of their gold as a ransom - name = gold_percentage - value = { - value = scope:surrendering_knight.gold - multiply = 0.2 - } - } - - if = { - limit = { - scope:surrendering_knight ?= { - any_equipped_character_artifact = { - OR = { - artifact_slot_type = primary_armament - artifact_slot_type = armor - artifact_slot_type = helmet - } - } - } - } - scope:surrendering_knight = { - random_equipped_character_artifact = { - limit = { - OR = { - artifact_slot_type = primary_armament - artifact_slot_type = armor - artifact_slot_type = helmet - } - } - save_scope_as = artifact - } - } - } - else = { - create_artifact_brooch_effect = { - OWNER = scope:surrendering_knight - SMITH = scope:surrendering_knight - } - } - - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_minor_value - } - } - - scope:surrendering_knight = { - accolade_medium_glory_loss_with_checks_effect = yes - } - } - - # Take their eye - option = { - name = ep2_tournament_events.1006.a - - trigger = { - OR = { - has_relation_rival = scope:surrendering_knight - has_relation_nemesis = scope:surrendering_knight - } - } - - add_internal_flag = special - - if = { - limit = { - scope:surrendering_knight = { - has_relation_nemesis = root - } - } - scope:surrendering_knight = { - add_trait = disfigured - } - } - else_if = { - limit = { - scope:surrendering_knight = { - has_relation_rival = root - } - } - scope:surrendering_knight = { - add_trait = one_eyed - } - } - - stress_impact = { - base = miniscule_stress_impact_loss - compassionate = massive_stress_impact_gain - forgiving = massive_stress_impact_gain - vengeful = minor_stress_impact_loss - sadistic = minor_stress_impact_loss - } - - ai_chance = { - base = 25 - - modifier = { - factor = 0 - OR = { - has_trait = compassionate - has_trait = forgiving - } - } - } - } - - # Take the ransom - option = { - name = ep2_tournament_events.1006.b - - trigger = { - scope:surrendering_knight.gold > 4 - } - - scope:surrendering_knight = { - pay_short_term_gold = { - target = root - gold = scope:gold_percentage - } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_ransom_log - tags = { good } - score = 5 - character = root - target = scope:surrendering_knight - } - } - - stress_impact = { # Deliberately low; we want the player to pick this option the most - greedy = miniscule_stress_impact_loss - just = miniscule_stress_impact_loss - generous = miniscule_stress_impact_gain - arbitrary = miniscule_stress_impact_gain - } - - ai_chance = { - base = 100 - ai_value_modifier = { - ai_boldness = 0.5 - ai_vengefulness = -0.5 - } - } - } - - # Take a piece of their armour/weaponry - option = { - name = ep2_tournament_events.1006.c - - trigger = { - scope:surrendering_knight = { - any_equipped_character_artifact = { - count >= 1 - OR = { - artifact_slot_type = primary_armament - artifact_slot_type = armor - artifact_slot_type = helmet - } - } - } - } - - if = { - limit = { - scope:surrendering_knight = { - any_equipped_character_artifact = { - count >= 1 - OR = { - artifact_slot_type = primary_armament - artifact_slot_type = armor - artifact_slot_type = helmet - } - save_temporary_scope_as = artifact - } - } - } - scope:artifact = { - set_owner = root - } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_ransom_log - tags = { good } - score = 5 - character = root - target = scope:surrendering_knight - } - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = 0.5 - ai_vengefulness = -0.5 - } - } - } - - # Take a tiny amount of gold - option = { - name = ep2_tournament_events.1006.d - - trigger = { - scope:surrendering_knight = { - any_equipped_character_artifact = { - count = 0 - } - gold < 4 - } - } - - scope:surrendering_knight = { - pay_short_term_gold = { - target = root - gold = 5 - } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_ransom_log - tags = { good } - score = 5 - character = root - target = scope:surrendering_knight - } - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = 0.5 - ai_vengefulness = -0.5 - } - } - } - - # Let them go free - option = { - name = ep2_tournament_events.1006.e - - add_prestige = 50 #Small bit of prestige for being gracious - - reverse_add_opinion = { - modifier = grateful_opinion - target = scope:surrendering_knight - opinion = 25 - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = -1 - ai_vengefulness = -1 - } - } - } -} - -# You take a minute at a refuge -ep2_tournament_events.1007 = { - type = activity_event - title = ep2_tournament_events.1007.t - desc = ep2_tournament_events.1007.desc - theme = tournament_contest - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = thinking - } - right_portrait = { - character = scope:teammate_1 - } - lower_right_portrait = { - character = scope:teammate_2 - } - lower_left_portrait = { - character = scope:teammate_3 - } - cooldown = { years = 5 } - - trigger = { - scope:activity = { - any_guest_subset_current_phase = { - name = qualified - root = this - exists = var:progress_to_victory - } - #Ensure there are two teams with at least 3 people each - any_guest_subset_current_phase = { - name = team_alpha - contest_event_general_contestant_valid_trigger = yes - count >= 3 - } - any_guest_subset_current_phase = { - name = team_beta - contest_event_general_contestant_valid_trigger = yes - count >= 3 - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_trotting" - tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1007 } - scope:activity = { - if = { # If you're in Team A, grab teammates - limit = { - any_guest_subset_current_phase = { - name = team_alpha - this = root - } - } - random_guest_subset_current_phase = { - name = team_alpha - limit = { contest_event_general_contestant_valid_trigger = yes } - save_scope_as = teammate_1 - } - random_guest_subset_current_phase = { - name = team_alpha - limit = { - contest_event_general_contestant_valid_trigger = yes - this != scope:teammate_1 - } - save_scope_as = teammate_2 - } - random_guest_subset_current_phase = { - name = team_alpha - limit = { - contest_event_general_contestant_valid_trigger = yes - NOR = { - this = scope:teammate_1 - this = scope:teammate_2 - } - } - save_scope_as = teammate_3 - } - } - else = { # If you're in team B, grab those teammates - random_guest_subset_current_phase = { - name = team_beta - limit = { - contest_event_general_contestant_valid_trigger = yes - } - save_scope_as = teammate_1 - } - random_guest_subset_current_phase = { - name = team_beta - limit = { - contest_event_general_contestant_valid_trigger = yes - this != scope:teammate_1 - } - save_scope_as = teammate_2 - } - random_guest_subset_current_phase = { - name = team_beta - limit = { - contest_event_general_contestant_valid_trigger = yes - NOR = { - this = scope:teammate_1 - this = scope:teammate_2 - } - } - save_scope_as = teammate_3 - } - } - } - } - - # Pay for some food and drink - option = { - name = ep2_tournament_events.1007.a - - remove_short_term_gold = medium_gold_value - - random_list = { - 10 = { #You are all somewhat refreshed - desc = ep2_tournament_events.1007.a.tt.success - show_chance = no - - hidden_effect = { - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - scope:teammate_1 = { - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - } - scope:teammate_2 = { - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - } - scope:teammate_3 = { - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - } - } - - send_interface_toast = { - title = ep2_tournament_events.1007.a.tt.success - left_icon = root - - custom_tooltip = ep2_tournament_events.1007.a.result - } - } - 2 = { #It refreshes all of you a lot - desc = ep2_tournament_events.1007.a.tt.bigsuccess - show_chance = no - - hidden_effect = { - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - scope:teammate_1 = { - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - } - scope:teammate_2 = { - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - } - scope:teammate_3 = { - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - } - } - - send_interface_toast = { - title = ep2_tournament_events.1007.a.tt.bigsuccess - left_icon = root - - custom_tooltip = ep2_tournament_events.1007.a.bigresult - } - } - } - - stress_impact = { - base = miniscule_stress_impact_loss - diligent = miniscule_stress_impact_gain - gluttonous = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = greedy - has_trait = avaricious - } - } - } - } - - # Share some inspiring words - option = { - name = ep2_tournament_events.1007.b - - flavor = ep2_tournament_events.1007.b.tt - - duel = { - skill = diplomacy - value = decent_skill_rating - - 50 = { #You inspire your troops - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - desc = ep2_tournament_events.1007.b.tt.success - - hidden_effect = { - scope:teammate_1 = { - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - } - scope:teammate_2 = { - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - } - scope:teammate_3 = { - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - } - } - - send_interface_toast = { - title = ep2_tournament_events.1007.b.tt.success - left_icon = root - - custom_tooltip = ep2_tournament_events.1007.b.result - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = wit - value = tournament_hastiludes_xp_gain_minor_value - } - } - } - } - 50 = { #You fail to make an impact - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - desc = ep2_tournament_events.1007.b.tt.failure - - send_interface_toast = { - title = ep2_tournament_events.1007.b.tt.failure - left_icon = root - - add_stress = minor_stress_gain - } - } - } - - stress_impact = { - shy = medium_stress_impact_gain - lazy = minor_stress_impact_gain - greedy = miniscule_stress_impact_loss - gregarious = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - has_trait = shy - } - } - } - - # Rest alone - option = { - name = ep2_tournament_events.1007.c - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - stress_impact = { - shy = minor_stress_impact_loss - lazy = miniscule_stress_impact_loss - greedy = miniscule_stress_impact_loss - gregarious = medium_stress_impact_gain - diligent = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - has_trait = gregarious - } - } - } -} - -# You encounter a famous knight in the melee -ep2_tournament_events.1011 = { - type = activity_event - title = ep2_tournament_events.1011.t - desc = { - desc = ep2_tournament_events.1011.start - first_valid = { - triggered_desc = { - trigger = { - OR = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - } - desc = ep2_tournament_events.1011.equal - } - triggered_desc = { - trigger = { - NOR = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - } - desc = ep2_tournament_events.1011.unequal - } - } - } - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = personality_honorable - } - right_portrait = { - character = scope:famous_knight - animation = sword_coup_degrace - } - cooldown = { years = 1 } - - trigger = { - exists = var:progress_to_victory_score - scope:activity = { - has_current_phase = tournament_phase_melee - OR = { - AND = { # If you're in Team A, they need to be in Team B - any_guest_subset_current_phase = { - name = team_alpha - this = root - } - any_guest_subset_current_phase = { - name = team_beta - contest_event_general_contestant_valid_trigger = yes - has_trait = tourney_participant - is_healthy = yes - OR = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - } - } - AND = { # If you're in Team B, they need to be in Team A - any_guest_subset_current_phase = { - name = team_beta - this = root - } - any_guest_subset_current_phase = { - name = team_alpha - contest_event_general_contestant_valid_trigger = yes - has_trait = tourney_participant - is_healthy = yes - OR = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - } - } - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_neigh" - tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1011 } - scope:activity = { - if = { - limit = { - any_guest_subset_current_phase = { - name = team_alpha - this = root - } - } - random_guest_subset_current_phase = { - name = team_beta - limit = { - contest_event_general_contestant_valid_trigger = yes - has_trait = tourney_participant - is_healthy = yes - OR = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - } - save_scope_as = famous_knight - } - } - else = { - random_guest_subset_current_phase = { - name = team_alpha - limit = { - contest_event_general_contestant_valid_trigger = yes - has_trait = tourney_participant - is_healthy = yes - OR = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - } - save_scope_as = famous_knight - } - } - } - save_scope_value_as = { - name = fight_range - value = { - integer_range = { - min = 1 - max = 9 - } - } - } - } - - # Throw dirt to give you an advantage before your duel - option = { - name = ep2_tournament_events.1011.a - - flavor = ep2_tournament_events.1011.a.tt - - trigger = { - OR = { - intrigue > 20 - has_trait = deceitful - has_trait = arbitrary - } - } - - random_list = { - 75 = { #You win - modifier = { #This is for fuzzying up the random list so it randomises it a bit - add = scope:fight_range - } - modifier = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 60 - } - add = 5 - } - modifier = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 75 - } - add = 10 - } - modifier = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 90 - } - add = 15 - } - modifier = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 60 - } - add = 5 - } - modifier = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 75 - } - add = 10 - } - modifier = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 90 - } - add = 15 - } - desc = ep2_tournament_events.1011.a.success - send_interface_toast = { - title = ep2_tournament_events.1011.a.success - left_icon = root - right_icon = scope:famous_knight - - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - } - } - } - 25 = { #You lose - modifier = { #This is for fuzzying up the random list so it randomises it a bit - add = scope:fight_range - } - modifier = { - scope:famous_knight = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 60 - } - } - add = 5 - } - modifier = { - scope:famous_knight = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 75 - } - } - add = 10 - } - modifier = { - scope:famous_knight = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 90 - } - } - add = 15 - } - modifier = { - scope:famous_knight = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 60 - } - } - add = 5 - } - modifier = { - scope:famous_knight = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 75 - } - } - add = 10 - } - modifier = { - scope:famous_knight = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 90 - } - } - add = 15 - } - desc = ep2_tournament_events.1011.a.failure - send_interface_toast = { - title = ep2_tournament_events.1011.a.failure - left_icon = root - right_icon = scope:famous_knight - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } - } - } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_dirt_thrown_log - tags = { good } - score = 5 - character = root - target = scope:famous_knight - } - } - - stress_impact = { - craven = minor_stress_impact_loss - deceitful = minor_stress_impact_loss - wrathful = miniscule_stress_impact_loss - arbitrary = miniscule_stress_impact_loss - brave = minor_stress_impact_gain - just = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = brave - has_trait = just - } - } - } - } - - # Engage them head on - option = { - name = ep2_tournament_events.1011.b - - trigger = { - OR = { #You are skilful in your own right - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - } - - random_list = { - 50 = { #You win - modifier = { #This is for fuzzying up the random list so it randomises it a bit - add = scope:fight_range - } - modifier = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 60 - } - add = 5 - } - modifier = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 75 - } - add = 10 - } - modifier = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 90 - } - add = 15 - } - modifier = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 60 - } - add = 5 - } - modifier = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 75 - } - add = 10 - } - modifier = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 90 - } - add = 15 - } - desc = ep2_tournament_events.1011.a.success - send_interface_toast = { - title = ep2_tournament_events.1011.a.success - left_icon = root - right_icon = scope:famous_knight - - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_medium_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_medium_value - } - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - } - } - 50 = { #You lose - modifier = { - scope:famous_knight = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 60 - } - } - add = 5 - } - modifier = { - scope:famous_knight = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 75 - } - } - add = 10 - } - modifier = { - scope:famous_knight = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 90 - } - } - add = 15 - } - modifier = { - scope:famous_knight = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 60 - } - } - add = 5 - } - modifier = { - scope:famous_knight = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 75 - } - } - add = 10 - } - modifier = { - scope:famous_knight = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 90 - } - } - add = 15 - } - desc = ep2_tournament_events.1011.a.failure - send_interface_toast = { - title = ep2_tournament_events.1011.a.failure - left_icon = root - right_icon = scope:famous_knight - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } - - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_minor_value - } - } - } - } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_dirt_thrown_log - tags = { good } - score = 5 - character = root - target = scope:famous_knight - } - } - - stress_impact = { - craven = medium_stress_impact_gain - wrathful = miniscule_stress_impact_loss - brave = minor_stress_impact_loss - just = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - ai_value_modifier = { - ai_boldness = 0.5 - ai_energy = 0.5 - ai_vengefulness = 0.5 - } - } - } - - # Ignore their challenge and slip away - option = { - name = ep2_tournament_events.1011.c - - trigger = { - OR = { #You are skilful in your own right - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - } - - reverse_add_opinion = { - modifier = disappointed_opinion - target = scope:famous_knight - opinion = -30 - } - - stress_impact = { - brave = major_stress_impact_gain - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - craven = medium_stress_impact_loss - content = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = ambitious - has_trait = brave - has_trait = arrogant - } - } - } - } - - # Try to fight them - option = { - name = ep2_tournament_events.1011.b #Re-use loc from above - - trigger = { - NOR = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - } - - random_list = { - 20 = { #You win - modifier = { #This is for fuzzying up the random list so it randomises it a bit - add = scope:fight_range - } - modifier = { - has_trait = physique_good - add = 5 - } - modifier = { - has_trait = strong - add = 5 - } - modifier = { - has_trait = gallant - add = 5 - } - modifier = { - has_trait = lifestyle_blademaster - add = 10 - } - custom_tooltip = ep2_tournament_events.1011.a.success - send_interface_toast = { - title = ep2_tournament_events.1011.a.success - left_icon = root - right_icon = scope:famous_knight - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_medium_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_medium_value - } - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - - accolade_medium_glory_gain_with_checks_effect = yes - } - } - 80 = { #You lose - modifier = { #This is for fuzzying up the random list so it randomises it a bit - add = scope:fight_range - } - custom_tooltip = ep2_tournament_events.1011.a.failure - send_interface_toast = { - title = ep2_tournament_events.1011.a.failure - left_icon = root - right_icon = scope:famous_knight - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } - - scope:famous_knight = { - accolade_minor_glory_gain_with_checks_effect = yes - } - - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_minor_value - } - } - } - } - } - - stress_impact = { - brave = medium_stress_impact_loss #In face of very unlikely odds! - ambitious = miniscule_stress_impact_loss - arrogant = miniscule_stress_impact_loss - craven = major_stress_impact_gain - humble = medium_stress_impact_gain - content = minor_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = 0.5 - ai_energy = 0.5 - ai_vengefulness = 0.5 - } - } - } - - # Try to escape - option = { - name = ep2_tournament_events.1011.c #Also re-using this - - trigger = { - NOR = { #You are skilful in your own right - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - } - - reverse_add_opinion = { - modifier = disappointed_opinion - target = scope:famous_knight - opinion = -30 - } - - duel = { - skill = intrigue - target = scope:famous_knight - - 50 = { #You escape - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - desc = ep2_tournament_events.1011.d.success - - send_interface_toast = { - title = ep2_tournament_events.1011.d.success - left_icon = root - right_icon = scope:famous_knight - - add_stress = medium_stress_loss - } - } - 50 = { #They catch you and smack you about - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - desc = ep2_tournament_events.1011.d.failure - - send_interface_toast = { - title = ep2_tournament_events.1011.d.failure - left_icon = root - right_icon = scope:famous_knight - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } - } - } - } - - stress_impact = { - brave = major_stress_impact_gain - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - craven = medium_stress_impact_loss - content = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = brave - has_trait = ambitious - has_trait = arrogant - } - } - } - } -} - -# You attempt to ambush an opponent in the trees -ep2_tournament_events.1012 = { - type = activity_event - title = ep2_tournament_events.1012.t - desc = ep2_tournament_events.1012.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = scheme - } - right_portrait = { - character = scope:caught_opponent - animation = shock - } - cooldown = { years = 5 } - - trigger = { - scope:activity = { - any_guest_subset_current_phase = { - name = qualified - this = root - } - any_guest_subset_current_phase = { - name = qualified - contest_event_general_contestant_valid_trigger = yes - } - } - scope:activity.activity_location = { #Ensure it's in a place where there could feasibly be some trees - NOR = { - terrain = desert - terrain = desert_mountains - terrain = drylands - terrain = floodplains - terrain = mountains - terrain = oasis - terrain = steppe - terrain = wetlands - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_wood_woosh" - tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1012 } - scope:activity = { - if = { # If you're in Team A, grab opponent - limit = { - any_guest_subset_current_phase = { - name = team_alpha - this = root - } - } - random_guest_subset_current_phase = { - name = team_beta - limit = { contest_event_general_contestant_valid_trigger = yes } - save_scope_as = caught_opponent - } - } - else = { # If you're in team B, grab that opponent - random_guest_subset_current_phase = { - name = team_alpha - limit = { - contest_event_general_contestant_valid_trigger = yes - } - save_scope_as = caught_opponent - } - } - } - } - - # You, a forest fighter, take huge advantage - option = { - name = ep2_tournament_events.1012.a - - trigger = { - OR = { - has_trait = forest_fighter - has_trait = jungle_stalker - } - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - - scope:caught_opponent = { - pay_short_term_gold = { - target = root - gold = { - value = root.medium_gold_value - max = scope:caught_opponent.gold - } - } - } - - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_minor_value - } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_ambush_sprung_log - tags = { good } - score = 5 - character = root - target = scope:versus_contestant - } - } - - stress_impact = { - brave = miniscule_stress_impact_loss - ambitious = miniscule_stress_impact_loss - deceitful = miniscule_stress_impact_loss - craven = medium_stress_impact_gain - content = minor_stress_impact_gain - honest = medium_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = 1 - ai_honor = -1 - ai_vengefulness = 1 - } - } - } - - # You are an honorable knight, and offer them fair duel - option = { - name = ep2_tournament_events.1012.b - - trigger = { - OR = { - has_trait = gallant - has_trait = just - } - } - - duel = { - skill = prowess - target = scope:caught_opponent - - 50 = { #You win - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - modifier = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 20 - } - add = 5 - } - modifier = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 40 - } - add = 10 - } - modifier = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 60 - } - add = 15 - } - modifier = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 80 - } - add = 20 - } - desc = ep2_tournament_events.1012.b.success - send_interface_toast = { - title = ep2_tournament_events.1012.b.success - left_icon = root - right_icon = scope:caught_opponent - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - accolade_minor_glory_gain_with_checks_effect = yes - - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_medium_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_medium_value - } - } - } - } - 50 = { #You lose - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - modifier = { - scope:caught_opponent = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 20 - } - } - add = 5 - } - modifier = { - scope:caught_opponent = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 40 - } - } - add = 10 - } - modifier = { - scope:caught_opponent = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 60 - } - } - add = 15 - } - modifier = { - scope:caught_opponent = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 80 - } - } - add = 20 - } - desc = ep2_tournament_events.1012.b.failure - send_interface_toast = { - title = ep2_tournament_events.1012.b.failure - left_icon = root - right_icon = scope:caught_opponent - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - - scope:caught_opponent = { - accolade_minor_glory_gain_with_checks_effect = yes - } - } - } - } - - reverse_add_opinion = { - modifier = respect_opinion - target = scope:caught_opponent - opinion = 25 - } - - stress_impact = { - brave = miniscule_stress_impact_loss - ambitious = miniscule_stress_impact_loss - deceitful = miniscule_stress_impact_loss - craven = medium_stress_impact_gain - content = minor_stress_impact_gain - honest = medium_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_compassion = 1 - ai_honor = 1 - ai_boldness = 1 - } - } - } - - # You attempt an ambush - option = { - name = ep2_tournament_events.1012.c - - trigger = { - NOR = { - has_trait = forest_fighter - has_trait = jungle_stalker - } - } - - duel = { - skills = { martial intrigue } - target = scope:caught_opponent - - 60 = { #It works - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - modifier = { - has_trait = deceitful #Happy to do it! - add = 5 - } - modifier = { - has_trait = patient #Wait for the right time to strike - add = 5 - } - modifier = { - has_trait = lifestyle_hunter - add = 5 - } - modifier = { - has_trait = lifestyle_blademaster - add = 5 - } - modifier = { - has_trait = strategist - add = 5 - } - custom_tooltip = ep2_tournament_events.1012.c.success - scope:activity = { - add_activity_log_entry = { - key = tournament_ambush_sprung_log - tags = { good } - score = 5 - character = root - target = scope:caught_opponent - } - } - send_interface_toast = { - title = ep2_tournament_events.1012.c.success - left_icon = root - right_icon = scope:caught_opponent - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - scope:caught_opponent = { - pay_short_term_gold = { - target = root - gold = { - value = root.minor_gold_value - max = scope:caught_opponent.gold - } - } - } - - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_minor_value - } - } - } - } - 40 = { #It doesn't work - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - modifier = { - has_trait = impatient - add = 5 - } - modifier = { - scope:caught_opponent = { - has_trait = strategist - } - add = 5 - } - modifier = { - scope:caught_opponent = { - has_trait = paranoid #Always watching out of the corner of their eye - } - add = 5 - } - custom_tooltip = ep2_tournament_events.1012.c.failure - send_interface_toast = { - title = ep2_tournament_events.1012.c.failure - left_icon = root - right_icon = scope:caught_opponent - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - - pay_short_term_gold = { - target = scope:caught_opponent - gold = { - value = root.minor_gold_value - max = root.gold - } - } - } - } - } - - stress_impact = { - brave = miniscule_stress_impact_loss - ambitious = miniscule_stress_impact_loss - deceitful = miniscule_stress_impact_loss - craven = medium_stress_impact_gain - content = minor_stress_impact_gain - honest = medium_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = 1 - ai_honor = -1 - ai_vengefulness = 1 - } - } - } - - # You let them go - option = { - name = ep2_tournament_events.1012.d - - stress_impact = { - brave = medium_stress_impact_gain - ambitious = medium_stress_impact_gain - deceitful = medium_stress_impact_gain - craven = miniscule_stress_impact_loss - content = miniscule_stress_impact_loss - honest = miniscule_stress_impact_loss - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = -1 - } - } - } -} - -# An opponent has fallen from their horse -ep2_tournament_events.1013 = { - type = activity_event - title = ep2_tournament_events.1013.t - desc = ep2_tournament_events.1013.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = jockey_lance_couched_gallop - } - right_portrait = { - character = scope:felled_participant - animation = pain - } - cooldown = { years = 1 } - - trigger = { - scope:activity = { #Ensure each team has at least one participant - any_guest_subset_current_phase = { - name = qualified - this = root - } - any_guest_subset_current_phase = { - name = team_alpha - contest_event_general_contestant_valid_trigger = yes - is_healthy = yes - } - any_guest_subset_current_phase = { - name = team_beta - contest_event_general_contestant_valid_trigger = yes - is_healthy = yes - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_neigh" - tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1013 } - scope:activity = { - if = { #Ensure it picks an opponent - limit = { - any_guest_subset_current_phase = { - name = team_alpha - this = root - } - } - random_guest_subset_current_phase = { - name = team_beta - limit = { - contest_event_general_contestant_valid_trigger = yes - is_healthy = yes - } - save_scope_as = felled_participant - } - } - else = { - random_guest_subset_current_phase = { - name = team_alpha - limit = { - contest_event_general_contestant_valid_trigger = yes - is_healthy = yes - } - save_scope_as = felled_participant - } - } - } - - scope:felled_participant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - } - } - - # You escort them out of the fray - option = { - name = ep2_tournament_events.1013.a - - trigger = { - OR = { - has_trait = gallant - has_trait = just - } - } - - scope:felled_participant = { - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - add_opinion = { - modifier = grateful_opinion - target = root - opinion = 25 - } - } - - set_nickname_effect = { #To give you something roleplay-ish - NICKNAME = nick_the_honorable - } - - stress_impact = { - base = minor_stress_impact_loss - compassionate = miniscule_stress_impact_loss - arbitrary = minor_stress_impact_gain - callous = medium_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_compassion = 1 - ai_honor = 1 - } - } - } - - # You run them over - option = { - name = ep2_tournament_events.1013.b - - activity_tournament_change_contestant_score_effect = { SCORE = increase_miniscule } - - scope:felled_participant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - - increase_wounds_no_death_effect = { REASON = battle } - - random = { - chance = 33 - if = { - limit = { - NOT = { - has_trait = scarred - } - } - add_trait = scarred - } - add_trait_xp = { - trait = scarred - value = { - integer_range = { - min = 5 - max = 25 - } - } - } - } - - add_opinion = { - modifier = angry_opinion - target = root - opinion = -25 - } - } - - stress_impact = { - brave = minor_stress_impact_gain - just = medium_stress_impact_gain - compassionate = medium_stress_impact_gain - sadistic = miniscule_stress_impact_loss - craven = miniscule_stress_impact_loss - arbitrary = minor_stress_impact_loss - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_honor = -1 - ai_compassion = -1 - } - } - } - - # You dismount to offer them fair duel - option = { - name = ep2_tournament_events.1013.c - - duel = { - skills = { prowess martial } - target = scope:felled_participant - - 50 = { #You win - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - modifier = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 25 - } - add = 10 - } - modifier = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - add = 20 - } - modifier = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 75 - } - add = 30 - } - desc = ep2_tournament_events.1013.c.success - send_interface_toast = { - title = ep2_tournament_events.1013.c.success - left_icon = root - right_icon = scope:felled_participant - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - scope:felled_participant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_minor_value - } - } - } - } - 50 = { #You lose - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - modifier = { - scope:felled_participant = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 25 - } - } - add = 10 - } - modifier = { - scope:felled_participant = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - } - add = 20 - } - modifier = { - scope:felled_participant = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 75 - } - } - add = 30 - } - desc = ep2_tournament_events.1013.c.failure - send_interface_toast = { - title = ep2_tournament_events.1013.c.failure - left_icon = root - right_icon = scope:felled_participant - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - - scope:felled_participant = { - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - } - } - } - } - - stress_impact = { - brave = miniscule_stress_impact_loss - just = miniscule_stress_impact_loss - craven = minor_stress_impact_gain - arbitrary = medium_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_compassion = 0.5 - ai_honor = 1 - ai_boldness = 1 - } - } - } - - # You let them go - option = { - name = ep2_tournament_events.1013.d - - stress_impact = { - brave = miniscule_stress_impact_gain - sadistic = minor_stress_impact_gain - craven = miniscule_stress_impact_loss - just = miniscule_stress_impact_loss - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_compassion = 0.5 - ai_honor = 0.5 - ai_boldness = -0.5 - } - } - } -} - -# A mysterious knight is doing incredibly well -ep2_tournament_events.1015 = { - type = activity_event - title = ep2_tournament_events.1015.t - desc = ep2_tournament_events.1015.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = shock - } - cooldown = { years = 5 } - - trigger = { - scope:activity = { - OR = { - AND = { - any_guest_subset_current_phase = { - name = team_alpha - this = root - } - any_guest_subset_current_phase = { - name = team_alpha - contest_event_general_contestant_valid_trigger = yes - OR = { #Ensure it's someone meaningful to you - is_close_family_or_spouse_of_root_trigger = yes - has_relation_lover = root - has_relation_soulmate = root - has_character_modifier = ignores_gender_army_rules #In case Mulan ends up really good! - } - } - } - AND = { - any_guest_subset_current_phase = { - name = team_beta - this = root - } - any_guest_subset_current_phase = { - name = team_beta - contest_event_general_contestant_valid_trigger = yes - OR = { #Ensure it's someone meaningful to you - is_close_family_or_spouse_of_root_trigger = yes - has_relation_lover = root - has_relation_soulmate = root - has_character_modifier = ignores_gender_army_rules #In case Mulan ends up really good! - } - } - } - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" - tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1015 } - scope:activity = { - if = { #Ensure it picks a member of your team - limit = { - any_guest_subset_current_phase = { - name = team_alpha - this = root - } - } - random_guest_subset_current_phase = { - name = team_alpha - limit = { - contest_event_general_contestant_valid_trigger = yes - OR = { - is_close_family_or_spouse_of_root_trigger = yes - has_relation_soulmate = root - has_relation_lover = root - has_character_modifier = ignores_gender_army_rules - } - } - save_scope_as = mysterious_knight - } - } - else = { - random_guest_subset_current_phase = { - name = team_beta - limit = { - contest_event_general_contestant_valid_trigger = yes - OR = { - is_close_family_or_spouse_of_root_trigger = yes - has_relation_soulmate = root - has_relation_lover = root - has_character_modifier = ignores_gender_army_rules - } - } - save_scope_as = mysterious_knight - } - } - } - - hidden_effect = { - scope:mysterious_knight = { - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - } - } - - save_scope_value_as = { #For the chase scene number fuzzying - name = chase_range - value = { - integer_range = { - min = 1 - max = 9 - } - } - } - } - - # Follow along behind them to clean up in their wake - option = { - name = ep2_tournament_events.1015.a - - trigger = { - intrigue >= 15 - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - add_gold = { minor_gold_value medium_gold_value } - - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_minor_value - } - } - - stress_impact = { - ambitious = miniscule_stress_impact_loss - deceitful = miniscule_stress_impact_loss - craven = miniscule_stress_impact_loss - arbitrary = miniscule_stress_impact_loss - brave = medium_stress_impact_gain - just = medium_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = -1 - ai_honor = -1 - ai_compassion = -1 - } - } - } - - # You must know who it is! Chase after them! - option = { - name = ep2_tournament_events.1015.b - - random_list = { - 50 = { #You catch them - modifier = { #This is for fuzzying up the random list so it randomises it a bit - add = scope:chase_range - } - modifier = { - has_trait = athletic - add = 10 - } - modifier = { - has_trait = stubborn - add = 5 - } - desc = ep2_tournament_events.1015.b.success - custom_tooltip = ep2_tournament_events.1015.b.success.tt - - trigger_event = ep2_tournament_events.1016 - } - 50 = { #They get away - modifier = { #This is for fuzzying up the random list so it randomises it a bit - add = scope:chase_range - } - modifier = { - OR = { - has_trait = wheezing - has_trait = spindly - } - add = 10 - } - modifier = { - OR = { - has_trait = clubfooted - has_trait = dwarf - } - add = 10 - } - modifier = { - current_weight > 80 - add = 5 - } - modifier = { - scope:mysterious_knight = { - has_trait = athletic - } - add = 10 - } - desc = ep2_tournament_events.1015.b.failure - send_interface_toast = { - title = ep2_tournament_events.1015.b.failure - left_icon = root - right_icon = scope:caught_opponent - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_miniscule } - } - } - } - - stress_impact = { - diligent = miniscule_stress_impact_loss - stubborn = miniscule_stress_impact_loss - lazy = medium_stress_impact_gain - fickle = minor_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = 1 - } - } - } - - # You let them go - option = { - name = ep2_tournament_events.1015.c - - stress_impact = { - diligent = minor_stress_impact_gain - stubborn = medium_stress_impact_gain - lazy = miniscule_stress_impact_loss - fickle = miniscule_stress_impact_loss - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = -0.5 - } - } - } -} - -# Followup to 1015: it's your (notable person!) -ep2_tournament_events.1016 = { - type = activity_event - title = ep2_tournament_events.1016.t - desc = { - desc = ep2_tournament_events.1016.start - first_valid = { - triggered_desc = { - trigger = { - has_character_flag = knows_mulan_flag - scope:mysterious_knight = { - has_character_modifier = ignores_gender_army_rules - } - } - desc = ep2_tournament_events.1016.mulan - } - triggered_desc = { - trigger = { - NOT = { - has_character_flag = knows_mulan_flag - } - scope:mysterious_knight = { - has_character_modifier = ignores_gender_army_rules - } - } - desc = ep2_tournament_events.1016.mulanunknown - } - triggered_desc = { - trigger = { - scope:mysterious_knight = { - OR = { #Catchall for relations - is_close_family_or_spouse_of_root_trigger = yes - has_relation_lover = root - has_relation_soulmate = root - } - } - } - desc = ep2_tournament_events.1016.relation - } - } - } - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = shock - } - right_portrait = { - character = scope:mysterious_knight - animation = marshal - } - cooldown = { years = 5 } - - immediate = { - hidden_effect = { - if = { - limit = { - scope:mysterious_knight = { - NOT = { - has_trait = tourney_participant - } - } - } - add_trait = tourney_participant - } - - if = { #Give them a stealthy big boost, so in-universe they don't look weird - limit = { - scope:mysterious_knight = { - has_trait = tourney_participant - } - } - scope:mysterious_knight = { - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_major_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_major_value - } - } - } - else = { - scope:mysterious_knight = { - add_trait = tourney_participant - - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_major_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_major_value - } - } - } - } - save_scope_value_as = { #For the chase scene number fuzzying - name = ability_range - value = { - integer_range = { - min = 1 - max = 9 - } - } - } - } - - # Protect me! - option = { - name = ep2_tournament_events.1016.a - - add_character_modifier = { #Add a powerful but temporary modifier - modifier = tournament_melee_protector_modifier - years = 1 - } - - stress_impact = { - ambitious = miniscule_stress_impact_loss - paranoid = miniscule_stress_impact_loss - craven = miniscule_stress_impact_loss - humble = miniscule_stress_impact_loss - brave = minor_stress_impact_gain - arrogant = medium_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = -0.5 - ai_rationality = 1 - } - } - } - - # You must teach me! - option = { - name = ep2_tournament_events.1016.b - - flavor = ep2_tournament_events.1016.b.tt - - random_list = { - 20 = { #You learn a lot - modifier = { #This is for fuzzying up the random list so it randomises it a bit - add = scope:ability_range - } - modifier = { - learning > 10 - add = 10 - } - modifier = { - has_trait = shrewd - add = 5 - } - modifier = { - has_trait = lifestyle_blademaster - add = 5 - } - desc = ep2_tournament_events.1016.b.success - - send_interface_toast = { - title = ep2_tournament_events.1016.b.success - left_icon = root - right_icon = scope:mysterious_knight - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_major_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_major_value - } - } - else = { - add_trait = tourney_participant - - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_major_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_major_value - } - } - } - } - 80 = { #You learn a little - modifier = { #This is for fuzzying up the random list so it randomises it a bit - add = scope:ability_range - } - desc = ep2_tournament_events.1016.b.failure - - send_interface_toast = { - title = ep2_tournament_events.1016.b.failure - left_icon = root - right_icon = scope:mysterious_knight - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_minor_value - } - } - else = { - add_trait = tourney_participant - - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_minor_value - } - } - } - } - } - - stress_impact = { - humble = miniscule_stress_impact_loss - diligent = miniscule_stress_impact_loss - arrogant = medium_stress_impact_gain - lazy = minor_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = 0.5 - ai_energy = 1 - } - } - } - - # I forbid this! - option = { - name = ep2_tournament_events.1016.c - - if = { #If you are their liege, demand they resign - limit = { - scope:mysterious_knight.liege = root - } - scope:mysterious_knight = { - if = { - limit = { exists = var:progress_to_victory } - remove_variable = progress_to_victory - } - if = { - limit = { exists = var:progress_to_victory_score } - remove_variable = progress_to_victory_score - } - if = { - limit = { exists = var:contest_aptitude } - remove_variable = contest_aptitude - } - } - } - - reverse_add_opinion = { - modifier = disappointed_opinion - target = scope:mysterious_knight - opinion = -25 - } - - stress_impact = { - humble = minor_stress_impact_gain - compassionate = minor_stress_impact_gain - fickle = medium_stress_impact_gain - callous = miniscule_stress_impact_loss - stubborn = miniscule_stress_impact_loss - arrogant = miniscule_stress_impact_loss - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = 0.5 - ai_energy = 1 - } - } - } -} - -# Cornered by three opposing knights -ep2_tournament_events.1017 = { - type = activity_event - title = ep2_tournament_events.1017.t - desc = ep2_tournament_events.1017.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = pain - } - right_portrait = { - character = scope:knight_1 - animation = sword_coup_degrace - } - lower_right_portrait = { - character = scope:knight_2 - } - lower_left_portrait = { - character = scope:knight_3 - } - cooldown = { years = 5 } - - trigger = { - scope:activity = { - OR = { - AND = { - any_guest_subset_current_phase = { - name = team_alpha - this = root - } - any_guest_subset_current_phase = { - name = team_alpha - contest_event_general_contestant_valid_trigger = yes - this != root - } - } - AND = { - any_guest_subset_current_phase = { - name = team_beta - this = root - } - any_guest_subset_current_phase = { - name = team_beta - contest_event_general_contestant_valid_trigger = yes - this != root - } - } - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_woosh" - tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1017 } - scope:activity = { - if = { # If you're in Team A, grab opponents in B - limit = { - any_guest_subset_current_phase = { - name = team_alpha - this = root - } - } - random_guest_subset_current_phase = { - name = team_beta - limit = { contest_event_general_contestant_valid_trigger = yes } - save_scope_as = knight_1 - } - random_guest_subset_current_phase = { - name = team_beta - limit = { - contest_event_general_contestant_valid_trigger = yes - this != scope:knight_1 - } - save_scope_as = knight_2 - } - random_guest_subset_current_phase = { - name = team_beta - limit = { - contest_event_general_contestant_valid_trigger = yes - NOR = { - this = scope:knight_1 - this = scope:knight_2 - } - } - save_scope_as = knight_3 - } - } - else = { # If you're in team B, grab opponents in A - random_guest_subset_current_phase = { - name = team_alpha - limit = { - contest_event_general_contestant_valid_trigger = yes - } - save_scope_as = knight_1 - } - random_guest_subset_current_phase = { - name = team_alpha - limit = { - contest_event_general_contestant_valid_trigger = yes - this != scope:knight_1 - } - save_scope_as = knight_2 - } - random_guest_subset_current_phase = { - name = team_alpha - limit = { - contest_event_general_contestant_valid_trigger = yes - NOR = { - this = scope:knight_1 - this = scope:knight_2 - } - } - save_scope_as = knight_3 - } - } - } - - save_scope_value_as = { #Combine the knights' prowess - name = knight_prowess - value = { - add = scope:knight_1.prowess - add = scope:knight_3.prowess - add = scope:knight_3.prowess - } - } - - save_scope_value_as = { #Simulate your backups' combined prowess - name = prowess_range - value = { - integer_range = { - min = 10 - max = 35 - } - } - } - } - - # Take them all on! - option = { - name = ep2_tournament_events.1017.a - - duel = { - skill = prowess - value = scope:knight_prowess - - # Success - 50 = { - desc = ep2_tournament_events.1017.a.success - show_chance = yes - - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - } - - send_interface_toast = { - title = ep2_tournament_events.1017.a.success - left_icon = root - - activity_tournament_change_contestant_score_effect = { SCORE = increase_massive } - - add_prestige = 250 - - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_medium_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_medium_value - } - } - } - } - # Failure - 50 = { - desc = ep2_tournament_events.1017.a.failure - show_chance = yes - - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - } - - send_interface_toast = { - title = ep2_tournament_events.1017.a.failure - left_icon = root - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - - increase_wounds_effect = { REASON = battle } - } - } - } - - stress_impact = { - ambitious = minor_stress_impact_loss - brave = minor_stress_impact_loss - stubborn = miniscule_stress_impact_loss - content = medium_stress_impact_gain - craven = medium_stress_impact_gain - fickle = minor_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = 1 - ai_honor = 0.5 - } - } - } - - # Call for backup - option = { - name = ep2_tournament_events.1017.b - - duel = { - skills = { prowess martial } - value = decent_skill_rating - - # Success - 50 = { - desc = ep2_tournament_events.1017.b.success - show_chance = yes - - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.1017.b.success - left_icon = root - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_minor_value - } - } - } - } - # Failure - 50 = { - desc = ep2_tournament_events.1017.b.failure - show_chance = yes - - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.1017.b.failure - left_icon = root - - add_stress = minor_stress_gain - } - } - } - - stress_impact = { - ambitious = minor_stress_impact_gain - brave = minor_stress_impact_gain - stubborn = minor_stress_impact_gain - content = miniscule_stress_impact_loss - craven = miniscule_stress_impact_loss - fickle = miniscule_stress_impact_loss - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = -1 - ai_honor = -0.5 - } - } - } -} - -scripted_trigger contest_house_united_trigger = { - contest_event_general_contestant_valid_trigger = yes - this != root - exists = house - house ?= { - this = root.house - any_house_member = { is_alive = yes } - } -} - -# You save a house member -ep2_tournament_events.1018 = { - type = activity_event - title = ep2_tournament_events.1018.t - desc = ep2_tournament_events.1018.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = jockey_gallop - } - right_portrait = { - character = scope:family - animation = admiration - } - cooldown = { years = 5 } - - trigger = { - exists = house - scope:activity = { - OR = { - AND = { - any_guest_subset_current_phase = { - name = team_alpha - this = root - } - any_guest_subset_current_phase = { - name = team_alpha - contest_house_united_trigger = yes - } - } - AND = { - any_guest_subset_current_phase = { - name = team_beta - this = root - } - any_guest_subset_current_phase = { - name = team_beta - contest_house_united_trigger = yes - } - } - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_flyby" - scope:activity = { - if = { # If you're in Team A, grab teammate - limit = { - any_guest_subset_current_phase = { - name = team_alpha - this = root - } - } - random_guest_subset_current_phase = { - name = team_alpha - limit = { contest_house_united_trigger = yes } - save_scope_as = family - } - } - else = { # If you're in Team B, grab teammate - random_guest_subset_current_phase = { - name = team_beta - limit = { contest_house_united_trigger = yes } - save_scope_as = family - } - } - } - - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_minor_value - } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_ambush_sprung_log - tags = { good } - score = 5 - character = root - target = scope:family - } - } - } - - # House unity! - option = { - name = ep2_tournament_events.1018.a - - if = { - limit = { - house = { - NOT = { - has_house_modifier = tournament_house_unity_modifier - } - } - } - house = { - add_house_modifier = { - modifier = tournament_house_unity_modifier - years = 15 - desc = tournament_house_unity_modifier_desc - } - } - } - else = { - add_prestige = medium_prestige_value - } - - reverse_add_opinion = { - target = scope:family - opinion = 15 - modifier = respect_opinion - } - - stress_impact = { - ambitious = miniscule_stress_impact_loss - shy = miniscule_stress_impact_loss - content = minor_stress_impact_gain - callous = minor_stress_impact_gain - } - - ai_chance = { - base = 25 #Deliberately low to keep the else from occurring too much for AI - ai_value_modifier = { - ai_boldness = 0.5 - ai_honor = 0.5 - } - } - } - - # Love u fam - option = { - name = ep2_tournament_events.1018.b - - if = { - limit = { - NOT = { #Ensure that you're not AI, to avoid massive proliferation of the Loyal trait - is_ai = yes - } - scope:family = { - is_ai = yes - NOR = { - has_trait = disloyal - has_trait = loyal - } - } - } - scope:family = { - add_trait = loyal - } - } - - if = { - limit = { - can_add_hook = { - type = loyalty_hook - target = scope:family - } - } - add_hook = { - type = loyalty_hook - target = scope:family - } - } - - reverse_add_opinion = { - target = scope:family - opinion = 15 - modifier = loyalty_opinion - } - - stress_impact = { - gregarious = miniscule_stress_impact_loss - compassionate = miniscule_stress_impact_loss - callous = miniscule_stress_impact_loss - sadistic = miniscule_stress_impact_loss - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = 1 - ai_honor = 1 - } - } - } -} - -################### -### ARCHERY ### -################### - -# Attempt to put off an opponent by coughing -ep2_tournament_events.1501 = { - type = activity_event - title = ep2_tournament_events.1501.t - desc = { - desc = ep2_tournament_events.1501.desc - first_valid = { - triggered_desc = { - trigger = { - scope:competitor = { - has_any_secrets = yes - } - intrigue > 10 - } - desc = ep2_tournament_events.1501.secret - } - } - } - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - scripted_animation = bow_closed - } - right_portrait = { - character = scope:competitor - scripted_animation = bow_drawn - } - cooldown = { years = 1 } - - trigger = { - scope:activity = { - any_guest_subset_current_phase = { - name = qualified - is_alive = yes - is_ai = yes # To ensure we don't reveal player secrets - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_arrow_flyby" - tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 1501 } - scope:activity = { - random_guest_subset_current_phase = { - name = qualified - limit = { - is_alive = yes - is_ai = yes # To ensure we don't reveal player secrets - } - save_scope_as = competitor - } - } - - if = { - limit = { - scope:competitor = { - any_secret = { - OR = { - secret_type = secret_deviant - secret_type = secret_witch - secret_type = secret_murder - secret_type = secret_disputed_heritage - secret_type = secret_non_believer - secret_type = secret_cannibal - } - } - } - } - scope:competitor = { - random_secret = { - limit = { - OR = { - secret_type = secret_deviant - secret_type = secret_witch - secret_type = secret_murder - secret_type = secret_disputed_heritage - secret_type = secret_non_believer - secret_type = secret_cannibal - } - } - save_scope_as = competitor_secret - } - } - } - } - - # Spread a rumour amongst the crowd - option = { - name = ep2_tournament_events.1501.a - - trigger = { - exists = scope:competitor_secret - - intrigue > 10 # Ensure you have decent enough intrigue to do this - } - - flavor = ep2_tournament_events.1501.a.tt - - scope:competitor_secret = { - expose_secret = root - } - - scope:competitor = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_archery_rumour_log - tags = { good } - score = 5 - character = root - target = scope:competitor - } - } - - stress_impact = { - deceitful = minor_stress_impact_loss - arbitrary = miniscule_stress_impact_loss - vengeful = miniscule_stress_impact_loss - just = medium_stress_impact_gain - honest = medium_stress_impact_gain - forgiving = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = just - has_trait = honest - has_trait = forgiving - } - } - } - } - - # Cough loudly - option = { - name = ep2_tournament_events.1501.b - - flavor = ep2_tournament_events.1501.b.tt - - add_prestige = -25 - - scope:competitor = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_archery_cough_log - tags = { good } - score = 5 - character = root - target = scope:competitor - } - } - - stress_impact = { - arbitrary = miniscule_stress_impact_loss - deceitful = miniscule_stress_impact_loss - just = medium_stress_impact_gain - honest = medium_stress_impact_gain - } - - ai_chance = { - base = 50 - - ai_value_modifier = { - ai_boldness = 1 - ai_vengefulness = 1 - } - } - } - - # Stay silent - option = { - name = ep2_tournament_events.1501.c - - scope:competitor = { - activity_tournament_change_contestant_score_effect = { SCORE = increase_miniscule } - } - - stress_impact = { - deceitful = medium_stress_impact_gain - arbitrary = medium_stress_impact_gain - vengeful = medium_stress_impact_gain - just = miniscule_stress_impact_loss - honest = miniscule_stress_impact_loss - forgiving = miniscule_stress_impact_loss - } - - ai_chance = { - base = 50 - - ai_value_modifier = { - ai_boldness = -1 - ai_vengefulness = -1 - } - } - } -} - -# It's a bit windy as you step up to shoot! -ep2_tournament_events.1502 = { - type = activity_event - title = ep2_tournament_events.1502.t - desc = ep2_tournament_events.1502.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - scripted_animation = bow_closed - } - cooldown = { years = 1 } - - trigger = { - is_in_guest_subset = { name = qualified } - scope:activity = { - any_guest_subset_current_phase = { #random qualified participant - name = qualified - contest_event_general_contestant_valid_trigger = yes - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_arrow_flyby" - tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 1502 } - scope:activity = { - random_guest_subset_current_phase = { - name = qualified - limit = { contest_event_general_contestant_valid_trigger = yes } - save_scope_as = contestant - } - } - } - - # Take the shot anyway, because you're an experienced marksman - option = { - name = ep2_tournament_events.1502.a - - trigger = { - OR = { #Make sure you're good at shooting a bow! - AND = { - has_trait = lifestyle_hunter - has_trait_xp = { - trait = lifestyle_hunter - track = hunter - value >= 50 - } - } - AND = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = bow - value >= 50 - } - } - } - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - - add_prestige = medium_prestige_gain - - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = bow - value = tournament_hastiludes_xp_gain_major_value - } - } - - stress_impact = { - base = miniscule_stress_impact_loss - ambitious = miniscule_stress_impact_loss - diligent = miniscule_stress_impact_loss - arrogant = miniscule_stress_impact_loss - content = minor_stress_impact_gain - lazy = minor_stress_impact_gain - humble = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - ai_value_modifier = { - ai_energy = 1 - ai_honor = 1 - } - } - } - - # Try and pin it on someone else - option = { - name = ep2_tournament_events.1502.b - - flavor = ep2_tournament_events.1502.b.tt - - duel = { - skill = diplomacy - value = medium_skill_rating - # Success - 1 = { - desc = ep2_tournament_events.1502.b.success - show_chance = yes - - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.1502.b.success - left_icon = root - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - scope:contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - } - } - # Failure - 1 = { - desc = ep2_tournament_events.1502.b.failure - show_chance = yes - - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.1502.b.failure - left_icon = root - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - } - } - - stress_impact = { - ambitious = miniscule_stress_impact_loss - deceitful = miniscule_stress_impact_loss - arbitrary = miniscule_stress_impact_loss - content = minor_stress_impact_gain - honest = medium_stress_impact_gain - just = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - ai_value_modifier = { - ai_compassion = -1 - ai_honor = -1 - } - } - } - - # Have a go despite the wind - option = { - name = ep2_tournament_events.1502.c - - duel = { - skill = prowess - value = high_skill_rating - # Success - 1 = { - desc = ep2_tournament_events.1502.c.success - show_chance = yes - - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.1502.c.success - left_icon = root - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = bow - value = tournament_hastiludes_xp_gain_major_value - } - } - } - } - # Failure - 1 = { - desc = ep2_tournament_events.1502.c.failure - show_chance = yes - - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.1502.c.success - left_icon = root - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - } - } - - stress_impact = { - ambitious = minor_stress_impact_gain - deceitful = minor_stress_impact_gain - arbitrary = minor_stress_impact_gain - content = miniscule_stress_impact_loss - honest = miniscule_stress_impact_loss - just = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - ai_value_modifier = { - ai_boldness = 1 - ai_honor = 1 - } - } - } -} - -# Bored waiting for your turn, try some mischief? -ep2_tournament_events.1503 = { - type = activity_event - title = ep2_tournament_events.1503.t - desc = ep2_tournament_events.1503.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = boredom - } - right_portrait = { - character = scope:contestant - scripted_animation = bow_closed - } - cooldown = { years = 1 } - - trigger = { - is_in_guest_subset = { name = qualified } - scope:activity = { - any_guest_subset_current_phase = { #random qualified participant - name = qualified - contest_event_general_contestant_valid_trigger = yes - NOT = { - any_secret = { - NOT = { is_known_by = root } - } - } - save_temporary_scope_as = participant_1 - } - any_guest_subset_current_phase = { #random qualified participant with a secret - name = qualified - this != scope:participant_1 - contest_event_general_contestant_valid_trigger = yes - # Won't reveal a secret to you which you already know. - any_secret = { - NOT = { is_known_by = root } - } - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_wood_woosh" - tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 1503 } - scope:activity = { - random_guest_subset_current_phase = { #random qualified participant - name = qualified - limit = { - contest_event_general_contestant_valid_trigger = yes - NOT = { - any_secret = { - NOT = { is_known_by = root } - } - } - } - save_scope_as = contestant - } - random_guest_subset_current_phase = { #random qualified participant with a secret - name = qualified - limit = { - contest_event_general_contestant_valid_trigger = yes - this != scope:contestant - # Won't reveal a secret to you which you already know. - any_secret = { - NOT = { is_known_by = root } - } - } - save_scope_as = secret_haver - random_secret = { - limit = { - NOT = { is_known_by = root } - } - save_scope_as = secret - } - } - } - } - - # Move the line back a few feet - option = { - name = ep2_tournament_events.1503.a - - flavor = ep2_tournament_events.1503.a.tt - - duel = { - skill = intrigue - target = scope:contestant - # Success - 1 = { - desc = ep2_tournament_events.1503.a.success - show_chance = yes - - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.1503.a.success - left_icon = root - right_icon = scope:contestant - - scope:contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - } - } - # Failure - 1 = { - desc = ep2_tournament_events.1503.a.failure - show_chance = yes - - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_cheating_caught_log - tags = { good } - score = 5 - character = root - target = scope:contestant - } - } - - send_interface_toast = { - title = ep2_tournament_events.1503.a.failure - left_icon = root - right_icon = scope:contestant - - add_prestige = medium_prestige_loss - } - } - } - - stress_impact = { - ambitious = miniscule_stress_impact_loss - arbitrary = miniscule_stress_impact_loss - content = minor_stress_impact_gain - just = minor_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_energy = 0.5 - ai_honor = -1 - } - } - } - - # Go and talk to the crowd - option = { - name = ep2_tournament_events.1503.b - - flavor = ep2_tournament_events.1503.b.flavor - - # Success, find a secret - duel = { - skills = { diplomacy intrigue } - value = medium_skill_rating - # Find a - 1 = { - desc = ep2_tournament_events.1503.b.success - show_chance = yes - - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - custom_tooltip = ep2_tournament_events.1503.b.tt - - hidden_effect = { #So at to hide the secret until toast pops - send_interface_toast = { - title = ep2_tournament_events.1503.b.success - left_icon = root - - scope:secret = { - reveal_to_without_events_effect = { - CHARACTER = root - } - } - } - } - } - # Failure, find nothing - 1 = { - desc = ep2_tournament_events.1503.b.failure - show_chance = yes - - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.1503.b.failure - left_icon = root - - add_stress = minor_stress_loss - } - } - } - - stress_impact = { - lazy = miniscule_stress_impact_loss - gregarious = miniscule_stress_impact_loss - shy = minor_stress_impact_gain - diligent = minor_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_compassion = 1 - ai_honor = 1 - } - } - } - - # Bah, just wait it out - option = { - name = ep2_tournament_events.1503.c - - stress_impact = { - gregarious = miniscule_stress_impact_gain - deceitful = miniscule_stress_impact_gain - impatient = miniscule_stress_impact_gain - shy = miniscule_stress_impact_loss - honest = miniscule_stress_impact_loss - patient = miniscule_stress_impact_loss - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_boldness = -1 - ai_honor = 1 - } - } - } -} - -################### -### WRESTLING ### -################### - -# You can use dirt to blind your opponent -ep2_tournament_events.2001 = { - type = activity_event - title = ep2_tournament_events.2001.t - desc = ep2_tournament_events.2001.desc - theme = tournament_contest - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = aggressive_unarmed - } - right_portrait = { - character = scope:versus_contestant - animation = rage - } - cooldown = { years = 1 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2001 } - } - - # Throw dirt at them - option = { - name = ep2_tournament_events.2001.a - - custom_tooltip = ep2_tournament_events.2001.a.tt - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - stress_impact = { - craven = medium_stress_impact_gain - brave = medium_stress_impact_loss - content = minor_stress_impact_gain - ambitious = minor_stress_impact_loss - arrogant = minor_stress_impact_loss - humble = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = craven - has_trait = content - has_trait = humble - } - } - } - } - - # Don't throw the dirt - option = { - name = ep2_tournament_events.2001.b - - duel = { - skill = prowess - target = scope:versus_contestant - - 40 = { #You fight your way out - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - desc = ep2_tournament_events.2004.d.tt.success - - send_interface_toast = { - title = ep2_tournament_events.2004.d.tt.success - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_medium_value - } - } - } - } - 60 = { #You struggle fruitlessly - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - desc = ep2_tournament_events.2004.d.tt.failure - - send_interface_toast = { - title = ep2_tournament_events.2004.d.tt.failure - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - } - } - - stress_impact = { - craven = medium_stress_impact_loss - brave = medium_stress_impact_gain - content = minor_stress_impact_loss - ambitious = minor_stress_impact_gain - arrogant = minor_stress_impact_gain - humble = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = brave - has_trait = ambitious - has_trait = arrogant - } - } - } - } -} - -# You go for the ol' oil check -ep2_tournament_events.2002 = { - type = activity_event - title = ep2_tournament_events.2002.t - desc = ep2_tournament_events.2002.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = personality_dishonorable - } - right_portrait = { - character = scope:versus_contestant - animation = shock - } - cooldown = { years = 1 } - - trigger = { - NOT = { #Make sure player has two hands with which to fight - has_trait = maimed - } - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" - contest_versus_player_vs_ai_scope_effect = yes - - save_scope_value_as = { - name = xp_range - value = { - integer_range = { - min = 1 - max = 5 - } - } - } - tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2002 } - } - - # Pokey poke - option = { - name = ep2_tournament_events.2002.a - - give_nickname = nick_the_dirty - - scope:versus_contestant = { - add_character_modifier = { - modifier = tournament_walking_funny_modifier - years = 3 - } - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - every_close_family_member = { - custom = ep2_tournament_events.2002.a.tt - add_opinion = { - target = root - opinion = -10 - modifier = disgusted_opinion - } - } - - stress_impact = { - honest = major_stress_impact_gain - just = major_stress_impact_gain - arbitrary = minor_stress_impact_loss - deceitful = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = honest - has_trait = just - } - } - } - } - - # I'd rather not - option = { - name = ep2_tournament_events.2002.b - - flavor = ep2_tournament_events.2002.b.tt - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - } - else = { - add_trait = tourney_participant - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - } - - stress_impact = { - honest = minor_stress_impact_loss - just = minor_stress_impact_loss - arbitrary = major_stress_impact_gain - deceitful = major_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = arbitrary - has_trait = deceitful - } - } - } - } -} - -# Your friend distracts the ref; use the chair? -ep2_tournament_events.2003 = { - type = activity_event - title = ep2_tournament_events.2003.t - desc = ep2_tournament_events.2003.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = scheme - } - right_portrait = { - character = scope:versus_contestant - animation = worry - } - lower_left_portrait = { - character = scope:friend - } - cooldown = { years = 1 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - scope:activity = { - any_attending_character = { - is_alive = yes - NOR = { - this = scope:versus_matchee - this = scope:versus_matcher - } - OR = { - has_relation_friend = root - has_relation_best_friend = root - } - } - } - } - - immediate = { - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2003 } - involved_activity = { - random_attending_character = { - limit = { - is_alive = yes - NOR = { - this = scope:versus_matchee - this = scope:versus_matcher - } - OR = { - has_relation_friend = root - has_relation_best_friend = root - } - } - save_scope_as = friend - } - } - save_scope_value_as = { - name = xp_range - value = { - integer_range = { - min = 1 - max = 5 - } - } - } - scope:activity = { - add_activity_log_entry = { - key = tournament_ref_distracted_log - tags = { good } - score = 5 - character = root - target = scope:friend - } - } - } - - # Viva la raza! - option = { - name = ep2_tournament_events.2003.a - - trigger = { - OR = { - has_trait = deceitful - has_trait = arbitrary - } - } - - custom_tooltip = ep2_tournament_events.2003.a.tt - - give_nickname = nick_the_cheater - - reverse_add_opinion = { - modifier = cheater_opinion - target = scope:versus_contestant - opinion = -40 - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - - stress_impact = { - base = minor_stress_impact_loss - brave = minor_stress_impact_gain - compassionate = minor_stress_impact_gain - just = major_stress_impact_gain - honest = major_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = just - has_trait = brave - has_trait = honest - } - } - } - } - - # Hit them with the chair - option = { - name = ep2_tournament_events.2003.b - - flavor = ep2_tournament_events.2003.b.tt - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - } - - stress_impact = { - craven = medium_stress_impact_loss - brave = medium_stress_impact_gain - content = minor_stress_impact_gain - ambitious = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = brave - has_trait = content - } - } - } - } - - # Choose the honourable route - option = { - name = ep2_tournament_events.2003.c - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - } - else = { - add_trait = tourney_participant - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - } - - stress_impact = { - base = miniscule_stress_impact_loss - compassionate = medium_stress_impact_loss - craven = medium_stress_impact_gain - brave = medium_stress_impact_loss - just = medium_stress_impact_loss - sadistic = medium_stress_impact_gain - callous = minor_stress_impact_gain - content = minor_stress_impact_loss - ambitious = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = craven - has_trait = ambitious - } - } - } - } -} - -# Opponent has a high weight -ep2_tournament_events.2004 = { - type = activity_event - title = ep2_tournament_events.2004.t - desc = ep2_tournament_events.2004.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = personality_rational - } - right_portrait = { - character = scope:versus_contestant - animation = personality_bold - } - cooldown = { years = 1 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - trigger_if = { - limit = { this = scope:versus_matchee } - scope:versus_matcher = { current_weight >= 70 } - } - trigger_else = { - scope:versus_matchee = { current_weight >= 70 } - } - } - - immediate = { - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2004 } - } - - # Tire them out by moving them around - option = { - name = ep2_tournament_events.2004.a - - trigger = { - OR = { - has_trait = shrewd - has_trait = intellect_good - scope:versus_contestant = { - has_trait = wheezing - } - } - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_medium_value - } - } - - ai_chance = { - base = 100 - } - } - - # Just pick them up lol - option = { - name = ep2_tournament_events.2004.b - - trigger = { - OR = { - has_trait = strong - has_trait = physique_good_1 - has_trait = physique_good_2 - has_trait = physique_good_3 - } - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_medium_value - } - } - - stress_impact = { - base = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - } - } - - # Medieval sumo - option = { - name = ep2_tournament_events.2004.c - - trigger = { - current_weight > 50 - NOT = { - has_trait = strong - has_trait = physique_good - } - } - - add_internal_flag = special - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_medium_value - } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_sumo_wrestling_log - tags = { good } - score = 5 - character = root - target = scope:versus_contestant - } - } - - stress_impact = { - base = miniscule_stress_impact_loss - craven = minor_stress_impact_gain - brave = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - } - } - - # Attempt to target their legs - option = { - name = ep2_tournament_events.2004.d - - duel = { - skill = prowess - target = scope:versus_contestant - - 50 = { #You wear them down - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - desc = ep2_tournament_events.2004.d.tt.success - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_medium_value - } - } - } - 50 = { #You fail to make an impact - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - desc = ep2_tournament_events.2004.d.tt.failure - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - } - - ai_chance = { - base = 100 - } - } - - # Take them head-on - option = { - name = ep2_tournament_events.2004.e - - add_prestige = minor_prestige_gain - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - - stress_impact = { - craven = minor_stress_impact_gain - brave = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - has_trait = craven - } - } - } -} - -scripted_trigger suitably_amorous_opponent = { - is_physically_able_adult = yes - can_marry_trigger = yes - is_concubine = no - is_attracted_to_gender_of = root - NOT = { - has_trait = chaste - has_trait = celibate - } -} - -# You and your opponent end up in a rather amorous position -ep2_tournament_events.2005 = { - type = activity_event - title = ep2_tournament_events.2005.t - desc = ep2_tournament_events.2005.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = flirtation_left - } - right_portrait = { - character = scope:versus_contestant - animation = flirtation - } - cooldown = { years = 1 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - scope:versus_matcher = { - is_attracted_to_gender_of = scope:versus_matchee - might_cheat_on_every_partner_trigger = yes - } - scope:versus_matchee = { - is_attracted_to_gender_of = scope:versus_matcher - might_cheat_on_every_partner_trigger = yes - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2005 } - } - - # Give 'em a good tumble - option = { - name = ep2_tournament_events.2005.a - trigger = { - OR = { - has_trait = rakish - has_trait = seducer - has_trait = lustful - } - NOT = { - has_trait = chaste - } - } - - had_sex_with_effect = { - CHARACTER = scope:versus_contestant - PREGNANCY_CHANCE = 50 - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - stress_impact = { - base = minor_stress_impact_loss - } - - tournament_contest_versus_resignation_effect = { RESIGNER = scope:versus_contestant CONTEST = wrestling SKILL = pugilism } - - ai_chance = { - base = 100 - } - } - - # See if they're interested - option = { - name = ep2_tournament_events.2005.b - - trigger = { - NOR = { - has_trait = rakish - has_trait = seducer - has_trait = lustful - } - } - - random_list = { - 5 = { #They are amenable to your advances - custom_tooltip = ep2_tournament_events.2005.b.tt.success - - had_sex_with_effect = { - CHARACTER = scope:versus_contestant - PREGNANCY_CHANCE = 50 - } - - modifier = { - add = 5 - scope:versus_contestant = { - has_trait = lustful - } - } - modifier = { - add = 5 - scope:versus_contestant = { - has_trait = seducer - } - } - modifier = { - add = 5 - scope:versus_contestant = { - has_trait = rakish - } - } - modifier = { - add = 1 - scope:versus_contestant = { - trait_compatibility = { - target = root - value >= medium_positive_trait_compatibility - } - } - } - modifier = { - add = -100 - scope:versus_contestant = { - has_trait = celibate - } - } - - send_interface_toast = { - title = ep2_tournament_events.2005.b.tt.success - left_icon = root - right_icon = scope:versus_contestant - } - - stress_impact = { - base = minor_stress_impact_loss - lustful = minor_stress_impact_loss - arrogant = minor_stress_impact_loss - rakish = minor_stress_impact_loss - seducer = minor_stress_impact_loss - } - - tournament_contest_versus_resignation_effect = { RESIGNER = scope:versus_contestant CONTEST = wrestling SKILL = pugilism } - } - - 6 = { #They are flattered but decline - custom_tooltip = ep2_tournament_events.2005.b.tt.failure - modifier = { - add = 5 - scope:versus_contestant = { - trait_compatibility = { - target = root - value >= medium_positive_trait_compatibility - } - } - } - modifier = { - add = 5 - scope:versus_contestant = { - has_trait = celibate - } - } - - send_interface_toast = { - title = ep2_tournament_events.2005.b.tt.failure - left_icon = root - right_icon = scope:versus_contestant - } - - stress_impact = { - lustful = minor_stress_impact_gain - stubborn = minor_stress_impact_gain - arrogant = minor_stress_impact_gain - } - } - - 4 = { #They are horrified and angry - custom_tooltip = ep2_tournament_events.2005.b.tt.criticalfailure - modifier = { - add = 5 - scope:versus_contestant = { - has_trait = chaste - } - } - modifier = { - add = 5 - scope:versus_contestant = { - has_trait = celibate - } - } - - send_interface_toast = { - title = ep2_tournament_events.2005.b.tt.criticalfailure - left_icon = root - right_icon = scope:versus_contestant - } - - stress_impact = { - base = minor_stress_impact_gain - lustful = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } - } - } - - stress_impact = { - chaste = major_stress_impact_gain - celibate = massive_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = celibate - has_trait = chaste - } - } - } - } - - # Take advantage to win the contest - option = { - name = ep2_tournament_events.2005.c - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - stress_impact = { - just = medium_stress_impact_gain - deceitful = minor_stress_impact_loss - arbitrary = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - has_trait = just - } - } - } -} - -# Death Event: Your opponent piledrivers you on to your head -ep2_tournament_events.2006 = { - type = activity_event - title = ep2_tournament_events.2006.t - desc = ep2_tournament_events.2006.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = shock - } - right_portrait = { - character = scope:versus_contestant - animation = rage - } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2006 } - } - - # Die - option = { - name = ep2_tournament_events.2006.a - - hidden_effect = { - tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = wrestling SKILL = pugilism } - } - death = { - death_reason = death_tournament_piledriver - } - scope:activity = { - add_activity_log_entry = { - key = tournament_wrestling_death_log - tags = { bad } - score = 10 - character = root - } - } - ai_chance = { - base = 100 - } - } -} - -# A person storms the ring to protest a decision in your favour -ep2_tournament_events.2007 = { - type = activity_event - title = ep2_tournament_events.2007.t - desc = ep2_tournament_events.2007.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = shock - } - right_portrait = { - character = scope:versus_contestant - animation = worry - } - lower_right_portrait = { - character = scope:opponent_friend - } - cooldown = { years = 1 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - scope:activity = { - any_attending_character = { - is_alive = yes - is_adult = yes - NOR = { - this = scope:versus_matchee - this = scope:versus_matcher - } - trigger_if = { - limit = { root = scope:versus_matchee } - has_relation_friend = scope:versus_matcher - } - trigger_else = { has_relation_friend = scope:versus_matchee } - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" - contest_versus_player_vs_ai_scope_effect = yes - - scope:activity = { - random_guest_subset_current_phase = { - name = spectator - limit = { - is_alive = yes - is_adult = yes - NOR = { - this = scope:versus_matchee - this = scope:versus_matcher - } - trigger_if = { - limit = { root = scope:versus_matchee } - has_relation_friend = scope:versus_matcher - } - trigger_else = { has_relation_friend = scope:versus_matchee } - } - save_scope_as = opponent_friend - } - } - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - scope:activity = { - add_activity_log_entry = { - key = tournament_ring_stormed_log - tags = { good } - score = 5 - character = root - target = scope:opponent_friend - } - } - } - - # Guards! Have this miscreant removed! - option = { - name = ep2_tournament_events.2007.a - - add_prestige = -50 - - progress_towards_rival_effect = { - REASON = rival_wrestling_liar - CHARACTER = scope:opponent_friend - OPINION = 0 - } - - stress_impact = { - wrathful = miniscule_stress_impact_loss - ambitious = miniscule_stress_impact_loss - deceitful = miniscule_stress_impact_loss - arbitrary = miniscule_stress_impact_loss - calm = medium_stress_impact_gain - content = medium_stress_impact_gain - honest = major_stress_impact_gain - just = major_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = just - has_trait = honest - } - } - } - } - - # Argue with them - option = { - name = ep2_tournament_events.2007.b - - duel = { - skill = diplomacy - target = scope:opponent_friend - #You win the debate - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - desc = ep2_tournament_events.2007.b.tt.success - - send_interface_toast = { - title = ep2_tournament_events.2007.b.tt.success - left_icon = root - right_icon = scope:opponent_friend - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = wit - value = tournament_hastiludes_xp_gain_medium_value - } - } - } - } - #They win the debate - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - desc = ep2_tournament_events.2007.b.tt.failure - - send_interface_toast = { - title = ep2_tournament_events.2007.b.tt.failure - left_icon = root - right_icon = scope:opponent_friend - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - } - } - - stress_impact = { - stubborn = miniscule_stress_impact_loss - diligent = miniscule_stress_impact_loss - fickle = medium_stress_impact_gain - lazy = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - NOR = { - has_trait = fickle - has_trait = lazy - } - } - } - } - - # Admit it, gain nickname - option = { - name = ep2_tournament_events.2007.c - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - - give_nickname = nick_the_honest - - add_prestige = medium_prestige_value - - reverse_add_opinion = { - modifier = impressed_opinion - target = scope:opponent_friend - opinion = 20 - } - - reverse_add_opinion = { - modifier = grateful_opinion - target = scope:versus_contestant - opinion = 20 - } - - stress_impact = { - honest = minor_stress_impact_loss - just = minor_stress_impact_loss - arbitrary = medium_stress_impact_gain - deceitful = medium_stress_impact_gain - } - - ai_chance = { - base = 50 - ai_value_modifier = { - ai_honor = 1 - ai_vengefulness = -0.5 - } - } - } -} - -# What part of your opponent's body do you focus on? -ep2_tournament_events.2501 = { - type = activity_event - title = ep2_tournament_events.2501.t - desc = ep2_tournament_events.2501.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = shock - } - right_portrait = { - character = scope:versus_contestant - animation = throne_room_cheer_1 - } - cooldown = { years = 1 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2501 } - } - - # Aim for the head - option = { - name = ep2_tournament_events.2501.a - random_list = { - 5 = { #You knock them out! - custom_tooltip = ep2_tournament_events.2501.a.tt.criticalsuccess - modifier = { - add = 5 - prowess > high_skill_rating - } - modifier = { - add = -5 - prowess < low_skill_rating - } - - send_interface_toast = { - title = ep2_tournament_events.2501.a.tt.criticalsuccess - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - - add_prestige = minor_prestige_gain - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_medium_value - } - } - } - } - 20 = { #It works reasonably well - custom_tooltip = ep2_tournament_events.2501.a.tt.success - modifier = { - add = 10 - prowess > high_skill_rating - } - - send_interface_toast = { - title = ep2_tournament_events.2501.a.tt.success - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - } - } - } - 20 = { #Your opponent sees it coming - custom_tooltip = ep2_tournament_events.2501.a.tt.failure - - send_interface_toast = { - title = ep2_tournament_events.2501.a.tt.failure - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - } - } - ai_chance = { - base = 100 - } - } - - # Aim for the body - option = { - name = ep2_tournament_events.2501.b - random_list = { - 10 = { #It works well - custom_tooltip = ep2_tournament_events.2501.a.tt.criticalsuccess - modifier = { - add = 5 - prowess > high_skill_rating - } - add_prestige = minor_prestige_gain - - send_interface_toast = { - title = ep2_tournament_events.2501.a.tt.criticalsuccess - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - } - } - } - 10 = { #It works reasonably well - custom_tooltip = ep2_tournament_events.2501.a.tt.success - modifier = { - add = 10 - prowess > high_skill_rating - } - - send_interface_toast = { - title = ep2_tournament_events.2501.a.tt.success - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - } - } - 10 = { #Your opponent sees it coming - custom_tooltip = ep2_tournament_events.2501.a.tt.failure - modifier = { - add = 10 - prowess < low_skill_rating - } - - send_interface_toast = { - title = ep2_tournament_events.2501.a.tt.failure - left_icon = root - right_icon = scope:versus_contestant - - add_prestige = minor_prestige_loss - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - } - } - } - ai_chance = { - base = 100 - } - } - - # Attack their legs - option = { - name = ep2_tournament_events.2501.c - random_list = { - 1 = { #It works well - custom_tooltip = ep2_tournament_events.2501.a.tt.criticalsuccess - modifier = { - add = -5 - prowess < low_skill_rating - } - add_prestige = minor_prestige_gain - - send_interface_toast = { - title = ep2_tournament_events.2501.a.tt.criticalsuccess - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - } - } - } - 30 = { #It works reasonably well - custom_tooltip = ep2_tournament_events.2501.a.tt.success - - modifier = { - add = 10 - prowess > high_skill_rating - } - - send_interface_toast = { - title = ep2_tournament_events.2501.a.tt.success - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - } - } - 5 = { #Your opponent sees it coming - - custom_tooltip = ep2_tournament_events.2501.a.tt.failure - modifier = { - add = 10 - prowess < low_skill_rating - } - - - send_interface_toast = { - title = ep2_tournament_events.2501.a.tt.failure - left_icon = root - right_icon = scope:versus_contestant - - add_prestige = minor_prestige_loss - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - } - } - } - - ai_chance = { - base = 100 - } - } -} - -# Your finger pops out of its socket! -ep2_tournament_events.2502 = { - type = activity_event - title = ep2_tournament_events.2502.t - desc = ep2_tournament_events.2502.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = pain - } - right_portrait = { - character = scope:versus_contestant - animation = personality_dishonorable - } - cooldown = { years = 1 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2502 } - } - - # Try and pop it back in - option = { - name = ep2_tournament_events.2502.a - custom_tooltip = ep2_tournament_events.2502.a.tt - random_list = { - 5 = { #It works - desc = ep2_tournament_events.2502.a.tt.success - modifier = { - add = 30 - has_trait = lifestyle_physician - } - modifier = { - add = 10 - has_trait = lifestyle_herbalist - } - - send_interface_toast = { - title = ep2_tournament_events.2502.a.tt.success - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - add_prestige = minor_prestige_gain - } - } - 20 = { #It doesn't work - desc = ep2_tournament_events.2502.a.tt.failure - modifier = { - add = 10 - has_trait = physique_bad - } - - send_interface_toast = { - title = ep2_tournament_events.2502.a.tt.failure - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - - add_character_modifier = { - modifier = tournament_dislocated_finger_modifier - years = 1 - } - } - } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_finger_popped_log - tags = { good } - score = 5 - character = root - target = scope:versus_contestant - } - } - - stress_impact = { - craven = medium_stress_impact_gain - impatient = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - has_trait = craven - } - } - } - - # Work around it - option = { - name = ep2_tournament_events.2502.b - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - - add_character_modifier = { - modifier = tournament_dislocated_finger_modifier - years = 1 - } - - ai_chance = { - base = 100 - } - } - - # Concede - option = { - name = ep2_tournament_events.2502.c - tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = wrestling SKILL = pugilism } - - stress_impact = { - craven = medium_stress_impact_loss - brave = medium_stress_impact_gain - content = minor_stress_impact_loss - ambitious = minor_stress_impact_gain - arrogant = minor_stress_impact_gain - humble = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = brave - has_trait = ambitious - } - } - } - } -} - -scripted_trigger contest_wrestling_eye_poke_trigger = { - OR = { - has_trait = sadistic - has_trait = deceitful - ai_compassion <= low_positive_ai_value - } -} - -# Your opponent tries eye-poking you -ep2_tournament_events.2503 = { - type = activity_event - title = ep2_tournament_events.2503.t - desc = ep2_tournament_events.2503.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = grief - } - right_portrait = { - character = scope:versus_contestant - animation = personality_cynical - } - cooldown = { years = 1 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - trigger_if = { - limit = { this = scope:versus_matchee } - scope:versus_matcher = { contest_wrestling_eye_poke_trigger = yes } - } - trigger_else = { - scope:versus_matchee = { contest_wrestling_eye_poke_trigger = yes } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2503 } - } - - # Poke them back - option = { - name = ep2_tournament_events.2503.a - - trigger = { - OR = { - has_trait = wrathful - has_trait = vengeful - has_trait = deceitful - has_trait = arbitrary - has_trait = callous - has_trait = sadistic - } - NOT = { - has_trait = one_eyed - } - } - - custom_tooltip = ep2_tournament_events.2503.a.tt - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - } - - add_prestige = minor_prestige_loss - - add_character_modifier = { - modifier = tournament_blurry_vision_modifier - years = 3 - } - - scope:versus_contestant = { - add_character_modifier = { - modifier = tournament_blurry_vision_modifier - years = 3 - } - } - - stress_impact = { - base = miniscule_stress_impact_loss - vengeful = minor_stress_impact_gain - wrathful = minor_stress_impact_gain - craven = medium_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = vengeful - has_trait = wrathful - } - } - } - } - - # Complain to get them disqualified, and take some time to recover - option = { - name = ep2_tournament_events.2503.b - - trigger = { - NOT = { - has_trait = one_eyed - } - } - - duel = { - skill = diplomacy - target = scope:versus_contestant - #You get them disqualified - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - desc = ep2_tournament_events.2503.b.tt.success - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - } - #You fail to get them disqualified - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - desc = ep2_tournament_events.2503.b.tt.failure - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - } - - - } - - # Continue the fight - option = { - name = ep2_tournament_events.2503.c - - trigger = { - NOT = { - has_trait = one_eyed - } - } - - custom_tooltip = ep2_tournament_events.2503.c.tt - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - - add_character_modifier = { - modifier = tournament_blurry_vision_modifier - years = 3 - } - } - - # Continue the fight but with no working eyes - option = { - name = ep2_tournament_events.2503.d - - trigger = { - has_trait = one_eyed - } - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - - add_character_modifier = { - modifier = tournament_really_blurry_vision_modifier - years = 5 - } - } -} - -# Your berserker opponent bites your nose off -ep2_tournament_events.2504 = { - type = activity_event - title = ep2_tournament_events.2504.t - desc = ep2_tournament_events.2504.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = grief - } - right_portrait = { - character = scope:versus_contestant - animation = rage - } - cooldown = { years = 1 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - trigger_if = { - limit = { this = scope:versus_matchee } - scope:versus_matcher = { has_trait = berserker } - } - trigger_else = { - scope:versus_matchee = { has_trait = berserker } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2504 } - random_court_position_holder = { - type = court_physician_court_position - save_scope_as = physician - } - - add_stress = major_stress_gain - } - - # Aaaaaaaaagggghhhh! Disqualify them! - option = { - name = ep2_tournament_events.2504.a - - custom_tooltip = ep2_tournament_events.2504.a.tt - - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - - add_trait = disfigured - - tournament_contest_versus_disqualification_effect = { DISQUALIFIED = scope:versus_contestant MATCH = root CONTEST = wrestling SKILL = pugilism } - - scope:activity = { - add_activity_log_entry = { - key = tournament_berserker_log - tags = { bad } - score = 5 - character = root - target = scope:versus_contestant - } - } - - ai_chance = { - base = 100 - - } - } - - # Get me my physician! I don't need to participate any further! - option = { - name = ep2_tournament_events.2504.b - - trigger = { - court_physician_available_trigger = yes - } - - custom_tooltip = ep2_tournament_events.2504.b.tt - - random_list = { - #Your physician works miracles - 2 = { - modifier = { - add = 5 - scope:physician = { - learning > average_skill_rating - } - } - modifier = { - add = 10 - scope:physician = { - learning > high_skill_rating - } - } - modifier = { - add = 10 - scope:physician = { - has_trait = lifestyle_herbalist - } - } - modifier = { - add = 20 - scope:physician = { - has_trait = lifestyle_physician - } - } - custom_tooltip = ep2_tournament_events.2504.b.tt.criticalsuccess - increase_wounds_effect = { REASON = fight } - } - #Your physician saves your nose - 10 = { - modifier = { - add = 5 - scope:physician = { - learning > average_skill_rating - } - } - modifier = { - add = 10 - scope:physician = { - learning > high_skill_rating - } - } - modifier = { - add = 10 - scope:physician = { - has_trait = lifestyle_herbalist - } - } - modifier = { - add = 20 - scope:physician = { - has_trait = lifestyle_physician - } - } - custom_tooltip = ep2_tournament_events.2504.b.tt.success - increase_wounds_effect = { REASON = fight } - add_trait = scarred - add_trait_xp = { - trait = scarred - value = { - integer_range = { - min = 25 - max = 60 - } - } - } - } - #Your physician is unable to save your nose - 10 = { - modifier = { - add = 5 - scope:physician = { - learning < average_skill_rating - } - } - modifier = { - add = 10 - scope:physician = { - learning < low_skill_rating - } - } - custom_tooltip = ep2_tournament_events.2504.b.tt.failure - increase_wounds_effect = { REASON = fight } - add_trait = disfigured - } - } - - stress_impact = { - base = miniscule_stress_impact_loss - vengeful = minor_stress_impact_gain - wrathful = minor_stress_impact_gain - craven = medium_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = vengeful - has_trait = wrathful - } - } - } - } - - # Find me a physician! I don't need to participate any further! - option = { - name = ep2_tournament_events.2504.c - - trigger = { - court_physician_available_trigger = no - } - - custom_tooltip = ep2_tournament_events.2504.c.tt - - increase_wounds_effect = { REASON = fight } - add_trait = disfigured - - tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = wrestling SKILL = pugilism } - - stress_impact = { - base = miniscule_stress_impact_loss - vengeful = minor_stress_impact_gain - wrathful = minor_stress_impact_gain - craven = medium_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = vengeful - has_trait = wrathful - } - } - } - } -} - -# Death event: opponent kicks your head through 180 degrees -ep2_tournament_events.2506 = { - type = activity_event - title = ep2_tournament_events.2506.t - desc = ep2_tournament_events.2506.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = pain - } - right_portrait = { - character = scope:versus_contestant - animation = shock - } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" - contest_versus_player_vs_ai_scope_effect = yes - } - - # Urk! - option = { - name = ep2_tournament_events.2506.a - - hidden_effect = { - tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = wrestling SKILL = pugilism } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_wrestling_death_log - tags = { bad } - score = 10 - character = root - } - } - - death = { - death_reason = death_tournament_roundhouse - } - - ai_chance = { - base = 100 - } - } -} - -# Discombobulate -ep2_tournament_events.2507 = { - type = activity_event - title = ep2_tournament_events.2507.t - desc = ep2_tournament_events.2507.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = personality_callous - } - right_portrait = { - character = scope:versus_contestant - animation = rage - } - cooldown = { years = 1 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2507 } - } - - # ...do it again - option = { - name = ep2_tournament_events.2507.a - - trigger = { - OR = { - has_trait = callous - has_trait = sadistic - has_trait = wrathful - } - } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_medium_value - } - } - - scope:versus_contestant = { - add_character_modifier = { - modifier = tournament_discombobulated_modifier - years = 10 - } - - add_opinion = { - modifier = hate_opinion - target = root - opinion = -60 - } - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - - stress_impact = { - base = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - } - } - - # Finish the fight quickly - option = { - name = ep2_tournament_events.2507.b - - flavor = ep2_tournament_events.2507.b.tt - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - } - - add_prestige = minor_prestige_gain - - reverse_add_opinion = { - modifier = grateful_opinion - target = scope:versus_contestant - opinion = 10 - } - - stress_impact = { - compassionate = minor_stress_impact_loss - sadistic = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - } - } - - # Persuade them to give up - option = { - name = ep2_tournament_events.2507.c - - duel = { - skill = diplomacy - value = medium_skill_rating - # Success - 1 = { - desc = ep2_tournament_events.2507.c.success - modifier = { - add = 10 - has_trait = compassionate - } - modifier = { - add = 2 - has_trait = humble - } - modifier = { - add = 5 - has_trait = patient - } - modifier = { - add = 5 - has_trait = education_diplomacy - } - modifier = { - add = 10 - has_trait = intellect_good - } - modifier = { - add = 15 - has_trait = shrewd - } - modifier = { - add = 20 - has_trait = diplomat - } - compare_modifier = { - value = scope:duel_value - multiplier = 5 - } - send_interface_toast = { - title = ep2_tournament_events.2507.c.success - left_icon = root - right_icon = scope:versus_contestant - add_prestige = minor_prestige_gain - reverse_add_opinion = { - modifier = kindness_opinion - target = scope:versus_contestant - opinion = 20 - } - tournament_contest_versus_resignation_effect = { RESIGNER = scope:versus_contestant CONTEST = wrestling SKILL = pugilism } - } - min = 5 - } - # Failure - 1 = { - desc = ep2_tournament_events.2507.c.failure - compare_modifier = { - value = scope:duel_value - multiplier = -5 - } - modifier = { - add = 10 - has_trait = callous - } - modifier = { - add = 5 - has_trait = arrogant - } - modifier = { - add = 2 - has_trait = impatient - } - modifier = { - add = 5 - has_trait = intellect_bad - } - modifier = { - add = 10 - has_trait = lisping - } - send_interface_toast = { - title = ep2_tournament_events.2507.c.failure - left_icon = root - right_icon = scope:versus_contestant - add_prestige = minor_prestige_loss - reverse_add_opinion = { - modifier = insult_opinion - target = scope:versus_contestant - opinion = -30 - } - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - } - min = 5 - } - } - - ai_chance = { - base = 100 - } - } -} - -################## -### QUINTAIN ### -################## - -scripted_trigger tournament_events_3501_knight_trigger = { - age < 25 #Need to be young to prove themselves! - is_ai = yes #No players! - can_be_knight_trigger = { ARMY_OWNER = root } # CAN be a knight... - is_knight = no #...but isn't currently - is_landed = no #is not landed, to avoid taking anyone good - NOR = { #is not employed, to avoid taking anyone useful - has_council_position = councillor_spouse - has_council_position = councillor_marshal - has_council_position = councillor_court_chaplain - has_council_position = councillor_steward - has_council_position = councillor_spymaster - } - this != root #isn't you, or the either knight -} - -# Two young knights vie for your attention -ep2_tournament_events.3501 = { - type = activity_event - title = ep2_tournament_events.3501.t - desc = ep2_tournament_events.3501.desc - theme = tournament_contest - left_portrait = { - character = root - animation = personality_callous - } - lower_right_portrait = { - character = scope:knight1 - } - lower_left_portrait = { - character = scope:knight2 - } - cooldown = { years = 1 } - - trigger = { - this = scope:host - scope:activity = { - any_guest_subset_current_phase = { - name = contestant - count >= 2 - tournament_events_3501_knight_trigger = yes - is_alive = yes - } - has_current_phase = tournament_phase_joust - } - } - - immediate = { - scope:activity = { - random_guest_subset_current_phase = { - name = contestant - limit = { - tournament_events_3501_knight_trigger = yes - is_alive = yes - } - save_scope_as = knight1 - } - random_guest_subset_current_phase = { - name = contestant - limit = { - tournament_events_3501_knight_trigger = yes - is_alive = yes - this != scope:knight1 - } - save_scope_as = knight2 - } - } - } - - # Pick Knight 1 - option = { - name = ep2_tournament_events.3501.a - - add_courtier = scope:knight1 - - scope:knight1 = { - - add_opinion = { - target = root - modifier = flattered_opinion - opinion = 50 - } - - accolade_medium_glory_gain_with_checks_effect = yes - - scope:knight2 = { - add_opinion = { - modifier = hate_opinion - target = scope:knight1 - opinion = -60 - } - add_opinion = { - modifier = disappointed_opinion - target = root - opinion = -10 - } - } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_quintain_choice_log_1 - tags = { good } - score = 5 - character = root - target = scope:knight1 - } - } - - ai_chance = { - base = 100 - } - } - - # Pick Knight 2 - option = { - name = ep2_tournament_events.3501.b - - add_courtier = scope:knight2 - - scope:knight2 = { - - add_opinion = { - target = root - modifier = flattered_opinion - opinion = 50 - } - - accolade_medium_glory_gain_with_checks_effect = yes - - scope:knight1 = { - add_opinion = { - modifier = hate_opinion - target = scope:knight2 - opinion = -60 - } - add_opinion = { - modifier = disappointed_opinion - target = root - opinion = -10 - } - } - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_quintain_choice_log_2 - tags = { good } - score = 5 - character = root - target = scope:knight2 - } - } - - ai_chance = { - base = 100 - } - } - - # Pick whoever wins the next match! - option = { - name = ep2_tournament_events.3501.c - scope:knight1 = { - duel = { - skill = prowess - target = scope:knight2 - 50 = { - show_chance = no - compare_modifier = { - value = scope:duel_value - multiplier = 1.5 - } - desc = ep2_tournament_events.knight_1_wins - scope:activity = { - add_activity_log_entry = { - key = tournament_quintain_choice_log_1 - tags = { good } - score = 5 - character = root - target = scope:knight1 - } - } - send_interface_toast = { - title = ep2_tournament_events.knight_1_wins - left_icon = root - right_icon = scope:knight1 - add_courtier = scope:knight1 - scope:knight1 = { - accolade_minor_glory_gain_with_checks_effect = yes - } - } - } - 50 = { - show_chance = no - compare_modifier = { - value = scope:duel_value - multiplier = -1.5 - } - desc = ep2_tournament_events.knight_2_wins - scope:activity = { - add_activity_log_entry = { - key = tournament_quintain_choice_log_2 - tags = { good } - score = 5 - character = root - target = scope:knight2 - } - } - send_interface_toast = { - title = ep2_tournament_events.knight_2_wins - left_icon = root - right_icon = scope:knight2 - add_courtier = scope:knight2 - scope:knight2 = { - accolade_minor_glory_gain_with_checks_effect = yes - } - } - } - } - } - ai_chance = { - base = 100 - } - } - - # Pick neither - option = { - name = ep2_tournament_events.3501.d - - if = { - limit = { activity_is_competing_trigger = yes } - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - } - - scope:knight1 = { - - add_opinion = { - target = root - modifier = disappointed_opinion - opinion = -20 - } - - progress_towards_rival_effect = { - REASON = rival_quintain_knight_anger - CHARACTER = scope:knight2 - OPINION = 0 - } - } - - scope:knight2 = { - - add_opinion = { - target = root - modifier = disappointed_opinion - opinion = -20 - } - - progress_towards_rival_effect = { - REASON = rival_quintain_knight_anger - CHARACTER = scope:knight1 - OPINION = 0 - } - } - - ai_chance = { - base = 100 - } - } -} - -# Quintain breaks -ep2_tournament_events.3502 = { - type = activity_event - title = ep2_tournament_events.3502.t - desc = ep2_tournament_events.3502.desc - theme = tournament_contest - left_portrait = { - character = root - animation = shock - } - right_portrait = { - character = scope:competitor - animation = personality_honorable - } - cooldown = { years = 1 } - - trigger = { - this = scope:host - scope:activity = { - any_guest_subset_current_phase = { - name = contestant - contest_event_general_contestant_valid_trigger = yes - } - has_current_phase = tournament_phase_joust - } - } - - immediate = { - scope:activity = { - random_guest_subset_current_phase = { - name = contestant - limit = { contest_event_general_contestant_valid_trigger = yes } - save_scope_as = competitor - } - activity_location.province_owner = { save_scope_as = mayor } - } - scope:activity = { - add_activity_log_entry = { - key = tournament_broken_quintain_log - tags = { bad } - score = 5 - character = scope:mayor - } - } - } - - option = { # Punish the builder - name = ep2_tournament_events.3502.a - - trigger = { - this = scope:host - } - - if = { - limit = { activity_is_competing_trigger = yes} - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - } - - add_prestige = medium_prestige_loss - - progress_towards_rival_effect = { - REASON = rival_quintain_collapse_blame - CHARACTER = scope:mayor - OPINION = default_rival_opinion - } - - stress_impact = { - base = miniscule_stress_impact_gain - calm = minor_stress_impact_gain - wrathful = miniscule_stress_impact_loss - vengeful = miniscule_stress_impact_loss - forgiving = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - has_trait = forgiving - } - } - } - - option = { # Criticise the host - name = ep2_tournament_events.3502.b - - trigger = { - this != scope:host - } - - progress_towards_rival_effect = { - REASON = rival_quintain_collapse_blame - CHARACTER = scope:mayor - OPINION = default_rival_opinion - } - - reverse_add_opinion = { - target = scope:host - modifier = angry_opinion - opinion = -30 - } - - stress_impact = { - forgiving = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - has_trait = forgiving - } - } - } - - option = { # Pay for its repair - name = ep2_tournament_events.3502.c - - remove_short_term_gold = medium_gold_value - - add_prestige = minor_prestige_gain - - if = { - limit = { - this != scope:host - } - reverse_add_opinion = { - target = scope:host - modifier = grateful_opinion - opinion = 30 - } - } - - stress_impact = { - greedy = medium_stress_impact_gain - generous = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - has_trait = greedy - } - } - } - - option = { # Pull out - name = ep2_tournament_events.3502.d - - reverse_add_opinion = { - target = scope:competitor - modifier = compliment_opinion - opinion = 20 - } - - stress_impact = { - arrogant = minor_stress_impact_gain - humble = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = ambitious - has_trait = stubborn - has_trait = arrogant - has_trait = brave - } - } - } - } -} - -# Hapless knight ends up on the quintain -ep2_tournament_events.3503 = { - type = activity_event - title = ep2_tournament_events.3503.t - desc = ep2_tournament_events.3503.desc - theme = tournament_contest - left_portrait = { - character = root - animation = laugh - } - right_portrait = { - character = scope:hapless_knight - animation = pain - } - cooldown = { years = 1 } - - trigger = { - this = scope:host - scope:activity = { - any_guest_subset_current_phase = { - name = contestant - contest_event_general_contestant_valid_trigger = yes - is_landed = no #Make sure they're not a noble - is_lowborn = yes #...and again - prowess < medium_skill_rating #Make sure they're likely to actually be bad - is_alive = yes #duh - } - has_current_phase = tournament_phase_joust - } - } - - immediate = { - scope:activity = { - random_guest_subset_current_phase = { - name = contestant - limit = { - contest_event_general_contestant_valid_trigger = yes - is_landed = no #Make sure they're not a noble - is_lowborn = yes #...and again - prowess < medium_skill_rating #Make sure they're likely to actually be bad - is_alive = yes #duh - } - save_scope_as = hapless_knight - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } - } - add_activity_log_entry = { - key = tournament_hapless_knight_log - tags = { good } - score = 5 - character = root - target = scope:hapless_knight - } - } - scope:hapless_knight = { accolade_minor_glory_loss_with_checks_effect = yes } - } - - option = { # Offer them a place as a jester - name = ep2_tournament_events.3503.a - - trigger = { - #Make sure you can actually offer them a jester position - can_appoint_char_to_court_position = { - CHAR = scope:hapless_knight - COURT_POS = court_jester_court_position - } - } - - random_list = { - 24 = { #They accept - - modifier = { #A humble person might be more likely to accept - add = 40 - scope:hapless_knight = { - has_trait = humble - } - } - - - modifier = { #A fickle person is less likely to adhere to their profession - add = 20 - scope:hapless_knight = { - has_trait = fickle - } - } - - modifier = { #A lazy person sees the opportunity for a comfortable life with minimal effort - add = 20 - scope:hapless_knight = { - has_trait = lazy - } - } - - modifier = { #Perhaps more likely if they're good at it - add = 10 - scope:hapless_knight = { - aptitude:court_jester_court_position >= 2 - } - } - - modifier = { #A gregarious person loves interacting with people - add = 5 - scope:hapless_knight = { - has_trait = gregarious - } - } - - desc = ep2_tournament_events.3503.a.tt.success - - send_interface_toast = { - title = ep2_tournament_events.3503.a.tt.success - left_icon = root - right_icon = scope:hapless_knight - hidden_effect = { - scope:hapless_knight = { set_employer = root } - } - court_position_grant_effect = { - EMPLOYER = root - POS = court_jester - CANDIDATE = scope:hapless_knight - } - - scope:hapless_knight = { - save_scope_as = resigner - tournament_contest_versus_resignation_effect = { RESIGNER = scope:hapless_knight CONTEST = joust SKILL = horse } - } - } - } - 76 = { #They refuse - modifier = { #An arrogant person would almost never accept - add = 200 - scope:hapless_knight = { - has_trait = arrogant - } - } - - modifier = { #A stubborn person doesn't want a career change - add = 50 - scope:hapless_knight = { - has_trait = stubborn - } - } - - desc = ep2_tournament_events.3503.a.tt.failure - - send_interface_toast = { - title = ep2_tournament_events.3503.a.tt.failure - left_icon = root - right_icon = scope:hapless_knight - - progress_towards_rival_effect = { - REASON = rival_quintain_collapse_blame - CHARACTER = scope:hapless_knight - OPINION = default_rival_opinion - } - } - } - } - - ai_chance = { - base = 100 - } - } - - option = { # Try to get them banned - name = ep2_tournament_events.3503.b - - progress_towards_rival_effect = { - REASON = rival_tournament_attempted_banning - CHARACTER = scope:hapless_knight - OPINION = default_rival_opinion - } - - duel = { - skill = diplomacy - target = scope:hapless_knight - # Success - 50 = { - show_chance = yes - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - desc = ep2_tournament_events.3503.b.tt.success - - send_interface_toast = { - title = ep2_tournament_events.3503.b.tt.success - left_icon = root - right_icon = scope:enemy - - if = { - limit = { activity_is_competing_trigger = yes } - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - } - - scope:hapless_knight = { - add_prestige = minor_prestige_loss - add_character_flag = tournament_not_competing - custom_tooltip = tournament_not_competing_tt - } - scope:activity = { - remove_from_guest_subset = { - name = contestant - target = scope:hapless_knight - } - add_to_guest_subset = { - name = spectator - target = scope:hapless_knight - } - } - } - } - # Failure - 50 = { - show_chance = yes - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - desc = ep2_tournament_events.3503.b.tt.failure - - send_interface_toast = { - title = ep2_tournament_events.3503.b.tt.failure - left_icon = root - right_icon = scope:enemy - - add_prestige = minor_prestige_loss - } - } - } - - ai_chance = { - base = 100 - } - } - - option = { # You decide you quite like them - name = ep2_tournament_events.3503.c - - if = { - limit = { activity_is_competing_trigger = yes } - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - } - - progress_towards_friend_effect = { - REASON = friend_joust_endearment - CHARACTER = scope:hapless_knight - OPINION = default_friend_opinion - } - - stress_impact = { - sadistic = medium_stress_impact_gain - callous = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = callous - has_trait = sadistic - } - } - } - } - option = { # Laugh at them - name = ep2_tournament_events.3503.d - custom_tooltip = available_because_intent_tt - trigger = { has_activity_intent = reduce_stress_intent } - - progress_towards_rival_effect = { - REASON = rival_contest_mockery - CHARACTER = scope:hapless_knight - OPINION = default_rival_opinion - } - - scope:hapless_knight = { - add_prestige = medium_prestige_loss - activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } - } - - stress_impact = { - base = major_stress_impact_loss - compassionate = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - } - } -} - -#Death event: Quintain hits you -ep2_tournament_events.3504 = { - type = activity_event - title = ep2_tournament_events.3504.t - desc = ep2_tournament_events.3504.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = pain - } - - trigger = { - is_participant_in_activity = scope:activity - scope:activity = { - has_current_phase = tournament_phase_joust - } - } - - option = { # Ouch! - name = ep2_tournament_events.3504.a - - random_list = { - 1 = { - show_chance = no - increase_wounds_effect = { REASON = accident } - } - 1 = { - show_chance = no - add_trait = incapable - } - 1 = { - show_chance = no - death = { - death_reason = death_tournament_quintain_hit - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_quintain_death_log - tags = { bad } - score = 10 - character = root - } - } - } - } - - ai_chance = { - base = 100 - } - } -} - -################# -### JOUST ### -################# - -# You get injured -ep2_tournament_events.4001 = { - type = activity_event - title = ep2_tournament_events.4001.t - desc = ep2_tournament_events.4001.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = jockey_loss - } - right_portrait = { - character = scope:versus_contestant - animation = jockey_lance_couched_gallop - } - cooldown = { months = 2 } - - trigger = { - #DLC check. - #has_ep2_dlc_trigger = yes - - #Standard checks. - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4001 } - scope:activity = { - add_activity_log_entry = { - key = tournament_joust_injury_log - tags = { bad } - score = 5 - character = root - } - } - } - - option = { # Pull through - name = ep2_tournament_events.4001.a - - trigger = { - OR = { - has_trait = physique_good - has_trait = strong - } - } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_medium_value - } - } - - increase_wounds_no_death_effect = { REASON = battle } - - add_prestige = medium_prestige_gain - - stress_impact = { - base = miniscule_stress_impact_gain - fickle = minor_stress_impact_gain - stubborn = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - } - } - - option = { # Stay in, get wounded - name = ep2_tournament_events.4001.b - - increase_wounds_no_death_effect = { REASON = battle } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_minor_value - } - } - - add_prestige = medium_prestige_gain - - stress_impact = { - base = minor_stress_impact_gain - fickle = minor_stress_impact_gain - stubborn = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - } - } - option = { # Pull out - name = ep2_tournament_events.4001.c - - tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = joust SKILL = horse } - - stress_impact = { - base = miniscule_stress_impact_loss - brave = minor_stress_impact_gain - craven = minor_stress_impact_loss - ambitious = minor_stress_impact_gain - stubborn = minor_stress_impact_gain - arrogant = minor_stress_impact_gain - humble = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = ambitious - has_trait = stubborn - has_trait = arrogant - has_trait = brave - } - } - } - } -} - -# Your opponent is knocked off their horse -ep2_tournament_events.4002 = { - type = activity_event - title = ep2_tournament_events.4002.t - desc = ep2_tournament_events.4002.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = jockey_lance_tilted - } - right_portrait = { - trigger = { - this != involved_activity.activity_host - } - character = scope:versus_contestant - animation = pain - } - cooldown = { months = 2 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_neigh" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4002 } - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_medium_value - } - } - scope:activity = { - add_activity_log_entry = { - key = tournament_knocked_off_log - tags = { good } - score = 5 - character = root - target = scope:versus_contestant - } - } - } - - option = { # Help them up and give them a shield - name = ep2_tournament_events.4002.a - - trigger = { - OR = { - has_trait = just - has_trait = gregarious - has_trait = compassionate - } - } - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = grateful_opinion - opinion = 40 - } - - add_prestige = medium_prestige_gain - - custom_tooltip = ep2_tournament_events.4001.a.tt - - hidden_effect = { - every_courtier_or_guest = { - add_opinion = { - target = root - opinion = 10 - modifier = reputation_opinion - } - } - } - - stress_impact = { - base = miniscule_stress_impact_loss - ambitious = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - } - } - - option = { # Help them up - name = ep2_tournament_events.4002.b - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = grateful_opinion - opinion = 15 - } - - add_prestige = minor_prestige_gain - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - stress_impact = { - just = miniscule_stress_impact_loss - compassionate = miniscule_stress_impact_loss - callous = minor_stress_impact_gain - sadistic = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = callous - has_trait = sadistic - } - } - } - } - option = { # Ah well - name = ep2_tournament_events.4002.c - - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - - stress_impact = { - just = minor_stress_impact_gain - brave = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - } - } -} - -# Your opponent is using a massive lance -ep2_tournament_events.4003 = { - type = activity_event - title = ep2_tournament_events.4003.t - desc = ep2_tournament_events.4003.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = jockey_loss - } - right_portrait = { - trigger = { - this != involved_activity.activity_host - } - character = scope:versus_contestant - animation = jockey_lance_couched_gallop - } - cooldown = { months = 2 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_trotting" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4003 } - } - - option = { # Protest to the authorities - name = ep2_tournament_events.4003.a - - trigger = { - OR = { - has_trait = just - has_trait = honest - has_trait = irritable - } - } - - flavor = ep2_tournament_events.4003.a.tt - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = annoyed_opinion - opinion = -40 - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - - add_prestige = minor_prestige_loss - - stress_impact = { - base = miniscule_stress_impact_loss - ambitious = minor_stress_impact_gain - just = minor_stress_impact_loss - craven = minor_stress_impact_loss - brave = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = brave - has_trait = ambitious - } - } - } - } - - option = { # Ask them not to use it - name = ep2_tournament_events.4003.b - - duel = { - skill = diplomacy - target = scope:versus_contestant - # Success - 50 = { - show_chance = yes - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.4003.b.tt.win - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - } - } - # Failure - 50 = { - show_chance = yes - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - send_interface_toast = { - title = ep2_tournament_events.4003.b.tt.lose - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - } - } - - stress_impact = { - ambitious = minor_stress_impact_gain - just = minor_stress_impact_loss - craven = minor_stress_impact_loss - brave = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = brave - has_trait = ambitious - } - } - } - } - option = { # Joust them anyway - name = ep2_tournament_events.4003.c - - add_prestige = medium_prestige_gain - - duel = { - skills = { prowess martial } - value = decent_skill_rating - # Success - 50 = { - show_chance = yes - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.4003.c.tt.win - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_medium_value - } - } - } - } - # Failure - 50 = { - show_chance = yes - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.4003.c.tt.lose - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - } - } - - stress_impact = { - ambitious = minor_stress_impact_loss - just = minor_stress_impact_gain - craven = minor_stress_impact_gain - brave = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = just - has_trait = craven - } - } - } - } -} - -# Your opponent challenges you to a duel on foot -ep2_tournament_events.4004 = { - type = activity_event - title = ep2_tournament_events.4004.t - desc = ep2_tournament_events.4004.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = jockey_lance_tilted - } - right_portrait = { - trigger = { - this != involved_activity.activity_host - } - character = scope:versus_contestant - animation = marshal - } - cooldown = { months = 2 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_neigh" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4004 } - } - - option = { # Accept - name = ep2_tournament_events.4004.a - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = respect_opinion - opinion = 30 - } - - duel = { - skill = prowess - target = scope:versus_contestant - # Success - 50 = { - show_chance = yes - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.4004.a.success - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_medium_value - } - } - } - } - # Failure - 50 = { - show_chance = yes - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - send_interface_toast = { - title = ep2_tournament_events.4004.a.failure - left_icon = root - right_icon = scope:versus_contestant - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - } - } - - add_prestige = minor_prestige_loss - - stress_impact = { - ambitious = medium_stress_impact_loss - paranoid = medium_stress_impact_gain - craven = minor_stress_impact_gain - brave = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = paranoid - has_trait = craven - } - } - } - } - - option = { # Refuse - name = ep2_tournament_events.4004.b - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = disappointed_opinion - opinion = -30 - } - - ai_chance = { - base = 100 - } - } - - option = { # Accept, but insist upon fighting WITH LANCES - name = ep2_tournament_events.4004.c - - trigger = { - OR = { - has_trait = dull - has_trait = intellect_bad - } - } - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = tournament_confused_opinion - opinion = -40 - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - add_prestige = minor_prestige_loss - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = tournament_hastiludes_xp_gain_minor_value - } - } - - stress_impact = { - base = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - } - } -} - -# Your opponent is injured but tilts anyway -ep2_tournament_events.4005 = { - type = activity_event - title = ep2_tournament_events.4005.t - desc = ep2_tournament_events.4005.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = jockey_lance_tilted - } - right_portrait = { - character = scope:versus_contestant - animation = jockey_loss - } - cooldown = { months = 2 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_wood_clash" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4005 } - scope:activity = { - add_activity_log_entry = { - key = tournament_joust_injury_log - tags = { bad } - score = 5 - character = scope:versus_contestant - } - } - } - - option = { # Tilt against them - name = ep2_tournament_events.4005.a - - flavor = ep2_tournament_events.4005.a.tt - - if = { # If they're a coward they'll like you less - limit = { - scope:versus_contestant = { - has_trait = craven - } - } - reverse_add_opinion = { - target = scope:versus_contestant - modifier = cruelty_opinion - opinion = -10 - } - } - else_if = { # If they're brave, stubborn or chivalric they'll respect you for respecting their wishes - limit = { - scope:versus_contestant = { - OR = { - has_trait = brave - has_trait = stubborn - has_trait = gallant - } - } - } - reverse_add_opinion = { - target = scope:versus_contestant - modifier = tournament_respected_wishes_opinion - opinion = 30 - } - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - add_prestige = miniscule_prestige_loss - - ai_chance = { - base = 100 - } - } - - option = { # Refuse to tilt against them - name = ep2_tournament_events.4005.b - - flavor = ep2_tournament_events.4005.b.tt - - if = { # If they're chivalric they'll respect you even more for being knightly - limit = { - scope:versus_contestant = { - has_trait = gallant - } - } - reverse_add_opinion = { - target = scope:versus_contestant - modifier = respect_opinion - opinion = 50 - } - } - - else_if = { # If they're not chivalric they'll still respect you - limit = { - scope:versus_contestant = { - NOT = { - has_trait = gallant - } - } - } - reverse_add_opinion = { - target = scope:versus_contestant - modifier = respect_opinion - opinion = 20 - } - } - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - - add_prestige = medium_prestige_gain - - stress_impact = { - compassionate = medium_stress_impact_loss - sadistic = medium_stress_impact_gain - callous = medium_stress_impact_gain - just = medium_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = sadistic - has_trait = callous - } - } - } - } - - option = { # Tilt against them in an underhanded way that guarantees victory - name = ep2_tournament_events.4005.c - - flavor = ep2_tournament_events.4005.c.tt - - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - - add_prestige = medium_prestige_loss - - if = { # If they're chivalric they'll hate you you even more for being knightly - limit = { - scope:versus_contestant = { - has_trait = gallant - } - } - reverse_add_opinion = { - target = scope:versus_contestant - modifier = angry_opinion - opinion = -60 - } - } - - else_if = { # If they're not chivalric they'll still hate you, just less so - limit = { - scope:versus_contestant = { - NOT = { - has_trait = gallant - } - } - } - reverse_add_opinion = { - target = scope:versus_contestant - modifier = angry_opinion - opinion = -40 - } - } - - stress_impact = { - compassionate = medium_stress_impact_gain - sadistic = medium_stress_impact_loss - callous = medium_stress_impact_loss - just = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = compassionate - has_trait = just - } - } - } - } -} - -# Your opponent asks for a mercy pass -ep2_tournament_events.4006 = { - type = activity_event - title = ep2_tournament_events.4006.t - desc = ep2_tournament_events.4006.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = jockey_lance_tilted - } - right_portrait = { - trigger = { - this != involved_activity.activity_host - } - character = scope:versus_contestant - animation = jockey_idle - } - cooldown = { months = 2 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_flyby" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4006 } - scope:activity = { - add_activity_log_entry = { - key = tournament_mercy_pass_log - tags = { good } - score = 5 - character = root - target = scope:versus_contestant - } - } - } - - option = { # Show mercy - name = ep2_tournament_events.4006.a - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = tournament_mercy_opinion - opinion = 30 - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - add_prestige = minor_prestige_gain - - stress_impact = { - compassionate = medium_stress_impact_loss - sadistic = medium_stress_impact_gain - callous = medium_stress_impact_gain - just = medium_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = callous - has_trait = sadistic - } - } - } - } - - option = { # No mercy - name = ep2_tournament_events.4006.b - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = cruelty_opinion - opinion = -30 - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - stress_impact = { - compassionate = medium_stress_impact_gain - sadistic = medium_stress_impact_loss - callous = minor_stress_impact_loss - just = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = just - has_trait = compassionate - } - } - } - } -} - -# Your opponent is mistreating their groom -ep2_tournament_events.4007 = { - type = activity_event - title = ep2_tournament_events.4007.t - desc = ep2_tournament_events.4007.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = jockey_idle - } - right_portrait = { - character = scope:groom - outfit_tags = { beggar_rags } - animation = admiration - } - lower_right_portrait = { - character = scope:versus_contestant - } - cooldown = { months = 2 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4007 } - create_character = { - location = root.location - faith = scope:versus_contestant.faith - culture = scope:versus_contestant.culture - random_traits_list = { - count = 1 - education_martial_1 = {} - education_martial_2 = {} - } - dynasty = none - age = { 18 22 } - random_traits = yes - gender_female_chance = { - if = { - limit = { scope:versus_contestant.faith = { has_doctrine = doctrine_gender_male_dominated } } - add = 0 - } - else_if = { - limit = { scope:versus_contestant.faith = { has_doctrine = doctrine_gender_female_dominated } } - add = 100 - } - else = { - add = 50 - } - } - save_scope_as = groom - } - } - - - option = { # Laugh at the groom - name = ep2_tournament_events.4007.a - - trigger = { - has_trait = callous - } - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = tournament_agreed_opinion - opinion = 30 - } - - reverse_add_opinion = { - target = root - modifier = tournament_mocked_opinion - opinion = -30 - } - - stress_impact = { - base = minor_stress_impact_loss - gregarious = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - has_trait = gregarious - } - } - } - - option = { # Offer the groom a job - name = ep2_tournament_events.4007.b - - flavor = ep2_tournament_events.4007.b.tt - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = angry_opinion - opinion = -30 - } - - scope:groom = { - reverse_add_opinion = { - target = scope:versus_contestant - modifier = angry_opinion - opinion = -30 - } - } - - add_courtier = scope:groom - - ai_chance = { - base = 100 - } - } - - option = { # Pay groom to unsettle opponent's horse - name = ep2_tournament_events.4007.c - - flavor = ep2_tournament_events.4007.c.tt - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - scope:groom = { - reverse_add_opinion = { - target = scope:versus_contestant - modifier = angry_opinion - opinion = -50 - } - } - - pay_short_term_gold = { - target = scope:groom - gold = minor_gold_value - } - - stress_impact = { - just = medium_stress_impact_gain - ambitious = minor_stress_impact_loss - greedy = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = just - has_trait = greedy - } - } - } - } - - option = { # Let it go - name = ep2_tournament_events.4007.d - - ai_chance = { - base = 100 - } - } -} - -# Crowd heckles you -ep2_tournament_events.4008 = { - type = activity_event - title = ep2_tournament_events.4008.t - desc = ep2_tournament_events.4008.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - cooldown = { months = 2 } - - left_portrait = { - character = root - animation = jockey_loss - } - right_portrait = { - character = scope:versus_contestant - animation = jockey_lance_tilted - } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_amb_2d_crowd_negative_reaction" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4008 } - scope:activity = { - add_activity_log_entry = { - key = tournament_crowd_heckled_log - tags = { bad } - score = 5 - character = root - } - } - } - - # Continue with the contest - option = { - name = ep2_tournament_events.4008.a - random_list = { - 45 = { #You win - - modifier = { #Skill buff - add = 15 - prowess > high_skill_rating - } - - modifier = { - add = 10 - has_trait = brave #Brave enough to ignore it - } - - modifier = { - add = 10 - has_trait = calm #Calm enough to ignore the abuse - } - - modifier = { - add = -10 - OR = { - has_trait = wrathful #Too angry to not care - has_trait = arrogant #How dare they! - has_trait = craven #Aaahhh, scary! - } - } - - desc = ep2_tournament_events.4008.a.success - - send_interface_toast = { - title = ep2_tournament_events.4008.a.success - left_icon = root - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = tournament_hastiludes_xp_gain_medium_value - } - } - - stress_impact = { - base = miniscule_stress_impact_loss - } - } - } - 25 = { #You lose - - desc = ep2_tournament_events.4008.a.failure - - send_interface_toast = { - title = ep2_tournament_events.4008.a.failure - left_icon = root - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - - stress_impact = { - base = miniscule_stress_impact_gain - } - } - } - 15 = { #You get injured by the crowd throwing stuff at you - modifier = { - add = 10 - has_trait = sadistic - } - modifier = { - add = 10 - has_trait = callous - } - modifier = { - add = 15 - OR = { - has_trait = murderer - has_trait = incestuous - has_trait = sodomite - has_trait = cannibal - has_trait = deviant - has_trait = kinslayer - has_trait = adulterer - has_trait = fornicator - has_trait = excommunicated - } - } - - desc = ep2_tournament_events.4008.a.criticalfailure - - send_interface_toast = { - title = ep2_tournament_events.4008.a.criticalfailure - left_icon = root - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - - add_prestige = minor_prestige_loss - - increase_wounds_effect = { REASON = fight } - - random = { - chance = 25 - if = { - limit = { - NOT = { - has_trait = scarred - } - } - add_trait = scarred - } - add_trait_xp = { - trait = scarred - value = { - integer_range = { - min = 5 - max = 25 - } - } - } - } - - stress_impact = { - base = minor_stress_impact_gain - } - } - } - } - ai_chance = { - base = 100 - - } - } - - # Throw the contest - option = { - name = ep2_tournament_events.4008.b - - add_prestige = minor_prestige_loss - - tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = joust SKILL = horse } - - stress_impact = { - brave = medium_stress_impact_gain - craven = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - has_trait = brave - } - } - } -} - -# Lend opponent a lance -ep2_tournament_events.4009 = { - type = activity_event - title = ep2_tournament_events.4009.t - desc = ep2_tournament_events.4009.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - cooldown = { months = 2 } - - left_portrait = { - character = root - animation = jockey_lance_tilted - } - right_portrait = { - character = scope:versus_contestant - animation = jockey_idle - } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_neigh" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4009 } - } - - # Mock them - option = { - name = ep2_tournament_events.4009.a - trigger = { - OR = { - has_trait = sadistic - has_trait = arrogant - } - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - progress_towards_rival_effect = { - REASON = rival_contest_mockery - CHARACTER = scope:hapless_knight - OPINION = default_rival_opinion - } - - stress_impact = { - sadistic = minor_stress_impact_loss - arrogant = minor_stress_impact_loss - just = medium_stress_impact_loss - gregarious = medium_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = just - has_trait = gregarious - } - } - } - } - # Lend them a lance - option = { - name = ep2_tournament_events.4009.b - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - - add_prestige = medium_prestige_gain - - scope:activity = { - add_activity_log_entry = { - key = tournament_lent_lance_log - tags = { good } - score = 5 - character = root - target = scope:versus_contestant - } - } - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = grateful_opinion - opinion = 30 - } - - stress_impact = { - compassionate = minor_stress_impact_loss - generous = minor_stress_impact_loss - just = minor_stress_impact_loss - arbitrary = minor_stress_impact_gain - callous = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = callous - has_trait = arbitrary - } - } - } - } - # Continue - option = { - name = ep2_tournament_events.4009.c - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - add_prestige = minor_prestige_loss - - stress_impact = { - compassionate = minor_stress_impact_gain - generous = minor_stress_impact_gain - just = minor_stress_impact_gain - arbitrary = minor_stress_impact_loss - callous = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = compassionate - has_trait = generous - has_trait = just - } - } - } - } -} - -################# -### RECITAL ### -################## - -# Previous entrant's verse is similar to yours -ep2_tournament_events.5501 = { - type = activity_event - title = ep2_tournament_events.5501.t - desc = ep2_tournament_events.5501.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = worry - } - right_portrait = { - character = scope:enemy - animation = scheme - } - cooldown = { years = 1 } - - trigger = { - exists = var:contest_aptitude - scope:activity = { - any_guest_subset_current_phase = { - name = qualified - this = root - } - any_guest_subset_current_phase = { - name = qualified - contest_event_general_contestant_valid_trigger = yes - this != root - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_positive_reaction" - scope:activity = { - random_guest_subset_current_phase = { - name = qualified - limit = { contest_event_general_contestant_valid_trigger = yes } - save_scope_as = enemy - } - } - tournament_pivotal_flavor_variable_effect = { CONTEST = recital ID = 5501 } - } - - # Show them it's all about the delivery - option = { - name = ep2_tournament_events.5501.a - trigger = { - OR = { - has_trait = lifestyle_poet - has_trait = education_learning_3 - has_trait = education_learning_4 - has_trait = education_learning_5 - has_trait = shrewd - } - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = wit - value = tournament_hastiludes_xp_gain_medium_value - } - } - - stress_impact = { - base = miniscule_stress_impact_loss - arrogant = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - } - } - } - - # Improvise - option = { - name = ep2_tournament_events.5501.b - - random_list = { - 9 = { #It goes well - - modifier = { #Skill buff - add = 15 - diplomacy > high_skill_rating - } - - modifier = { #Big buff if you're a poet - add = 15 - has_trait = lifestyle_poet - } - - modifier = { #More diplo! - add = 10 - OR = { - has_trait = education_learning_3 - has_trait = education_learning_4 - has_trait = education_learning_5 - } - } - - modifier = { #Being learned helps - add = 5 - learning > high_skill_rating - } - - modifier = { #Always good to be an extrovert in these situations - add = 5 - has_trait = gregarious - } - - modifier = { #Blanket coverage for smarts - add = 5 - OR = { - has_trait = shrewd - has_trait = intellect_good - } - } - - desc = ep2_tournament_events.5501.b.success - - send_interface_toast = { - title = ep2_tournament_events.5501.b.success - left_icon = root - right_icon = scope:enemy - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = wit - value = tournament_hastiludes_xp_gain_minor_value - } - } - - stress_impact = { - base = miniscule_stress_impact_loss - } - } - } - 10 = { #It doesn't go well - - desc = ep2_tournament_events.5501.b.failure - - send_interface_toast = { - title = ep2_tournament_events.5501.b.failure - left_icon = root - right_icon = scope:enemy - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - - stress_impact = { - base = miniscule_stress_impact_gain - } - } - } - } - - ai_chance = { - base = 100 - } - } - # Protest - option = { - name = ep2_tournament_events.5501.c - - add_prestige = minor_prestige_loss - - duel = { - skills = { diplomacy intrigue } - target = scope:enemy - #They DID plan it! - 40 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.5501.c.success - left_icon = root - right_icon = scope:enemy - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - add_prestige = minor_prestige_gain - } - - desc = ep2_tournament_events.5501.c.success - - stress_impact = { - base = miniscule_stress_impact_loss - paranoid = major_stress_impact_loss #I KNEW IT! - just = minor_stress_impact_loss - } - } - #You look like a fool - 60 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.5501.c.failure - left_icon = root - right_icon = scope:enemy - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - add_prestige = minor_prestige_loss - } - - desc = ep2_tournament_events.5501.c.failure - - stress_impact = { - base = miniscule_stress_impact_gain - paranoid = medium_stress_impact_gain - just = medium_stress_impact_gain - } - } - } - - ai_chance = { - base = 100 - } - } -} - -# Contestant plagiarises verse -ep2_tournament_events.5502 = { - type = activity_event - title = ep2_tournament_events.5502.t - desc = { - desc = ep2_tournament_events.5502.start - first_valid = { - triggered_desc = { - trigger = { - scope:contestant = { - has_friendly_relationship_trigger = { - CHARACTER = root - } - culture != scope:activity.activity_location.culture - } - } - desc = ep2_tournament_events.5502.friend - } - triggered_desc = { - trigger = { - scope:contestant = { - culture != scope:activity.activity_location.culture - } - } - desc = ep2_tournament_events.5502.culture - } - } - desc = ep2_tournament_events.5502.end - } - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = worry - } - right_portrait = { - character = scope:contestant - animation = shock - } - cooldown = { years = 1 } - - trigger = { - scope:activity = { - any_guest_subset_current_phase = { - name = qualified - contest_event_general_contestant_valid_trigger = yes - culture != scope:activity.activity_location.culture - this != root - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" - scope:activity = { - random_guest_subset_current_phase = { - name = qualified - limit = { - contest_event_general_contestant_valid_trigger = yes - culture != scope:activity.activity_location.culture - } - save_scope_as = contestant - } - } - tournament_pivotal_flavor_variable_effect = { CONTEST = recital ID = 5502 } - scope:activity = { - add_activity_log_entry = { - key = tournament_plagiarism_log - tags = { good } - score = 5 - character = root - target = scope:versus_contestant - } - } - } - - # This isn't their fault! - option = { - name = ep2_tournament_events.5502.a - - duel = { - skills = { diplomacy } - value = decent_skill_rating - - #You convince the crowd - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.5502.c.success - left_icon = root - right_icon = scope:contestant - - scope:contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - add_opinion = { - target = root - modifier = grateful_opinion - opinion = 35 - } - } - } - - desc = ep2_tournament_events.5502.c.success - - stress_impact = { - base = miniscule_stress_impact_loss - gregarious = miniscule_stress_impact_loss - just = minor_stress_impact_loss - lazy = minor_stress_impact_gain - callous = medium_stress_impact_gain - } - } - - #The crowd turn against them - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.5502.c.failure - left_icon = root - right_icon = scope:contestant - - scope:contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - } - } - - desc = ep2_tournament_events.5502.c.failure - - stress_impact = { - base = miniscule_stress_impact_gain - } - } - } - - ai_chance = { - base = 100 - } - } - - # Join in with the booing - option = { - name = ep2_tournament_events.5502.b - - scope:contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - add_prestige = minor_prestige_loss - } - - progress_towards_rival_effect = { - REASON = rival_recital_booing - CHARACTER = scope:contestant - OPINION = default_rival_opinion - } - - stress_impact = { - gregarious = minor_stress_impact_gain - just = medium_stress_impact_gain - lazy = miniscule_stress_impact_loss - callous = miniscule_stress_impact_loss - ambitious = miniscule_stress_impact_loss - honest = major_stress_impact_gain - deceitful = miniscule_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = just - has_trait = honest - } - } - } - } - - # Leave the contestant to suffer - option = { - name = ep2_tournament_events.5502.c - - scope:contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - } - - stress_impact = { - gregarious = miniscule_stress_impact_gain - just = miniscule_stress_impact_gain - honest = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - has_trait = honest - } - } - } -} - -# Stage fright -ep2_tournament_events.5503 = { - type = activity_event - title = ep2_tournament_events.5503.t - desc = { - desc = ep2_tournament_events.5503.desc - first_valid = { - triggered_desc = { - trigger = { - OR = { - has_trait = avaricious - has_trait = education_stewardship_3 - has_trait = education_stewardship_4 - has_trait = education_stewardship_5 - } - } - desc = ep2_tournament_events.5503.rich - } - triggered_desc = { - trigger = { - OR = { - has_trait = seducer - AND = { - has_trait = deviant - has_trait = lustful - } - } - } - desc = ep2_tournament_events.5503.seducer - } - triggered_desc = { - desc = ep2_tournament_events.5503.fallback - } - } - } - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = shock - } - cooldown = { years = 1 } - - trigger = { - exists = var:contest_aptitude - scope:activity = { - any_guest_subset_current_phase = { - name = qualified - this = root - } - any_guest_subset_current_phase = { - name = qualified - contest_event_general_contestant_valid_trigger = yes - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" - scope:activity = { - random_guest_subset_current_phase = { - name = qualified - limit = { contest_event_general_contestant_valid_trigger = yes } - save_scope_as = contestant - } - } - tournament_pivotal_flavor_variable_effect = { CONTEST = recital ID = 5503 } - } - - # Fall back on a stock poem - option = { - name = ep2_tournament_events.5503.a - trigger = { - has_trait = lifestyle_poet - } - - flavor = ep2_tournament_events.5503.a.tt - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = wit - value = tournament_hastiludes_xp_gain_minor_value - } - } - - stress_impact = { - base = miniscule_stress_impact_loss - } - - ai_chance = { - base = 200 - } - } - - # Behold! Free coin! - option = { - name = ep2_tournament_events.5503.b - - trigger = { - OR = { - has_trait = avaricious - has_trait = education_stewardship_3 - has_trait = education_stewardship_4 - has_trait = education_stewardship_5 - } - } - - flavor = ep2_tournament_events.5503.b.tt - - remove_short_term_gold = tiny_gold_value - - stress_impact = { - base = miniscule_stress_impact_loss - greedy = major_stress_impact_gain - generous = minor_stress_impact_loss - just = minor_stress_impact_gain - } - - ai_chance = { - base = 200 - } - } - - # Give the crowd what they want - option = { - name = ep2_tournament_events.5503.c - - trigger = { - OR = { - has_trait = seducer - AND = { - has_trait = deviant - has_trait = lustful - } - } - } - - flavor = ep2_tournament_events.5503.c.tt - - if = { - limit = { - faith = { - NOR = { - trait_is_virtue = lustful - trait_is_sin = lustful - } - } - } - add_prestige = minor_prestige_loss - add_character_modifier = { - modifier = tournament_performative_sensuousness_modifier - years = 5 - } - } - else_if = { - limit = { - faith = { - trait_is_sin = lustful - } - } - add_piety = medium_piety_loss - add_character_modifier = { - modifier = tournament_performative_sensuousness_modifier - years = 10 - } - } - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - ai_chance = { - base = 200 - } - } - - # Distract the crowd - option = { - name = ep2_tournament_events.5503.d - - duel = { - skills = { intrigue diplomacy } - value = decent_skill_rating - #You successfully distract the crowd - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.5503.d.win - left_icon = root - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - } - - desc = ep2_tournament_events.5503.d.win - - stress_impact = { - base = miniscule_stress_impact_loss - deceitful = minor_stress_impact_loss - } - } - #The crowd aren't fooled - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.5503.d.lose - left_icon = root - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - - desc = ep2_tournament_events.5503.d.lose - - stress_impact = { - base = minor_stress_impact_gain - arrogant = minor_stress_impact_gain - shy = minor_stress_impact_gain - } - } - } - - ai_chance = { - base = 100 - } - } - - # Try and fail - option = { - name = ep2_tournament_events.5503.e - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - - stress_impact = { - base = miniscule_stress_impact_gain - arrogant = minor_stress_impact_gain - shy = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - } - } -} - -# A downpour begins -ep2_tournament_events.5504 = { - type = activity_event - title = ep2_tournament_events.5504.t - desc = ep2_tournament_events.5504.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = worry - } - cooldown = { years = 1 } - - trigger = { - exists = var:contest_aptitude - scope:activity = { - any_guest_subset_current_phase = { - name = qualified - this = root - } - activity_location = { is_drylands_or_desert_trigger = no } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" - tournament_pivotal_flavor_variable_effect = { CONTEST = recital ID = 5504 } - scope:activity = { - add_activity_log_entry = { - key = tournament_downpour_begins_log - tags = { good } - score = 5 - character = root - } - } - } - - # Continue - option = { - name = ep2_tournament_events.5504.a - - duel = { - skills = { diplomacy } - value = decent_skill_rating - - 50 = { #You utilise the rain successfully - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - modifier = { #Skill buff - add = 15 - diplomacy > high_skill_rating - } - - modifier = { #Big buff if you're a poet - add = 15 - has_trait = lifestyle_poet - } - - modifier = { #More diplo! - add = 10 - OR = { - has_trait = education_learning_3 - has_trait = education_learning_4 - has_trait = education_learning_5 - } - } - - modifier = { #Being learned helps - add = 5 - learning > high_skill_rating - } - - modifier = { #Not scared of a bit of thunder - add = 5 - has_trait = brave - } - - modifier = { #Blanket coverage for smarts - add = 5 - OR = { - has_trait = shrewd - has_trait = intellect_good - } - } - - send_interface_toast = { - title = ep2_tournament_events.5504.a.success - left_icon = root - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = wit - value = tournament_hastiludes_xp_gain_medium_value - } - } - } - - desc = ep2_tournament_events.5504.a.success - - stress_impact = { - base = miniscule_stress_impact_loss - brave = miniscule_stress_impact_loss - } - } - - 50 = { #You are drowned out by the downpour - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - modifier = { #Skill debuff - add = -10 - diplomacy < high_skill_rating - } - - modifier = { #Aaahhhh, loud noises! - add = -5 - has_trait = craven - } - - send_interface_toast = { - title = ep2_tournament_events.5504.a.failure - left_icon = root - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - } - - - desc = ep2_tournament_events.5504.a.failure - - stress_impact = { - base = miniscule_stress_impact_gain - craven = medium_stress_impact_gain - } - } - } - - - ai_chance = { - base = 100 - } - } - - # Run away scared - option = { - name = ep2_tournament_events.5504.b - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - - stress_impact = { - brave = medium_stress_impact_gain - shy = miniscule_stress_impact_loss - craven = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - has_trait = brave - } - } - } -} - -# You see a chance to insult an opponent -ep2_tournament_events.5505 = { - type = activity_event - title = ep2_tournament_events.5505.t - desc = { - desc = ep2_tournament_events.5505.desc - first_valid = { - triggered_desc = { - trigger = { - scope:enemy = { - AND = { - is_female = no - OR = { - has_trait = chaste - has_trait = celibate - } - } - } - } - desc = ep2_tournament_events.5505.start.malevirgin - } - triggered_desc = { - trigger = { - scope:enemy = { - AND = { - is_female = yes - OR = { - has_trait = chaste - has_trait = celibate - } - } - } - } - desc = ep2_tournament_events.5505.start.femalevirgin - } - triggered_desc = { - trigger = { - scope:enemy = { - age > 60 - } - } - desc = ep2_tournament_events.5505.start.old - } - triggered_desc = { - trigger = { - scope:enemy = { - current_weight > 50 - } - } - desc = ep2_tournament_events.5505.start.fat - } - triggered_desc = { - trigger = { - scope:enemy = { - has_trait = compassionate - } - NOT = { - has_trait = compassionate - } - } - desc = ep2_tournament_events.5505.start.soft - } - triggered_desc = { - trigger = { - has_trait = compassionate - } - desc = ep2_tournament_events.5505.start.compassionate - } - triggered_desc = { - desc = ep2_tournament_events.5505.start.fallback - } - } - desc = ep2_tournament_events.5505.end - } - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = happiness - } - right_portrait = { - character = scope:enemy - animation = anger - } - cooldown = { years = 1 } - - trigger = { - exists = var:contest_aptitude - scope:activity = { - any_guest_subset_current_phase = { - name = qualified - this = root - } - any_guest_subset_current_phase = { - name = qualified - contest_event_general_contestant_valid_trigger = yes - this != root - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" - scope:activity = { - random_guest_subset_current_phase = { - name = qualified - limit = { contest_event_general_contestant_valid_trigger = yes } - save_scope_as = enemy - } - } - tournament_pivotal_flavor_variable_effect = { CONTEST = recital ID = 5505 } - } - - # Call them a virgin - option = { - name = ep2_tournament_events.5505.maidenless - trigger = { - scope:enemy = { - OR = { - has_trait = chaste - has_trait = celibate - } - } - } - - add_internal_flag = special - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = wit - value = tournament_hastiludes_xp_gain_medium_value - } - } - - progress_towards_rival_effect = { - REASON = rival_recital_insult - CHARACTER = scope:enemy - OPINION = default_rival_opinion - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_insulted_opponent_log - tags = { good } - score = 5 - character = root - target = scope:enemy - } - } - - stress_impact = { - chaste = medium_stress_impact_gain - celibate = medium_stress_impact_gain - sadistic = minor_stress_impact_loss - arrogant = minor_stress_impact_loss - gregarious = medium_stress_impact_gain - compassionate = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = compassionate - has_trait = gregarious - has_trait = chaste - has_trait = celibate - } - } - } - } - - # Call them old - option = { - name = ep2_tournament_events.5505.old - trigger = { - scope:enemy = { - age > 60 - } - } - - add_internal_flag = special - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = wit - value = tournament_hastiludes_xp_gain_medium_value - } - } - - progress_towards_rival_effect = { - REASON = rival_recital_insult - CHARACTER = scope:enemy - OPINION = default_rival_opinion - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_insulted_opponent_log - tags = { good } - score = 5 - character = root - target = scope:enemy - } - } - - stress_impact = { - sadistic = minor_stress_impact_loss - arrogant = minor_stress_impact_loss - gregarious = medium_stress_impact_gain - compassionate = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = compassionate - has_trait = gregarious - } - } - } - } - - # Call them fat - option = { - name = ep2_tournament_events.5505.fat - trigger = { - scope:enemy = { - current_weight > 50 - } - NOT = { - current_weight > 50 - } - } - - add_internal_flag = special - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = wit - value = tournament_hastiludes_xp_gain_medium_value - } - } - - progress_towards_rival_effect = { - REASON = rival_recital_insult - CHARACTER = scope:enemy - OPINION = default_rival_opinion - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_insulted_opponent_log - tags = { good } - score = 5 - character = root - target = scope:enemy - } - } - - stress_impact = { - sadistic = minor_stress_impact_loss - arrogant = minor_stress_impact_loss - gregarious = medium_stress_impact_gain - compassionate = medium_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = compassionate - has_trait = gregarious - } - } - } - } - - # Try, and fail, to insult them - option = { - name = ep2_tournament_events.5505.idiot - trigger = { - OR = { - has_trait = dull - has_trait = intellect_bad - } - } - - add_internal_flag = special - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - - reverse_add_opinion = { - target = scope:enemy - modifier = tournament_confused_opinion - opinion = -5 - } - - stress_impact = { - base = medium_stress_impact_loss - } - - ai_chance = { - base = 100 - } - } - - # Imply you'll flay them - option = { - name = ep2_tournament_events.5505.torturer - trigger = { - has_trait = torturer - } - - add_internal_flag = special - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - progress_towards_rival_effect = { - REASON = rival_recital_insult - CHARACTER = scope:enemy - OPINION = default_rival_opinion - } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = wit - value = tournament_hastiludes_xp_gain_minor_value - } - } - - reverse_add_opinion = { - target = scope:enemy - modifier = disgusted_opinion - opinion = -40 - } - - every_close_family_member = { - custom = ep2_tournament_events.5505.opinion.tt - limit = { - NOT = { - has_trait = sadistic - } - location = root.location - } - add_opinion = { - target = root - opinion = -20 - modifier = disgusted_opinion - } - } - - stress_impact = { - base = minor_stress_impact_loss - sadistic = medium_stress_impact_loss - gregarious = major_stress_impact_gain - compassionate = major_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = compassionate - has_trait = gregarious - } - } - } - } - - # Be nice - option = { - name = ep2_tournament_events.5505.compassionate - - trigger = { - has_trait = compassionate - } - - add_internal_flag = special - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - progress_towards_friend_effect = { - REASON = friend_recital_compliment - CHARACTER = scope:enemy - OPINION = default_friend_opinion - } - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = wit - value = tournament_hastiludes_xp_gain_minor_value - } - } - - stress_impact = { - sadistic = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - compassionate = minor_stress_impact_loss - gregarious = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = sadistic - has_trait = arrogant - } - } - } - } - - # Insult them - option = { - name = ep2_tournament_events.5505.fallback - - activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - - progress_towards_rival_effect = { - REASON = rival_recital_insult - CHARACTER = scope:enemy - OPINION = default_rival_opinion - } - - stress_impact = { - compassionate = medium_stress_impact_gain - humble = medium_stress_impact_gain - gregarious = minor_stress_impact_gain - } - - scope:activity = { - add_activity_log_entry = { - key = tournament_insulted_opponent_log - tags = { good } - score = 5 - character = root - target = scope:enemy - } - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = compassionate - has_trait = gregarious - } - } - } - } - - # ...never mind - option = { - name = ep2_tournament_events.5505.getout - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - - stress_impact = { - sadistic = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - compassionate = minor_stress_impact_loss - gregarious = minor_stress_impact_loss - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = sadistic - has_trait = arrogant - } - } - } - } -} - -######################### -### HONSE RANCING ### -######################### - -# Choose your ~~fighter~~ jockey -ep2_tournament_events.4500 = { - type = activity_event - title = ep2_tournament_events.4500.t - desc = { - desc = ep2_tournament_events.4500.desc - triggered_desc = { # Knight - trigger = { - scope:jockey1 = { - is_knight_of = root - } - } - desc = ep2_tournament_events.4500.knight - } - triggered_desc = { # Guest - trigger = { - scope:jockey1 = { - is_knight_of = root - } - scope:jockey2 = { is_in_the_same_court_as_or_guest = root } - } - desc = ep2_tournament_events.4500.guest - } - triggered_desc = { - trigger = { - scope:jockey1 = { - is_knight_of = root - } - scope:jockey2 = { - is_in_the_same_court_as_or_guest = root - } - } - desc = ep2_tournament_events.4500.nobody - } - triggered_desc = { # Nobody - trigger = { - NOR = { - scope:jockey1 = { - is_knight_of = root - } - scope:jockey2 = { - is_in_the_same_court_as_or_guest = root - } - } - } - desc = ep2_tournament_events.4500.fallback - } - } - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = worry - } - right_portrait = scope:jockey1 - lower_right_portrait = scope:jockey2 - lower_left_portrait = scope:jockey3 - - trigger = { - is_ai = no - } - - immediate = { - #Knight - if = { - limit = { - any_knight = { - location = root.location - is_participant_in_activity = scope:activity - is_adult = yes - is_landed = no - is_healthy = yes - NOT = { - is_in_guest_subset = { name = qualified } - } - } - } - random_knight = { - limit = { - location = root.location - is_participant_in_activity = scope:activity - is_adult = yes - is_landed = no - is_healthy = yes - NOT = { - is_in_guest_subset = { name = qualified } - } - } - weight = { - base = 1 - modifier = { add = prowess } - } - save_scope_as = jockey1 - } - } - else = { - create_character = { - template = tournament_locale_character - culture = root.location.culture - faith = root.location.faith - location = root.location - gender_female_chance = root_soldier_female_chance - save_scope_as = jockey1 - } - scope:jockey1 = { - add_character_flag = generated_jockey - add_to_list = potential_jockeys - } - } - # Courtiers/Guests - if = { - limit = { - any_courtier_or_guest = { - location = root.location - is_participant_in_activity = scope:activity - is_adult = yes - is_healthy = yes - NOR = { - is_in_guest_subset = { name = qualified } - this = scope:jockey1 - is_spouse_of = root - is_concubine = yes - } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } - } - } - random_courtier_or_guest = { - limit = { - location = root.location - is_participant_in_activity = scope:activity - is_adult = yes - is_healthy = yes - NOR = { - is_in_guest_subset = { name = qualified } - this = scope:jockey1 - is_spouse_of = root - is_concubine = yes - } - } - weight = { - base = 1 - modifier = { add = prowess } - } - save_scope_as = jockey2 - } - } - else = { - create_character = { - template = tournament_locale_character - culture = root.location.culture - faith = root.location.faith - location = root.location - gender_female_chance = root_soldier_female_chance - save_scope_as = jockey2 - } - scope:jockey2 = { - add_character_flag = generated_jockey - add_to_list = potential_jockeys - } - } - #Randos - create_character = { - template = tournament_locale_character - culture = root.location.culture - faith = root.location.faith - location = root.location - gender_female_chance = root_soldier_female_chance - save_scope_as = jockey3 - } - scope:jockey3 = { - add_character_flag = generated_jockey - add_to_list = potential_jockeys - } - } - - # Choose Jockey 1 - option = { - name = ep2_tournament_events.4500.a - flavor = ep2_tournament_events.4500.knight.tt - scope:jockey1 = { - tournament_choose_jockey_effect = yes - accolade_medium_glory_gain_with_checks_effect = yes - } - ai_chance = { - base = 1 - modifier = { add = scope:jockey1.contest_horse_aptitude_value } - } - } - # Choose Jockey 2 - option = { - name = ep2_tournament_events.4500.b - flavor = ep2_tournament_events.4500.guest.tt - scope:jockey2 = { - tournament_choose_jockey_effect = yes - accolade_medium_glory_gain_with_checks_effect = yes - } - ai_chance = { - base = 1 - modifier = { add = scope:jockey2.contest_horse_aptitude_value } - } - } - # Choose Jockey 3 - option = { - name = ep2_tournament_events.4500.c - flavor = ep2_tournament_events.4500.nobody.tt - scope:jockey3 = { - tournament_choose_jockey_effect = yes - accolade_medium_glory_gain_with_checks_effect = yes - } - ai_chance = { - base = 1 - modifier = { add = scope:jockey3.contest_horse_aptitude_value } - } - } - - after = { - # Cull spare jockeys - every_in_list = { - list = potential_jockeys - limit = { - has_character_flag = generated_jockey - NOT = { root.var:horse_race_jockey ?= this } - } - silent_disappearance_effect = yes - } - } -} - -######################### -### EXTRA ARCHERY ### -######################### - -# You try to liven up the Contest -# Archery -ep2_tournament_events.6501 = { - type = activity_event - title = ep2_tournament_events.6501.t - desc = ep2_tournament_events.6501.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = bow_closed - } - cooldown = { years = 1 } - - trigger = { - exists = var:contest_aptitude - scope:activity = { - any_guest_subset_current_phase = { - name = qualified - this = root - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_arrow_flyby" - tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 6501 } - } - - # Stand on one leg a fencepost - option = { - name = ep2_tournament_events.6501.a - trigger = { - has_trait = arrogant - } - - duel = { - skill = prowess - value = high_skill_rating - #You succeed! - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - modifier = { # I'm used to this :sunglasses: - factor = 2 - has_trait = one_legged - } - - send_interface_toast = { - title = ep2_tournament_events.6501.a.tt.win - left_icon = root - - activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - - add_prestige = major_prestige_value - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = bow - value = tournament_hastiludes_xp_gain_major_value - } - } - } - if = { - limit = { - OR = { - location = { - OR = { - geographical_region = world_europe - geographical_region = world_asia_minor - } - } - OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } - } - } - give_nickname = nick_monopod - } - else = { - give_nickname = nick_sure_footed - } - - desc = ep2_tournament_events.6501.a.tt.win - - stress_impact = { - arrogant = medium_stress_impact_loss - shy = medium_stress_impact_gain - brave = minor_stress_impact_loss - stubborn = minor_stress_impact_loss - } - } - #You slip and fall - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.6501.a.tt.lose - left_icon = root - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - - increase_wounds_effect = { REASON = wounds } - } - - desc = ep2_tournament_events.6501.a.tt.lose - - stress_impact = { - base = minor_stress_impact_gain - arrogant = major_stress_impact_gain - } - } - } - scope:activity = { - add_activity_log_entry = { - key = tournament_archery_livened_log - tags = { good } - score = 5 - character = root - } - } - stress_impact = { - craven = minor_stress_impact_gain - shy = minor_stress_impact_gain - humble = minor_stress_impact_gain - } - ai_chance = { - base = 30 - } - } - - # Try to fire an arrow blindfolded - option = { - name = ep2_tournament_events.6501.b - duel = { - skill = prowess - value = high_skill_rating - #You succeed! - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.6501.b.tt.win - left_icon = root - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - add_prestige = medium_prestige_value - - if = { - limit = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = bow - value = tournament_hastiludes_xp_gain_medium_value - } - } - } - - desc = ep2_tournament_events.6501.b.tt.win - - stress_impact = { - arrogant = minor_stress_impact_loss - shy = minor_stress_impact_gain - brave = miniscule_stress_impact_loss - stubborn = miniscule_stress_impact_loss - } - } - #You slip and fall - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - - send_interface_toast = { - title = ep2_tournament_events.6501.a.tt.lose - left_icon = root - - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - - add_prestige = minor_prestige_loss - } - - desc = ep2_tournament_events.6501.b.tt.lose - - stress_impact = { - arrogant = medium_stress_impact_gain - } - } - } - scope:activity = { - add_activity_log_entry = { - key = tournament_archery_livened_log - tags = { good } - score = 5 - character = root - } - } - ai_chance = { - base = 100 - } - } - - # Leave it - option = { - name = ep2_tournament_events.6501.c - stress_impact = { - stubborn = minor_stress_impact_gain - arrogant = minor_stress_impact_gain - ambitious = minor_stress_impact_gain - } - ai_chance = { - base = 100 - } - } -} - -# A competitor injures themself -# Joust -ep2_tournament_events.6502 = { - type = activity_event - title = ep2_tournament_events.6502.t - desc = ep2_tournament_events.6502.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = personality_honorable - } - right_portrait = { - character = scope:versus_contestant - animation = loss_1 - } - cooldown = { years = 1 } - - trigger = { - contest_versus_player_vs_ai_trigger = yes - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" - contest_versus_player_vs_ai_scope_effect = yes - tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 6502 } - random_court_position_holder = { - type = court_physician_court_position - save_scope_as = physician - } - scope:activity = { - add_activity_log_entry = { - key = tournament_joust_injury_log - tags = { bad } - score = 5 - character = scope:versus_contestant - } - } - } - - # Slyly delight in their fall and injure them further - option = { - name = ep2_tournament_events.6502.a - trigger = { - OR = { - has_trait = sadistic - has_trait = callous - } - } - - flavor = ep2_tournament_events.6502.a.tt - - activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - - scope:versus_contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - increase_wounds_no_death_effect = { REASON = wounds } - if = { - limit = { - NOT = { - has_trait = scarred - } - } - add_trait = scarred - } - add_trait_xp = { - trait = scarred - value = { - integer_range = { - min = 5 - max = 65 - } - } - } - } - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = hurt_opinion - opinion = -40 - } - - stress_impact = { - sadistic = miniscule_stress_impact_loss - callous = miniscule_stress_impact_loss - just = medium_stress_impact_gain - gregarious = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = just - has_trait = gregarious - } - } - } - } - - # Fetch your doctor - option = { - name = ep2_tournament_events.6502.b - - trigger = { - court_physician_available_trigger = yes - } - - add_prestige = minor_prestige_gain - - random_list = { - #Your physician does well - 2 = { - modifier = { - add = 5 - scope:physician = { - learning > average_skill_rating - } - } - modifier = { - add = 10 - scope:physician = { - learning > high_skill_rating - } - } - modifier = { - add = 10 - scope:physician = { - has_trait = lifestyle_herbalist - } - } - modifier = { - add = 20 - scope:physician = { - has_trait = lifestyle_physician - } - } - desc = ep2_tournament_events.6502.b.tt.success - - send_interface_toast = { - title = ep2_tournament_events.6502.b.tt.success - left_icon = root - right_icon = scope:versus_contestant - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = grateful_opinion - opinion = 30 - } - } - } - #Your physician doesn't do so hot - 10 = { - modifier = { - add = 5 - scope:physician = { - learning < average_skill_rating - } - } - modifier = { - add = 10 - scope:physician = { - learning < high_skill_rating - } - } - desc = ep2_tournament_events.6502.b.tt.failure - send_interface_toast = { - title = ep2_tournament_events.6502.b.tt.failure - left_icon = root - right_icon = scope:versus_contestant - - scope:competitor = { - if = { - limit = { - NOT = { - scope:versus_contestant = { - has_trait = scarred - } - } - } - add_trait = scarred - } - add_trait_xp = { - trait = scarred - value = { - integer_range = { - min = 5 - max = 25 - } - } - } - } - } - } - } - - scope:versus_contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - } - - reverse_add_opinion = { - target = scope:versus_contestant - modifier = grateful_opinion - opinion = 20 - } - - stress_impact = { - compassionate = miniscule_stress_impact_loss - generous = miniscule_stress_impact_loss - just = miniscule_stress_impact_loss - callous = minor_stress_impact_gain - arbitrary = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - - modifier = { - factor = 0 - OR = { - has_trait = callous - has_trait = arbitrary - } - } - } - } - - # Help them up - option = { - name = ep2_tournament_events.6502.c - - trigger = { - NOT = { - has_trait = callous - has_trait = sadistic - } - } - - scope:versus_contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - - increase_wounds_no_death_effect = { REASON = wounds } - } - - add_prestige = minor_prestige_gain - - stress_impact = { - compassionate = miniscule_stress_impact_loss - generous = miniscule_stress_impact_loss - just = miniscule_stress_impact_loss - arbitrary = minor_stress_impact_gain - callous = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - } - } - - # Shake your head and move on - option = { - name = ep2_tournament_events.6502.d - - scope:versus_contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - - increase_wounds_no_death_effect = { REASON = wounds } - - if = { - limit = { - NOT = { - has_trait = scarred - } - } - add_trait = scarred - } - add_trait_xp = { - trait = scarred - value = { - integer_range = { - min = 5 - max = 25 - } - } - } - } - - stress_impact = { - compassionate = minor_stress_impact_gain - } - - ai_chance = { - base = 100 - } - } -} - -# A wayward arrow hits a bystander -# Archery -ep2_tournament_events.6503 = { - type = activity_event - title = ep2_tournament_events.6503.t - desc = ep2_tournament_events.6503.desc - window = widget_activity_locale_fullscreen_event - theme = tournament_contest - left_portrait = { - character = root - animation = shock - } - right_portrait = { - character = scope:competitor1 - animation = shame - } - lower_right_portrait = { - character = scope:competitor2 - } - cooldown = { years = 1 } - - trigger = { - scope:activity = { - any_guest_subset_current_phase = { - count >= 2 - name = qualified - contest_event_general_contestant_valid_trigger = yes - } - } - } - - immediate = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_arrow_impact" - tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 6503 } - scope:activity = { - random_guest_subset_current_phase = { - name = qualified - limit = { contest_event_general_contestant_valid_trigger = yes } - save_scope_as = competitor1 - tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 6503 } - } - random_guest_subset_current_phase = { - name = qualified - limit = { - contest_event_general_contestant_valid_trigger = yes - this != scope:competitor1 - } - save_scope_as = competitor2 - tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 6503 } - } - } - scope:competitor2 = { - increase_wounds_no_death_effect = { - REASON = spectator_injured - } - } - scope:activity = { - add_activity_log_entry = { - key = tournament_wayward_arrow_log - tags = { bad } - score = 5 - character = scope:competitor2 - } - } - } - - # Heal the person - option = { - name = ep2_tournament_events.6503.a - trigger = { - has_trait = lifestyle_herbalist - } - reverse_add_opinion = { - target = scope:competitor2 - modifier = grateful_opinion - opinion = 40 - } - reverse_add_opinion = { - target = scope:competitor1 - modifier = relieved_opinion - opinion = 10 - } - scope:competitor2 = { - add_character_modifier = { - modifier = safe_wound_treatment_success_low_modifier - years = 2 - } - } - progress_towards_friend_effect = { - REASON = friend_treated_wounds - CHARACTER = scope:competitor2 - OPINION = 0 - } - stress_impact = { - base = miniscule_stress_impact_loss - arbitrary = minor_stress_impact_gain - callous = minor_stress_impact_gain - sadistic = minor_stress_impact_gain - } - ai_chance = { - base = 100 - } - } - - # Call for a medic - option = { - name = ep2_tournament_events.6503.b - remove_short_term_gold = minor_gold_value - reverse_add_opinion = { - target = scope:competitor2 - modifier = grateful_opinion - opinion = 40 - } - reverse_add_opinion = { - target = scope:competitor1 - modifier = relieved_opinion - opinion = 10 - } - scope:competitor2 = { - add_character_modifier = { - modifier = safe_wound_treatment_success_low_modifier - years = 2 - } - } - progress_towards_friend_effect = { - REASON = friend_treated_wounds - CHARACTER = scope:competitor2 - OPINION = 0 - } - stress_impact = { - base = miniscule_stress_impact_gain - greedy = minor_stress_impact_gain - callous = minor_stress_impact_gain - sadistic = minor_stress_impact_gain - } - ai_chance = { - base = 100 - modifier = { #More likely if you don't have a lot of gold - factor = 0 - gold < root.minor_gold_value - } - } - } - - # This isn't my concern - option = { - name = ep2_tournament_events.6503.c - scope:competitor1 = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } - } - scope:competitor2 = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } - - add_stress = minor_stress_gain - - progress_towards_rival_effect = { - REASON = rival_refused_to_help_wound - CHARACTER = scope:competitor1 - OPINION = default_rival_opinion - } - } - ai_chance = { - base = 100 - } - } -} +namespace = ep2_tournament_events + +################################################## +# DUEL +# 0001 - 0999 +# +# MELEE +# 1000 - 1499 +# +# ARCHERY +# 1500 - 1999 +# +# WRESTLING/FISTFIGHTING +# 2000 - 2999 +# +# QUINTAIN (Locale) +# 3500 - 3999 +# +# JOUST +# 4000 - 4499 +# +# RACE +# 4500 - 4999 +# +# RECITAL +# 5500 - 5999 +# +################################################## + +######################### +### SHARED EVENTS ### +######################### + +############## +### DUEL ### +############## + +# Opponent is limping... you think +ep2_tournament_events.0001 = { + type = activity_event + title = ep2_tournament_events.0001.t + desc = ep2_tournament_events.0001.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:versus_contestant + animation = pain + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" + contest_versus_player_vs_ai_scope_effect = yes + if = { + limit = { + scope:activity = { has_current_phase = tournament_phase_wrestling } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 0001 } + } + else_if = { + limit = { + scope:activity = { has_current_phase = tournament_phase_duel } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0001 } + } + } + + # Work it out via smarts + option = { + name = ep2_tournament_events.0001.a + trigger = { + OR = { + has_trait = intellect_good + has_trait = shrewd + } + } + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + custom_tooltip = ep2_tournament_events.0001.a.tt + + stress_impact = { + base = miniscule_stress_impact_loss + paranoid = minor_stress_impact_loss + trusting = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + # Go for their leg + option = { + name = ep2_tournament_events.0001.b + + duel = { + skills = { intrigue prowess } + target = scope:versus_contestant + #Your intuition was correct + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.0001.b.tt.win + left_icon = root + right_icon = scope:versus_contestant + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + + desc = ep2_tournament_events.0001.b.tt.win + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + + stress_impact = { + paranoid = minor_stress_impact_loss + trusting = minor_stress_impact_gain + } + } + #Your opponent was bluffing + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.0001.b.tt.lose + left_icon = root + right_icon = scope:versus_contestant + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + + desc = ep2_tournament_events.0001.b.tt.lose + + stress_impact = { + paranoid = minor_stress_impact_gain + trusting = minor_stress_impact_loss + } + } + } + + ai_chance = { + base = 100 + } + } + + # Ignore it + option = { + name = ep2_tournament_events.0001.c + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + stress_impact = { + paranoid = minor_stress_impact_gain + trusting = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } +} + +# Opponent plays to the crowd +ep2_tournament_events.0002 = { + type = activity_event + title = ep2_tournament_events.0002.t + desc = ep2_tournament_events.0002.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:versus_contestant + animation = throne_room_cheer_1 + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_positive_reaction" + contest_versus_player_vs_ai_scope_effect = yes + if = { + limit = { + scope:activity = { has_current_phase = tournament_phase_wrestling } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 0002 } + } + else_if = { + limit = { + scope:activity = { has_current_phase = tournament_phase_duel } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0002 } + } + } + + # I'll show you! + option = { + name = ep2_tournament_events.0002.a + trigger = { + OR = { + has_trait = physique_good + has_trait = strong + } + } + custom_tooltip = ep2_tournament_events.0002.a.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + add_prestige = minor_prestige_gain + + scope:activity = { + add_activity_log_entry = { + key = tournament_pose_off_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + base = minor_stress_impact_loss + arrogant = medium_stress_impact_loss + humble = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + # Demand they face you + option = { + name = ep2_tournament_events.0002.b + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + # Attack them from behind + option = { + name = ep2_tournament_events.0002.c + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + accolade_minimal_glory_loss_with_checks_effect = yes + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -30 + } + + stress_impact = { + craven = medium_stress_impact_loss + brave = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } +} + +scripted_trigger contest_versus_wants_to_resign_trigger = { + OR = { + dread_modified_ai_boldness = { + dreaded_character = root + value <= medium_negative_ai_value + } + AND = { + has_trait = wounded + has_trait = craven + } + AND = { + NOT = { has_trait = brave } + has_trait_rank = { + trait = wounded + rank >= 2 + } + } + } +} + +# Opponent wants to quit +ep2_tournament_events.0003 = { + type = activity_event + title = ep2_tournament_events.0003.t + desc = { + desc = ep2_tournament_events.0003.desc + first_valid = { + triggered_desc = { # Dread + trigger = { + scope:versus_contestant = { + has_dread_level_towards = { + target = root + level > 0 + } + } + } + desc = ep2_tournament_events.0003.desc.dread + } + triggered_desc = { #Wounded and Craven + trigger = { + scope:versus_contestant = { + has_trait = wounded + has_trait = craven + } + } + desc = ep2_tournament_events.0003.desc.craven + } + triggered_desc = { # Badly wounded, not brave + trigger = { + scope:versus_contestant = { + NOT = { has_trait = brave } + has_trait_rank = { + trait = wounded + rank >= 2 + } + } + } + desc = ep2_tournament_events.0003.desc.wounded + } + } + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + cooldown = { years = 1 } + + left_portrait = { + character = root + animation = personality_honorable + } + + right_portrait = { + character = scope:versus_contestant + animation = pain + } + + # Reasons for the opposition to quit: + # They dread you + # They have medium or high wounds and aren't brave + # They have any level of wounds and are craven + trigger = { + contest_versus_player_vs_ai_trigger = yes + trigger_if = { + limit = { this = scope:versus_matchee } + scope:versus_matcher = { contest_versus_wants_to_resign_trigger = yes } + } + trigger_else = { + scope:versus_matchee = { contest_versus_wants_to_resign_trigger = yes } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" + contest_versus_player_vs_ai_scope_effect = yes + if = { + limit = { + scope:activity = { has_current_phase = tournament_phase_wrestling } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 0003 } + } + else_if = { + limit = { + scope:activity = { has_current_phase = tournament_phase_duel } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0003 } + } + } + + # Mock their cowardice + option = { + name = ep2_tournament_events.0003.a + trigger = { + NOT = { has_trait = craven } + scope:versus_contestant = { has_trait = craven } + } + accolade_minimal_glory_loss_with_checks_effect = yes + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = tournament_mocked_opinion + opinion = -30 + } + + add_prestige = minor_prestige_gain + + scope:activity = { + add_activity_log_entry = { + key = tournament_mocked_cowardice_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + sadistic = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + # Understand their cowardice + option = { + name = ep2_tournament_events.0003.b + trigger = { + has_trait = craven + scope:versus_contestant = { has_trait = craven } + } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = grateful_opinion + opinion = 20 + } + + stress_impact = { + craven = medium_stress_impact_loss + arrogant = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + humble = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + # Acknowledge their wounds + option = { + name = ep2_tournament_events.0003.c + trigger = { + scope:versus_contestant = { + NOT = { has_trait = brave } + OR = { + has_trait = wounded_2 + has_trait = wounded_3 + } + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_wounded_quit_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = respect_opinion + opinion = 20 + } + + stress_impact = { + compassionate = minor_stress_impact_loss + sadistic = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + # Tell them never to challenge you again + option = { + name = ep2_tournament_events.0003.d + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -30 + } + + stress_impact = { + arrogant = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_mocked_cowardice_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = compassionate + has_trait = humble + } + } + } + } + + # Tell them they fought well + option = { + name = ep2_tournament_events.0003.e + accolade_minimal_glory_gain_with_checks_effect = yes + reverse_add_opinion = { + target = scope:versus_contestant + modifier = compliment_opinion + opinion = 20 + } + + stress_impact = { + arrogant = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + humble = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = arrogant + } + } + } + + after = { + tournament_contest_versus_resignation_effect = { RESIGNER = scope:versus_contestant CONTEST = wrestling SKILL = pugilism } + } +} + +# Sword flies into the crowd +ep2_tournament_events.0004 = { + type = activity_event + title = ep2_tournament_events.0004.t + desc = ep2_tournament_events.0004.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + cooldown = { years = 1 } + + left_portrait = { + character = root + animation = worry + } + + right_portrait = { + character = scope:versus_contestant + animation = shock + } + + lower_center_portrait = { + character = scope:watching_crowd + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + + scope:activity = { + any_guest_subset_current_phase = { + name = spectator + is_alive = yes + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0004 } + + scope:activity = { + random_guest_subset_current_phase = { + name = spectator + limit = { is_alive = yes } + save_scope_as = watching_crowd + } + } + + scope:watching_crowd = { + increase_wounds_no_death_effect = { REASON = death_spectator_injured } + + if = { + limit = { + NOT = { + has_trait = scarred + } + } + add_trait = scarred + } + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 5 + max = 25 + } + } + } + } + } + + # Blame your opponent + option = { + name = ep2_tournament_events.0004.a + + trigger = { + has_trait = deceitful + } + + scope:watching_crowd = { + add_opinion = { + target = scope:versus_contestant + modifier = hurt_opinion + opinion = -50 + } + } + + scope:versus_contestant = { + add_prestige = minor_prestige_loss + + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_failed_defuse_duel_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + sadistic = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = compassionate + has_trait = just + } + } + } + } + + # Apologise + option = { + name = ep2_tournament_events.0004.b + + duel = { + skill = diplomacy + value = high_skill_rating + 50 = { #They accept your apology + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.0004.b.success + + send_interface_toast = { + title = ep2_tournament_events.0004.b.success + left_icon = root + right_icon = scope:watching_crowd + + scope:watching_crowd = { + add_opinion = { + target = root + modifier = forgiven_opinion + opinion = 15 + } + } + } + + desc = ep2_tournament_events.1001.c.success + } + 50 = { #They don't accept the apology + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep2_tournament_events.0004.b.failure + + send_interface_toast = { + title = ep2_tournament_events.0004.b.failure + left_icon = root + right_icon = scope:watching_crowd + + scope:watching_crowd = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -35 + } + } + } + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_duel_apology_log + tags = { bad } + score = 5 + character = root + target = scope:watching_crowd + } + } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + honest = minor_stress_impact_loss + sadistic = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + deceitful = major_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = sadistic + has_trait = arbitrary + has_trait = deceitful + } + } + } + } + + # Take a swing at opponent whilst they're distracted + option = { + name = ep2_tournament_events.0004.c + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + accolade_minimal_glory_loss_with_checks_effect = yes + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -40 + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + craven = miniscule_stress_impact_loss + impatient = minor_stress_impact_loss + brave = medium_stress_impact_gain + patient = medium_stress_impact_gain + content = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = content + has_trait = patient + has_trait = brave + } + } + } + } +} + +# Kick opponent in the groin +ep2_tournament_events.0005 = { + type = activity_event + title = ep2_tournament_events.0005.t + desc = { + desc = ep2_tournament_events.0005.start + first_valid = { + triggered_desc = { + trigger = { + scope:versus_contestant = { is_eunuch_trigger = yes } + } + desc = ep2_tournament_events.0005.eunuch + } + triggered_desc = { + trigger = { + scope:versus_contestant = { is_eunuch_trigger = no } + } + desc = ep2_tournament_events.0005.pain + } + } + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + cooldown = { years = 1 } + + left_portrait = { + character = root + animation = worry + } + + right_portrait = { + character = scope:versus_contestant + triggered_animation = { # Normal + trigger = { + scope:versus_contestant = { is_eunuch_trigger = no } + } + animation = pain + } + triggered_animation = { # Unfettered by any weak spots. BUILT DIFFERENT. + trigger = { + scope:versus_contestant = { is_eunuch_trigger = yes } + } + animation = anger + } + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + weight_multiplier = { + base = 1 + modifier = { + OR = { + has_trait = just + has_trait = compassionate + has_trait = gallant + } + add = -0.5 + } + modifier = { + OR = { + has_trait = arbitrary + has_trait = sadistic + has_trait = ambitious + } + add = 0.5 + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0005 } + } + + # Follow up + option = { + name = ep2_tournament_events.0005.a + + trigger = { + scope:versus_contestant = { is_eunuch_trigger = no } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + accolade_minimal_glory_loss_with_checks_effect = yes + + add_prestige = minor_prestige_loss + + add_character_modifier = { + modifier = tournament_low_blower_modifier + years = 10 + } + + scope:versus_contestant = { + add_prestige = minor_prestige_loss + + add_opinion = { + target = root + modifier = angry_opinion + opinion = -50 + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + sadistic = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + gallant = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + } + } + } + + # Apologise + option = { + name = ep2_tournament_events.0005.b + + trigger = { + scope:versus_contestant = { is_eunuch_trigger = no } + } + + accolade_minimal_glory_gain_with_checks_effect = yes + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -20 + } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + honest = minor_stress_impact_loss + sadistic = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_vengefulness = -1 + } + } + } + + # Oh no, they're not susceptible to my secret technique! + option = { + name = ep2_tournament_events.0005.c + + trigger = { + scope:versus_contestant = { is_eunuch_trigger = yes } + } + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_miniscule } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = dismissive_opinion + opinion = -25 + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + craven = miniscule_stress_impact_loss + impatient = minor_stress_impact_loss + brave = medium_stress_impact_gain + patient = medium_stress_impact_gain + content = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + } + } + } +} + +# You have a chance to end them rightly +ep2_tournament_events.0006 = { + type = activity_event + title = ep2_tournament_events.0006.t + desc = ep2_tournament_events.0006.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + cooldown = { years = 1 } + + left_portrait = { + character = root + animation = scheme + } + + right_portrait = { + character = scope:versus_contestant + animation = worry + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_positive_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0006 } + } + + # End them rightly! + option = { + name = ep2_tournament_events.0006.a + + flavor = ep2_tournament_events.0006.a.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_miniscule } + + accolade_minimal_glory_gain_with_checks_effect = yes + + add_character_modifier = { + modifier = tournament_roguish_duelist_modifier + years = 25 + } + + scope:versus_contestant = { + send_interface_toast = { #Send an interface toast so it's not just completely random if it's not an AI + title = ep2_tournament_events.0006.a.toast + left_icon = scope:versus_contestant + right_icon = root + + add_prestige = medium_prestige_loss + + add_character_modifier = { + modifier = tournament_ended_rightly_modifier + years = 15 + } + } + + add_opinion = { + target = root + modifier = tournament_ended_rightly_opinion + opinion = -60 + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_ended_rightly_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + sadistic = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + deceitful = minor_stress_impact_loss + } + + ai_chance = { + base = 30 #Deliberately lowered to ensure we don't see too much of this + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + } + } + } + + # Just follow up normally + option = { + name = ep2_tournament_events.0006.b + + flavor = ep2_tournament_events.0006.b.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + stress_impact = { + just = miniscule_stress_impact_loss + arbitrary = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_vengefulness = -1 + } + } + } + + # Let them recover + option = { + name = ep2_tournament_events.0006.c + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_miniscule } + + accolade_minor_glory_gain_with_checks_effect = yes + + progress_towards_friend_effect = { + REASON = friend_duel_recovered + CHARACTER = scope:versus_contestant + OPINION = default_friend_opinion + } + + stress_impact = { + ambitious = medium_stress_impact_gain + craven = medium_stress_impact_gain + impatient = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + brave = miniscule_stress_impact_loss + patient = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + forgiving = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + } + } + } +} + +# Your opponent offers you money to take a dive +ep2_tournament_events.0007 = { + type = activity_event + title = ep2_tournament_events.0007.t + desc = ep2_tournament_events.0007.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + cooldown = { years = 1 } + + left_portrait = { + character = root + animation = worry + } + + right_portrait = { + character = scope:versus_contestant + animation = beg + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + trigger_if = { + limit = { this = scope:versus_matcher } + scope:versus_matchee.gold > 100 + } + trigger_else = { scope:versus_matcher.gold > 100 } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + contest_versus_player_vs_ai_scope_effect = yes + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0007 } + } + + # Accept + option = { + name = ep2_tournament_events.0007.a + + scope:versus_contestant = { + pay_short_term_gold = { + target = root + gold = { + value = scope:versus_contestant.major_gold_value + max = 100 + } + } + + add_opinion = { + target = root + modifier = relieved_opinion + opinion = 30 + } + } + + save_scope_as = resigner + tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = duel SKILL = foot } + + scope:activity = { + add_activity_log_entry = { + key = tournament_suspicious_loss_log + tags = { bad } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + greedy = minor_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_greed = 1 + } + } + } + + # Accept, but for a hook and half the gold + option = { + name = ep2_tournament_events.0007.b + + trigger = { + can_add_hook = { #Ensure they can be indebted to you + type = loyalty_hook + target = scope:versus_contestant + } + } + + add_hook = { + type = loyalty_hook + target = scope:versus_contestant + } + + save_scope_as = resigner + tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = duel SKILL = foot } + + scope:activity = { + add_activity_log_entry = { + key = tournament_suspicious_loss_log + tags = { bad } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + honest = medium_stress_impact_gain + greedy = minor_stress_impact_gain + deceitful = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_energy = 1 + } + } + } + + # Refuse + option = { + name = ep2_tournament_events.0007.c + + scope:versus_contestant = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + } + + stress_impact = { + arbitrary = medium_stress_impact_gain + just = miniscule_stress_impact_loss + greedy = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_vengefulness = -1 + } + } + } +} + +# You try to read your opponent's move +ep2_tournament_events.0010 = { + type = activity_event + title = ep2_tournament_events.0010.t + desc = ep2_tournament_events.0010.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + cooldown = { years = 1 } + + left_portrait = { + character = root + animation = marshal + } + + right_portrait = { + character = scope:versus_contestant + animation = sword_coup_degrace + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0010 } + } + + # Attempt a risky counter + option = { + name = ep2_tournament_events.0010.a + + duel = { + skills = { prowess intrigue } + target = scope:versus_contestant + 50 = { #You guess right + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.0010.a.success + + modifier = { + has_trait = lifestyle_blademaster + add = 10 + } + + modifier = { + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + add = 10 + } + + modifier = { + has_trait = shrewd + add = 2 + } + + send_interface_toast = { + title = ep2_tournament_events.0010.a.success + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = respect_opinion + opinion = 10 + } + } + min = 10 + } + 50 = { #You guess wrong + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep2_tournament_events.0010.a.failure + + modifier = { + scope:versus_contestant = { + has_trait = lifestyle_blademaster + } + add = 5 + } + + modifier = { + scope:versus_contestant = { + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + } + add = 5 + } + + send_interface_toast = { + title = ep2_tournament_events.0010.a.failure + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + increase_wounds_no_death_effect = { REASON = duel } + + if = { + limit = { + NOT = { + has_trait = scarred + } + } + add_trait = scarred + } + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 5 + max = 25 + } + } + } + } + min = 10 + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + impatient = miniscule_stress_impact_loss + patient = minor_stress_impact_gain + content = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 1 + } + } + } + + # Block it + option = { + name = ep2_tournament_events.0010.b + + duel = { + skills = { prowess martial } + target = scope:versus_contestant + 75 = { #It succeeds + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.0010.b.success + + modifier = { + has_trait = lifestyle_blademaster + add = 10 + } + + modifier = { + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + add = 10 + } + + send_interface_toast = { + title = ep2_tournament_events.0010.b.success + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = respect_opinion + opinion = 10 + } + } + min = 10 + } + 25 = { #It fails + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep2_tournament_events.0010.a.failure + + modifier = { + scope:versus_contestant = { + has_trait = lifestyle_blademaster + } + add = 7 + } + + modifier = { + scope:versus_contestant = { + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + } + add = 7 + } + + send_interface_toast = { + title = ep2_tournament_events.0010.a.failure + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + increase_wounds_no_death_effect = { REASON = duel } + } + min = 10 + } + } + + stress_impact = { + fickle = miniscule_stress_impact_loss + patient = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + stubborn = minor_stress_impact_gain + impatient = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = 0.5 + } + } + } + + # Sidestep the blow entirely + option = { + name = ep2_tournament_events.0010.c + + flavor = ep2_tournament_events.0010.c.tt + + accolade_minimal_glory_gain_with_checks_effect = yes + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_miniscule } + + stress_impact = { + brave = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + impatient = minor_stress_impact_gain + patient = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + craven = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = -1 + } + } + } +} + +# You attempt to fight with your other hand to surprise your opponent +ep2_tournament_events.0011 = { + type = activity_event + title = ep2_tournament_events.0011.t + desc = ep2_tournament_events.0011.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + cooldown = { years = 1 } + + left_portrait = { + character = root + animation = aggressive_sword + } + + right_portrait = { + character = scope:versus_contestant + animation = sword_coup_degrace + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + + NOT = { #For obvious reasons + has_trait = maimed + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_woosh" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0011 } + save_scope_value_as = { + name = weapon_range + value = { + integer_range = { + min = 1 + max = 15 + } + } + } + } + + # Pop it to your hand with the greatest of ease + option = { + name = ep2_tournament_events.0011.a + + trigger = { + OR = { + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + has_trait = lifestyle_blademaster + has_trait = education_martial_prowess + } + } + + flavor = ep2_tournament_events.0011.a.tt + + add_character_modifier = tournament_ambidextrous_modifier + + accolade_minor_glory_gain_with_checks_effect = yes + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + scope:activity = { + add_activity_log_entry = { + key = tournament_ambidextrous_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + base = minor_stress_impact_loss + deceitful = miniscule_stress_impact_loss + arrogant = miniscule_stress_impact_loss + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + # Attempt to throw your weapon to your other hand + option = { + name = ep2_tournament_events.0011.b + + trigger = { + NOR = { + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + has_trait = lifestyle_blademaster + has_trait = education_martial_prowess + } + } + + flavor = ep2_tournament_events.0011.b.tt + + duel = { + skills = { prowess intrigue } + target = scope:versus_contestant + + 50 = { #It succeeds + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.0011.b.success + + modifier = { + has_trait = athletic + add = 5 + } + + modifier = { + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 15 + } + } + add = 5 + } + min = 5 + + modifier = { + has_trait = education_martial_prowess + add = 15 + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_ambidextrous_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + send_interface_toast = { + title = ep2_tournament_events.0011.b.success + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + add_character_modifier = { + modifier = tournament_ambidextrous_modifier + years = 25 + } + } + } + 40 = { #It fails + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep2_tournament_events.0011.b.failure + + modifier = { + scope:versus_contestant = { + has_trait = lifestyle_blademaster + } + add = 7 + } + + modifier = { + scope:versus_contestant = { + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + } + add = 7 + } + min = 4 + + send_interface_toast = { + title = ep2_tournament_events.0011.b.failure + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + + 10 = { #It fails horrendously + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 1 + + desc = ep2_tournament_events.0011.b.criticalfailure + + scope:activity = { + add_activity_log_entry = { + key = tournament_ambisinister_log + tags = { bad } + score = 5 + character = root + target = scope:versus_contestant + } + } + + send_interface_toast = { + title = ep2_tournament_events.0011.b.criticalfailure + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + + add_character_modifier = { + modifier = tournament_ambisinister_modifier + years = 25 + } + + increase_wounds_no_death_effect = { REASON = duel } + + if = { + limit = { + NOT = { + has_trait = scarred + } + } + add_trait = scarred + } + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 5 + max = 25 + } + } + } + } + } + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + arrogant = miniscule_stress_impact_loss + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + # Attempt to fight on, using your sword with two hands + option = { + name = ep2_tournament_events.0011.c + + flavor = ep2_tournament_events.0011.c.tt + + random_list = { + 50 = { + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:weapon_range + } + + send_interface_toast = { + title = ep2_tournament_events.0011.c.success + left_icon = root + right_icon = scope:versus_contestant + + custom_tooltip = ep2_tournament_events.0011.c.opinion + + scope:activity = { + random_guest_subset_current_phase = { + name = spectator + limit = { is_alive = yes } + + hidden_effect = { + add_opinion = { + target = root + opinion = 5 + modifier = impressed_opinion + } + } + } + } + } + } + 50 = { + send_interface_toast = { + title = ep2_tournament_events.0011.c.failure + left_icon = root + right_icon = scope:versus_contestant + + increase_wounds_no_death_effect = { REASON = duel } + activity_tournament_change_contestant_score_effect = { SCORE = decrease_miniscule } + } + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + wrathful = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + content = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# GO GO GADGET DUELING CLOAK +# No but for real, it's taken from Di Grassi's manuals (yes, I know, slightly out of period, shhhh, rule of cool): +# "The cloak may be flung or thrown with the edge of the sword, when one standeth at the low ward, +# with the point of the sword turned backwards, on the left side and the left side with the cloak upon it, +# followed at large upon the arm up to the elbow: but not wrapped about it, and whilest he falseth a reverse, +# he may take the cloak on the edge of the sword and fling it towards his enemy, +# and then strike him with such a blow as shall be then most for his advantage deliver." +ep2_tournament_events.0012 = { + type = activity_event + title = ep2_tournament_events.0012.t + desc = ep2_tournament_events.0012.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + + left_portrait = { + character = root + animation = marshal + } + + right_portrait = { + character = scope:versus_contestant + animation = laugh + } + + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + + has_character_flag = cloak_duelist_flag #Ensure you are wearing your DUELING CLOAK + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0012 } + } + + # Proudly fight in the cloak + option = { + name = ep2_tournament_events.0012.a + + trigger = { + has_trait = arrogant + } + + if = { + limit = { + NOT = { + has_character_modifier = tournament_fashionable_duelist_modifier + } + } + add_character_modifier = { + modifier = tournament_fashionable_duelist_modifier + years = 20 + } + } + else = { + add_prestige = medium_prestige_gain + } + + accolade_medium_glory_gain_with_checks_effect = yes + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_miniscule } + + stress_impact = { + base = medium_stress_impact_loss + stubborn = miniscule_stress_impact_loss + fickle = minor_stress_impact_gain + } + + ai_chance = { + base = 75 + ai_value_modifier = { + ai_boldness = 1 + ai_vengefulness = 0.5 + } + } + } + + # Throw the cloak at your enemy + option = { + name = ep2_tournament_events.0012.b + + trigger = { + intrigue > 8 + } + show_as_unavailable = { + always = yes + } + + flavor = ep2_tournament_events.0012.b.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + scope:activity = { + add_activity_log_entry = { + key = tournament_dueling_cloak_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = 1 + } + } + } + + # Dis-cloak thyself + option = { + name = ep2_tournament_events.0012.c + + flavor = ep2_tournament_events.0012.c.tt + + stress_impact = { + ambitious = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + content = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 0.5 + } + } + } + + # Insist on wearing it + option = { + name = ep2_tournament_events.0012.d + + trigger = { + NOT = { + has_trait = arrogant + } + } + + if = { + limit = { + NOT = { + has_character_modifier = tournament_fashionable_duelist_modifier + } + } + add_character_modifier = { + modifier = tournament_fashionable_duelist_modifier + years = 10 + } + } + else = { + add_prestige = medium_prestige_gain + } + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + stress_impact = { + stubborn = miniscule_stress_impact_loss + fickle = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 1 + } + } + } + + after = { + remove_character_flag = cloak_duelist_flag + } +} + +# Try to distract your opponent with words +ep2_tournament_events.0020 = { + type = activity_event + title = ep2_tournament_events.0020.t + desc = { + desc = ep2_tournament_events.0020.desc + first_valid = { + triggered_desc = { + trigger = { + scope:secret = { + exists = this + } + } + desc = ep2_tournament_events.0020.secret + } + } + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:versus_contestant + animation = aggressive_sword + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0020 } + + scope:versus_contestant = { + random_secret = { + limit = { + is_known_by = root + } + save_scope_as = secret + } + } + } + + # Loudly reveal their secret + option = { + name = ep2_tournament_events.0020.a + + trigger = { + scope:secret = { + exists = this + } + OR = { + has_trait = sadistic + has_trait = callous + has_trait = arbitrary + } + } + + scope:secret = { + expose_secret = root + } + + scope:versus_contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + } + + accolade_minor_glory_loss_with_checks_effect = yes + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -50 + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_secret_exposed_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + sadistic = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + + modifier = { + factor = 0 + NOR = { + has_trait = compassionate + has_trait = just + } + } + } + } + + # I know your seeeecreeeet! + option = { + name = ep2_tournament_events.0020.b + + trigger = { + scope:secret = { + exists = this + } + } + + add_internal_flag = special + + scope:versus_contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + + accolade_minimal_glory_loss_with_checks_effect = yes + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -30 + } + + stress_impact = { + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + sadistic = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 2 + ai_boldness = 2 + ai_honor = -2 + ai_compassion = -2 + } + } + } + + # Try to distract them + option = { + name = ep2_tournament_events.0020.c + + duel = { + skill = diplomacy + value = high_skill_rating + 50 = { #They accept your apology + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.0020.c.success + + send_interface_toast = { + title = ep2_tournament_events.0020.c.success + left_icon = root + right_icon = scope:versus_contestant + + scope:versus_contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + } + } + 50 = { #They don't accept the apology + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep2_tournament_events.0020.c.failure + + send_interface_toast = { + title = ep2_tournament_events.0020.c.failure + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + } + } + + stress_impact = { + just = medium_stress_impact_gain + honest = minor_stress_impact_gain + arbitrary = miniscule_stress_impact_gain + deceitful = miniscule_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -1 + } + } + } + + # Decide against such underhanded tactics + option = { + name = ep2_tournament_events.0020.d + + accolade_minimal_glory_gain_with_checks_effect = yes + + stress_impact = { + just = miniscule_stress_impact_loss + honest = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 75 + ai_value_modifier = { + ai_boldness = -0.5 + ai_honor = 1 + } + } + } +} + +# Remind your opponent you slept with their family member +ep2_tournament_events.0021 = { + type = activity_event + title = ep2_tournament_events.0021.t + desc = ep2_tournament_events.0021.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:versus_contestant + animation = dismissal + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + trigger_if = { + limit = { this = scope:versus_matcher } + scope:versus_matchee = { + any_close_family_member = { + OR = { + has_relation_lover = root + has_relation_soulmate = root + is_spouse_of = root + } + } + } + } + trigger_else = { + scope:versus_matcher = { + any_close_family_member = { + OR = { + has_relation_lover = root + has_relation_soulmate = root + is_spouse_of = root + } + } + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = duel ID = 0021 } + + scope:versus_contestant = { + random_close_family_member = { + limit = { + OR = { + has_relation_lover = root + has_relation_soulmate = root + is_spouse_of = root + } + } + save_scope_as = family + } + } + } + + # CoD lobby trash talk, 2009 + option = { + name = ep2_tournament_events.0021.a + + trigger = { + OR = { + has_trait = sadistic + has_trait = arrogant + } + + NOR = { + has_trait = chaste + has_trait = celibate + } + } + + scope:versus_contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = absolutely_horrified_opinion + opinion = -60 + } + + reverse_add_opinion = { + target = scope:family + modifier = insulted_opinion + opinion = -20 + } + + stress_impact = { + base = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 2 + ai_boldness = 2 + ai_honor = -2 + ai_compassion = -2 + } + } + } + + # Thou hast undone our mother! + option = { + name = ep2_tournament_events.0021.b + + scope:versus_contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + + accolade_minimal_glory_gain_with_checks_effect = yes + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -40 + } + + stress_impact = { + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + sadistic = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 2 + ai_boldness = 2 + ai_honor = -2 + ai_compassion = -2 + } + } + } + + # Stay out of it + option = { + name = ep2_tournament_events.0021.c + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = -2 + ai_boldness = -2 + ai_honor = 2 + ai_compassion = 2 + } + } + } +} + +############### +### MELEE ### +############### + +# Melee spills over into nearby town +ep2_tournament_events.1001 = { + type = activity_event + title = ep2_tournament_events.1001.t + desc = ep2_tournament_events.1001.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = worry + } + cooldown = { years = 1 } + + trigger = { + NOT = { + has_variable = tournament_village_destroyed + } + OR = { + involved_activity.activity_location = { + has_holding_type = church_holding + barony = { + lessee = { + this != root #it's not you + is_ai = yes + is_adult = yes + } + } + } + scope:activity.activity_location.province_owner != root + } + } + + immediate = { + play_sound_effect = "event:/SFX/Ambience/3DMapEmitters/Nature/sfx_amb_3d_fire" + scope:activity.activity_location.province_owner = { save_scope_as = mayor } + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1001 } + } + + # Make everyone stop + option = { + name = ep2_tournament_events.1001.a + + trigger = { + has_trait = august + } + + add_prestige = medium_prestige_value + + stress_impact = { + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = craven + has_trait = content + has_trait = humble + } + } + } + } + + # Stubbornly refuse to leave + option = { + name = ep2_tournament_events.1001.b + + trigger = { + has_trait = stubborn + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + scope:activity.activity_location = { + add_province_modifier = { + modifier = village_destroyed_modifier + years = 10 + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_village_burned_log + tags = { bad } + score = 5 + character = root + } + } + + stress_impact = { + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = craven + has_trait = content + has_trait = humble + } + } + } + } + + # Attempt to call a truce + option = { + name = ep2_tournament_events.1001.c + + duel = { + skill = diplomacy + value = high_skill_rating + + 50 = { #The contestants acquiesce + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1001.c.success + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + add_prestige = minor_prestige_gain + } + + desc = ep2_tournament_events.1001.c.success + } + 50 = { #Nobody listens + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1001.c.success + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + add_prestige = minor_prestige_loss + } + + desc = ep2_tournament_events.1001.c.failure + + scope:activity = { + add_activity_log_entry = { + key = tournament_village_burned_log + tags = { bad } + score = 5 + character = root + } + } + + scope:activity.activity_location = { + add_province_modifier = { + modifier = village_destroyed_modifier + years = 10 + } + } + + set_variable = { + days = 150 #Want it to last the entire duration of a tournament + name = tournament_village_destroyed + } + } + } + + stress_impact = { + brave = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + # Leave + option = { + name = ep2_tournament_events.1001.d + + set_variable = { + days = 150 #Want it to last the entire duration of a tournament + name = tournament_village_destroyed + } + + scope:activity.activity_location = { + add_province_modifier = { + modifier = village_destroyed_modifier + years = 10 + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_village_burned_log + tags = { bad } + score = 5 + character = root + } + } + + stress_impact = { + craven = minor_stress_impact_loss + content = miniscule_stress_impact_loss + brave = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + + modifier = { + factor = 0 + NOR = { + has_trait = brave + has_trait = ambitious + has_trait = arrogant + } + } + } + } +} + +# Village mayor approaches you furiously +ep2_tournament_events.1002 = { + type = activity_event + title = ep2_tournament_events.1002.t + desc = ep2_tournament_events.1002.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:mayor + animation = anger + } + cooldown = { years = 1 } + + trigger = { + has_variable = tournament_village_destroyed # ensure village actually got ruined + scope:activity.activity_location.province_owner != root + } + + immediate = { + scope:activity.activity_location.province_owner = { save_scope_as = mayor } + scope:activity.activity_location = { save_scope_as = holding } + } + + # Offer to rebuild using your expertise + option = { + name = ep2_tournament_events.1002.a + + trigger = { + has_trait = architect + } + + reverse_add_opinion = { + target = scope:mayor + opinion = 20 + modifier = pleased_opinion + } + + if = { + limit = { + this != scope:host + } + reverse_add_opinion = { + target = scope:host + opinion = 20 + modifier = pleased_opinion + } + } + + scope:holding = { + remove_province_modifier = village_destroyed_modifier + add_province_modifier = { + modifier = village_rebuilt_modifier + years = 10 + } + } + + stress_impact = { + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = content + has_trait = humble + } + } + } + } + + # Intimidate the mayor + option = { + name = ep2_tournament_events.1002.b + + trigger = { + dread >= high_dread + } + + add_internal_flag = special + + reverse_add_opinion = { + target = scope:mayor + opinion = -30 + modifier = scared_opinion + } + + stress_impact = { + sadistic = minor_stress_impact_loss + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = content + has_trait = humble + has_trait = compassionate + } + } + } + } + + # Offer to pay for the damage + option = { + name = ep2_tournament_events.1002.c + + remove_short_term_gold = medium_gold_value + + scope:holding = { + remove_province_modifier = village_destroyed_modifier + } + + reverse_add_opinion = { + target = scope:mayor + opinion = 10 + modifier = kindness_opinion + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_village_paid_log + tags = { good } + score = 5 + character = root + target = scope:mayor + } + } + + stress_impact = { + greedy = major_stress_impact_gain + generous = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + # Send the mayor away + option = { + name = ep2_tournament_events.1002.d + + progress_towards_rival_effect = { + REASON = rival_melee_dismissed_mayor + CHARACTER = scope:mayor + OPINION = default_rival_opinion + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + humble = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } +} + +# Your weapon is knocked from your grasp; retrieve it or switch to a reserve? +ep2_tournament_events.1003 = { + type = activity_event + title = ep2_tournament_events.1003.t + desc = ep2_tournament_events.1003.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = shock + } + artifact = { + target = scope:tournament_weapon + position = lower_center_portrait + } + cooldown = { years = 1 } + + trigger = { + exists = var:contest_aptitude + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + this = root + } + any_guest_subset_current_phase = { # Just to make sure there's still some alive people + name = qualified + contest_event_general_contestant_valid_trigger = yes + } + } + any_character_artifact = { + is_equipped = yes + artifact_slot_type = primary_armament + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1003 } + random_character_artifact = { + limit = { + is_equipped = yes + artifact_slot_type = primary_armament + } + unequip_artifact_from_owner = yes + save_scope_as = tournament_weapon + } + + save_scope_value_as = { + name = weapon_range + value = { + integer_range = { + min = 0 + max = 5 + } + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + + # Dive for it + option = { + name = ep2_tournament_events.1003.a + + random_list = { + 10 = { #You successfully retrieve it + custom_tooltip = ep2_tournament_events.1003.a.tt.success + + modifier = { #Strong and Athletic are nice catch-all traits for having quick reflexes + add = 5 + + OR = { + has_trait = strong + has_trait = athletic + } + } + modifier = { #add a good physique too, for the same reasons + add = 2 + + has_trait = physique_good + } + + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:weapon_range + } + + send_interface_toast = { + title = ep2_tournament_events.1003.a.tt.success + left_icon = root + + scope:tournament_weapon = { + equip_artifact_to_owner = yes + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + + arrogant = miniscule_stress_impact_loss + content = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + } + + 10 = { #You have to go back later and find it + custom_tooltip = ep2_tournament_events.1003.a.tt.failure + + send_interface_toast = { + title = ep2_tournament_events.1003.a.tt.failure + left_icon = root + } + + stress_impact = { + base = miniscule_stress_impact_gain + + arrogant = minor_stress_impact_gain + content = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + } + } + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOT = { + has_trait = arrogant + } + } + } + } + + # Switch to a different weapon + option = { + name = ep2_tournament_events.1003.b + + flavor = ep2_tournament_events.1003.b.tt + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + stress_impact = { + arrogant = medium_stress_impact_gain + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { #Get out option + base = 100 + } + } +} + +# A comely [non-martial gender] has taken a wrong turn and ended up in the melee! +ep2_tournament_events.1004 = { + type = activity_event + title = ep2_tournament_events.1004.t + desc = ep2_tournament_events.1004.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:comely_stray + animation = worry + } + lower_center_portrait = { + character = scope:rescuer_knight + } + cooldown = { years = 1 } + + trigger = { + exists = var:contest_aptitude + scope:activity = { + any_attending_character = { + count < 240 #Max is 250 but attendance is open so leaving some space + } + any_guest_subset_current_phase = { + name = qualified + this = root + } + any_guest_subset_current_phase = { + name = qualified + contest_event_general_contestant_valid_trigger = yes + is_knight_of = root + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1004 } + create_character = { + template = beautiful_peasant_character + age = { age_compared_to_root_minus_ten_always_adult age_compared_to_root_plus_ten_always_adult } + gender_female_chance = root_attraction_based_female_chance + location = scope:activity.activity_location + faith = root.location.faith + culture = root.location.culture + save_scope_as = comely_stray + + } + scope:comely_stray = { + hidden_effect = { + add_to_activity = scope:activity + } + } + scope:activity = { + random_guest_subset_current_phase = { + name = qualified + limit = { + contest_event_general_contestant_valid_trigger = yes + is_knight_of = root + } + save_scope_as = rescuer_knight + } + } + } + + # Lustful/Seducer option that has you escort them completely off the field of battle + option = { + name = ep2_tournament_events.1004.a + + trigger = { + OR = { + has_trait = lustful + has_trait = seducer + } + might_cheat_on_every_partner_trigger = yes + } + + flavor = ep2_tournament_events.1004.a.tt + + accolade_minor_glory_gain_with_checks_effect = yes + + had_sex_with_effect = { + CHARACTER = scope:comely_stray + PREGNANCY_CHANCE = 50 + } + + if = { + limit = { + can_set_relation_lover_trigger = { CHARACTER = scope:comely_stray } + } + set_relation_lover = { + TARGET = scope:comely_stray + REASON = lover_saved_melee + } + } + + remove_variable = contest_aptitude + + scope:activity = { + add_activity_log_entry = { + key = tournament_seducer_log + tags = { good } + score = 5 + character = root + target = scope:comely_stray + + # Effect + custom_description = { + text = tournament_contest_withdraw_tt + subject = root + } + } + } + + stress_impact = { + base = minor_stress_impact_loss + chaste = massive_stress_impact_gain #technically possible if you're a Seducer + content = minor_stress_impact_gain + lazy = minor_stress_impact_gain + compassionate = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = brave + } + } + } + } + + # Well well, how would you like a dashing ladylord to sweep you off your feet? + option = { + name = ep2_tournament_events.1004.a # Same name as above to re-use loc + + trigger = { + NOR = { + has_trait = lustful + has_trait = seducer + } + } + + accolade_minimal_glory_gain_with_checks_effect = yes + + scope:comely_stray = { #Goodness, so dashing! + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 40 + } + } + + add_courtier = scope:comely_stray + + if = { + limit = { + can_start_scheme = { + type = seduce + target_character = scope:comely_stray + } + } + start_scheme = { + type = seduce + target_character = scope:comely_stray + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_swept_off_feet_log + tags = { good } + score = 5 + character = root + target = scope:comely_stray + } + } + + stress_impact = { + chaste = major_stress_impact_gain + content = minor_stress_impact_gain + lazy = minor_stress_impact_gain + compassionate = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = brave + } + } + } + } + + # Send a knight to rescue them + option = { + name = ep2_tournament_events.1004.c + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + scope:rescuer_knight = { + accolade_minor_glory_gain_with_checks_effect = yes + } + + scope:comely_stray = { + add_opinion = { + modifier = grateful_opinion + target = scope:rescuer_knight + opinion = 40 + } + } + + stress_impact = { + lustful = major_stress_impact_gain + arrogant = medium_stress_impact_gain + brave = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = lustful + } + } + } + } + + # They can fend for themselves + option = { + name = ep2_tournament_events.1004.d + + scope:comely_stray = { + add_opinion = { + modifier = cruelty_opinion + target = root + opinion = -30 + } + } + + random_list = { + 7 = { #They escape unharmed + desc = ep2_tournament_events.1004.d.escape.tt + + show_chance = no #Make it uncertain for all three + + send_interface_toast = { + title = ep2_tournament_events.1004.d.escape.tt + left_icon = root + right_icon = scope:comely_stray + } + } + + 5 = { #They get injured + desc = ep2_tournament_events.1004.d.injured.tt + + show_chance = no + + send_interface_toast = { + title = ep2_tournament_events.1004.d.injured.tt + left_icon = root + right_icon = scope:comely_stray + + scope:comely_stray = { + increase_wounds_effect = { REASON = battle } + + if = { + limit = { + NOT = { + has_trait = scarred + } + } + add_trait = scarred + } + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 35 + max = 100 + } + } + } + } + } + } + + 3 = { #They die + desc = ep2_tournament_events.1004.d.dead.tt + + show_chance = no + + scope:activity = { + add_activity_log_entry = { + key = tournament_melee_death_log + tags = { bad } + score = 5 + character = root + target = scope:comely_stray + } + } + + send_interface_toast = { + title = ep2_tournament_events.1004.d.dead.tt + left_icon = root + right_icon = scope:comely_stray + scope:comely_stray = { + death = { death_reason = death_wounds } + } + } + } + } + + stress_impact = { + lustful = major_stress_impact_gain + brave = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + lazy = minor_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = brave + has_trait = compassionate + } + } + } + } +} + +# Death Event: You step into a throat strike +ep2_tournament_events.1005 = { + type = activity_event + title = ep2_tournament_events.1005.t + desc = ep2_tournament_events.1005.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = poison + } + cooldown = { years = 1 } + + trigger = { + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + this = root + } + } + } + + # Chance to die + option = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + name = ep2_tournament_events.1005.a + duel = { + skill = prowess + value = root.contest_aptitude_fetch_value + 30 = { + desc = ep2_tournament_events.1005.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + scope:activity = { + add_activity_log_entry = { + key = tournament_accident_wounded_log + tags = { bad } + score = 5 + character = root + root = { + increase_wounds_no_death_effect = { REASON = fight } + } + } + } + } + 10 = { + desc = ep2_tournament_events.1005.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + scope:activity = { + add_activity_log_entry = { + key = tournament_melee_death_log + tags = { bad } + score = 10 + character = root + root = { + death = { + death_reason = death_tournament_melee_throat + } + } + } + } + } + } + ai_chance = { + base = 100 + } + } + # Yield + option = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + name = ep2_tournament_events.1005.b + + remove_variable = contest_aptitude + custom_tooltip = ep2_tournament_events.1005.resign + scope:activity = { + add_activity_log_entry = { + key = tournament_melee_wounded_log + tags = { bad } + score = 10 + character = root + root = { + add_trait = disfigured + } + remove_from_guest_subset = { + name = qualified + target = root + } + add_to_guest_subset = { + name = spectator + target = root + } + } + } + ai_chance = { + base = 100 + } + } +} + +# Ransom an opponent +ep2_tournament_events.1006 = { + type = activity_event + title = ep2_tournament_events.1006.t + desc = { + desc = ep2_tournament_events.1006.start + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_relation_rival = scope:surrendering_knight + has_relation_nemesis = scope:surrendering_knight + } + } + desc = ep2_tournament_events.1006.rival + } + triggered_desc = { + trigger = { + AND = { + NOR = { + has_relation_rival = scope:surrendering_knight + has_relation_nemesis = scope:surrendering_knight + } + scope:surrendering_knight.gold < 5 + } + } + desc = { + desc = ep2_tournament_events.1006.normal + desc = ep2_tournament_events.1006.broke + } + } + triggered_desc = { + trigger = { + NOR = { + has_relation_rival = scope:surrendering_knight + has_relation_nemesis = scope:surrendering_knight + } + } + desc = ep2_tournament_events.1006.normal + } + } + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = sword_coup_degrace + } + right_portrait = { + character = scope:surrendering_knight + animation = sword_yield_start + } + cooldown = { years = 1 } + + trigger = { + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + contest_event_general_contestant_valid_trigger = yes + root = this + } + any_guest_subset_current_phase = { + name = qualified + contest_event_general_contestant_valid_trigger = yes + is_ai = yes + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_positive_reaction" + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1006 } + scope:activity = { + random_guest_subset_current_phase = { + name = qualified + limit = { + contest_event_general_contestant_valid_trigger = yes + is_ai = yes + } + save_scope_as = surrendering_knight + } + } + + save_scope_value_as = { #Save their gold + name = surrendering_knight_gold + value = scope:surrendering_knight.gold + } + + save_scope_value_as = { #Save a fifth of their gold as a ransom + name = gold_percentage + value = { + value = scope:surrendering_knight.gold + multiply = 0.2 + } + } + + if = { + limit = { + scope:surrendering_knight ?= { + any_equipped_character_artifact = { + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_slot_type = helmet + } + } + } + } + scope:surrendering_knight = { + random_equipped_character_artifact = { + limit = { + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_slot_type = helmet + } + } + save_scope_as = artifact + } + } + } + else = { + create_artifact_brooch_effect = { + OWNER = scope:surrendering_knight + SMITH = scope:surrendering_knight + } + } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + + scope:surrendering_knight = { + accolade_medium_glory_loss_with_checks_effect = yes + } + } + + # Take their eye + option = { + name = ep2_tournament_events.1006.a + + trigger = { + OR = { + has_relation_rival = scope:surrendering_knight + has_relation_nemesis = scope:surrendering_knight + } + } + + add_internal_flag = special + + if = { + limit = { + scope:surrendering_knight = { + has_relation_nemesis = root + } + } + scope:surrendering_knight = { + add_trait = disfigured + } + } + else_if = { + limit = { + scope:surrendering_knight = { + has_relation_rival = root + } + } + scope:surrendering_knight = { + add_trait = one_eyed + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + compassionate = massive_stress_impact_gain + forgiving = massive_stress_impact_gain + vengeful = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + + ai_chance = { + base = 25 + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + # Take the ransom + option = { + name = ep2_tournament_events.1006.b + + trigger = { + scope:surrendering_knight.gold > 4 + } + + scope:surrendering_knight = { + pay_short_term_gold = { + target = root + gold = scope:gold_percentage + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_ransom_log + tags = { good } + score = 5 + character = root + target = scope:surrendering_knight + } + } + + stress_impact = { # Deliberately low; we want the player to pick this option the most + greedy = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + generous = miniscule_stress_impact_gain + arbitrary = miniscule_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = -0.5 + } + } + } + + # Take a piece of their armour/weaponry + option = { + name = ep2_tournament_events.1006.c + + trigger = { + exists = scope:artifact + } + + scope:artifact = { + set_owner = root + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_ransom_log + tags = { good } + score = 5 + character = root + target = scope:surrendering_knight + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = -0.5 + } + } + } + + # Take a tiny amount of gold + option = { + name = ep2_tournament_events.1006.d + + trigger = { + scope:surrendering_knight = { + any_equipped_character_artifact = { + count = 0 + } + gold < 4 + } + } + + scope:surrendering_knight = { + pay_short_term_gold = { + target = root + gold = 5 + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_ransom_log + tags = { good } + score = 5 + character = root + target = scope:surrendering_knight + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = -0.5 + } + } + } + + # Let them go free + option = { + name = ep2_tournament_events.1006.e + + add_prestige = 50 #Small bit of prestige for being gracious + + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:surrendering_knight + opinion = 25 + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + ai_vengefulness = -1 + } + } + } +} + +# You take a minute at a refuge +ep2_tournament_events.1007 = { + type = activity_event + title = ep2_tournament_events.1007.t + desc = ep2_tournament_events.1007.desc + theme = tournament_contest + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:teammate_1 + } + lower_right_portrait = { + character = scope:teammate_2 + } + lower_left_portrait = { + character = scope:teammate_3 + } + cooldown = { years = 1 } + + trigger = { + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + root = this + exists = var:progress_to_victory + } + #Ensure there are two teams with at least 3 people each + any_guest_subset_current_phase = { + name = team_alpha + contest_event_general_contestant_valid_trigger = yes + count >= 3 + } + any_guest_subset_current_phase = { + name = team_beta + contest_event_general_contestant_valid_trigger = yes + count >= 3 + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_trotting" + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1007 } + scope:activity = { + if = { # If you're in Team A, grab teammates + limit = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + } + random_guest_subset_current_phase = { + name = team_alpha + limit = { contest_event_general_contestant_valid_trigger = yes } + save_scope_as = teammate_1 + } + random_guest_subset_current_phase = { + name = team_alpha + limit = { + contest_event_general_contestant_valid_trigger = yes + this != scope:teammate_1 + } + save_scope_as = teammate_2 + } + random_guest_subset_current_phase = { + name = team_alpha + limit = { + contest_event_general_contestant_valid_trigger = yes + NOR = { + this = scope:teammate_1 + this = scope:teammate_2 + } + } + save_scope_as = teammate_3 + } + } + else = { # If you're in team B, grab those teammates + random_guest_subset_current_phase = { + name = team_beta + limit = { + contest_event_general_contestant_valid_trigger = yes + } + save_scope_as = teammate_1 + } + random_guest_subset_current_phase = { + name = team_beta + limit = { + contest_event_general_contestant_valid_trigger = yes + this != scope:teammate_1 + } + save_scope_as = teammate_2 + } + random_guest_subset_current_phase = { + name = team_beta + limit = { + contest_event_general_contestant_valid_trigger = yes + NOR = { + this = scope:teammate_1 + this = scope:teammate_2 + } + } + save_scope_as = teammate_3 + } + } + } + } + + # Pay for some food and drink + option = { + name = ep2_tournament_events.1007.a + + remove_short_term_gold = medium_gold_value + + random_list = { + 10 = { #You are all somewhat refreshed + desc = ep2_tournament_events.1007.a.tt.success + show_chance = no + + hidden_effect = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + scope:teammate_1 = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + scope:teammate_2 = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + scope:teammate_3 = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + } + + send_interface_toast = { + title = ep2_tournament_events.1007.a.tt.success + left_icon = root + + custom_tooltip = ep2_tournament_events.1007.a.result + } + } + 2 = { #It refreshes all of you a lot + desc = ep2_tournament_events.1007.a.tt.bigsuccess + show_chance = no + + hidden_effect = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + scope:teammate_1 = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + scope:teammate_2 = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + scope:teammate_3 = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + } + + send_interface_toast = { + title = ep2_tournament_events.1007.a.tt.bigsuccess + left_icon = root + + custom_tooltip = ep2_tournament_events.1007.a.bigresult + } + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_gain + gluttonous = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = greedy + has_trait = avaricious + } + } + } + } + + # Share some inspiring words + option = { + name = ep2_tournament_events.1007.b + + flavor = ep2_tournament_events.1007.b.tt + + duel = { + skill = diplomacy + value = decent_skill_rating + + 50 = { #You inspire your troops + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.1007.b.tt.success + + hidden_effect = { + scope:teammate_1 = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + scope:teammate_2 = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + scope:teammate_3 = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + } + + send_interface_toast = { + title = ep2_tournament_events.1007.b.tt.success + left_icon = root + + custom_tooltip = ep2_tournament_events.1007.b.result + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + 50 = { #You fail to make an impact + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep2_tournament_events.1007.b.tt.failure + + send_interface_toast = { + title = ep2_tournament_events.1007.b.tt.failure + left_icon = root + + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + shy = medium_stress_impact_gain + lazy = minor_stress_impact_gain + greedy = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = shy + } + } + } + + # Rest alone + option = { + name = ep2_tournament_events.1007.c + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + stress_impact = { + shy = minor_stress_impact_loss + lazy = miniscule_stress_impact_loss + greedy = miniscule_stress_impact_loss + gregarious = medium_stress_impact_gain + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = gregarious + } + } + } +} + +# You encounter a famous knight in the melee +ep2_tournament_events.1011 = { + type = activity_event + title = ep2_tournament_events.1011.t + desc = { + desc = ep2_tournament_events.1011.start + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + desc = ep2_tournament_events.1011.equal + } + triggered_desc = { + trigger = { + NOR = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + desc = ep2_tournament_events.1011.unequal + } + } + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:famous_knight + animation = sword_coup_degrace + } + cooldown = { years = 1 } + + trigger = { + exists = var:progress_to_victory_score + scope:activity = { + has_current_phase = tournament_phase_melee + OR = { + AND = { # If you're in Team A, they need to be in Team B + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + any_guest_subset_current_phase = { + name = team_beta + contest_event_general_contestant_valid_trigger = yes + has_trait = tourney_participant + is_healthy = yes + OR = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + } + AND = { # If you're in Team B, they need to be in Team A + any_guest_subset_current_phase = { + name = team_beta + this = root + } + any_guest_subset_current_phase = { + name = team_alpha + contest_event_general_contestant_valid_trigger = yes + has_trait = tourney_participant + is_healthy = yes + OR = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + } + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_neigh" + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1011 } + scope:activity = { + if = { + limit = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + } + random_guest_subset_current_phase = { + name = team_beta + limit = { + contest_event_general_contestant_valid_trigger = yes + has_trait = tourney_participant + is_healthy = yes + OR = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + save_scope_as = famous_knight + } + } + else = { + random_guest_subset_current_phase = { + name = team_alpha + limit = { + contest_event_general_contestant_valid_trigger = yes + has_trait = tourney_participant + is_healthy = yes + OR = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + save_scope_as = famous_knight + } + } + } + save_scope_value_as = { + name = fight_range + value = { + integer_range = { + min = 1 + max = 9 + } + } + } + } + + # Throw dirt to give you an advantage before your duel + option = { + name = ep2_tournament_events.1011.a + + flavor = ep2_tournament_events.1011.a.tt + + trigger = { + OR = { + intrigue > 20 + has_trait = deceitful + has_trait = arbitrary + } + } + + random_list = { + 75 = { #You win + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:fight_range + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 60 + } + add = 5 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 75 + } + add = 10 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 90 + } + add = 15 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 60 + } + add = 5 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 75 + } + add = 10 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 90 + } + add = 15 + } + desc = ep2_tournament_events.1011.a.success + send_interface_toast = { + title = ep2_tournament_events.1011.a.success + left_icon = root + right_icon = scope:famous_knight + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + 25 = { #You lose + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:fight_range + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 60 + } + } + add = 5 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 75 + } + } + add = 10 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 90 + } + } + add = 15 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 60 + } + } + add = 5 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 75 + } + } + add = 10 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 90 + } + } + add = 15 + } + desc = ep2_tournament_events.1011.a.failure + send_interface_toast = { + title = ep2_tournament_events.1011.a.failure + left_icon = root + right_icon = scope:famous_knight + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + } + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_dirt_thrown_log + tags = { good } + score = 5 + character = root + target = scope:famous_knight + } + } + + stress_impact = { + craven = minor_stress_impact_loss + deceitful = minor_stress_impact_loss + wrathful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + brave = minor_stress_impact_gain + just = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = just + } + } + } + } + + # Engage them head on + option = { + name = ep2_tournament_events.1011.b + + trigger = { + OR = { #You are skilful in your own right + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + + random_list = { + 50 = { #You win + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:fight_range + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 60 + } + add = 5 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 75 + } + add = 10 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 90 + } + add = 15 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 60 + } + add = 5 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 75 + } + add = 10 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 90 + } + add = 15 + } + desc = ep2_tournament_events.1011.a.success + send_interface_toast = { + title = ep2_tournament_events.1011.a.success + left_icon = root + right_icon = scope:famous_knight + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_medium_value + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + } + } + 50 = { #You lose + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 60 + } + } + add = 5 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 75 + } + } + add = 10 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 90 + } + } + add = 15 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 60 + } + } + add = 5 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 75 + } + } + add = 10 + } + modifier = { + scope:famous_knight = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 90 + } + } + add = 15 + } + desc = ep2_tournament_events.1011.a.failure + send_interface_toast = { + title = ep2_tournament_events.1011.a.failure + left_icon = root + right_icon = scope:famous_knight + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_dirt_thrown_log + tags = { good } + score = 5 + character = root + target = scope:famous_knight + } + } + + stress_impact = { + craven = medium_stress_impact_gain + wrathful = miniscule_stress_impact_loss + brave = minor_stress_impact_loss + just = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_vengefulness = 0.5 + } + } + } + + # Ignore their challenge and slip away + option = { + name = ep2_tournament_events.1011.c + + trigger = { + OR = { #You are skilful in your own right + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:famous_knight + opinion = -30 + } + + stress_impact = { + brave = major_stress_impact_gain + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + craven = medium_stress_impact_loss + content = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = brave + has_trait = arrogant + } + } + } + } + + # Try to fight them + option = { + name = ep2_tournament_events.1011.b #Re-use loc from above + + trigger = { + NOR = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + + random_list = { + 20 = { #You win + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:fight_range + } + modifier = { + has_trait = physique_good + add = 5 + } + modifier = { + has_trait = strong + add = 5 + } + modifier = { + has_trait = gallant + add = 5 + } + modifier = { + has_trait = lifestyle_blademaster + add = 10 + } + custom_tooltip = ep2_tournament_events.1011.a.success + send_interface_toast = { + title = ep2_tournament_events.1011.a.success + left_icon = root + right_icon = scope:famous_knight + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_medium_value + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + accolade_medium_glory_gain_with_checks_effect = yes + } + } + 80 = { #You lose + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:fight_range + } + custom_tooltip = ep2_tournament_events.1011.a.failure + send_interface_toast = { + title = ep2_tournament_events.1011.a.failure + left_icon = root + right_icon = scope:famous_knight + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + + scope:famous_knight = { + accolade_minor_glory_gain_with_checks_effect = yes + } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + } + + stress_impact = { + brave = medium_stress_impact_loss #In face of very unlikely odds! + ambitious = miniscule_stress_impact_loss + arrogant = miniscule_stress_impact_loss + craven = major_stress_impact_gain + humble = medium_stress_impact_gain + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_vengefulness = 0.5 + } + } + } + + # Try to escape + option = { + name = ep2_tournament_events.1011.c #Also re-using this + + trigger = { + NOR = { #You are skilful in your own right + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + } + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:famous_knight + opinion = -30 + } + + duel = { + skill = intrigue + target = scope:famous_knight + + 50 = { #You escape + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.1011.d.success + + send_interface_toast = { + title = ep2_tournament_events.1011.d.success + left_icon = root + right_icon = scope:famous_knight + + add_stress = medium_stress_loss + } + } + 50 = { #They catch you and smack you about + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.1011.d.failure + + send_interface_toast = { + title = ep2_tournament_events.1011.d.failure + left_icon = root + right_icon = scope:famous_knight + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + } + } + } + + stress_impact = { + brave = major_stress_impact_gain + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + craven = medium_stress_impact_loss + content = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = ambitious + has_trait = arrogant + } + } + } + } +} + +# You attempt to ambush an opponent in the trees +ep2_tournament_events.1012 = { + type = activity_event + title = ep2_tournament_events.1012.t + desc = ep2_tournament_events.1012.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:caught_opponent + animation = shock + } + cooldown = { years = 1 } + + trigger = { + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + this = root + } + any_guest_subset_current_phase = { + name = qualified + contest_event_general_contestant_valid_trigger = yes + } + } + scope:activity.activity_location = { #Ensure it's in a place where there could feasibly be some trees + NOR = { + terrain = desert + terrain = desert_mountains + terrain = drylands + terrain = floodplains + terrain = mountains + terrain = oasis + terrain = steppe + terrain = wetlands + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_wood_woosh" + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1012 } + scope:activity = { + if = { # If you're in Team A, grab opponent + limit = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + } + random_guest_subset_current_phase = { + name = team_beta + limit = { contest_event_general_contestant_valid_trigger = yes } + save_scope_as = caught_opponent + } + } + else = { # If you're in team B, grab that opponent + random_guest_subset_current_phase = { + name = team_alpha + limit = { + contest_event_general_contestant_valid_trigger = yes + } + save_scope_as = caught_opponent + } + } + } + } + + # You, a forest fighter, take huge advantage + option = { + name = ep2_tournament_events.1012.a + + trigger = { + OR = { + has_trait = forest_fighter + has_trait = jungle_stalker + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + scope:caught_opponent = { + pay_short_term_gold = { + target = root + gold = { + value = root.medium_gold_value + max = scope:caught_opponent.gold + } + } + } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_ambush_sprung_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + honest = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -1 + ai_vengefulness = 1 + } + } + } + + # You are an honorable knight, and offer them fair duel + option = { + name = ep2_tournament_events.1012.b + + trigger = { + OR = { + has_trait = gallant + has_trait = just + } + } + + duel = { + skill = prowess + target = scope:caught_opponent + + 50 = { #You win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 20 + } + add = 5 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 40 + } + add = 10 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 60 + } + add = 15 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 80 + } + add = 20 + } + desc = ep2_tournament_events.1012.b.success + send_interface_toast = { + title = ep2_tournament_events.1012.b.success + left_icon = root + right_icon = scope:caught_opponent + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + accolade_minor_glory_gain_with_checks_effect = yes + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + } + 50 = { #You lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + modifier = { + scope:caught_opponent = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 20 + } + } + add = 5 + } + modifier = { + scope:caught_opponent = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 40 + } + } + add = 10 + } + modifier = { + scope:caught_opponent = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 60 + } + } + add = 15 + } + modifier = { + scope:caught_opponent = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 80 + } + } + add = 20 + } + desc = ep2_tournament_events.1012.b.failure + send_interface_toast = { + title = ep2_tournament_events.1012.b.failure + left_icon = root + right_icon = scope:caught_opponent + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + scope:caught_opponent = { + accolade_minor_glory_gain_with_checks_effect = yes + } + } + } + } + + reverse_add_opinion = { + modifier = respect_opinion + target = scope:caught_opponent + opinion = 25 + } + + stress_impact = { + brave = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + honest = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + ai_boldness = 1 + } + } + } + + # You attempt an ambush + option = { + name = ep2_tournament_events.1012.c + + trigger = { + NOR = { + has_trait = forest_fighter + has_trait = jungle_stalker + } + } + + duel = { + skills = { martial intrigue } + target = scope:caught_opponent + + 60 = { #It works + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + modifier = { + has_trait = deceitful #Happy to do it! + add = 5 + } + modifier = { + has_trait = patient #Wait for the right time to strike + add = 5 + } + modifier = { + has_trait = lifestyle_hunter + add = 5 + } + modifier = { + has_trait = lifestyle_blademaster + add = 5 + } + modifier = { + has_trait = strategist + add = 5 + } + custom_tooltip = ep2_tournament_events.1012.c.success + scope:activity = { + add_activity_log_entry = { + key = tournament_ambush_sprung_log + tags = { good } + score = 5 + character = root + target = scope:caught_opponent + } + } + send_interface_toast = { + title = ep2_tournament_events.1012.c.success + left_icon = root + right_icon = scope:caught_opponent + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + scope:caught_opponent = { + pay_short_term_gold = { + target = root + gold = { + value = root.minor_gold_value + max = scope:caught_opponent.gold + } + } + } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + 40 = { #It doesn't work + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + modifier = { + has_trait = impatient + add = 5 + } + modifier = { + scope:caught_opponent = { + has_trait = strategist + } + add = 5 + } + modifier = { + scope:caught_opponent = { + has_trait = paranoid #Always watching out of the corner of their eye + } + add = 5 + } + custom_tooltip = ep2_tournament_events.1012.c.failure + send_interface_toast = { + title = ep2_tournament_events.1012.c.failure + left_icon = root + right_icon = scope:caught_opponent + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + pay_short_term_gold = { + target = scope:caught_opponent + gold = { + value = root.minor_gold_value + max = root.gold + } + } + } + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + honest = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -1 + ai_vengefulness = 1 + } + } + } + + # You let them go + option = { + name = ep2_tournament_events.1012.d + + stress_impact = { + brave = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + craven = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + honest = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# An opponent has fallen from their horse +ep2_tournament_events.1013 = { + type = activity_event + title = ep2_tournament_events.1013.t + desc = ep2_tournament_events.1013.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = jockey_lance_couched_gallop + } + right_portrait = { + character = scope:felled_participant + animation = pain + } + cooldown = { years = 1 } + + trigger = { + scope:activity = { #Ensure each team has at least one participant + any_guest_subset_current_phase = { + name = qualified + this = root + } + any_guest_subset_current_phase = { + name = team_alpha + contest_event_general_contestant_valid_trigger = yes + is_healthy = yes + } + any_guest_subset_current_phase = { + name = team_beta + contest_event_general_contestant_valid_trigger = yes + is_healthy = yes + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_neigh" + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1013 } + scope:activity = { + if = { #Ensure it picks an opponent + limit = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + } + random_guest_subset_current_phase = { + name = team_beta + limit = { + contest_event_general_contestant_valid_trigger = yes + is_healthy = yes + } + save_scope_as = felled_participant + } + } + else = { + random_guest_subset_current_phase = { + name = team_alpha + limit = { + contest_event_general_contestant_valid_trigger = yes + is_healthy = yes + } + save_scope_as = felled_participant + } + } + } + + scope:felled_participant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + } + + # You escort them out of the fray + option = { + name = ep2_tournament_events.1013.a + + trigger = { + OR = { + has_trait = gallant + has_trait = just + } + } + + scope:felled_participant = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 25 + } + } + + set_nickname_effect = { #To give you something roleplay-ish + NICKNAME = nick_the_honorable + } + + stress_impact = { + base = minor_stress_impact_loss + compassionate = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + } + } + + # You run them over + option = { + name = ep2_tournament_events.1013.b + + activity_tournament_change_contestant_score_effect = { SCORE = increase_miniscule } + + scope:felled_participant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + increase_wounds_no_death_effect = { REASON = battle } + + random = { + chance = 33 + if = { + limit = { + NOT = { + has_trait = scarred + } + } + add_trait = scarred + } + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 5 + max = 25 + } + } + } + } + + add_opinion = { + modifier = angry_opinion + target = root + opinion = -25 + } + } + + stress_impact = { + brave = minor_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + sadistic = miniscule_stress_impact_loss + craven = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + ai_compassion = -1 + } + } + } + + # You dismount to offer them fair duel + option = { + name = ep2_tournament_events.1013.c + + duel = { + skills = { prowess martial } + target = scope:felled_participant + + 50 = { #You win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 25 + } + add = 10 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + add = 20 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 75 + } + add = 30 + } + desc = ep2_tournament_events.1013.c.success + send_interface_toast = { + title = ep2_tournament_events.1013.c.success + left_icon = root + right_icon = scope:felled_participant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + scope:felled_participant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + 50 = { #You lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + modifier = { + scope:felled_participant = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 25 + } + } + add = 10 + } + modifier = { + scope:felled_participant = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 50 + } + } + add = 20 + } + modifier = { + scope:felled_participant = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 75 + } + } + add = 30 + } + desc = ep2_tournament_events.1013.c.failure + send_interface_toast = { + title = ep2_tournament_events.1013.c.failure + left_icon = root + right_icon = scope:felled_participant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + scope:felled_participant = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + } + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + craven = minor_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 1 + ai_boldness = 1 + } + } + } + + # You let them go + option = { + name = ep2_tournament_events.1013.d + + stress_impact = { + brave = miniscule_stress_impact_gain + sadistic = minor_stress_impact_gain + craven = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 0.5 + ai_boldness = -0.5 + } + } + } +} + +# A mysterious knight is doing incredibly well +ep2_tournament_events.1015 = { + type = activity_event + title = ep2_tournament_events.1015.t + desc = ep2_tournament_events.1015.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = shock + } + cooldown = { years = 1 } + + trigger = { + scope:activity = { + OR = { + AND = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + any_guest_subset_current_phase = { + name = team_alpha + contest_event_general_contestant_valid_trigger = yes + OR = { #Ensure it's someone meaningful to you + is_close_family_or_spouse_of_root_trigger = yes + has_relation_lover = root + has_relation_soulmate = root + has_character_modifier = ignores_gender_army_rules #In case Mulan ends up really good! + } + } + } + AND = { + any_guest_subset_current_phase = { + name = team_beta + this = root + } + any_guest_subset_current_phase = { + name = team_beta + contest_event_general_contestant_valid_trigger = yes + OR = { #Ensure it's someone meaningful to you + is_close_family_or_spouse_of_root_trigger = yes + has_relation_lover = root + has_relation_soulmate = root + has_character_modifier = ignores_gender_army_rules #In case Mulan ends up really good! + } + } + } + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1015 } + scope:activity = { + if = { #Ensure it picks a member of your team + limit = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + } + random_guest_subset_current_phase = { + name = team_alpha + limit = { + contest_event_general_contestant_valid_trigger = yes + OR = { + is_close_family_or_spouse_of_root_trigger = yes + has_relation_soulmate = root + has_relation_lover = root + has_character_modifier = ignores_gender_army_rules + } + } + save_scope_as = mysterious_knight + } + } + else = { + random_guest_subset_current_phase = { + name = team_beta + limit = { + contest_event_general_contestant_valid_trigger = yes + OR = { + is_close_family_or_spouse_of_root_trigger = yes + has_relation_soulmate = root + has_relation_lover = root + has_character_modifier = ignores_gender_army_rules + } + } + save_scope_as = mysterious_knight + } + } + } + + hidden_effect = { + scope:mysterious_knight = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + } + } + + save_scope_value_as = { #For the chase scene number fuzzying + name = chase_range + value = { + integer_range = { + min = 1 + max = 9 + } + } + } + } + + # Follow along behind them to clean up in their wake + option = { + name = ep2_tournament_events.1015.a + + trigger = { + intrigue >= 15 + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + add_gold = { minor_gold_value medium_gold_value } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + craven = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + brave = medium_stress_impact_gain + just = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = -1 + ai_compassion = -1 + } + } + } + + # You must know who it is! Chase after them! + option = { + name = ep2_tournament_events.1015.b + + random_list = { + 50 = { #You catch them + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:chase_range + } + modifier = { + has_trait = athletic + add = 10 + } + modifier = { + has_trait = stubborn + add = 5 + } + desc = ep2_tournament_events.1015.b.success + custom_tooltip = ep2_tournament_events.1015.b.success.tt + + trigger_event = ep2_tournament_events.1016 + } + 50 = { #They get away + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:chase_range + } + modifier = { + OR = { + has_trait = wheezing + has_trait = spindly + } + add = 10 + } + modifier = { + OR = { + has_trait = clubfooted + has_trait = dwarf + } + add = 10 + } + modifier = { + current_weight > 80 + add = 5 + } + modifier = { + scope:mysterious_knight = { + has_trait = athletic + } + add = 10 + } + desc = ep2_tournament_events.1015.b.failure + send_interface_toast = { + title = ep2_tournament_events.1015.b.failure + left_icon = root + right_icon = scope:caught_opponent + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_miniscule } + } + } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + lazy = medium_stress_impact_gain + fickle = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + # You let them go + option = { + name = ep2_tournament_events.1015.c + + stress_impact = { + diligent = minor_stress_impact_gain + stubborn = medium_stress_impact_gain + lazy = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + } + } + } +} + +# Followup to 1015: it's your (notable person!) +ep2_tournament_events.1016 = { + type = activity_event + title = ep2_tournament_events.1016.t + desc = { + desc = ep2_tournament_events.1016.start + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = knows_mulan_flag + scope:mysterious_knight = { + has_character_modifier = ignores_gender_army_rules + } + } + desc = ep2_tournament_events.1016.mulan + } + triggered_desc = { + trigger = { + NOT = { + has_character_flag = knows_mulan_flag + } + scope:mysterious_knight = { + has_character_modifier = ignores_gender_army_rules + } + } + desc = ep2_tournament_events.1016.mulanunknown + } + triggered_desc = { + trigger = { + scope:mysterious_knight = { + OR = { #Catchall for relations + is_close_family_or_spouse_of_root_trigger = yes + has_relation_lover = root + has_relation_soulmate = root + } + } + } + desc = ep2_tournament_events.1016.relation + } + } + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:mysterious_knight + animation = marshal + } + cooldown = { years = 1 } + + immediate = { + hidden_effect = { + if = { + limit = { + scope:mysterious_knight = { + NOT = { + has_trait = tourney_participant + } + } + } + add_trait = tourney_participant + } + + if = { #Give them a stealthy big boost, so in-universe they don't look weird + limit = { + scope:mysterious_knight = { + has_trait = tourney_participant + } + } + scope:mysterious_knight = { + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_major_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_major_value + } + } + } + else = { + scope:mysterious_knight = { + add_trait = tourney_participant + + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_major_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_major_value + } + } + } + } + save_scope_value_as = { #For the chase scene number fuzzying + name = ability_range + value = { + integer_range = { + min = 1 + max = 9 + } + } + } + } + + # Protect me! + option = { + name = ep2_tournament_events.1016.a + + add_character_modifier = { #Add a powerful but temporary modifier + modifier = tournament_melee_protector_modifier + years = 1 + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + paranoid = miniscule_stress_impact_loss + craven = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + brave = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + ai_rationality = 1 + } + } + } + + # You must teach me! + option = { + name = ep2_tournament_events.1016.b + + flavor = ep2_tournament_events.1016.b.tt + + random_list = { + 20 = { #You learn a lot + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:ability_range + } + modifier = { + learning > 10 + add = 10 + } + modifier = { + has_trait = shrewd + add = 5 + } + modifier = { + has_trait = lifestyle_blademaster + add = 5 + } + desc = ep2_tournament_events.1016.b.success + + send_interface_toast = { + title = ep2_tournament_events.1016.b.success + left_icon = root + right_icon = scope:mysterious_knight + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_major_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_major_value + } + } + else = { + add_trait = tourney_participant + + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_major_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_major_value + } + } + } + } + 80 = { #You learn a little + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:ability_range + } + desc = ep2_tournament_events.1016.b.failure + + send_interface_toast = { + title = ep2_tournament_events.1016.b.failure + left_icon = root + right_icon = scope:mysterious_knight + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + else = { + add_trait = tourney_participant + + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + } + + stress_impact = { + humble = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + arrogant = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 1 + } + } + } + + # I forbid this! + option = { + name = ep2_tournament_events.1016.c + + if = { #If you are their liege, demand they resign + limit = { + scope:mysterious_knight.liege = root + } + scope:mysterious_knight = { + if = { + limit = { exists = var:progress_to_victory } + remove_variable = progress_to_victory + } + if = { + limit = { exists = var:progress_to_victory_score } + remove_variable = progress_to_victory_score + } + if = { + limit = { exists = var:contest_aptitude } + remove_variable = contest_aptitude + } + } + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:mysterious_knight + opinion = -25 + } + + stress_impact = { + humble = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + fickle = medium_stress_impact_gain + callous = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + arrogant = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 1 + } + } + } +} + +# Cornered by three opposing knights +ep2_tournament_events.1017 = { + type = activity_event + title = ep2_tournament_events.1017.t + desc = ep2_tournament_events.1017.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = pain + } + right_portrait = { + character = scope:knight_1 + animation = sword_coup_degrace + } + lower_right_portrait = { + character = scope:knight_2 + } + lower_left_portrait = { + character = scope:knight_3 + } + cooldown = { years = 1 } + + trigger = { + scope:activity = { + OR = { + AND = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + any_guest_subset_current_phase = { + name = team_alpha + contest_event_general_contestant_valid_trigger = yes + this != root + } + } + AND = { + any_guest_subset_current_phase = { + name = team_beta + this = root + } + any_guest_subset_current_phase = { + name = team_beta + contest_event_general_contestant_valid_trigger = yes + this != root + } + } + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_woosh" + tournament_pivotal_flavor_variable_effect = { CONTEST = melee ID = 1017 } + scope:activity = { + if = { # If you're in Team A, grab opponents in B + limit = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + } + random_guest_subset_current_phase = { + name = team_beta + limit = { contest_event_general_contestant_valid_trigger = yes } + save_scope_as = knight_1 + } + random_guest_subset_current_phase = { + name = team_beta + limit = { + contest_event_general_contestant_valid_trigger = yes + this != scope:knight_1 + } + save_scope_as = knight_2 + } + random_guest_subset_current_phase = { + name = team_beta + limit = { + contest_event_general_contestant_valid_trigger = yes + NOR = { + this = scope:knight_1 + this = scope:knight_2 + } + } + save_scope_as = knight_3 + } + } + else = { # If you're in team B, grab opponents in A + random_guest_subset_current_phase = { + name = team_alpha + limit = { + contest_event_general_contestant_valid_trigger = yes + } + save_scope_as = knight_1 + } + random_guest_subset_current_phase = { + name = team_alpha + limit = { + contest_event_general_contestant_valid_trigger = yes + this != scope:knight_1 + } + save_scope_as = knight_2 + } + random_guest_subset_current_phase = { + name = team_alpha + limit = { + contest_event_general_contestant_valid_trigger = yes + NOR = { + this = scope:knight_1 + this = scope:knight_2 + } + } + save_scope_as = knight_3 + } + } + } + + save_scope_value_as = { #Combine the knights' prowess + name = knight_prowess + value = { + add = scope:knight_1.prowess + add = scope:knight_3.prowess + add = scope:knight_3.prowess + } + } + + save_scope_value_as = { #Simulate your backups' combined prowess + name = prowess_range + value = { + integer_range = { + min = 10 + max = 35 + } + } + } + } + + # Take them all on! + option = { + name = ep2_tournament_events.1017.a + + duel = { + skill = prowess + value = scope:knight_prowess + + # Success + 50 = { + desc = ep2_tournament_events.1017.a.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + + send_interface_toast = { + title = ep2_tournament_events.1017.a.success + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = increase_massive } + + add_prestige = 250 + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + } + # Failure + 50 = { + desc = ep2_tournament_events.1017.a.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + + send_interface_toast = { + title = ep2_tournament_events.1017.a.failure + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + increase_wounds_effect = { REASON = battle } + } + } + } + + stress_impact = { + ambitious = minor_stress_impact_loss + brave = minor_stress_impact_loss + stubborn = miniscule_stress_impact_loss + content = medium_stress_impact_gain + craven = medium_stress_impact_gain + fickle = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 0.5 + } + } + } + + # Call for backup + option = { + name = ep2_tournament_events.1017.b + + duel = { + skills = { prowess martial } + value = decent_skill_rating + + # Success + 50 = { + desc = ep2_tournament_events.1017.b.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1017.b.success + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + # Failure + 50 = { + desc = ep2_tournament_events.1017.b.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1017.b.failure + left_icon = root + + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + brave = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + content = miniscule_stress_impact_loss + craven = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = -0.5 + } + } + } +} + +scripted_trigger contest_house_united_trigger = { + contest_event_general_contestant_valid_trigger = yes + this != root + exists = house + house ?= { + this = root.house + any_house_member = { is_alive = yes } + } +} + +# You save a house member +ep2_tournament_events.1018 = { + type = activity_event + title = ep2_tournament_events.1018.t + desc = ep2_tournament_events.1018.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = jockey_gallop + } + right_portrait = { + character = scope:family + animation = admiration + } + cooldown = { years = 1 } + + trigger = { + exists = house + scope:activity = { + OR = { + AND = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + any_guest_subset_current_phase = { + name = team_alpha + contest_house_united_trigger = yes + } + } + AND = { + any_guest_subset_current_phase = { + name = team_beta + this = root + } + any_guest_subset_current_phase = { + name = team_beta + contest_house_united_trigger = yes + } + } + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_flyby" + scope:activity = { + if = { # If you're in Team A, grab teammate + limit = { + any_guest_subset_current_phase = { + name = team_alpha + this = root + } + } + random_guest_subset_current_phase = { + name = team_alpha + limit = { contest_house_united_trigger = yes } + save_scope_as = family + } + } + else = { # If you're in Team B, grab teammate + random_guest_subset_current_phase = { + name = team_beta + limit = { contest_house_united_trigger = yes } + save_scope_as = family + } + } + } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_ambush_sprung_log + tags = { good } + score = 5 + character = root + target = scope:family + } + } + } + + # House unity! + option = { + name = ep2_tournament_events.1018.a + + if = { + limit = { + house = { + NOT = { + has_house_modifier = tournament_house_unity_modifier + } + } + } + house = { + add_house_modifier = { + modifier = tournament_house_unity_modifier + years = 15 + desc = tournament_house_unity_modifier_desc + } + } + } + else = { + add_prestige = medium_prestige_value + } + + reverse_add_opinion = { + target = scope:family + opinion = 15 + modifier = respect_opinion + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + shy = miniscule_stress_impact_loss + content = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 25 #Deliberately low to keep the else from occurring too much for AI + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = 0.5 + } + } + } + + # Love u fam + option = { + name = ep2_tournament_events.1018.b + + if = { + limit = { + NOT = { #Ensure that you're not AI, to avoid massive proliferation of the Loyal trait + is_ai = yes + } + scope:family = { + is_ai = yes + NOR = { + has_trait = disloyal + has_trait = loyal + } + } + } + scope:family = { + add_trait = loyal + } + } + + if = { + limit = { + can_add_hook = { + type = loyalty_hook + target = scope:family + } + } + add_hook = { + type = loyalty_hook + target = scope:family + } + } + + reverse_add_opinion = { + target = scope:family + opinion = 15 + modifier = loyalty_opinion + } + + stress_impact = { + gregarious = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 1 + } + } + } +} + +################### +### ARCHERY ### +################### + +# Attempt to put off an opponent by coughing +ep2_tournament_events.1501 = { + type = activity_event + title = ep2_tournament_events.1501.t + desc = { + desc = ep2_tournament_events.1501.desc + first_valid = { + triggered_desc = { + trigger = { + scope:competitor = { + has_any_secrets = yes + } + intrigue > 10 + } + desc = ep2_tournament_events.1501.secret + } + } + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + scripted_animation = bow_closed + } + right_portrait = { + character = scope:competitor + scripted_animation = bow_drawn + } + cooldown = { years = 1 } + + trigger = { + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + is_alive = yes + is_ai = yes # To ensure we don't reveal player secrets + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_arrow_flyby" + tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 1501 } + scope:activity = { + random_guest_subset_current_phase = { + name = qualified + limit = { + is_alive = yes + is_ai = yes # To ensure we don't reveal player secrets + } + save_scope_as = competitor + } + } + + if = { + limit = { + scope:competitor = { + any_secret = { + OR = { + secret_type = secret_deviant + secret_type = secret_witch + secret_type = secret_murder + secret_type = secret_disputed_heritage + secret_type = secret_non_believer + secret_type = secret_cannibal + } + } + } + } + scope:competitor = { + random_secret = { + limit = { + OR = { + secret_type = secret_deviant + secret_type = secret_witch + secret_type = secret_murder + secret_type = secret_disputed_heritage + secret_type = secret_non_believer + secret_type = secret_cannibal + } + } + save_scope_as = competitor_secret + } + } + } + } + + # Spread a rumour amongst the crowd + option = { + name = ep2_tournament_events.1501.a + + trigger = { + exists = scope:competitor_secret + + intrigue > 10 # Ensure you have decent enough intrigue to do this + } + + flavor = ep2_tournament_events.1501.a.tt + + scope:competitor_secret = { + expose_secret = root + } + + scope:competitor = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_archery_rumour_log + tags = { good } + score = 5 + character = root + target = scope:competitor + } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + vengeful = miniscule_stress_impact_loss + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = just + has_trait = honest + has_trait = forgiving + } + } + } + } + + # Cough loudly + option = { + name = ep2_tournament_events.1501.b + + flavor = ep2_tournament_events.1501.b.tt + + add_prestige = -25 + + scope:competitor = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_archery_cough_log + tags = { good } + score = 5 + character = root + target = scope:competitor + } + } + + stress_impact = { + arbitrary = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + + ai_value_modifier = { + ai_boldness = 1 + ai_vengefulness = 1 + } + } + } + + # Stay silent + option = { + name = ep2_tournament_events.1501.c + + scope:competitor = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_miniscule } + } + + stress_impact = { + deceitful = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + just = miniscule_stress_impact_loss + honest = miniscule_stress_impact_loss + forgiving = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + + ai_value_modifier = { + ai_boldness = -1 + ai_vengefulness = -1 + } + } + } +} + +# It's a bit windy as you step up to shoot! +ep2_tournament_events.1502 = { + type = activity_event + title = ep2_tournament_events.1502.t + desc = ep2_tournament_events.1502.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + scripted_animation = bow_closed + } + cooldown = { years = 1 } + + trigger = { + is_in_guest_subset = { name = qualified } + scope:activity = { + any_guest_subset_current_phase = { #random qualified participant + name = qualified + contest_event_general_contestant_valid_trigger = yes + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_arrow_flyby" + tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 1502 } + scope:activity = { + random_guest_subset_current_phase = { + name = qualified + limit = { contest_event_general_contestant_valid_trigger = yes } + save_scope_as = contestant + } + } + } + + # Take the shot anyway, because you're an experienced marksman + option = { + name = ep2_tournament_events.1502.a + + trigger = { + OR = { #Make sure you're good at shooting a bow! + AND = { + has_trait = lifestyle_hunter + has_trait_xp = { + trait = lifestyle_hunter + track = hunter + value >= 50 + } + } + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 50 + } + } + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + add_prestige = medium_prestige_gain + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = bow + value = tournament_hastiludes_xp_gain_major_value + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + arrogant = miniscule_stress_impact_loss + content = minor_stress_impact_gain + lazy = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_honor = 1 + } + } + } + + # Try and pin it on someone else + option = { + name = ep2_tournament_events.1502.b + + flavor = ep2_tournament_events.1502.b.tt + + duel = { + skill = diplomacy + value = medium_skill_rating + # Success + 1 = { + desc = ep2_tournament_events.1502.b.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1502.b.success + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + scope:contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + # Failure + 1 = { + desc = ep2_tournament_events.1502.b.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1502.b.failure + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + content = minor_stress_impact_gain + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_honor = -1 + } + } + } + + # Have a go despite the wind + option = { + name = ep2_tournament_events.1502.c + + duel = { + skill = prowess + value = high_skill_rating + # Success + 1 = { + desc = ep2_tournament_events.1502.c.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1502.c.success + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = bow + value = tournament_hastiludes_xp_gain_major_value + } + } + } + } + # Failure + 1 = { + desc = ep2_tournament_events.1502.c.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1502.c.success + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + content = miniscule_stress_impact_loss + honest = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 1 + } + } + } +} + +# Bored waiting for your turn, try some mischief? +ep2_tournament_events.1503 = { + type = activity_event + title = ep2_tournament_events.1503.t + desc = ep2_tournament_events.1503.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = boredom + } + right_portrait = { + character = scope:contestant + scripted_animation = bow_closed + } + cooldown = { years = 1 } + + trigger = { + is_in_guest_subset = { name = qualified } + scope:activity = { + any_guest_subset_current_phase = { #random qualified participant + name = qualified + contest_event_general_contestant_valid_trigger = yes + NOT = { + any_secret = { + NOT = { is_known_by = root } + } + } + save_temporary_scope_as = participant_1 + } + any_guest_subset_current_phase = { #random qualified participant with a secret + name = qualified + this != scope:participant_1 + contest_event_general_contestant_valid_trigger = yes + # Won't reveal a secret to you which you already know. + any_secret = { + NOT = { is_known_by = root } + } + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_wood_woosh" + tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 1503 } + scope:activity = { + random_guest_subset_current_phase = { #random qualified participant + name = qualified + limit = { + contest_event_general_contestant_valid_trigger = yes + NOT = { + any_secret = { + NOT = { is_known_by = root } + } + } + } + save_scope_as = contestant + } + random_guest_subset_current_phase = { #random qualified participant with a secret + name = qualified + limit = { + contest_event_general_contestant_valid_trigger = yes + this != scope:contestant + # Won't reveal a secret to you which you already know. + any_secret = { + NOT = { is_known_by = root } + } + } + save_scope_as = secret_haver + random_secret = { + limit = { + NOT = { is_known_by = root } + } + save_scope_as = secret + } + } + } + } + + # Move the line back a few feet + option = { + name = ep2_tournament_events.1503.a + + flavor = ep2_tournament_events.1503.a.tt + + duel = { + skill = intrigue + target = scope:contestant + # Success + 1 = { + desc = ep2_tournament_events.1503.a.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1503.a.success + left_icon = root + right_icon = scope:contestant + + scope:contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + # Failure + 1 = { + desc = ep2_tournament_events.1503.a.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_cheating_caught_log + tags = { good } + score = 5 + character = root + target = scope:contestant + } + } + + send_interface_toast = { + title = ep2_tournament_events.1503.a.failure + left_icon = root + right_icon = scope:contestant + + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + content = minor_stress_impact_gain + just = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 0.5 + ai_honor = -1 + } + } + } + + # Go and talk to the crowd + option = { + name = ep2_tournament_events.1503.b + + flavor = ep2_tournament_events.1503.b.flavor + + # Success, find a secret + duel = { + skills = { diplomacy intrigue } + value = medium_skill_rating + # Find a + 1 = { + desc = ep2_tournament_events.1503.b.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + custom_tooltip = ep2_tournament_events.1503.b.tt + + hidden_effect = { #So at to hide the secret until toast pops + send_interface_toast = { + title = ep2_tournament_events.1503.b.success + left_icon = root + + scope:secret = { + reveal_to_without_events_effect = { + CHARACTER = root + } + } + } + } + } + # Failure, find nothing + 1 = { + desc = ep2_tournament_events.1503.b.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.1503.b.failure + left_icon = root + + add_stress = minor_stress_loss + } + } + } + + stress_impact = { + lazy = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + } + } + + # Bah, just wait it out + option = { + name = ep2_tournament_events.1503.c + + stress_impact = { + gregarious = miniscule_stress_impact_gain + deceitful = miniscule_stress_impact_gain + impatient = miniscule_stress_impact_gain + shy = miniscule_stress_impact_loss + honest = miniscule_stress_impact_loss + patient = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 1 + } + } + } +} + +################### +### WRESTLING ### +################### + +# You can use dirt to blind your opponent +ep2_tournament_events.2001 = { + type = activity_event + title = ep2_tournament_events.2001.t + desc = ep2_tournament_events.2001.desc + theme = tournament_contest + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = aggressive_unarmed + } + right_portrait = { + character = scope:versus_contestant + animation = rage + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2001 } + } + + # Throw dirt at them + option = { + name = ep2_tournament_events.2001.a + + custom_tooltip = ep2_tournament_events.2001.a.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + stress_impact = { + craven = medium_stress_impact_gain + brave = medium_stress_impact_loss + content = minor_stress_impact_gain + ambitious = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = craven + has_trait = content + has_trait = humble + } + } + } + } + + # Don't throw the dirt + option = { + name = ep2_tournament_events.2001.b + + duel = { + skill = prowess + target = scope:versus_contestant + + 40 = { #You fight your way out + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.2004.d.tt.success + + send_interface_toast = { + title = ep2_tournament_events.2004.d.tt.success + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + } + 60 = { #You struggle fruitlessly + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep2_tournament_events.2004.d.tt.failure + + send_interface_toast = { + title = ep2_tournament_events.2004.d.tt.failure + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + + stress_impact = { + craven = medium_stress_impact_loss + brave = medium_stress_impact_gain + content = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + humble = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = brave + has_trait = ambitious + has_trait = arrogant + } + } + } + } +} + +# You go for the ol' oil check +ep2_tournament_events.2002 = { + type = activity_event + title = ep2_tournament_events.2002.t + desc = ep2_tournament_events.2002.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = personality_dishonorable + } + right_portrait = { + character = scope:versus_contestant + animation = shock + } + cooldown = { years = 1 } + + trigger = { + NOT = { #Make sure player has two hands with which to fight + has_trait = maimed + } + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + contest_versus_player_vs_ai_scope_effect = yes + + save_scope_value_as = { + name = xp_range + value = { + integer_range = { + min = 1 + max = 5 + } + } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2002 } + } + + # Pokey poke + option = { + name = ep2_tournament_events.2002.a + + give_nickname = nick_the_dirty + + scope:versus_contestant = { + add_character_modifier = { + modifier = tournament_walking_funny_modifier + years = 3 + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + every_close_family_member = { + custom = ep2_tournament_events.2002.a.tt + add_opinion = { + target = root + opinion = -10 + modifier = disgusted_opinion + } + } + + stress_impact = { + honest = major_stress_impact_gain + just = major_stress_impact_gain + arbitrary = minor_stress_impact_loss + deceitful = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = honest + has_trait = just + } + } + } + } + + # I'd rather not + option = { + name = ep2_tournament_events.2002.b + + flavor = ep2_tournament_events.2002.b.tt + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + else = { + add_trait = tourney_participant + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + + stress_impact = { + honest = minor_stress_impact_loss + just = minor_stress_impact_loss + arbitrary = major_stress_impact_gain + deceitful = major_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = arbitrary + has_trait = deceitful + } + } + } + } +} + +# Your friend distracts the ref; use the chair? +ep2_tournament_events.2003 = { + type = activity_event + title = ep2_tournament_events.2003.t + desc = ep2_tournament_events.2003.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:versus_contestant + animation = worry + } + lower_left_portrait = { + character = scope:friend + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + scope:activity = { + any_attending_character = { + is_alive = yes + NOR = { + this = scope:versus_matchee + this = scope:versus_matcher + } + OR = { + has_relation_friend = root + has_relation_best_friend = root + } + } + } + } + + immediate = { + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2003 } + involved_activity = { + random_attending_character = { + limit = { + is_alive = yes + NOR = { + this = scope:versus_matchee + this = scope:versus_matcher + } + OR = { + has_relation_friend = root + has_relation_best_friend = root + } + } + save_scope_as = friend + } + } + save_scope_value_as = { + name = xp_range + value = { + integer_range = { + min = 1 + max = 5 + } + } + } + scope:activity = { + add_activity_log_entry = { + key = tournament_ref_distracted_log + tags = { good } + score = 5 + character = root + target = scope:friend + } + } + } + + # Viva la raza! + option = { + name = ep2_tournament_events.2003.a + + trigger = { + OR = { + has_trait = deceitful + has_trait = arbitrary + } + } + + custom_tooltip = ep2_tournament_events.2003.a.tt + + give_nickname = nick_the_cheater + + reverse_add_opinion = { + modifier = cheater_opinion + target = scope:versus_contestant + opinion = -40 + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + stress_impact = { + base = minor_stress_impact_loss + brave = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + just = major_stress_impact_gain + honest = major_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = just + has_trait = brave + has_trait = honest + } + } + } + } + + # Hit them with the chair + option = { + name = ep2_tournament_events.2003.b + + flavor = ep2_tournament_events.2003.b.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + + stress_impact = { + craven = medium_stress_impact_loss + brave = medium_stress_impact_gain + content = minor_stress_impact_gain + ambitious = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = brave + has_trait = content + } + } + } + } + + # Choose the honourable route + option = { + name = ep2_tournament_events.2003.c + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + else = { + add_trait = tourney_participant + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + compassionate = medium_stress_impact_loss + craven = medium_stress_impact_gain + brave = medium_stress_impact_loss + just = medium_stress_impact_loss + sadistic = medium_stress_impact_gain + callous = minor_stress_impact_gain + content = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = craven + has_trait = ambitious + } + } + } + } +} + +# Opponent has a high weight +ep2_tournament_events.2004 = { + type = activity_event + title = ep2_tournament_events.2004.t + desc = ep2_tournament_events.2004.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:versus_contestant + animation = personality_bold + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + trigger_if = { + limit = { this = scope:versus_matchee } + scope:versus_matcher = { current_weight >= 70 } + } + trigger_else = { + scope:versus_matchee = { current_weight >= 70 } + } + } + + immediate = { + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2004 } + } + + # Tire them out by moving them around + option = { + name = ep2_tournament_events.2004.a + + trigger = { + OR = { + has_trait = shrewd + has_trait = intellect_good + scope:versus_contestant = { + has_trait = wheezing + } + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + + ai_chance = { + base = 100 + } + } + + # Just pick them up lol + option = { + name = ep2_tournament_events.2004.b + + trigger = { + OR = { + has_trait = strong + has_trait = physique_good_1 + has_trait = physique_good_2 + has_trait = physique_good_3 + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + # Medieval sumo + option = { + name = ep2_tournament_events.2004.c + + trigger = { + current_weight > 50 + NOT = { + has_trait = strong + has_trait = physique_good + } + } + + add_internal_flag = special + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_sumo_wrestling_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + craven = minor_stress_impact_gain + brave = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + # Attempt to target their legs + option = { + name = ep2_tournament_events.2004.d + + duel = { + skill = prowess + target = scope:versus_contestant + + 50 = { #You wear them down + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.2004.d.tt.success + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + 50 = { #You fail to make an impact + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep2_tournament_events.2004.d.tt.failure + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + + ai_chance = { + base = 100 + } + } + + # Take them head-on + option = { + name = ep2_tournament_events.2004.e + + add_prestige = minor_prestige_gain + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + stress_impact = { + craven = minor_stress_impact_gain + brave = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = craven + } + } + } +} + +scripted_trigger suitably_amorous_opponent = { + is_physically_able_adult = yes + can_marry_trigger = yes + is_concubine = no + is_attracted_to_gender_of = root + NOT = { + has_trait = chaste + has_trait = celibate + } +} + +# You and your opponent end up in a rather amorous position +ep2_tournament_events.2005 = { + type = activity_event + title = ep2_tournament_events.2005.t + desc = ep2_tournament_events.2005.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = flirtation_left + } + right_portrait = { + character = scope:versus_contestant + animation = flirtation + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + scope:versus_matcher = { + is_attracted_to_gender_of = scope:versus_matchee + might_cheat_on_every_partner_trigger = yes + } + scope:versus_matchee = { + is_attracted_to_gender_of = scope:versus_matcher + might_cheat_on_every_partner_trigger = yes + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2005 } + } + + # Give 'em a good tumble + option = { + name = ep2_tournament_events.2005.a + trigger = { + OR = { + has_trait = rakish + has_trait = seducer + has_trait = lustful + } + NOT = { + has_trait = chaste + } + } + + had_sex_with_effect = { + CHARACTER = scope:versus_contestant + PREGNANCY_CHANCE = 50 + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + stress_impact = { + base = minor_stress_impact_loss + } + + tournament_contest_versus_resignation_effect = { RESIGNER = scope:versus_contestant CONTEST = wrestling SKILL = pugilism } + + ai_chance = { + base = 100 + } + } + + # See if they're interested + option = { + name = ep2_tournament_events.2005.b + + trigger = { + NOR = { + has_trait = rakish + has_trait = seducer + has_trait = lustful + } + } + + random_list = { + 5 = { #They are amenable to your advances + custom_tooltip = ep2_tournament_events.2005.b.tt.success + + had_sex_with_effect = { + CHARACTER = scope:versus_contestant + PREGNANCY_CHANCE = 50 + } + + modifier = { + add = 5 + scope:versus_contestant = { + has_trait = lustful + } + } + modifier = { + add = 5 + scope:versus_contestant = { + has_trait = seducer + } + } + modifier = { + add = 5 + scope:versus_contestant = { + has_trait = rakish + } + } + modifier = { + add = 1 + scope:versus_contestant = { + trait_compatibility = { + target = root + value >= medium_positive_trait_compatibility + } + } + } + modifier = { + add = -100 + scope:versus_contestant = { + has_trait = celibate + } + } + + send_interface_toast = { + title = ep2_tournament_events.2005.b.tt.success + left_icon = root + right_icon = scope:versus_contestant + } + + stress_impact = { + base = minor_stress_impact_loss + lustful = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + rakish = minor_stress_impact_loss + seducer = minor_stress_impact_loss + } + + tournament_contest_versus_resignation_effect = { RESIGNER = scope:versus_contestant CONTEST = wrestling SKILL = pugilism } + } + + 6 = { #They are flattered but decline + custom_tooltip = ep2_tournament_events.2005.b.tt.failure + modifier = { + add = 5 + scope:versus_contestant = { + trait_compatibility = { + target = root + value >= medium_positive_trait_compatibility + } + } + } + modifier = { + add = 5 + scope:versus_contestant = { + has_trait = celibate + } + } + + send_interface_toast = { + title = ep2_tournament_events.2005.b.tt.failure + left_icon = root + right_icon = scope:versus_contestant + } + + stress_impact = { + lustful = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + + 4 = { #They are horrified and angry + custom_tooltip = ep2_tournament_events.2005.b.tt.criticalfailure + modifier = { + add = 5 + scope:versus_contestant = { + has_trait = chaste + } + } + modifier = { + add = 5 + scope:versus_contestant = { + has_trait = celibate + } + } + + send_interface_toast = { + title = ep2_tournament_events.2005.b.tt.criticalfailure + left_icon = root + right_icon = scope:versus_contestant + } + + stress_impact = { + base = minor_stress_impact_gain + lustful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + } + } + + stress_impact = { + chaste = major_stress_impact_gain + celibate = massive_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = celibate + has_trait = chaste + } + } + } + } + + # Take advantage to win the contest + option = { + name = ep2_tournament_events.2005.c + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + stress_impact = { + just = medium_stress_impact_gain + deceitful = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = just + } + } + } +} + +# Death Event: Your opponent piledrivers you on to your head +ep2_tournament_events.2006 = { + type = activity_event + title = ep2_tournament_events.2006.t + desc = ep2_tournament_events.2006.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:versus_contestant + animation = rage + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2006 } + } + + # Chance to die + option = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + name = ep2_tournament_events.1005.a + duel = { + skill = prowess + value = root.contest_aptitude_fetch_value + 30 = { + desc = ep2_tournament_events.1005.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + scope:activity = { + add_activity_log_entry = { + key = tournament_accident_wounded_log + tags = { bad } + score = 5 + character = root + root = { + increase_wounds_no_death_effect = { REASON = fight } + } + } + } + } + 10 = { + desc = ep2_tournament_events.1005.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + scope:activity = { + add_activity_log_entry = { + key = tournament_wrestling_death_log + tags = { bad } + score = 10 + character = root + root = { + death = { + death_reason = death_tournament_piledriver + } + } + } + } + } + } + ai_chance = { + base = 100 + } + } + # Yield + option = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + name = ep2_tournament_events.1005.b + + remove_variable = contest_aptitude + custom_tooltip = ep2_tournament_events.1005.resign + scope:activity = { + add_activity_log_entry = { + key = tournament_melee_wounded_log + tags = { bad } + score = 10 + character = root + root = { + add_trait = disfigured + } + hidden_effect = { + tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = wrestling SKILL = pugilism } + } + } + } + ai_chance = { + base = 100 + } + } +} + +# A person storms the ring to protest a decision in your favour +ep2_tournament_events.2007 = { + type = activity_event + title = ep2_tournament_events.2007.t + desc = ep2_tournament_events.2007.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:versus_contestant + animation = worry + } + lower_right_portrait = { + character = scope:opponent_friend + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + scope:activity = { + any_attending_character = { + is_alive = yes + is_adult = yes + NOR = { + this = scope:versus_matchee + this = scope:versus_matcher + } + trigger_if = { + limit = { root = scope:versus_matchee } + has_relation_friend = scope:versus_matcher + } + trigger_else = { has_relation_friend = scope:versus_matchee } + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" + contest_versus_player_vs_ai_scope_effect = yes + + scope:activity = { + random_guest_subset_current_phase = { + name = spectator + limit = { + is_alive = yes + is_adult = yes + NOR = { + this = scope:versus_matchee + this = scope:versus_matcher + } + trigger_if = { + limit = { root = scope:versus_matchee } + has_relation_friend = scope:versus_matcher + } + trigger_else = { has_relation_friend = scope:versus_matchee } + } + save_scope_as = opponent_friend + } + } + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + scope:activity = { + add_activity_log_entry = { + key = tournament_ring_stormed_log + tags = { good } + score = 5 + character = root + target = scope:opponent_friend + } + } + } + + # Guards! Have this miscreant removed! + option = { + name = ep2_tournament_events.2007.a + + add_prestige = -50 + + progress_towards_rival_effect = { + REASON = rival_wrestling_liar + CHARACTER = scope:opponent_friend + OPINION = 0 + } + + stress_impact = { + wrathful = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + calm = medium_stress_impact_gain + content = medium_stress_impact_gain + honest = major_stress_impact_gain + just = major_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = just + has_trait = honest + } + } + } + } + + # Argue with them + option = { + name = ep2_tournament_events.2007.b + + duel = { + skill = diplomacy + target = scope:opponent_friend + #You win the debate + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_tournament_events.2007.b.tt.success + + send_interface_toast = { + title = ep2_tournament_events.2007.b.tt.success + left_icon = root + right_icon = scope:opponent_friend + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + } + #They win the debate + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_tournament_events.2007.b.tt.failure + + send_interface_toast = { + title = ep2_tournament_events.2007.b.tt.failure + left_icon = root + right_icon = scope:opponent_friend + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + + stress_impact = { + stubborn = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + fickle = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + NOR = { + has_trait = fickle + has_trait = lazy + } + } + } + } + + # Admit it, gain nickname + option = { + name = ep2_tournament_events.2007.c + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + give_nickname = nick_the_honest + + add_prestige = medium_prestige_value + + reverse_add_opinion = { + modifier = impressed_opinion + target = scope:opponent_friend + opinion = 20 + } + + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:versus_contestant + opinion = 20 + } + + stress_impact = { + honest = minor_stress_impact_loss + just = minor_stress_impact_loss + arbitrary = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + ai_vengefulness = -0.5 + } + } + } +} + +# What part of your opponent's body do you focus on? +ep2_tournament_events.2501 = { + type = activity_event + title = ep2_tournament_events.2501.t + desc = ep2_tournament_events.2501.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:versus_contestant + animation = throne_room_cheer_1 + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2501 } + } + + # Aim for the head + option = { + name = ep2_tournament_events.2501.a + random_list = { + 5 = { #You knock them out! + custom_tooltip = ep2_tournament_events.2501.a.tt.criticalsuccess + modifier = { + add = 5 + prowess > high_skill_rating + } + modifier = { + add = -5 + prowess < low_skill_rating + } + + send_interface_toast = { + title = ep2_tournament_events.2501.a.tt.criticalsuccess + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + add_prestige = minor_prestige_gain + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + } + 20 = { #It works reasonably well + custom_tooltip = ep2_tournament_events.2501.a.tt.success + modifier = { + add = 10 + prowess > high_skill_rating + } + + send_interface_toast = { + title = ep2_tournament_events.2501.a.tt.success + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + 20 = { #Your opponent sees it coming + custom_tooltip = ep2_tournament_events.2501.a.tt.failure + + send_interface_toast = { + title = ep2_tournament_events.2501.a.tt.failure + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + ai_chance = { + base = 100 + } + } + + # Aim for the body + option = { + name = ep2_tournament_events.2501.b + random_list = { + 10 = { #It works well + custom_tooltip = ep2_tournament_events.2501.a.tt.criticalsuccess + modifier = { + add = 5 + prowess > high_skill_rating + } + add_prestige = minor_prestige_gain + + send_interface_toast = { + title = ep2_tournament_events.2501.a.tt.criticalsuccess + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + 10 = { #It works reasonably well + custom_tooltip = ep2_tournament_events.2501.a.tt.success + modifier = { + add = 10 + prowess > high_skill_rating + } + + send_interface_toast = { + title = ep2_tournament_events.2501.a.tt.success + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + } + 10 = { #Your opponent sees it coming + custom_tooltip = ep2_tournament_events.2501.a.tt.failure + modifier = { + add = 10 + prowess < low_skill_rating + } + + send_interface_toast = { + title = ep2_tournament_events.2501.a.tt.failure + left_icon = root + right_icon = scope:versus_contestant + + add_prestige = minor_prestige_loss + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + } + } + ai_chance = { + base = 100 + } + } + + # Attack their legs + option = { + name = ep2_tournament_events.2501.c + random_list = { + 1 = { #It works well + custom_tooltip = ep2_tournament_events.2501.a.tt.criticalsuccess + modifier = { + add = -5 + prowess < low_skill_rating + } + add_prestige = minor_prestige_gain + + send_interface_toast = { + title = ep2_tournament_events.2501.a.tt.criticalsuccess + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + } + } + 30 = { #It works reasonably well + custom_tooltip = ep2_tournament_events.2501.a.tt.success + + modifier = { + add = 10 + prowess > high_skill_rating + } + + send_interface_toast = { + title = ep2_tournament_events.2501.a.tt.success + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + } + 5 = { #Your opponent sees it coming + + custom_tooltip = ep2_tournament_events.2501.a.tt.failure + modifier = { + add = 10 + prowess < low_skill_rating + } + + + send_interface_toast = { + title = ep2_tournament_events.2501.a.tt.failure + left_icon = root + right_icon = scope:versus_contestant + + add_prestige = minor_prestige_loss + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + } + } + + ai_chance = { + base = 100 + } + } +} + +# Your finger pops out of its socket! +ep2_tournament_events.2502 = { + type = activity_event + title = ep2_tournament_events.2502.t + desc = ep2_tournament_events.2502.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = pain + } + right_portrait = { + character = scope:versus_contestant + animation = personality_dishonorable + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2502 } + } + + # Try and pop it back in + option = { + name = ep2_tournament_events.2502.a + custom_tooltip = ep2_tournament_events.2502.a.tt + random_list = { + 5 = { #It works + desc = ep2_tournament_events.2502.a.tt.success + modifier = { + add = 30 + has_trait = lifestyle_physician + } + modifier = { + add = 10 + has_trait = lifestyle_herbalist + } + + send_interface_toast = { + title = ep2_tournament_events.2502.a.tt.success + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + add_prestige = minor_prestige_gain + } + } + 20 = { #It doesn't work + desc = ep2_tournament_events.2502.a.tt.failure + modifier = { + add = 10 + has_trait = physique_bad + } + + send_interface_toast = { + title = ep2_tournament_events.2502.a.tt.failure + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + add_character_modifier = { + modifier = tournament_dislocated_finger_modifier + years = 1 + } + } + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_finger_popped_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + stress_impact = { + craven = medium_stress_impact_gain + impatient = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = craven + } + } + } + + # Work around it + option = { + name = ep2_tournament_events.2502.b + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + add_character_modifier = { + modifier = tournament_dislocated_finger_modifier + years = 1 + } + + ai_chance = { + base = 100 + } + } + + # Concede + option = { + name = ep2_tournament_events.2502.c + tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = wrestling SKILL = pugilism } + + stress_impact = { + craven = medium_stress_impact_loss + brave = medium_stress_impact_gain + content = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + humble = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = ambitious + } + } + } + } +} + +scripted_trigger contest_wrestling_eye_poke_trigger = { + OR = { + has_trait = sadistic + has_trait = deceitful + ai_compassion <= low_positive_ai_value + } +} + +# Your opponent tries eye-poking you +ep2_tournament_events.2503 = { + type = activity_event + title = ep2_tournament_events.2503.t + desc = ep2_tournament_events.2503.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = grief + } + right_portrait = { + character = scope:versus_contestant + animation = personality_cynical + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + trigger_if = { + limit = { this = scope:versus_matchee } + scope:versus_matcher = { contest_wrestling_eye_poke_trigger = yes } + } + trigger_else = { + scope:versus_matchee = { contest_wrestling_eye_poke_trigger = yes } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2503 } + } + + # Poke them back + option = { + name = ep2_tournament_events.2503.a + + trigger = { + OR = { + has_trait = wrathful + has_trait = vengeful + has_trait = deceitful + has_trait = arbitrary + has_trait = callous + has_trait = sadistic + } + NOT = { + has_trait = one_eyed + } + } + + custom_tooltip = ep2_tournament_events.2503.a.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + + add_prestige = minor_prestige_loss + + add_character_modifier = { + modifier = tournament_blurry_vision_modifier + years = 3 + } + + scope:versus_contestant = { + add_character_modifier = { + modifier = tournament_blurry_vision_modifier + years = 3 + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + craven = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = wrathful + } + } + } + } + + # Complain to get them disqualified, and take some time to recover + option = { + name = ep2_tournament_events.2503.b + + trigger = { + NOT = { + has_trait = one_eyed + } + } + + duel = { + skill = diplomacy + target = scope:versus_contestant + #You get them disqualified + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_tournament_events.2503.b.tt.success + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + #You fail to get them disqualified + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_tournament_events.2503.b.tt.failure + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + + + } + + # Continue the fight + option = { + name = ep2_tournament_events.2503.c + + trigger = { + NOT = { + has_trait = one_eyed + } + } + + custom_tooltip = ep2_tournament_events.2503.c.tt + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + add_character_modifier = { + modifier = tournament_blurry_vision_modifier + years = 3 + } + } + + # Continue the fight but with no working eyes + option = { + name = ep2_tournament_events.2503.d + + trigger = { + has_trait = one_eyed + } + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + add_character_modifier = { + modifier = tournament_really_blurry_vision_modifier + years = 5 + } + } +} + +# Your berserker opponent bites your nose off +ep2_tournament_events.2504 = { + type = activity_event + title = ep2_tournament_events.2504.t + desc = ep2_tournament_events.2504.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = grief + } + right_portrait = { + character = scope:versus_contestant + animation = rage + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + trigger_if = { + limit = { this = scope:versus_matchee } + scope:versus_matcher = { has_trait = berserker } + } + trigger_else = { + scope:versus_matchee = { has_trait = berserker } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2504 } + random_court_position_holder = { + type = court_physician_court_position + save_scope_as = physician + } + + add_stress = major_stress_gain + } + + # Aaaaaaaaagggghhhh! Disqualify them! + option = { + name = ep2_tournament_events.2504.a + + custom_tooltip = ep2_tournament_events.2504.a.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + add_trait = disfigured + + tournament_contest_versus_disqualification_effect = { DISQUALIFIED = scope:versus_contestant MATCH = root CONTEST = wrestling SKILL = pugilism } + + scope:activity = { + add_activity_log_entry = { + key = tournament_berserker_log + tags = { bad } + score = 5 + character = root + target = scope:versus_contestant + } + } + + ai_chance = { + base = 100 + + } + } + + # Get me my physician! I don't need to participate any further! + option = { + name = ep2_tournament_events.2504.b + + trigger = { + court_physician_available_trigger = yes + } + + custom_tooltip = ep2_tournament_events.2504.b.tt + + random_list = { + #Your physician works miracles + 2 = { + modifier = { + add = 5 + scope:physician = { + learning > average_skill_rating + } + } + modifier = { + add = 10 + scope:physician = { + learning > high_skill_rating + } + } + modifier = { + add = 10 + scope:physician = { + has_trait = lifestyle_herbalist + } + } + modifier = { + add = 20 + scope:physician = { + has_trait = lifestyle_physician + } + } + custom_tooltip = ep2_tournament_events.2504.b.tt.criticalsuccess + increase_wounds_effect = { REASON = fight } + } + #Your physician saves your nose + 10 = { + modifier = { + add = 5 + scope:physician = { + learning > average_skill_rating + } + } + modifier = { + add = 10 + scope:physician = { + learning > high_skill_rating + } + } + modifier = { + add = 10 + scope:physician = { + has_trait = lifestyle_herbalist + } + } + modifier = { + add = 20 + scope:physician = { + has_trait = lifestyle_physician + } + } + custom_tooltip = ep2_tournament_events.2504.b.tt.success + increase_wounds_effect = { REASON = fight } + add_trait = scarred + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 25 + max = 60 + } + } + } + } + #Your physician is unable to save your nose + 10 = { + modifier = { + add = 5 + scope:physician = { + learning < average_skill_rating + } + } + modifier = { + add = 10 + scope:physician = { + learning < low_skill_rating + } + } + custom_tooltip = ep2_tournament_events.2504.b.tt.failure + increase_wounds_effect = { REASON = fight } + add_trait = disfigured + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + craven = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = wrathful + } + } + } + } + + # Find me a physician! I don't need to participate any further! + option = { + name = ep2_tournament_events.2504.c + + trigger = { + court_physician_available_trigger = no + } + + custom_tooltip = ep2_tournament_events.2504.c.tt + + increase_wounds_effect = { REASON = fight } + add_trait = disfigured + + tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = wrestling SKILL = pugilism } + + stress_impact = { + base = miniscule_stress_impact_loss + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + craven = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = wrathful + } + } + } + } +} + +# Death event: opponent kicks your head through 180 degrees +ep2_tournament_events.2506 = { + type = activity_event + title = ep2_tournament_events.2506.t + desc = ep2_tournament_events.2506.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = pain + } + right_portrait = { + character = scope:versus_contestant + animation = shock + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + contest_versus_player_vs_ai_scope_effect = yes + } + + # Chance to die + option = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + name = ep2_tournament_events.2506.a + duel = { + skill = prowess + value = root.contest_aptitude_fetch_value + 30 = { + desc = ep2_tournament_events.1005.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + scope:activity = { + add_activity_log_entry = { + key = tournament_accident_wounded_log + tags = { bad } + score = 5 + character = root + root = { + increase_wounds_no_death_effect = { REASON = fight } + } + } + } + } + 10 = { + desc = ep2_tournament_events.1005.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + scope:activity = { + add_activity_log_entry = { + key = tournament_wrestling_death_log + tags = { bad } + score = 10 + character = root + death = { + death_reason = death_tournament_roundhouse + } + } + } + } + } + ai_chance = { + base = 100 + } + } + # Yield + option = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + name = ep2_tournament_events.1005.b + + remove_variable = contest_aptitude + custom_tooltip = ep2_tournament_events.1005.resign + scope:activity = { + add_activity_log_entry = { + key = tournament_melee_wounded_log + tags = { bad } + score = 10 + character = root + root = { + add_trait = disfigured + } + } + } + hidden_effect = { + tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = wrestling SKILL = pugilism } + } + ai_chance = { + base = 100 + } + } +} + +# Discombobulate +ep2_tournament_events.2507 = { + type = activity_event + title = ep2_tournament_events.2507.t + desc = ep2_tournament_events.2507.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = personality_callous + } + right_portrait = { + character = scope:versus_contestant + animation = rage + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2507 } + } + + # ...do it again + option = { + name = ep2_tournament_events.2507.a + + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = wrathful + } + } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + + scope:versus_contestant = { + add_character_modifier = { + modifier = tournament_discombobulated_modifier + years = 10 + } + + add_opinion = { + modifier = hate_opinion + target = root + opinion = -60 + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + # Finish the fight quickly + option = { + name = ep2_tournament_events.2507.b + + flavor = ep2_tournament_events.2507.b.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + + add_prestige = minor_prestige_gain + + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:versus_contestant + opinion = 10 + } + + stress_impact = { + compassionate = minor_stress_impact_loss + sadistic = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + # Persuade them to give up + option = { + name = ep2_tournament_events.2507.c + + duel = { + skill = diplomacy + value = medium_skill_rating + # Success + 1 = { + desc = ep2_tournament_events.2507.c.success + modifier = { + add = 10 + has_trait = compassionate + } + modifier = { + add = 2 + has_trait = humble + } + modifier = { + add = 5 + has_trait = patient + } + modifier = { + add = 5 + has_trait = education_diplomacy + } + modifier = { + add = 10 + has_trait = intellect_good + } + modifier = { + add = 15 + has_trait = shrewd + } + modifier = { + add = 20 + has_trait = diplomat + } + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + send_interface_toast = { + title = ep2_tournament_events.2507.c.success + left_icon = root + right_icon = scope:versus_contestant + add_prestige = minor_prestige_gain + reverse_add_opinion = { + modifier = kindness_opinion + target = scope:versus_contestant + opinion = 20 + } + tournament_contest_versus_resignation_effect = { RESIGNER = scope:versus_contestant CONTEST = wrestling SKILL = pugilism } + } + min = 5 + } + # Failure + 1 = { + desc = ep2_tournament_events.2507.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -5 + } + modifier = { + add = 10 + has_trait = callous + } + modifier = { + add = 5 + has_trait = arrogant + } + modifier = { + add = 2 + has_trait = impatient + } + modifier = { + add = 5 + has_trait = intellect_bad + } + modifier = { + add = 10 + has_trait = lisping + } + send_interface_toast = { + title = ep2_tournament_events.2507.c.failure + left_icon = root + right_icon = scope:versus_contestant + add_prestige = minor_prestige_loss + reverse_add_opinion = { + modifier = insult_opinion + target = scope:versus_contestant + opinion = -30 + } + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + min = 5 + } + } + + ai_chance = { + base = 100 + } + } +} + +################## +### QUINTAIN ### +################## + +scripted_trigger tournament_events_3501_knight_trigger = { + age < 25 #Need to be young to prove themselves! + is_ai = yes #No players! + can_be_knight_trigger = { ARMY_OWNER = root } # CAN be a knight... + is_knight = no #...but isn't currently + is_landed = no #is not landed, to avoid taking anyone good + NOR = { #is not employed, to avoid taking anyone useful + has_council_position = councillor_spouse + has_council_position = councillor_marshal + has_council_position = councillor_court_chaplain + has_council_position = councillor_steward + has_council_position = councillor_spymaster + } + this != root #isn't you, or the either knight +} + +# Two young knights vie for your attention +ep2_tournament_events.3501 = { + type = activity_event + title = ep2_tournament_events.3501.t + desc = ep2_tournament_events.3501.desc + theme = tournament_contest + left_portrait = { + character = root + animation = personality_callous + } + lower_right_portrait = { + character = scope:knight1 + } + lower_left_portrait = { + character = scope:knight2 + } + cooldown = { years = 1 } + + trigger = { + this = scope:host + scope:activity = { + any_guest_subset_current_phase = { + name = contestant + count >= 2 + tournament_events_3501_knight_trigger = yes + is_alive = yes + } + has_current_phase = tournament_phase_joust + } + } + + immediate = { + scope:activity = { + random_guest_subset_current_phase = { + name = contestant + limit = { + tournament_events_3501_knight_trigger = yes + is_alive = yes + } + save_scope_as = knight1 + } + random_guest_subset_current_phase = { + name = contestant + limit = { + tournament_events_3501_knight_trigger = yes + is_alive = yes + this != scope:knight1 + } + save_scope_as = knight2 + } + } + } + + # Pick Knight 1 + option = { + name = ep2_tournament_events.3501.a + + add_courtier = scope:knight1 + + scope:knight1 = { + + add_opinion = { + target = root + modifier = flattered_opinion + opinion = 50 + } + + accolade_medium_glory_gain_with_checks_effect = yes + + scope:knight2 = { + add_opinion = { + modifier = hate_opinion + target = scope:knight1 + opinion = -60 + } + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_quintain_choice_log_1 + tags = { good } + score = 5 + character = root + target = scope:knight1 + } + } + + ai_chance = { + base = 100 + } + } + + # Pick Knight 2 + option = { + name = ep2_tournament_events.3501.b + + add_courtier = scope:knight2 + + scope:knight2 = { + + add_opinion = { + target = root + modifier = flattered_opinion + opinion = 50 + } + + accolade_medium_glory_gain_with_checks_effect = yes + + scope:knight1 = { + add_opinion = { + modifier = hate_opinion + target = scope:knight2 + opinion = -60 + } + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_quintain_choice_log_2 + tags = { good } + score = 5 + character = root + target = scope:knight2 + } + } + + ai_chance = { + base = 100 + } + } + + # Pick whoever wins the next match! + option = { + name = ep2_tournament_events.3501.c + scope:knight1 = { + duel = { + skill = prowess + target = scope:knight2 + 50 = { + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + } + desc = ep2_tournament_events.knight_1_wins + scope:activity = { + add_activity_log_entry = { + key = tournament_quintain_choice_log_1 + tags = { good } + score = 5 + character = root + target = scope:knight1 + } + } + send_interface_toast = { + title = ep2_tournament_events.knight_1_wins + left_icon = root + right_icon = scope:knight1 + add_courtier = scope:knight1 + scope:knight1 = { + accolade_minor_glory_gain_with_checks_effect = yes + } + } + } + 50 = { + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + } + desc = ep2_tournament_events.knight_2_wins + scope:activity = { + add_activity_log_entry = { + key = tournament_quintain_choice_log_2 + tags = { good } + score = 5 + character = root + target = scope:knight2 + } + } + send_interface_toast = { + title = ep2_tournament_events.knight_2_wins + left_icon = root + right_icon = scope:knight2 + add_courtier = scope:knight2 + scope:knight2 = { + accolade_minor_glory_gain_with_checks_effect = yes + } + } + } + } + } + ai_chance = { + base = 100 + } + } + + # Pick neither + option = { + name = ep2_tournament_events.3501.d + + if = { + limit = { activity_is_competing_trigger = yes } + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + + scope:knight1 = { + + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + + progress_towards_rival_effect = { + REASON = rival_quintain_knight_anger + CHARACTER = scope:knight2 + OPINION = 0 + } + } + + scope:knight2 = { + + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + + progress_towards_rival_effect = { + REASON = rival_quintain_knight_anger + CHARACTER = scope:knight1 + OPINION = 0 + } + } + + ai_chance = { + base = 100 + } + } +} + +# Quintain breaks +ep2_tournament_events.3502 = { + type = activity_event + title = ep2_tournament_events.3502.t + desc = ep2_tournament_events.3502.desc + theme = tournament_contest + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:competitor + animation = personality_honorable + } + cooldown = { years = 1 } + + trigger = { + this = scope:host + scope:activity = { + any_guest_subset_current_phase = { + name = contestant + contest_event_general_contestant_valid_trigger = yes + } + has_current_phase = tournament_phase_joust + } + } + + immediate = { + scope:activity = { + random_guest_subset_current_phase = { + name = contestant + limit = { contest_event_general_contestant_valid_trigger = yes } + save_scope_as = competitor + } + activity_location.province_owner = { save_scope_as = mayor } + } + scope:activity = { + add_activity_log_entry = { + key = tournament_broken_quintain_log + tags = { bad } + score = 5 + character = scope:mayor + } + } + } + + option = { # Punish the builder + name = ep2_tournament_events.3502.a + + trigger = { + this = scope:host + } + + if = { + limit = { activity_is_competing_trigger = yes} + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + + add_prestige = medium_prestige_loss + + progress_towards_rival_effect = { + REASON = rival_quintain_collapse_blame + CHARACTER = scope:mayor + OPINION = default_rival_opinion + } + + stress_impact = { + base = miniscule_stress_impact_gain + calm = minor_stress_impact_gain + wrathful = miniscule_stress_impact_loss + vengeful = miniscule_stress_impact_loss + forgiving = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = forgiving + } + } + } + + option = { # Criticise the host + name = ep2_tournament_events.3502.b + + trigger = { + this != scope:host + } + + progress_towards_rival_effect = { + REASON = rival_quintain_collapse_blame + CHARACTER = scope:mayor + OPINION = default_rival_opinion + } + + reverse_add_opinion = { + target = scope:host + modifier = angry_opinion + opinion = -30 + } + + stress_impact = { + forgiving = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = forgiving + } + } + } + + option = { # Pay for its repair + name = ep2_tournament_events.3502.c + + remove_short_term_gold = medium_gold_value + + add_prestige = minor_prestige_gain + + if = { + limit = { + this != scope:host + } + reverse_add_opinion = { + target = scope:host + modifier = grateful_opinion + opinion = 30 + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + generous = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + option = { # Pull out + name = ep2_tournament_events.3502.d + + reverse_add_opinion = { + target = scope:competitor + modifier = compliment_opinion + opinion = 20 + } + + stress_impact = { + arrogant = minor_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = stubborn + has_trait = arrogant + has_trait = brave + } + } + } + } +} + +# Hapless knight ends up on the quintain +ep2_tournament_events.3503 = { + type = activity_event + title = ep2_tournament_events.3503.t + desc = ep2_tournament_events.3503.desc + theme = tournament_contest + left_portrait = { + character = root + animation = laugh + } + right_portrait = { + character = scope:hapless_knight + animation = pain + } + cooldown = { years = 1 } + + trigger = { + this = scope:host + scope:activity = { + any_guest_subset_current_phase = { + name = contestant + contest_event_general_contestant_valid_trigger = yes + is_landed = no #Make sure they're not a noble + is_lowborn = yes #...and again + prowess < medium_skill_rating #Make sure they're likely to actually be bad + is_alive = yes #duh + } + has_current_phase = tournament_phase_joust + } + } + + immediate = { + scope:activity = { + random_guest_subset_current_phase = { + name = contestant + limit = { + contest_event_general_contestant_valid_trigger = yes + is_landed = no #Make sure they're not a noble + is_lowborn = yes #...and again + prowess < medium_skill_rating #Make sure they're likely to actually be bad + is_alive = yes #duh + } + save_scope_as = hapless_knight + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + } + add_activity_log_entry = { + key = tournament_hapless_knight_log + tags = { good } + score = 5 + character = root + target = scope:hapless_knight + } + } + scope:hapless_knight = { accolade_minor_glory_loss_with_checks_effect = yes } + } + + option = { # Offer them a place as a jester + name = ep2_tournament_events.3503.a + + trigger = { + #Make sure you can actually offer them a jester position + can_appoint_char_to_court_position = { + CHAR = scope:hapless_knight + COURT_POS = court_jester_court_position + } + } + + random_list = { + 24 = { #They accept + + modifier = { #A humble person might be more likely to accept + add = 40 + scope:hapless_knight = { + has_trait = humble + } + } + + + modifier = { #A fickle person is less likely to adhere to their profession + add = 20 + scope:hapless_knight = { + has_trait = fickle + } + } + + modifier = { #A lazy person sees the opportunity for a comfortable life with minimal effort + add = 20 + scope:hapless_knight = { + has_trait = lazy + } + } + + modifier = { #Perhaps more likely if they're good at it + add = 10 + scope:hapless_knight = { + aptitude:court_jester_court_position >= 2 + } + } + + modifier = { #A gregarious person loves interacting with people + add = 5 + scope:hapless_knight = { + has_trait = gregarious + } + } + + desc = ep2_tournament_events.3503.a.tt.success + + send_interface_toast = { + title = ep2_tournament_events.3503.a.tt.success + left_icon = root + right_icon = scope:hapless_knight + hidden_effect = { + scope:hapless_knight = { set_employer = root } + } + court_position_grant_effect = { + EMPLOYER = root + POS = court_jester + CANDIDATE = scope:hapless_knight + } + + scope:hapless_knight = { + save_scope_as = resigner + tournament_contest_versus_resignation_effect = { RESIGNER = scope:hapless_knight CONTEST = joust SKILL = horse } + } + } + } + 76 = { #They refuse + modifier = { #An arrogant person would almost never accept + add = 200 + scope:hapless_knight = { + has_trait = arrogant + } + } + + modifier = { #A stubborn person doesn't want a career change + add = 50 + scope:hapless_knight = { + has_trait = stubborn + } + } + + desc = ep2_tournament_events.3503.a.tt.failure + + send_interface_toast = { + title = ep2_tournament_events.3503.a.tt.failure + left_icon = root + right_icon = scope:hapless_knight + + progress_towards_rival_effect = { + REASON = rival_quintain_collapse_blame + CHARACTER = scope:hapless_knight + OPINION = default_rival_opinion + } + } + } + } + + ai_chance = { + base = 100 + } + } + + option = { # Try to get them banned + name = ep2_tournament_events.3503.b + + progress_towards_rival_effect = { + REASON = rival_tournament_attempted_banning + CHARACTER = scope:hapless_knight + OPINION = default_rival_opinion + } + + duel = { + skill = diplomacy + target = scope:hapless_knight + # Success + 50 = { + show_chance = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep2_tournament_events.3503.b.tt.success + + send_interface_toast = { + title = ep2_tournament_events.3503.b.tt.success + left_icon = root + right_icon = scope:enemy + + if = { + limit = { activity_is_competing_trigger = yes } + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + + scope:hapless_knight = { + add_prestige = minor_prestige_loss + add_character_flag = tournament_not_competing + custom_tooltip = tournament_not_competing_tt + } + scope:activity = { + remove_from_guest_subset = { + name = contestant + target = scope:hapless_knight + } + add_to_guest_subset = { + name = spectator + target = scope:hapless_knight + } + } + } + } + # Failure + 50 = { + show_chance = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep2_tournament_events.3503.b.tt.failure + + send_interface_toast = { + title = ep2_tournament_events.3503.b.tt.failure + left_icon = root + right_icon = scope:enemy + + add_prestige = minor_prestige_loss + } + } + } + + ai_chance = { + base = 100 + } + } + + option = { # You decide you quite like them + name = ep2_tournament_events.3503.c + + if = { + limit = { activity_is_competing_trigger = yes } + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + + progress_towards_friend_effect = { + REASON = friend_joust_endearment + CHARACTER = scope:hapless_knight + OPINION = default_friend_opinion + } + + stress_impact = { + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + option = { # Laugh at them + name = ep2_tournament_events.3503.d + reason = activity_intent + trigger = { has_activity_intent = reduce_stress_intent } + + progress_towards_rival_effect = { + REASON = rival_contest_mockery + CHARACTER = scope:hapless_knight + OPINION = default_rival_opinion + } + + scope:hapless_knight = { + add_prestige = medium_prestige_loss + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + } + + stress_impact = { + base = major_stress_impact_loss + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } +} + +#Death event: Quintain hits you +ep2_tournament_events.3504 = { + type = activity_event + title = ep2_tournament_events.3504.t + desc = ep2_tournament_events.3504.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = pain + } + + trigger = { + is_participant_in_activity = scope:activity + scope:activity = { + has_current_phase = tournament_phase_joust + } + } + + # Chance to die + option = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + name = ep2_tournament_events.3504.a + duel = { + skill = prowess + value = root.contest_aptitude_fetch_value + 30 = { + desc = ep2_tournament_events.1005.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + scope:activity = { + add_activity_log_entry = { + key = tournament_accident_wounded_log + tags = { bad } + score = 5 + character = root + root = { + increase_wounds_no_death_effect = { REASON = fight } + } + } + } + } + 10 = { + desc = ep2_tournament_events.1005.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + scope:activity = { + add_activity_log_entry = { + key = tournament_quintain_death_log + tags = { bad } + score = 10 + character = root + root = { + death = { + death_reason = death_tournament_quintain_hit + } + } + } + } + } + } + ai_chance = { + base = 100 + } + } + # Yield + option = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + name = ep2_tournament_events.1005.b + + remove_variable = contest_aptitude + custom_tooltip = ep2_tournament_events.1005.resign + scope:activity = { + add_activity_log_entry = { + key = tournament_melee_wounded_log + tags = { bad } + score = 10 + character = root + root = { + add_trait = disfigured + } + remove_from_guest_subset = { + name = qualified + target = root + } + add_to_guest_subset = { + name = spectator + target = root + } + } + } + ai_chance = { + base = 100 + } + } +} + +################# +### JOUST ### +################# + +# You get injured +ep2_tournament_events.4001 = { + type = activity_event + title = ep2_tournament_events.4001.t + desc = ep2_tournament_events.4001.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = jockey_loss + } + right_portrait = { + character = scope:versus_contestant + animation = jockey_lance_couched_gallop + } + cooldown = { months = 2 } + + trigger = { + #DLC check. + #has_ep2_dlc_trigger = yes + + #Standard checks. + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4001 } + scope:activity = { + add_activity_log_entry = { + key = tournament_joust_injury_log + tags = { bad } + score = 5 + character = root + } + } + } + + option = { # Pull through + name = ep2_tournament_events.4001.a + + trigger = { + OR = { + has_trait = physique_good + has_trait = strong + } + } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_medium_value + } + } + + increase_wounds_no_death_effect = { REASON = battle } + + add_prestige = medium_prestige_gain + + stress_impact = { + base = miniscule_stress_impact_gain + fickle = minor_stress_impact_gain + stubborn = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + option = { # Stay in, get wounded + name = ep2_tournament_events.4001.b + + increase_wounds_no_death_effect = { REASON = battle } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_minor_value + } + } + + add_prestige = medium_prestige_gain + + stress_impact = { + base = minor_stress_impact_gain + fickle = minor_stress_impact_gain + stubborn = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + option = { # Pull out + name = ep2_tournament_events.4001.c + + tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = joust SKILL = horse } + + stress_impact = { + base = miniscule_stress_impact_loss + brave = minor_stress_impact_gain + craven = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + humble = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = stubborn + has_trait = arrogant + has_trait = brave + } + } + } + } +} + +# Your opponent is knocked off their horse +ep2_tournament_events.4002 = { + type = activity_event + title = ep2_tournament_events.4002.t + desc = ep2_tournament_events.4002.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = jockey_lance_tilted + } + right_portrait = { + trigger = { + this != involved_activity.activity_host + } + character = scope:versus_contestant + animation = pain + } + cooldown = { months = 2 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_neigh" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4002 } + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_medium_value + } + } + scope:activity = { + add_activity_log_entry = { + key = tournament_knocked_off_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + } + + option = { # Help them up and give them a shield + name = ep2_tournament_events.4002.a + + trigger = { + OR = { + has_trait = just + has_trait = gregarious + has_trait = compassionate + } + } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = grateful_opinion + opinion = 40 + } + + add_prestige = medium_prestige_gain + + custom_tooltip = ep2_tournament_events.4001.a.tt + + hidden_effect = { + every_courtier_or_guest = { + add_opinion = { + target = root + opinion = 10 + modifier = reputation_opinion + } + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + option = { # Help them up + name = ep2_tournament_events.4002.b + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = grateful_opinion + opinion = 15 + } + + add_prestige = minor_prestige_gain + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + stress_impact = { + just = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + option = { # Ah well + name = ep2_tournament_events.4002.c + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + stress_impact = { + just = minor_stress_impact_gain + brave = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } +} + +# Your opponent is using a massive lance +ep2_tournament_events.4003 = { + type = activity_event + title = ep2_tournament_events.4003.t + desc = ep2_tournament_events.4003.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = jockey_loss + } + right_portrait = { + trigger = { + this != involved_activity.activity_host + } + character = scope:versus_contestant + animation = jockey_lance_couched_gallop + } + cooldown = { months = 2 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_trotting" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4003 } + } + + option = { # Protest to the authorities + name = ep2_tournament_events.4003.a + + trigger = { + OR = { + has_trait = just + has_trait = honest + has_trait = irritable + } + } + + flavor = ep2_tournament_events.4003.a.tt + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = annoyed_opinion + opinion = -40 + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + add_prestige = minor_prestige_loss + + stress_impact = { + base = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + just = minor_stress_impact_loss + craven = minor_stress_impact_loss + brave = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = ambitious + } + } + } + } + + option = { # Ask them not to use it + name = ep2_tournament_events.4003.b + + duel = { + skill = diplomacy + target = scope:versus_contestant + # Success + 50 = { + show_chance = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.4003.b.tt.win + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + } + # Failure + 50 = { + show_chance = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep2_tournament_events.4003.b.tt.lose + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + just = minor_stress_impact_loss + craven = minor_stress_impact_loss + brave = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = ambitious + } + } + } + } + option = { # Joust them anyway + name = ep2_tournament_events.4003.c + + add_prestige = medium_prestige_gain + + duel = { + skills = { prowess martial } + value = decent_skill_rating + # Success + 50 = { + show_chance = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.4003.c.tt.win + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + } + # Failure + 50 = { + show_chance = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.4003.c.tt.lose + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + + stress_impact = { + ambitious = minor_stress_impact_loss + just = minor_stress_impact_gain + craven = minor_stress_impact_gain + brave = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = craven + } + } + } + } +} + +# Your opponent challenges you to a duel on foot +ep2_tournament_events.4004 = { + type = activity_event + title = ep2_tournament_events.4004.t + desc = ep2_tournament_events.4004.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = jockey_lance_tilted + } + right_portrait = { + trigger = { + this != involved_activity.activity_host + } + character = scope:versus_contestant + animation = marshal + } + cooldown = { months = 2 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_neigh" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4004 } + } + + option = { # Accept + name = ep2_tournament_events.4004.a + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = respect_opinion + opinion = 30 + } + + duel = { + skill = prowess + target = scope:versus_contestant + # Success + 50 = { + show_chance = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.4004.a.success + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + } + # Failure + 50 = { + show_chance = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep2_tournament_events.4004.a.failure + left_icon = root + right_icon = scope:versus_contestant + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + } + } + + add_prestige = minor_prestige_loss + + stress_impact = { + ambitious = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + craven = minor_stress_impact_gain + brave = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = craven + } + } + } + } + + option = { # Refuse + name = ep2_tournament_events.4004.b + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = disappointed_opinion + opinion = -30 + } + + ai_chance = { + base = 100 + } + } + + option = { # Accept, but insist upon fighting WITH LANCES + name = ep2_tournament_events.4004.c + + trigger = { + OR = { + has_trait = dull + has_trait = intellect_bad + } + } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = tournament_confused_opinion + opinion = -40 + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + add_prestige = minor_prestige_loss + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } +} + +# Your opponent is injured but tilts anyway +ep2_tournament_events.4005 = { + type = activity_event + title = ep2_tournament_events.4005.t + desc = ep2_tournament_events.4005.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = jockey_lance_tilted + } + right_portrait = { + character = scope:versus_contestant + animation = jockey_loss + } + cooldown = { months = 2 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_wood_clash" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4005 } + scope:activity = { + add_activity_log_entry = { + key = tournament_joust_injury_log + tags = { bad } + score = 5 + character = scope:versus_contestant + } + } + } + + option = { # Tilt against them + name = ep2_tournament_events.4005.a + + flavor = ep2_tournament_events.4005.a.tt + + if = { # If they're a coward they'll like you less + limit = { + scope:versus_contestant = { + has_trait = craven + } + } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = cruelty_opinion + opinion = -10 + } + } + else_if = { # If they're brave, stubborn or chivalric they'll respect you for respecting their wishes + limit = { + scope:versus_contestant = { + OR = { + has_trait = brave + has_trait = stubborn + has_trait = gallant + } + } + } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = tournament_respected_wishes_opinion + opinion = 30 + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + add_prestige = miniscule_prestige_loss + + ai_chance = { + base = 100 + } + } + + option = { # Refuse to tilt against them + name = ep2_tournament_events.4005.b + + flavor = ep2_tournament_events.4005.b.tt + + if = { # If they're chivalric they'll respect you even more for being knightly + limit = { + scope:versus_contestant = { + has_trait = gallant + } + } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = respect_opinion + opinion = 50 + } + } + + else_if = { # If they're not chivalric they'll still respect you + limit = { + scope:versus_contestant = { + NOT = { + has_trait = gallant + } + } + } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = respect_opinion + opinion = 20 + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + add_prestige = medium_prestige_gain + + stress_impact = { + compassionate = medium_stress_impact_loss + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + just = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = callous + } + } + } + } + + option = { # Tilt against them in an underhanded way that guarantees victory + name = ep2_tournament_events.4005.c + + flavor = ep2_tournament_events.4005.c.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + add_prestige = medium_prestige_loss + + if = { # If they're chivalric they'll hate you you even more for being knightly + limit = { + scope:versus_contestant = { + has_trait = gallant + } + } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -60 + } + } + + else_if = { # If they're not chivalric they'll still hate you, just less so + limit = { + scope:versus_contestant = { + NOT = { + has_trait = gallant + } + } + } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -40 + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + sadistic = medium_stress_impact_loss + callous = medium_stress_impact_loss + just = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + } + } + } + } +} + +# Your opponent asks for a mercy pass +ep2_tournament_events.4006 = { + type = activity_event + title = ep2_tournament_events.4006.t + desc = ep2_tournament_events.4006.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = jockey_lance_tilted + } + right_portrait = { + trigger = { + this != involved_activity.activity_host + } + character = scope:versus_contestant + animation = jockey_idle + } + cooldown = { months = 2 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_flyby" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4006 } + scope:activity = { + add_activity_log_entry = { + key = tournament_mercy_pass_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + } + + option = { # Show mercy + name = ep2_tournament_events.4006.a + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = tournament_mercy_opinion + opinion = 30 + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + add_prestige = minor_prestige_gain + + stress_impact = { + compassionate = medium_stress_impact_loss + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + just = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + + option = { # No mercy + name = ep2_tournament_events.4006.b + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = cruelty_opinion + opinion = -30 + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + stress_impact = { + compassionate = medium_stress_impact_gain + sadistic = medium_stress_impact_loss + callous = minor_stress_impact_loss + just = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = compassionate + } + } + } + } +} + +# Your opponent is mistreating their groom +ep2_tournament_events.4007 = { + type = activity_event + title = ep2_tournament_events.4007.t + desc = ep2_tournament_events.4007.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = jockey_idle + } + right_portrait = { + character = scope:groom + outfit_tags = { beggar_rags } + animation = admiration + } + lower_right_portrait = { + character = scope:versus_contestant + } + cooldown = { months = 2 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4007 } + create_character = { + location = root.location + faith = scope:versus_contestant.faith + culture = scope:versus_contestant.culture + random_traits_list = { + count = 1 + education_martial_1 = {} + education_martial_2 = {} + } + dynasty = none + age = { 18 22 } + random_traits = yes + gender_female_chance = { + if = { + limit = { scope:versus_contestant.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { scope:versus_contestant.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } + } + save_scope_as = groom + } + } + + + option = { # Laugh at the groom + name = ep2_tournament_events.4007.a + + trigger = { + has_trait = callous + } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = tournament_agreed_opinion + opinion = 30 + } + + reverse_add_opinion = { + target = root + modifier = tournament_mocked_opinion + opinion = -30 + } + + stress_impact = { + base = minor_stress_impact_loss + gregarious = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = gregarious + } + } + } + + option = { # Offer the groom a job + name = ep2_tournament_events.4007.b + + flavor = ep2_tournament_events.4007.b.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -30 + } + + scope:groom = { + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -30 + } + } + + add_courtier = scope:groom + + ai_chance = { + base = 100 + } + } + + option = { # Pay groom to unsettle opponent's horse + name = ep2_tournament_events.4007.c + + flavor = ep2_tournament_events.4007.c.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + scope:groom = { + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -50 + } + } + + pay_short_term_gold = { + target = scope:groom + gold = minor_gold_value + } + + stress_impact = { + just = medium_stress_impact_gain + ambitious = minor_stress_impact_loss + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = greedy + } + } + } + } + + option = { # Let it go + name = ep2_tournament_events.4007.d + + ai_chance = { + base = 100 + } + } +} + +# Crowd heckles you +ep2_tournament_events.4008 = { + type = activity_event + title = ep2_tournament_events.4008.t + desc = ep2_tournament_events.4008.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + cooldown = { months = 2 } + + left_portrait = { + character = root + animation = jockey_loss + } + right_portrait = { + character = scope:versus_contestant + animation = jockey_lance_tilted + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_amb_2d_crowd_negative_reaction" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4008 } + scope:activity = { + add_activity_log_entry = { + key = tournament_crowd_heckled_log + tags = { bad } + score = 5 + character = root + } + } + } + + # Continue with the contest + option = { + name = ep2_tournament_events.4008.a + random_list = { + 45 = { #You win + + modifier = { #Skill buff + add = 15 + prowess > high_skill_rating + } + + modifier = { + add = 10 + has_trait = brave #Brave enough to ignore it + } + + modifier = { + add = 10 + has_trait = calm #Calm enough to ignore the abuse + } + + modifier = { + add = -10 + OR = { + has_trait = wrathful #Too angry to not care + has_trait = arrogant #How dare they! + has_trait = craven #Aaahhh, scary! + } + } + + desc = ep2_tournament_events.4008.a.success + + send_interface_toast = { + title = ep2_tournament_events.4008.a.success + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_medium_value + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + } + } + } + 25 = { #You lose + + desc = ep2_tournament_events.4008.a.failure + + send_interface_toast = { + title = ep2_tournament_events.4008.a.failure + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + stress_impact = { + base = miniscule_stress_impact_gain + } + } + } + 15 = { #You get injured by the crowd throwing stuff at you + modifier = { + add = 10 + has_trait = sadistic + } + modifier = { + add = 10 + has_trait = callous + } + modifier = { + add = 15 + OR = { + has_trait = murderer + has_trait = incestuous + has_trait = sodomite + has_trait = cannibal + has_trait = deviant + has_trait = kinslayer + has_trait = adulterer + has_trait = fornicator + has_trait = excommunicated + } + } + + desc = ep2_tournament_events.4008.a.criticalfailure + + send_interface_toast = { + title = ep2_tournament_events.4008.a.criticalfailure + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + add_prestige = minor_prestige_loss + + increase_wounds_effect = { REASON = fight } + + random = { + chance = 25 + if = { + limit = { + NOT = { + has_trait = scarred + } + } + add_trait = scarred + } + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 5 + max = 25 + } + } + } + } + + stress_impact = { + base = minor_stress_impact_gain + } + } + } + } + ai_chance = { + base = 100 + + } + } + + # Throw the contest + option = { + name = ep2_tournament_events.4008.b + + add_prestige = minor_prestige_loss + + tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = joust SKILL = horse } + + stress_impact = { + brave = medium_stress_impact_gain + craven = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = brave + } + } + } +} + +# Lend opponent a lance +ep2_tournament_events.4009 = { + type = activity_event + title = ep2_tournament_events.4009.t + desc = ep2_tournament_events.4009.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + cooldown = { months = 2 } + + left_portrait = { + character = root + animation = jockey_lance_tilted + } + right_portrait = { + character = scope:versus_contestant + animation = jockey_idle + } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_horse_neigh" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 4009 } + } + + # Mock them + option = { + name = ep2_tournament_events.4009.a + trigger = { + OR = { + has_trait = sadistic + has_trait = arrogant + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + progress_towards_rival_effect = { + REASON = rival_contest_mockery + CHARACTER = scope:hapless_knight + OPINION = default_rival_opinion + } + + stress_impact = { + sadistic = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + just = medium_stress_impact_loss + gregarious = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = gregarious + } + } + } + } + # Lend them a lance + option = { + name = ep2_tournament_events.4009.b + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + add_prestige = medium_prestige_gain + + scope:activity = { + add_activity_log_entry = { + key = tournament_lent_lance_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = grateful_opinion + opinion = 30 + } + + stress_impact = { + compassionate = minor_stress_impact_loss + generous = minor_stress_impact_loss + just = minor_stress_impact_loss + arbitrary = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = arbitrary + } + } + } + } + # Continue + option = { + name = ep2_tournament_events.4009.c + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + add_prestige = minor_prestige_loss + + stress_impact = { + compassionate = minor_stress_impact_gain + generous = minor_stress_impact_gain + just = minor_stress_impact_gain + arbitrary = minor_stress_impact_loss + callous = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = generous + has_trait = just + } + } + } + } +} + +################# +### RECITAL ### +################## + +# Previous entrant's verse is similar to yours +ep2_tournament_events.5501 = { + type = activity_event + title = ep2_tournament_events.5501.t + desc = ep2_tournament_events.5501.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:enemy + animation = scheme + } + cooldown = { years = 1 } + + trigger = { + exists = var:contest_aptitude + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + this = root + } + any_guest_subset_current_phase = { + name = qualified + contest_event_general_contestant_valid_trigger = yes + this != root + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_positive_reaction" + scope:activity = { + random_guest_subset_current_phase = { + name = qualified + limit = { contest_event_general_contestant_valid_trigger = yes } + save_scope_as = enemy + } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = recital ID = 5501 } + } + + # Show them it's all about the delivery + option = { + name = ep2_tournament_events.5501.a + trigger = { + OR = { + has_trait = lifestyle_poet + has_trait = education_learning_3 + has_trait = education_learning_4 + has_trait = education_learning_5 + has_trait = shrewd + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_medium_value + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + arrogant = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + } + } + } + + # Improvise + option = { + name = ep2_tournament_events.5501.b + + random_list = { + 9 = { #It goes well + + modifier = { #Skill buff + add = 15 + diplomacy > high_skill_rating + } + + modifier = { #Big buff if you're a poet + add = 15 + has_trait = lifestyle_poet + } + + modifier = { #More diplo! + add = 10 + OR = { + has_trait = education_learning_3 + has_trait = education_learning_4 + has_trait = education_learning_5 + } + } + + modifier = { #Being learned helps + add = 5 + learning > high_skill_rating + } + + modifier = { #Always good to be an extrovert in these situations + add = 5 + has_trait = gregarious + } + + modifier = { #Blanket coverage for smarts + add = 5 + OR = { + has_trait = shrewd + has_trait = intellect_good + } + } + + desc = ep2_tournament_events.5501.b.success + + send_interface_toast = { + title = ep2_tournament_events.5501.b.success + left_icon = root + right_icon = scope:enemy + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_minor_value + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + } + } + } + 10 = { #It doesn't go well + + desc = ep2_tournament_events.5501.b.failure + + send_interface_toast = { + title = ep2_tournament_events.5501.b.failure + left_icon = root + right_icon = scope:enemy + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + stress_impact = { + base = miniscule_stress_impact_gain + } + } + } + } + + ai_chance = { + base = 100 + } + } + # Protest + option = { + name = ep2_tournament_events.5501.c + + add_prestige = minor_prestige_loss + + duel = { + skills = { diplomacy intrigue } + target = scope:enemy + #They DID plan it! + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.5501.c.success + left_icon = root + right_icon = scope:enemy + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + add_prestige = minor_prestige_gain + } + + desc = ep2_tournament_events.5501.c.success + + stress_impact = { + base = miniscule_stress_impact_loss + paranoid = major_stress_impact_loss #I KNEW IT! + just = minor_stress_impact_loss + } + } + #You look like a fool + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.5501.c.failure + left_icon = root + right_icon = scope:enemy + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + add_prestige = minor_prestige_loss + } + + desc = ep2_tournament_events.5501.c.failure + + stress_impact = { + base = miniscule_stress_impact_gain + paranoid = medium_stress_impact_gain + just = medium_stress_impact_gain + } + } + } + + ai_chance = { + base = 100 + } + } +} + +# Contestant plagiarises verse +ep2_tournament_events.5502 = { + type = activity_event + title = ep2_tournament_events.5502.t + desc = { + desc = ep2_tournament_events.5502.start + first_valid = { + triggered_desc = { + trigger = { + scope:contestant = { + has_friendly_relationship_trigger = { + CHARACTER = root + } + culture != scope:activity.activity_location.culture + } + } + desc = ep2_tournament_events.5502.friend + } + triggered_desc = { + trigger = { + scope:contestant = { + culture != scope:activity.activity_location.culture + } + } + desc = ep2_tournament_events.5502.culture + } + } + desc = ep2_tournament_events.5502.end + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:contestant + animation = shock + } + cooldown = { years = 1 } + + trigger = { + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + contest_event_general_contestant_valid_trigger = yes + culture != scope:activity.activity_location.culture + this != root + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" + scope:activity = { + random_guest_subset_current_phase = { + name = qualified + limit = { + contest_event_general_contestant_valid_trigger = yes + culture != scope:activity.activity_location.culture + } + save_scope_as = contestant + } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = recital ID = 5502 } + scope:activity = { + add_activity_log_entry = { + key = tournament_plagiarism_log + tags = { good } + score = 5 + character = root + target = scope:versus_contestant + } + } + } + + # This isn't their fault! + option = { + name = ep2_tournament_events.5502.a + + duel = { + skills = { diplomacy } + value = decent_skill_rating + + #You convince the crowd + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.5502.c.success + left_icon = root + right_icon = scope:contestant + + scope:contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 35 + } + } + } + + desc = ep2_tournament_events.5502.c.success + + stress_impact = { + base = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + just = minor_stress_impact_loss + lazy = minor_stress_impact_gain + callous = medium_stress_impact_gain + } + } + + #The crowd turn against them + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.5502.c.failure + left_icon = root + right_icon = scope:contestant + + scope:contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + } + + desc = ep2_tournament_events.5502.c.failure + + stress_impact = { + base = miniscule_stress_impact_gain + } + } + } + + ai_chance = { + base = 100 + } + } + + # Join in with the booing + option = { + name = ep2_tournament_events.5502.b + + scope:contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + add_prestige = minor_prestige_loss + } + + progress_towards_rival_effect = { + REASON = rival_recital_booing + CHARACTER = scope:contestant + OPINION = default_rival_opinion + } + + stress_impact = { + gregarious = minor_stress_impact_gain + just = medium_stress_impact_gain + lazy = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + honest = major_stress_impact_gain + deceitful = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = honest + } + } + } + } + + # Leave the contestant to suffer + option = { + name = ep2_tournament_events.5502.c + + scope:contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + + stress_impact = { + gregarious = miniscule_stress_impact_gain + just = miniscule_stress_impact_gain + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = honest + + } + } + } +} + +# Stage fright +ep2_tournament_events.5503 = { + type = activity_event + title = ep2_tournament_events.5503.t + desc = { + desc = ep2_tournament_events.5503.desc + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = avaricious + has_trait = education_stewardship_3 + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + } + } + desc = ep2_tournament_events.5503.rich + } + triggered_desc = { + trigger = { + OR = { + has_trait = seducer + AND = { + has_trait = deviant + has_trait = lustful + } + } + } + desc = ep2_tournament_events.5503.seducer + } + triggered_desc = { + desc = ep2_tournament_events.5503.fallback + } + } + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = shock + } + cooldown = { years = 1 } + + trigger = { + exists = var:contest_aptitude + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + this = root + } + any_guest_subset_current_phase = { + name = qualified + contest_event_general_contestant_valid_trigger = yes + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + scope:activity = { + random_guest_subset_current_phase = { + name = qualified + limit = { contest_event_general_contestant_valid_trigger = yes } + save_scope_as = contestant + } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = recital ID = 5503 } + } + + # Fall back on a stock poem + option = { + name = ep2_tournament_events.5503.a + trigger = { + has_trait = lifestyle_poet + } + + flavor = ep2_tournament_events.5503.a.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_minor_value + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + } + + ai_chance = { + base = 200 + } + } + + # Behold! Free coin! + option = { + name = ep2_tournament_events.5503.b + + trigger = { + OR = { + has_trait = avaricious + has_trait = education_stewardship_3 + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + } + } + + flavor = ep2_tournament_events.5503.b.tt + + remove_short_term_gold = tiny_gold_value + + stress_impact = { + base = miniscule_stress_impact_loss + greedy = major_stress_impact_gain + generous = minor_stress_impact_loss + just = minor_stress_impact_gain + } + + ai_chance = { + base = 200 + } + } + + # Give the crowd what they want + option = { + name = ep2_tournament_events.5503.c + + trigger = { + OR = { + has_trait = seducer + AND = { + has_trait = deviant + has_trait = lustful + } + } + } + + flavor = ep2_tournament_events.5503.c.tt + + if = { + limit = { + faith = { + NOR = { + trait_is_virtue = lustful + trait_is_sin = lustful + } + } + } + add_prestige = minor_prestige_loss + add_character_modifier = { + modifier = tournament_performative_sensuousness_modifier + years = 5 + } + } + else_if = { + limit = { + faith = { + trait_is_sin = lustful + } + } + add_piety = medium_piety_loss + add_character_modifier = { + modifier = tournament_performative_sensuousness_modifier + years = 10 + } + } + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + ai_chance = { + base = 200 + } + } + + # Distract the crowd + option = { + name = ep2_tournament_events.5503.d + + duel = { + skills = { intrigue diplomacy } + value = decent_skill_rating + #You successfully distract the crowd + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.5503.d.win + left_icon = root + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + } + + desc = ep2_tournament_events.5503.d.win + + stress_impact = { + base = miniscule_stress_impact_loss + deceitful = minor_stress_impact_loss + } + } + #The crowd aren't fooled + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.5503.d.lose + left_icon = root + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + + desc = ep2_tournament_events.5503.d.lose + + stress_impact = { + base = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + } + } + + ai_chance = { + base = 100 + } + } + + # Try and fail + option = { + name = ep2_tournament_events.5503.e + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + stress_impact = { + base = miniscule_stress_impact_gain + arrogant = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } +} + +# A downpour begins +ep2_tournament_events.5504 = { + type = activity_event + title = ep2_tournament_events.5504.t + desc = ep2_tournament_events.5504.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = worry + } + cooldown = { years = 1 } + + trigger = { + exists = var:contest_aptitude + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + this = root + } + activity_location = { is_drylands_or_desert_trigger = no } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_negative_reaction" + tournament_pivotal_flavor_variable_effect = { CONTEST = recital ID = 5504 } + scope:activity = { + add_activity_log_entry = { + key = tournament_downpour_begins_log + tags = { good } + score = 5 + character = root + } + } + } + + # Continue + option = { + name = ep2_tournament_events.5504.a + + duel = { + skills = { diplomacy } + value = decent_skill_rating + + 50 = { #You utilise the rain successfully + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + modifier = { #Skill buff + add = 15 + diplomacy > high_skill_rating + } + + modifier = { #Big buff if you're a poet + add = 15 + has_trait = lifestyle_poet + } + + modifier = { #More diplo! + add = 10 + OR = { + has_trait = education_learning_3 + has_trait = education_learning_4 + has_trait = education_learning_5 + } + } + + modifier = { #Being learned helps + add = 5 + learning > high_skill_rating + } + + modifier = { #Not scared of a bit of thunder + add = 5 + has_trait = brave + } + + modifier = { #Blanket coverage for smarts + add = 5 + OR = { + has_trait = shrewd + has_trait = intellect_good + } + } + + send_interface_toast = { + title = ep2_tournament_events.5504.a.success + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + + desc = ep2_tournament_events.5504.a.success + + stress_impact = { + base = miniscule_stress_impact_loss + brave = miniscule_stress_impact_loss + } + } + + 50 = { #You are drowned out by the downpour + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + modifier = { #Skill debuff + add = -10 + diplomacy < high_skill_rating + } + + modifier = { #Aaahhhh, loud noises! + add = -5 + has_trait = craven + } + + send_interface_toast = { + title = ep2_tournament_events.5504.a.failure + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + + + desc = ep2_tournament_events.5504.a.failure + + stress_impact = { + base = miniscule_stress_impact_gain + craven = medium_stress_impact_gain + } + } + } + + + ai_chance = { + base = 100 + } + } + + # Run away scared + option = { + name = ep2_tournament_events.5504.b + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + stress_impact = { + brave = medium_stress_impact_gain + shy = miniscule_stress_impact_loss + craven = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = brave + } + } + } +} + +# You see a chance to insult an opponent +ep2_tournament_events.5505 = { + type = activity_event + title = ep2_tournament_events.5505.t + desc = { + desc = ep2_tournament_events.5505.desc + first_valid = { + triggered_desc = { + trigger = { + scope:enemy = { + AND = { + is_female = no + OR = { + has_trait = chaste + has_trait = celibate + } + } + } + } + desc = ep2_tournament_events.5505.start.malevirgin + } + triggered_desc = { + trigger = { + scope:enemy = { + AND = { + is_female = yes + OR = { + has_trait = chaste + has_trait = celibate + } + } + } + } + desc = ep2_tournament_events.5505.start.femalevirgin + } + triggered_desc = { + trigger = { + scope:enemy = { + age > 60 + } + } + desc = ep2_tournament_events.5505.start.old + } + triggered_desc = { + trigger = { + scope:enemy = { + current_weight > 50 + } + } + desc = ep2_tournament_events.5505.start.fat + } + triggered_desc = { + trigger = { + scope:enemy = { + has_trait = compassionate + } + NOT = { + has_trait = compassionate + } + } + desc = ep2_tournament_events.5505.start.soft + } + triggered_desc = { + trigger = { + has_trait = compassionate + } + desc = ep2_tournament_events.5505.start.compassionate + } + triggered_desc = { + desc = ep2_tournament_events.5505.start.fallback + } + } + desc = ep2_tournament_events.5505.end + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:enemy + animation = anger + } + cooldown = { years = 1 } + + trigger = { + exists = var:contest_aptitude + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + this = root + } + any_guest_subset_current_phase = { + name = qualified + contest_event_general_contestant_valid_trigger = yes + this != root + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Ambience/2D/ep2_amb_2d_crowd_surprise_reaction" + scope:activity = { + random_guest_subset_current_phase = { + name = qualified + limit = { contest_event_general_contestant_valid_trigger = yes } + save_scope_as = enemy + } + } + tournament_pivotal_flavor_variable_effect = { CONTEST = recital ID = 5505 } + } + + # Call them a virgin + option = { + name = ep2_tournament_events.5505.maidenless + trigger = { + scope:enemy = { + OR = { + has_trait = chaste + has_trait = celibate + } + } + } + + add_internal_flag = special + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_medium_value + } + } + + progress_towards_rival_effect = { + REASON = rival_recital_insult + CHARACTER = scope:enemy + OPINION = default_rival_opinion + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_insulted_opponent_log + tags = { good } + score = 5 + character = root + target = scope:enemy + } + } + + stress_impact = { + chaste = medium_stress_impact_gain + celibate = medium_stress_impact_gain + sadistic = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + gregarious = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + has_trait = chaste + has_trait = celibate + } + } + } + } + + # Call them old + option = { + name = ep2_tournament_events.5505.old + trigger = { + scope:enemy = { + age > 60 + } + } + + add_internal_flag = special + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_medium_value + } + } + + progress_towards_rival_effect = { + REASON = rival_recital_insult + CHARACTER = scope:enemy + OPINION = default_rival_opinion + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_insulted_opponent_log + tags = { good } + score = 5 + character = root + target = scope:enemy + } + } + + stress_impact = { + sadistic = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + gregarious = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + } + } + } + } + + # Call them fat + option = { + name = ep2_tournament_events.5505.fat + trigger = { + scope:enemy = { + current_weight > 50 + } + NOT = { + current_weight > 50 + } + } + + add_internal_flag = special + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_medium_value + } + } + + progress_towards_rival_effect = { + REASON = rival_recital_insult + CHARACTER = scope:enemy + OPINION = default_rival_opinion + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_insulted_opponent_log + tags = { good } + score = 5 + character = root + target = scope:enemy + } + } + + stress_impact = { + sadistic = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + gregarious = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + } + } + } + } + + # Try, and fail, to insult them + option = { + name = ep2_tournament_events.5505.idiot + trigger = { + OR = { + has_trait = dull + has_trait = intellect_bad + } + } + + add_internal_flag = special + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + + reverse_add_opinion = { + target = scope:enemy + modifier = tournament_confused_opinion + opinion = -5 + } + + stress_impact = { + base = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + # Imply you'll flay them + option = { + name = ep2_tournament_events.5505.torturer + trigger = { + has_trait = torturer + } + + add_internal_flag = special + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + progress_towards_rival_effect = { + REASON = rival_recital_insult + CHARACTER = scope:enemy + OPINION = default_rival_opinion + } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_minor_value + } + } + + reverse_add_opinion = { + target = scope:enemy + modifier = disgusted_opinion + opinion = -40 + } + + every_close_family_member = { + custom = ep2_tournament_events.5505.opinion.tt + limit = { + NOT = { + has_trait = sadistic + } + location = root.location + } + add_opinion = { + target = root + opinion = -20 + modifier = disgusted_opinion + } + } + + stress_impact = { + base = minor_stress_impact_loss + sadistic = medium_stress_impact_loss + gregarious = major_stress_impact_gain + compassionate = major_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + } + } + } + } + + # Be nice + option = { + name = ep2_tournament_events.5505.compassionate + + trigger = { + has_trait = compassionate + } + + add_internal_flag = special + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + progress_towards_friend_effect = { + REASON = friend_recital_compliment + CHARACTER = scope:enemy + OPINION = default_friend_opinion + } + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_minor_value + } + } + + stress_impact = { + sadistic = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + compassionate = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = arrogant + } + } + } + } + + # Insult them + option = { + name = ep2_tournament_events.5505.fallback + + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + + progress_towards_rival_effect = { + REASON = rival_recital_insult + CHARACTER = scope:enemy + OPINION = default_rival_opinion + } + + stress_impact = { + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + gregarious = minor_stress_impact_gain + } + + scope:activity = { + add_activity_log_entry = { + key = tournament_insulted_opponent_log + tags = { good } + score = 5 + character = root + target = scope:enemy + } + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + } + } + } + } + + # ...never mind + option = { + name = ep2_tournament_events.5505.getout + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + stress_impact = { + sadistic = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + compassionate = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = arrogant + } + } + } + } +} + +######################### +### HONSE RANCING ### +######################### + +# Choose your ~~fighter~~ jockey +ep2_tournament_events.4500 = { + type = activity_event + title = ep2_tournament_events.4500.t + desc = { + desc = ep2_tournament_events.4500.desc + triggered_desc = { # Knight + trigger = { + scope:jockey1 = { + is_knight_of = root + } + } + desc = ep2_tournament_events.4500.knight + } + triggered_desc = { # Guest + trigger = { + scope:jockey1 = { + is_knight_of = root + } + scope:jockey2 = { is_in_the_same_court_as_or_guest = root } + } + desc = ep2_tournament_events.4500.guest + } + triggered_desc = { + trigger = { + scope:jockey1 = { + is_knight_of = root + } + scope:jockey2 = { + is_in_the_same_court_as_or_guest = root + } + } + desc = ep2_tournament_events.4500.nobody + } + triggered_desc = { # Nobody + trigger = { + NOR = { + scope:jockey1 = { + is_knight_of = root + } + scope:jockey2 = { + is_in_the_same_court_as_or_guest = root + } + } + } + desc = ep2_tournament_events.4500.fallback + } + } + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = worry + } + right_portrait = scope:jockey1 + lower_right_portrait = scope:jockey2 + lower_left_portrait = scope:jockey3 + + trigger = { + is_ai = no + } + + immediate = { + #Knight + if = { + limit = { + any_knight = { + location = root.location + is_participant_in_activity = scope:activity + is_adult = yes + is_landed = no + is_healthy = yes + NOT = { + is_in_guest_subset = { name = qualified } + } + } + } + random_knight = { + limit = { + location = root.location + is_participant_in_activity = scope:activity + is_adult = yes + is_landed = no + is_healthy = yes + NOT = { + is_in_guest_subset = { name = qualified } + } + } + weight = { + base = 1 + modifier = { add = prowess } + } + save_scope_as = jockey1 + } + } + else = { + create_character = { + template = tournament_locale_character + culture = root.location.culture + faith = root.location.faith + location = root.location + gender_female_chance = root_soldier_female_chance + save_scope_as = jockey1 + } + scope:jockey1 = { + add_character_flag = generated_jockey + add_to_list = potential_jockeys + } + } + # Courtiers/Guests + if = { + limit = { + any_courtier_or_guest = { + location = root.location + is_participant_in_activity = scope:activity + is_adult = yes + is_healthy = yes + NOR = { + is_in_guest_subset = { name = qualified } + this = scope:jockey1 + is_spouse_of = root + is_concubine = yes + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + random_courtier_or_guest = { + limit = { + location = root.location + is_participant_in_activity = scope:activity + is_adult = yes + is_healthy = yes + NOR = { + is_in_guest_subset = { name = qualified } + this = scope:jockey1 + is_spouse_of = root + is_concubine = yes + } + } + weight = { + base = 1 + modifier = { add = prowess } + } + save_scope_as = jockey2 + } + } + else = { + create_character = { + template = tournament_locale_character + culture = root.location.culture + faith = root.location.faith + location = root.location + gender_female_chance = root_soldier_female_chance + save_scope_as = jockey2 + } + scope:jockey2 = { + add_character_flag = generated_jockey + add_to_list = potential_jockeys + } + } + #Randos + create_character = { + template = tournament_locale_character + culture = root.location.culture + faith = root.location.faith + location = root.location + gender_female_chance = root_soldier_female_chance + save_scope_as = jockey3 + } + scope:jockey3 = { + add_character_flag = generated_jockey + add_to_list = potential_jockeys + } + } + + # Choose Jockey 1 + option = { + name = ep2_tournament_events.4500.a + flavor = ep2_tournament_events.4500.knight.tt + scope:jockey1 = { + tournament_choose_jockey_effect = yes + accolade_medium_glory_gain_with_checks_effect = yes + } + ai_chance = { + base = 1 + modifier = { add = scope:jockey1.contest_horse_aptitude_value } + } + } + # Choose Jockey 2 + option = { + name = ep2_tournament_events.4500.b + flavor = ep2_tournament_events.4500.guest.tt + scope:jockey2 = { + tournament_choose_jockey_effect = yes + accolade_medium_glory_gain_with_checks_effect = yes + } + ai_chance = { + base = 1 + modifier = { add = scope:jockey2.contest_horse_aptitude_value } + } + } + # Choose Jockey 3 + option = { + name = ep2_tournament_events.4500.c + flavor = ep2_tournament_events.4500.nobody.tt + scope:jockey3 = { + tournament_choose_jockey_effect = yes + accolade_medium_glory_gain_with_checks_effect = yes + } + ai_chance = { + base = 1 + modifier = { add = scope:jockey3.contest_horse_aptitude_value } + } + } + + after = { + # Cull spare jockeys + every_in_list = { + list = potential_jockeys + limit = { + has_character_flag = generated_jockey + NOT = { root.var:horse_race_jockey ?= this } + } + silent_disappearance_effect = yes + } + } +} + +######################### +### EXTRA ARCHERY ### +######################### + +# You try to liven up the Contest +# Archery +ep2_tournament_events.6501 = { + type = activity_event + title = ep2_tournament_events.6501.t + desc = ep2_tournament_events.6501.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = bow_closed + } + cooldown = { years = 1 } + + trigger = { + exists = var:contest_aptitude + scope:activity = { + any_guest_subset_current_phase = { + name = qualified + this = root + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_arrow_flyby" + tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 6501 } + } + + # Stand on one leg a fencepost + option = { + name = ep2_tournament_events.6501.a + trigger = { + has_trait = arrogant + } + + duel = { + skill = prowess + value = high_skill_rating + #You succeed! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # I'm used to this :sunglasses: + factor = 2 + has_trait = one_legged + } + + send_interface_toast = { + title = ep2_tournament_events.6501.a.tt.win + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + + add_prestige = major_prestige_value + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = bow + value = tournament_hastiludes_xp_gain_major_value + } + } + } + if = { + limit = { + OR = { + location = { + OR = { + geographical_region = world_europe + geographical_region = world_asia_minor + } + } + religion = religion:christianity_religion + } + } + give_nickname = nick_monopod + } + else = { + give_nickname = nick_sure_footed + } + + desc = ep2_tournament_events.6501.a.tt.win + + stress_impact = { + arrogant = medium_stress_impact_loss + shy = medium_stress_impact_gain + brave = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + } + } + #You slip and fall + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.6501.a.tt.lose + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + increase_wounds_effect = { REASON = wounds } + } + + desc = ep2_tournament_events.6501.a.tt.lose + + stress_impact = { + base = minor_stress_impact_gain + arrogant = major_stress_impact_gain + } + } + } + scope:activity = { + add_activity_log_entry = { + key = tournament_archery_livened_log + tags = { good } + score = 5 + character = root + } + } + stress_impact = { + craven = minor_stress_impact_gain + shy = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 30 + } + } + + # Try to fire an arrow blindfolded + option = { + name = ep2_tournament_events.6501.b + duel = { + skill = prowess + value = high_skill_rating + #You succeed! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.6501.b.tt.win + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + add_prestige = medium_prestige_value + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = bow + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + + desc = ep2_tournament_events.6501.b.tt.win + + stress_impact = { + arrogant = minor_stress_impact_loss + shy = minor_stress_impact_gain + brave = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + } + } + #You slip and fall + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep2_tournament_events.6501.a.tt.lose + left_icon = root + + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + add_prestige = minor_prestige_loss + } + + desc = ep2_tournament_events.6501.b.tt.lose + + stress_impact = { + arrogant = medium_stress_impact_gain + } + } + } + scope:activity = { + add_activity_log_entry = { + key = tournament_archery_livened_log + tags = { good } + score = 5 + character = root + } + } + ai_chance = { + base = 100 + } + } + + # Leave it + option = { + name = ep2_tournament_events.6501.c + stress_impact = { + stubborn = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } +} + +# A competitor injures themself +# Joust +ep2_tournament_events.6502 = { + type = activity_event + title = ep2_tournament_events.6502.t + desc = ep2_tournament_events.6502.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:versus_contestant + animation = loss_1 + } + cooldown = { years = 1 } + + trigger = { + contest_versus_player_vs_ai_trigger = yes + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_male_grunts" + contest_versus_player_vs_ai_scope_effect = yes + tournament_pivotal_flavor_variable_effect = { CONTEST = joust ID = 6502 } + random_court_position_holder = { + type = court_physician_court_position + save_scope_as = physician + } + scope:activity = { + add_activity_log_entry = { + key = tournament_joust_injury_log + tags = { bad } + score = 5 + character = scope:versus_contestant + } + } + } + + # Slyly delight in their fall and injure them further + option = { + name = ep2_tournament_events.6502.a + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + } + } + + flavor = ep2_tournament_events.6502.a.tt + + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + + scope:versus_contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + increase_wounds_no_death_effect = { REASON = wounds } + if = { + limit = { + NOT = { + has_trait = scarred + } + } + add_trait = scarred + } + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 5 + max = 65 + } + } + } + } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = hurt_opinion + opinion = -40 + } + + stress_impact = { + sadistic = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + just = medium_stress_impact_gain + gregarious = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = gregarious + } + } + } + } + + # Fetch your doctor + option = { + name = ep2_tournament_events.6502.b + + trigger = { + court_physician_available_trigger = yes + } + + add_prestige = minor_prestige_gain + + random_list = { + #Your physician does well + 2 = { + modifier = { + add = 5 + scope:physician = { + learning > average_skill_rating + } + } + modifier = { + add = 10 + scope:physician = { + learning > high_skill_rating + } + } + modifier = { + add = 10 + scope:physician = { + has_trait = lifestyle_herbalist + } + } + modifier = { + add = 20 + scope:physician = { + has_trait = lifestyle_physician + } + } + desc = ep2_tournament_events.6502.b.tt.success + + send_interface_toast = { + title = ep2_tournament_events.6502.b.tt.success + left_icon = root + right_icon = scope:versus_contestant + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = grateful_opinion + opinion = 30 + } + } + } + #Your physician doesn't do so hot + 10 = { + modifier = { + add = 5 + scope:physician = { + learning < average_skill_rating + } + } + modifier = { + add = 10 + scope:physician = { + learning < high_skill_rating + } + } + desc = ep2_tournament_events.6502.b.tt.failure + send_interface_toast = { + title = ep2_tournament_events.6502.b.tt.failure + left_icon = root + right_icon = scope:versus_contestant + + scope:competitor = { + if = { + limit = { + NOT = { + scope:versus_contestant = { + has_trait = scarred + } + } + } + add_trait = scarred + } + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 5 + max = 25 + } + } + } + } + } + } + } + + scope:versus_contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + + reverse_add_opinion = { + target = scope:versus_contestant + modifier = grateful_opinion + opinion = 20 + } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + generous = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = arbitrary + } + } + } + } + + # Help them up + option = { + name = ep2_tournament_events.6502.c + + trigger = { + NOT = { + has_trait = callous + has_trait = sadistic + } + } + + scope:versus_contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + increase_wounds_no_death_effect = { REASON = wounds } + } + + add_prestige = minor_prestige_gain + + stress_impact = { + compassionate = miniscule_stress_impact_loss + generous = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + # Shake your head and move on + option = { + name = ep2_tournament_events.6502.d + + scope:versus_contestant = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + increase_wounds_no_death_effect = { REASON = wounds } + + if = { + limit = { + NOT = { + has_trait = scarred + } + } + add_trait = scarred + } + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 5 + max = 25 + } + } + } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } +} + +# A wayward arrow hits a bystander +# Archery +ep2_tournament_events.6503 = { + type = activity_event + title = ep2_tournament_events.6503.t + desc = ep2_tournament_events.6503.desc + window = widget_activity_locale_fullscreen_event + theme = tournament_contest + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:competitor1 + animation = shame + } + lower_right_portrait = { + character = scope:competitor2 + } + cooldown = { years = 1 } + + trigger = { + scope:activity = { + any_guest_subset_current_phase = { + count >= 2 + name = qualified + contest_event_general_contestant_valid_trigger = yes + } + } + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_arrow_impact" + tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 6503 } + scope:activity = { + random_guest_subset_current_phase = { + name = qualified + limit = { contest_event_general_contestant_valid_trigger = yes } + save_scope_as = competitor1 + tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 6503 } + } + random_guest_subset_current_phase = { + name = qualified + limit = { + contest_event_general_contestant_valid_trigger = yes + this != scope:competitor1 + } + save_scope_as = competitor2 + tournament_pivotal_flavor_variable_effect = { CONTEST = archery ID = 6503 } + } + } + scope:competitor2 = { + increase_wounds_no_death_effect = { + REASON = spectator_injured + } + } + scope:activity = { + add_activity_log_entry = { + key = tournament_wayward_arrow_log + tags = { bad } + score = 5 + character = scope:competitor2 + } + } + } + + # Heal the person + option = { + name = ep2_tournament_events.6503.a + trigger = { + has_trait = lifestyle_herbalist + } + reverse_add_opinion = { + target = scope:competitor2 + modifier = grateful_opinion + opinion = 40 + } + reverse_add_opinion = { + target = scope:competitor1 + modifier = relieved_opinion + opinion = 10 + } + scope:competitor2 = { + add_character_modifier = { + modifier = safe_wound_treatment_success_low_modifier + years = 2 + } + } + progress_towards_friend_effect = { + REASON = friend_treated_wounds + CHARACTER = scope:competitor2 + OPINION = 0 + } + stress_impact = { + base = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + # Call for a medic + option = { + name = ep2_tournament_events.6503.b + remove_short_term_gold = minor_gold_value + reverse_add_opinion = { + target = scope:competitor2 + modifier = grateful_opinion + opinion = 40 + } + reverse_add_opinion = { + target = scope:competitor1 + modifier = relieved_opinion + opinion = 10 + } + scope:competitor2 = { + add_character_modifier = { + modifier = safe_wound_treatment_success_low_modifier + years = 2 + } + } + progress_towards_friend_effect = { + REASON = friend_treated_wounds + CHARACTER = scope:competitor2 + OPINION = 0 + } + stress_impact = { + base = miniscule_stress_impact_gain + greedy = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { #More likely if you don't have a lot of gold + factor = 0 + gold < root.minor_gold_value + } + } + } + + # This isn't my concern + option = { + name = ep2_tournament_events.6503.c + scope:competitor1 = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } + } + scope:competitor2 = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + + add_stress = minor_stress_gain + + progress_towards_rival_effect = { + REASON = rival_refused_to_help_wound + CHARACTER = scope:competitor1 + OPINION = default_rival_opinion + } + } + ai_chance = { + base = 100 + } + } +} diff --git a/events/dlc/ep2/wedding_events/ep2_bloody_wedding_events.txt b/events/dlc/ep2/wedding_events/ep2_bloody_wedding_events.txt index 7712d777..b9d88167 100644 --- a/events/dlc/ep2/wedding_events/ep2_bloody_wedding_events.txt +++ b/events/dlc/ep2/wedding_events/ep2_bloody_wedding_events.txt @@ -50,7 +50,11 @@ ep2_wedding.0101 = { text = ep2_wedding.0101.a_lowborn } custom_tooltip = ep2_wedding.0101.a.tt - set_variable = bloody_wedding_murder_family_var + set_variable = { + name = bloody_wedding_murder + value = flag:family + years = 1 + } ai_chance = { base = 100 modifier = { @@ -82,8 +86,12 @@ ep2_wedding.0101 = { option = { #kill only the spouse name = ep2_wedding.0101.b custom_tooltip = ep2_wedding.0101.a.tt - set_variable = bloody_wedding_murder_solo_var - ai_chance = { + set_variable = { + name = bloody_wedding_murder + value = flag:solo + years = 1 + } + ai_chance = { base = 100 modifier = { OR = { @@ -113,8 +121,12 @@ ep2_wedding.0101 = { } } } - set_variable = bloody_wedding_murder_spouse_var - ai_chance = { + set_variable = { + name = bloody_wedding_murder + value = flag:spouse + years = 1 + } + ai_chance = { base = 100 modifier = { OR = { @@ -303,7 +315,7 @@ ep2_wedding.0202 = { trigger = { exists = scope:activity - has_variable = bloody_wedding_murder_family_var + var:bloody_wedding_murder ?= flag:family } immediate = { @@ -584,7 +596,7 @@ ep2_wedding.0203 = { trigger = { exists = scope:activity - has_variable = bloody_wedding_murder_solo_var + var:bloody_wedding_murder ?= flag:solo } immediate = { @@ -971,19 +983,19 @@ ep2_wedding.0301 = { first_valid = { triggered_desc = { #Your mercenaries killed everyone trigger = { - has_variable = bloody_wedding_murder_family_var + var:bloody_wedding_murder ?= flag:family } desc = ep2_wedding.0301.desc.family } triggered_desc = { #Agent killed the spouse trigger = { - has_variable = bloody_wedding_murder_solo_var + var:bloody_wedding_murder ?= flag:solo } desc = ep2_wedding.0301.desc.agent } triggered_desc = { #Spouse died during the wedding night trigger = { - has_variable = bloody_wedding_murder_spouse_var + var:bloody_wedding_murder ?= flag:spouse } desc = ep2_wedding.0301.desc.wedding_night } @@ -992,7 +1004,7 @@ ep2_wedding.0301 = { triggered_desc = { #You're the spouse - wedding night kill trigger = { scope:spouse_1 = root - has_variable = bloody_wedding_murder_spouse_var + var:bloody_wedding_murder ?= flag:spouse } desc = ep2_wedding.0301.spouse_wnight } @@ -1112,19 +1124,19 @@ ep2_wedding.0302 = { first_valid = { triggered_desc = { #Host killed everyone trigger = { - scope:host = { has_variable = bloody_wedding_murder_family_var } + scope:host = { var:bloody_wedding_murder ?= flag:family } } desc = ep2_wedding.0302.desc.family } triggered_desc = { #Agent killed the spouse trigger = { - scope:host = { has_variable = bloody_wedding_murder_solo_var } + scope:host = { var:bloody_wedding_murder ?= flag:solo } } desc = ep2_wedding.0302.desc.agent } triggered_desc = { #Spouse died during the wedding night trigger = { - scope:host = { has_variable = bloody_wedding_murder_spouse_var } + scope:host = { var:bloody_wedding_murder ?= flag:spouse } } desc = ep2_wedding.0302.desc.wedding_night } @@ -1185,7 +1197,7 @@ ep2_wedding.0302 = { scope:activity.var:spouse_2_var = { save_scope_as = spouse_2 } if = { limit = { - scope:host = { has_variable = bloody_wedding_murder_family_var } + scope:host = { var:bloody_wedding_murder ?= flag:family } } show_as_tooltip = { scope:activity = { @@ -1208,8 +1220,8 @@ ep2_wedding.0302 = { limit = { scope:host = { OR = { - has_variable = bloody_wedding_murder_solo_var - has_variable = bloody_wedding_murder_spouse_var + var:bloody_wedding_murder ?= flag:solo + var:bloody_wedding_murder ?= flag:spouse } } } @@ -1488,9 +1500,9 @@ ep2_wedding.0955 = { ep2_wedding.0958 = { #variable clean up - done in an event so they persist for the guests hidden = yes immediate = { - remove_variable ?= bloody_wedding_murder_family_var - remove_variable ?= bloody_wedding_murder_solo_var - remove_variable ?= bloody_wedding_murder_spouse_var + remove_variable ?= bloody_wedding_murder + remove_variable ?= bloody_wedding_backed_down_var + remove_variable ?= bloody_murder_fail } } @@ -1594,13 +1606,13 @@ ep2_wedding.0204 = { #we assume you're the spouse otherwise triggered_desc = { trigger = { - scope:host = { has_variable = bloody_wedding_murder_family_var } + scope:host = { var:bloody_wedding_murder ?= flag:family } } desc = ep2_wedding.0204.desc.family } triggered_desc = { trigger = { - scope:host = { has_variable = bloody_wedding_murder_solo_var } + scope:host = { var:bloody_wedding_murder ?= flag:solo } } desc = ep2_wedding.0204.desc.solo } @@ -1622,7 +1634,7 @@ ep2_wedding.0204 = { lower_center_portrait = { trigger = { root != scope:spouse_2 - NOT = { scope:host = { has_variable = bloody_wedding_murder_solo_var } } + NOT = { scope:host = { var:bloody_wedding_murder ?= flag:solo } } } character = scope:spouse_2 } @@ -1630,7 +1642,7 @@ ep2_wedding.0204 = { trigger = { exists = scope:entourage_1 root != scope:entourage_1 - NOT = { scope:host = { has_variable = bloody_wedding_murder_solo_var } } + NOT = { scope:host = { var:bloody_wedding_murder ?= flag:solo } } } character = scope:entourage_1 } @@ -1638,7 +1650,7 @@ ep2_wedding.0204 = { trigger = { exists = scope:entourage_2 root != scope:entourage_2 - NOT = { scope:host = { has_variable = bloody_wedding_murder_solo_var } } + NOT = { scope:host = { var:bloody_wedding_murder ?= flag:solo } } } character = scope:entourage_2 } diff --git a/events/dlc/ep2/wedding_events/ep2_wedding_events.txt b/events/dlc/ep2/wedding_events/ep2_wedding_events.txt index 947dc2e9..25f43574 100644 --- a/events/dlc/ep2/wedding_events/ep2_wedding_events.txt +++ b/events/dlc/ep2/wedding_events/ep2_wedding_events.txt @@ -85,43 +85,113 @@ ep2_wedding.0001 = { lower_center_portrait = scope:spouse_2 trigger = { - exists = var:promised_grand_wedding_marriage_countdown - has_variable = promised_grand_wedding_marriage_countdown - var:promised_grand_wedding_marriage_countdown = { is_alive = yes } - exists = var:promised_grand_wedding_marriage_countdown.betrothed + var:promised_grand_wedding_marriage_countdown ?= { + is_alive = yes + is_available_allow_travelling = yes + age >= 19 + save_temporary_scope_as = spouse_1 + betrothed = { + is_alive = yes + is_available_allow_travelling = yes + age >= 19 + can_marry_character_trigger = { CHARACTER = scope:spouse_1 } + } + } NOT = { involved_activity ?= { has_activity_type = activity_wedding activity_host = root } } - var:promised_grand_wedding_marriage_countdown = { age >= 19 } - var:promised_grand_wedding_marriage_countdown.betrothed = { age >= 19 } } # This event shouldn't trigger unless the spouses have been adult and marriable for at least 3 years in any case, but to prevent edge cases, we check that they are adult, and if they are not or have not been for at least 3 years, we try again one year later on_trigger_fail = { - if = { - limit = { - has_variable = promised_grand_wedding_marriage_countdown - } - if = { - limit = { exists = var:promised_grand_wedding_marriage_countdown } - trigger_event = { - id = ep2_wedding.0001 - days = 365 - } - set_variable = { - name = promised_grand_wedding_marriage_countdown - value = var:promised_grand_wedding_marriage_countdown - years = grand_wedding_timeout - } - } - else = { - remove_variable = promised_grand_wedding_marriage_countdown - } - } - } + if = { + limit = { + # you are not in this GW + NOT = { + involved_activity ?= { + has_activity_type = activity_wedding + activity_host = root + } + } + } + var:promised_grand_wedding_marriage_countdown ?= { + save_scope_as = spouse_1 + betrothed ?= { save_scope_as = spouse_2 } + } + if = { + limit = { + exists = scope:spouse_1 + exists = scope:spouse_2 + } + if = { + limit = { + # no longer valid marriage, e.g. devoted + scope:spouse_1 ?= { + NOT = { + can_marry_character_trigger = { CHARACTER = scope:spouse_2 } + } + } + } + # TODO informing event + clean_grand_wedding_betrothal_variables = yes + } + else_if = { + limit = { + scope:spouse_1 ?= { + OR = { + age < 19 + scope:spouse_2.age < 19 + # grace period for illness + AND = { + is_available_allow_travelling = no + age < 25 + } + scope:spouse_2 = { + is_available_allow_travelling = no + age < 25 + } + } + } + } + trigger_event = { + id = ep2_wedding.0001 + days = 365 + } + set_variable = { + name = promised_grand_wedding_marriage_countdown + value = scope:spouse_1 + years = grand_wedding_timeout + } + } + # both adult, but can't attend for a reallly long time + else_if = { + limit = { + scope:spouse_1 ?= { + age >= 25 + scope:spouse_2.age >= 25 + OR = { + is_available_allow_travelling = no + scope:spouse_2 = { + is_available_allow_travelling = no + } + } + } + } + # TODO: add an event + clean_grand_wedding_betrothal_variables = yes + } + else_if = { + limit = { + has_variable = promised_grand_wedding_marriage_countdown + } + clean_grand_wedding_betrothal_variables = yes + } + } + } + } immediate = { var:promised_grand_wedding_marriage_countdown = { @@ -158,7 +228,7 @@ ep2_wedding.0002 = { option = { name = ep2_wedding.0002.a - remove_variable = promised_grand_wedding_marriage_countdown + clean_grand_wedding_betrothal_variables = yes } } @@ -202,8 +272,10 @@ ep2_wedding.0100 = { root = scope:spouse_2 } } - desc = ep2_wedding.0100.desc_host - desc = ep2_wedding.0100.desc_host_outro + desc = { + desc = ep2_wedding.0100.desc_host + desc = ep2_wedding.0100.desc_host_outro + } } triggered_desc = { trigger = { @@ -389,12 +461,8 @@ ep2_wedding.0150 = { scope:activity.special_guest:spouse_2 = { save_scope_as = spouse_2 } - if = { - limit = { - exists = scope:activity.special_guest:officiant - } - scope:activity.special_guest:officiant = { save_scope_as = officiant } - } + check_officiant_effect = yes + scope:activity.var:officiant ?= { save_scope_as = officiant } scope:spouse_1 = { show_as_tooltip = { marry = scope:spouse_2 @@ -438,13 +506,7 @@ ep2_wedding.0151 = { first_valid = { triggered_desc = { trigger = { - scope:activity = { - has_activity_option = { - category = special_type - option = wedding_type_bloody - } - } - scope:host = { NOT = { has_variable = bloody_wedding_backed_down_var } } + is_bloody_wedding = yes } desc = ep2_wedding.0151.desc.murder } @@ -709,10 +771,8 @@ ep2_wedding.0151 = { } } } - scope:spouse_1 = { remove_variable = promised_grand_wedding_by } - scope:spouse_2 = { remove_variable = promised_grand_wedding_by } scope:host = { - remove_variable = promised_grand_wedding_marriage_countdown + clean_grand_wedding_betrothal_variables = yes } # The marriage should not be consummated before the Wedding Night! hidden_effect = { @@ -829,12 +889,7 @@ ep2_wedding.0200 = { triggered_desc = { trigger = { #spouse and bloody wedding this = scope:host - scope:activity = { - has_activity_option = { - category = special_type - option = wedding_type_bloody - } - } + is_bloody_wedding = yes root = scope:spouse_1 } desc = ep2_wedding.0200.desc.murder_spouse @@ -842,12 +897,7 @@ ep2_wedding.0200 = { triggered_desc = { #bloody wedding trigger = { this = scope:host - scope:activity = { - has_activity_option = { - category = special_type - option = wedding_type_bloody - } - } + is_bloody_wedding = yes root != scope:spouse_1 } desc = ep2_wedding.0200.desc.murder @@ -1002,26 +1052,14 @@ ep2_wedding.0200 = { option = { name = { - trigger = { - scope:activity = { - has_activity_option = { - category = special_type - option = wedding_type_bloody - } - } + trigger = { + is_bloody_wedding = yes } text = ep2_wedding.0200.a.murder } name = { trigger = { - NOT = { - scope:activity = { - has_activity_option = { - category = special_type - option = wedding_type_bloody - } - } - } + is_bloody_wedding = no } text = ep2_wedding.0200.a } @@ -1047,12 +1085,7 @@ ep2_wedding.0300 = { first_valid = { triggered_desc = { trigger = { - scope:activity = { - has_activity_option = { - category = special_type - option = wedding_type_bloody - } - } + is_bloody_wedding = yes root = scope:spouse_1 } desc = ep2_wedding.0300.desc.murder_spouse @@ -1261,9 +1294,6 @@ ep2_wedding.0910 = { remove_variable = gwedding_gold_recoup_value } remove_variable = promised_grand_wedding_by - scope:previous_host = { - remove_variable = promised_grand_wedding_marriage_countdown - } if = { limit = { has_character_modifier = wedding_fertility_delay_modifier @@ -1355,10 +1385,6 @@ ep2_wedding.0920 = { } remove_variable = gwedding_gold_recoup_value } - remove_variable = promised_grand_wedding_by - scope:previous_host = { - remove_variable = promised_grand_wedding_marriage_countdown - } if = { limit = { has_character_modifier = wedding_fertility_delay_modifier @@ -1415,12 +1441,6 @@ ep2_wedding.0921 = { } remove_variable = gwedding_gold_recoup_value } - if = { - limit = { - has_variable = promised_grand_wedding_by - } - remove_variable = promised_grand_wedding_by - } if = { limit = { has_character_modifier = wedding_fertility_delay_modifier @@ -1604,23 +1624,6 @@ ep2_wedding.0997 = { animation = sadness } - immediate = { - # we should never get this far. If it happens, just get a free pass out of the Grand Wedding Promise since something has gone wrong - if = { - limit = { - this = scope:host - } - remove_variable = promised_grand_wedding_marriage_countdown - } - if = { - limit = { - has_variable = promised_grand_wedding_by - var:promised_grand_wedding_by = scope:host - } - remove_variable = promised_grand_wedding_by - } - } - option = { name = ep2_wedding.0998.a } @@ -1640,19 +1643,6 @@ ep2_wedding.0998 = { immediate = { # we should never get this far. If it happens, just get a free pass out of the Grand Wedding Promise since something has gone wrong - if = { - limit = { - this = scope:host - } - remove_variable = promised_grand_wedding_marriage_countdown - } - if = { - limit = { - has_variable = promised_grand_wedding_by - var:promised_grand_wedding_by = scope:host - } - remove_variable = promised_grand_wedding_by - } if = { limit = { exists = scope:spouse_1 @@ -1998,7 +1988,7 @@ ep2_wedding.1000 = { trigger = { has_activity_intent = reduce_stress_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent stress_impact = { base = minor_stress_impact_loss } @@ -3202,7 +3192,7 @@ ep2_wedding.1100 = { has_activity_intent = reduce_stress_intent this = scope:bride } - custom_tooltip = available_because_intent_tt + reason = activity_intent stress_impact = { base = minor_stress_impact_loss } @@ -3817,12 +3807,21 @@ ep2_wedding.1030 = { # Spouse: your child from a previous partner makes a fuss scripted_trigger ep2_wedding_1120_valid_child_trigger = { - NOT = { + NOR = { + has_trait = child_of_concubine_female + has_trait = child_of_concubine_male any_parent = { this = root.betrothed } + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 } any_parent = { even_if_dead = yes this != root + # polygamy case + trigger_if = { + limit = { is_alive = yes } + NOT = { any_consort = { this = root.betrothed } } + } save_temporary_scope_as = other_parent } age >= 6 @@ -4241,10 +4240,15 @@ scripted_trigger ep2_wedding_1121_valid_child_trigger = { any_parent = { even_if_dead = yes this != root.betrothed + # polygamy case + trigger_if = { + limit = { is_alive = yes } + NOT = { any_consort = { this = root.betrothed } } + } save_temporary_scope_as = other_parent } age >= 6 - involved_activity ?= { this = scope:activity } + involved_activity ?= scope:activity save_temporary_scope_as = trouble_child } @@ -5871,7 +5875,7 @@ ep2_wedding.1140 = { key = made_a_misstep_log tags = { bad } score = 50 - character = scope:spouse_1 + character = scope:fumbling_spouse scope:fumbling_spouse = { add_opinion = { @@ -5926,7 +5930,7 @@ ep2_wedding.1140 = { key = made_a_misstep_log tags = { bad } score = 50 - character = scope:spouse_1 + character = scope:fumbling_spouse } } ai_chance = { @@ -5940,7 +5944,7 @@ ep2_wedding.1140 = { trigger = { has_activity_intent = reduce_stress_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent scope:fumbling_spouse = { add_opinion = { target = root @@ -5957,7 +5961,7 @@ ep2_wedding.1140 = { tags = { good } score = 50 character = root - target = scope:spouse_1 + target = scope:fumbling_spouse } } ai_chance = { @@ -6846,7 +6850,7 @@ ep2_wedding.1170 = { trigger = { has_activity_intent = reduce_stress_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent stress_impact = { base = medium_stress_impact_loss humble = major_stress_impact_loss @@ -6866,7 +6870,7 @@ ep2_wedding.1170 = { trigger = { has_activity_intent = banquet_mischief_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent add_character_modifier = { modifier = wedding_parade_mayhem_modifier years = 5 @@ -6886,7 +6890,7 @@ ep2_wedding.1170 = { has_activity_intent = murder_attendee_intent } flavor = ep2_wedding.1170.e.tt - custom_tooltip = available_because_intent_tt + reason = activity_intent duel = { skills = { intrigue prowess } target = scope:murderee @@ -7146,7 +7150,7 @@ ep2_wedding.1180 = { trigger = { has_activity_intent = reduce_stress_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent scope:other_spouse = { add_opinion = { target = root @@ -7433,7 +7437,7 @@ ep2_wedding.1190 = { has_activity_intent = banquet_mischief_intent } } - custom_tooltip = available_because_intent_tt + reason = activity_intent scope:grumbler = { add_opinion = { target = root @@ -7793,7 +7797,7 @@ ep2_wedding.1200 = { trigger = { has_activity_intent = woo_attendee_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent duel = { skill = intrigue target = scope:listener @@ -7869,7 +7873,7 @@ ep2_wedding.1200 = { trigger = { has_activity_intent = diplomatic_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent duel = { skill = diplomacy target = scope:listener @@ -7957,7 +7961,7 @@ ep2_wedding.1200 = { trigger = { has_activity_intent = matchmaking_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent duel = { skills = { diplomacy intrigue } target = scope:listener @@ -8801,7 +8805,7 @@ ep2_wedding.1220 = { has_activity_intent = diplomatic_intent } flavor = ep2_wedding.1220.c.tt - custom_tooltip = available_because_intent_tt + reason = activity_intent duel = { skill = diplomacy target = scope:relative @@ -8915,7 +8919,7 @@ ep2_wedding.1220 = { trigger = { has_activity_intent = banquet_mischief_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent if = { limit = { has_lifestyle = intrigue_lifestyle @@ -10373,7 +10377,7 @@ ep2_wedding.1070 = { exists = scope:1070_target has_activity_intent = murder_attendee_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent scope:1070_target = { duel = { skill = prowess @@ -10747,7 +10751,7 @@ ep2_wedding.1090 = { has_ep2_dlc_trigger = yes has_activity_intent = matchmaking_intent - intent_target.location = root.location + intent_target.location ?= root.location location = scope:activity.activity_location intent_target = { NOT = { has_character_flag = busy_in_banquet_event } } @@ -12255,11 +12259,7 @@ ep2_wedding.1111 = { } trigger_if = { limit = { - OR = { - this = scope:host - scope:host = scope:activity.special_guest:spouse_1 - scope:host = scope:activity.special_guest:spouse_2 - } + this = scope:host } scope:activity = { any_attending_character = { @@ -15038,14 +15038,10 @@ ep2_wedding.1330 = { option = { name = ep2_wedding.1330.d trigger = { - OR = { - has_trait = deviant - any_secret = { type = secret_deviant } - } + is_deviant_trigger = yes NOR = { - faith = { has_doctrine = doctrine_deviancy_accepted } - scope:spouse = { has_trait = deviant } - scope:spouse = { any_secret = { type = secret_deviant NOT = { is_known_by = root } } } + faith = { has_doctrine_parameter = deviancy_accepted } + scope:spouse = { is_deviant_trigger = yes } } } @@ -15735,47 +15731,46 @@ ep2_wedding.1340 = { } ai_chance = { base = 100 - base = 1 modifier = { - has_trait = lifestyle_gardener - add = 70 - } - modifier = { - has_trait = lifestyle_reveler - add = 70 - } - modifier = { - has_trait = lifestyle_hunter - add = 70 - } - modifier = { - has_trait = lifestyle_poet - add = 70 - } - modifier = { - has_trait = lifestyle_blademaster - add = 40 - } - modifier = { - has_trait = lifestyle_herbalist - add = 40 - } - modifier = { - has_trait = lifestyle_mystic - add = 40 - } - modifier = { - has_trait = lifestyle_physician - add = 40 - } - modifier = { - has_trait = athletic - add = 40 - } - modifier = { - has_trait = journaller - add = 40 - } + has_trait = lifestyle_gardener + add = 70 + } + modifier = { + has_trait = lifestyle_reveler + add = 70 + } + modifier = { + has_trait = lifestyle_hunter + add = 70 + } + modifier = { + has_trait = lifestyle_poet + add = 70 + } + modifier = { + has_trait = lifestyle_blademaster + add = 40 + } + modifier = { + has_trait = lifestyle_herbalist + add = 40 + } + modifier = { + has_trait = lifestyle_mystic + add = 40 + } + modifier = { + has_trait = lifestyle_physician + add = 40 + } + modifier = { + has_trait = athletic + add = 40 + } + modifier = { + has_trait = journaller + add = 40 + } } } @@ -15813,10 +15808,7 @@ ep2_wedding.1340 = { add = 20 } modifier = { - OR = { - any_secret = { type = secret_witch } - has_trait = witch - } + is_witch_trigger = yes add = 20 } send_interface_toast = { @@ -15855,10 +15847,7 @@ ep2_wedding.1340 = { add = 20 } modifier = { - OR = { - any_secret = { type = secret_witch } - has_trait = witch - } + is_witch_trigger = yes add = 20 } } @@ -17711,12 +17700,14 @@ ep2_wedding.3030 = { any_character_artifact = { artifact_slot_type = miscellaneous this != scope:love_memento + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:my_spouse } } } random_character_artifact = { limit = { artifact_slot_type = miscellaneous this != scope:love_memento + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:my_spouse } } save_scope_as = my_love_memento } @@ -18252,7 +18243,7 @@ ep2_wedding.3040 = { scope:my_spouse = { is_ai = yes } intent_target = scope:my_spouse } - custom_tooltip = available_because_intent_tt + reason = activity_intent random_list = { 50 = { #spouse saves themselves desc = ep2_wedding.3040.d.success @@ -19258,15 +19249,10 @@ ep2_wedding.3300 = { else = { scope:activity.special_guest:spouse_1 = { save_scope_as = my_spouse } } + check_officiant_effect = yes + scope:activity.var:officiant ?= { save_scope_as = officiant } # Save witnesses ep2_wedding_bedding_ceremony_witness_effect = yes - # Save officiant - if = { - limit = { - scope:host.cp:councillor_court_chaplain ?= { is_participant_in_activity = scope:activity } - } - scope:host.cp:councillor_court_chaplain = { save_scope_as = officiant } - } # Save jester if = { limit = { @@ -19869,7 +19855,7 @@ scripted_trigger wedding_3400_suitor_trigger = { is_participant_in_activity = scope:activity is_attracted_to_gender_of = $SUITOR$ age >= $SUITOR$.age_minus_25 - age < $SUITOR$.age_plus_25 + age < $SUITOR$.age_plus_25 OR = { is_married = no allowed_more_spouses = yes @@ -19878,7 +19864,7 @@ scripted_trigger wedding_3400_suitor_trigger = { faith = { has_doctrine = doctrine_adultery_women_accepted } root.faith = { has_doctrine = doctrine_adultery_women_accepted } $SUITOR$.faith = { has_doctrine = doctrine_adultery_women_accepted } - + } trigger_else = { faith = { has_doctrine = doctrine_adultery_men_accepted } @@ -23415,7 +23401,7 @@ ep2_wedding.2020 = { } } } - custom_tooltip = available_because_intent_tt + reason = activity_intent duel = { skill = prowess target = scope:drunk_guest diff --git a/events/dlc/ep2/wedding_events/ep2_wedding_events_ewan.txt b/events/dlc/ep2/wedding_events/ep2_wedding_events_ewan.txt index b1300e26..ce79de40 100644 --- a/events/dlc/ep2/wedding_events/ep2_wedding_events_ewan.txt +++ b/events/dlc/ep2/wedding_events/ep2_wedding_events_ewan.txt @@ -1081,7 +1081,7 @@ ep2_wedding_ewan.0001 = { name = ep2_wedding_ewan.0001.c flavor = ep2_wedding_ewan.0001.c.tt trigger = { has_activity_intent = murder_attendee_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent scope:intent_target = { # They're unsettled by your staring. @@ -1899,7 +1899,7 @@ ep2_wedding_ewan.0011 = { name = ep2_wedding_ewan.0011.c # Check for target directly, rather than just the intent, because there isn't a pre-defined intent target and we may have failed to acquire someone suitable. trigger = { exists = scope:intent_target } - custom_tooltip = available_because_intent_tt + reason = activity_intent # You try to trip a server onto someone. duel = { @@ -2744,7 +2744,7 @@ ep2_wedding_ewan.0021 = { option = { name = ep2_wedding_ewan.0021.c trigger = { has_activity_intent = woo_attendee_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent # Sprinkle a bit of opinion in there. reverse_add_opinion = { @@ -3246,7 +3246,7 @@ ep2_wedding_ewan.0031 = { option = { name = ep2_wedding_ewan.0031.g trigger = { has_activity_intent = reduce_stress_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent # Decent middling prestige. add_prestige = medium_prestige_gain @@ -3463,7 +3463,7 @@ ep2_wedding_ewan.0041 = { option = { name = ep2_wedding_ewan.0041.b trigger = { has_activity_intent = reduce_stress_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent # If you're the host, gain prestige. if = { @@ -3499,7 +3499,7 @@ ep2_wedding_ewan.0041 = { option = { name = ep2_wedding_ewan.0041.c trigger = { has_activity_intent = murder_attendee_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent scope:intent_target = { # They're a bit freaked out. @@ -3531,7 +3531,7 @@ ep2_wedding_ewan.0041 = { option = { name = ep2_wedding_ewan.0041.d trigger = { has_activity_intent = woo_attendee_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent # You try to keep it juuuuust about down-low. duel = { @@ -3624,7 +3624,7 @@ ep2_wedding_ewan.0041 = { option = { name = ep2_wedding_ewan.0041.e trigger = { has_activity_intent = diplomatic_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent # Try to give a big, impressive speech. duel = { @@ -3694,7 +3694,7 @@ ep2_wedding_ewan.0041 = { option = { name = ep2_wedding_ewan.0041.f trigger = { has_activity_intent = matchmaking_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent # Gain opinion with scope:activity_intent. reverse_add_opinion = { @@ -3729,7 +3729,7 @@ ep2_wedding_ewan.0041 = { option = { name = ep2_wedding_ewan.0041.g trigger = { has_activity_intent = banquet_mischief_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent # We take your highest of diplomacy or intrigue and let you duel against it. if = { @@ -3840,7 +3840,7 @@ scripted_trigger ep2_wedding_ewan_0051_legal_rake_trigger = { save_temporary_scope_as = char_temp NOT = { trait_is_criminal_in_faith_trigger = { - TRAIT = adulterer + TRAIT = trait:adulterer FAITH = scope:char_temp.faith GENDER_CHARACTER = scope:char_temp } @@ -5707,7 +5707,7 @@ ep2_wedding_ewan.0061 = { option = { name = ep2_wedding_ewan.0061.d trigger = { has_activity_intent = banquet_mischief_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent # Same as the .e rolls, but we remove the minor result and just roll between success & crit success. duel = { diff --git a/events/dlc/ep3/ep3_contract_events.txt b/events/dlc/ep3/ep3_contract_events.txt index 3639690c..4bf641c6 100644 --- a/events/dlc/ep3/ep3_contract_events.txt +++ b/events/dlc/ep3/ep3_contract_events.txt @@ -3034,7 +3034,7 @@ ep3_contract_event.0013 = { scope:task_contract_employer = { pay_treasury_or_gold = { target = scope:task_contract_taker - value = ep3_hire_laamp_mercs_payment_value + value = scope:laamp_temp.ep3_hire_laamp_mercs_payment_value } } scope:laamp_temp = { @@ -7412,10 +7412,11 @@ ep3_contract_event.0095 = { } } - #lead an independence peasant war + #lead an independence peasant war, become landed ruler after winning option = { name = ep3_contract_event.0095.a #start a freedom war! + custom_tooltip = ep3_contract_event.0095.a_become_landed start_war = { cb = ep3_laamp_peasant_war target = scope:task_contract_councillor_liege.top_liege @@ -7471,7 +7472,75 @@ ep3_contract_event.0095 = { } ai_chance = { base = 20 + } + } + #lead an independence peasant war, but remain laamp after winning + option = { + name = ep3_contract_event.0095.a_2 + #start a freedom war! + custom_tooltip = { + text = ep3_contract_event.0095.a_remain_laamp + set_variable = { + name = ep3_laamp_peasant_war_remain_laamp + value = yes + } + } + start_war = { + cb = ep3_laamp_peasant_war + target = scope:task_contract_councillor_liege.top_liege + } + #try to capture the marshal, as they standing right next to you + duel = { + skills = { prowess intrigue } + target = scope:task_contract_councillor + 25 = { + desc = ep3_contract_event.0095.a_win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + prisoner_of_war_capture_effect = { + TARGET = scope:task_contract_councillor + IMPRISONER = root + } + scope:task_contract_councillor_liege = { + add_opinion = { + modifier = fp3_wrongful_imprisonment_opinion + opinion = -30 + target = root + } + } + } + 25 = { + desc = ep3_contract_event.0095.a_lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + scope:task_contract_councillor = { + add_opinion = { + target = root + modifier = attempted_imprisonment_opinion + } + } + } + } + #fail the contract, obivously + scope:task_contract = { + complete_task_contract = failure_standard + } + return_home = yes + stress_impact = { + craven = minor_stress_impact_gain + lazy = minor_stress_impact_gain + brave = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + } + ai_chance = { + base = 0 } } diff --git a/events/dlc/ep3/ep3_decisions_events.txt b/events/dlc/ep3/ep3_decisions_events.txt index b8d45c53..9dd4f653 100644 --- a/events/dlc/ep3/ep3_decisions_events.txt +++ b/events/dlc/ep3/ep3_decisions_events.txt @@ -2650,7 +2650,7 @@ ep3_decisions_event.2090 = { remove_variable = confirmation_grace } # Refund any costs - add_prestige = standard_activity_cost + add_prestige = standard_activity_base_cost } trigger_event = ep3_decisions_event.2080 } @@ -4429,6 +4429,12 @@ ep3_decisions_event.4022 = { participants = { missionary = scope:evangelizer sender = scope:sender } } set_character_faith_with_conversion = scope:evangelizer.faith + if = { + limit = { + scope:evangelizer.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } custom_tooltip = ep3_decisions_event.4022.a.tt custom_tooltip = negotiated_alliance_delay_tt show_as_tooltip = { @@ -5171,6 +5177,23 @@ ep3_decisions_event.4060 = { } add_character_modifier = { modifier = first_admin_emperor } } + # NF tooltip + if = { + limit = { exists = scope:new_title } # some gov types don't need to create a new title + get_title = scope:new_title + } + # Adopting vassal tooltip + every_powerful_vassal = { + limit = { has_same_government = root } + switch = { + trigger = has_government + japan_administrative_government = { change_government = japan_administrative_government } + celestial_government = { change_government = celestial_government } + meritocratic_government = { change_government = meritocratic_government } + steppe_admin_government = { change_government = steppe_admin_government } + fallback = { change_government = administrative_government } + } + } } hidden_effect = { ordered_vassal = { @@ -6138,6 +6161,17 @@ ep3_decisions_event.4090 = { desc = appointment_timeout_desc_retired_governor } } + else_if = { + limit = { + government_is_japanese_trigger = yes + } + add_gold = major_gold_value + change_influence = major_influence_value + add_character_modifier = { + modifier = renounced_governorship_japan + years = 15 + } + } else = { add_gold = massive_gold_value add_character_modifier = { @@ -6766,14 +6800,14 @@ ep3_decisions_event.5020 = { ordered_in_list = { list = available_heresies order_by = num_county_followers - position = 1 + position = 0 save_scope_as = heresy_1 } ordered_in_list = { list = available_heresies limit = { this != scope:heresy_1 } order_by = num_county_followers - position = 1 + position = 0 save_scope_as = heresy_2 } ordered_in_list = { @@ -6783,7 +6817,7 @@ ep3_decisions_event.5020 = { this != scope:heresy_2 } order_by = num_county_followers - position = 1 + position = 0 save_scope_as = heresy_3 } } @@ -6791,6 +6825,12 @@ ep3_decisions_event.5020 = { option = { name = ep3_decisions_event.5020.a set_character_faith_with_conversion = scope:heresy_1 + if = { + limit = { + scope:heresy_1 = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } add_heresiarch_trait_effect = yes # Otherwise the conversion event will remove the trait add_character_flag = converted_by_heresy_decision @@ -6830,6 +6870,12 @@ ep3_decisions_event.5020 = { exists = scope:heresy_2 } set_character_faith_with_conversion = scope:heresy_2 + if = { + limit = { + scope:heresy_2 = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } add_heresiarch_trait_effect = yes # Otherwise the conversion event will remove the trait add_character_flag = converted_by_heresy_decision @@ -6869,6 +6915,12 @@ ep3_decisions_event.5020 = { exists = scope:heresy_3 } set_character_faith_with_conversion = scope:heresy_3 + if = { + limit = { + scope:heresy_3 = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } add_heresiarch_trait_effect = yes # Otherwise the conversion event will remove the trait add_character_flag = converted_by_heresy_decision @@ -6995,6 +7047,12 @@ ep3_decisions_event.5021 = { root = { primary_title = { set_state_faith = scope:heresy } set_character_faith_with_conversion = scope:heresy + if = { + limit = { + scope:heresy = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } add_opinion = { target = scope:heretic modifier = forced_state_heresy_opinion @@ -7376,9 +7434,22 @@ ep3_decisions_event.6001 = { } } scope:liege = { save_scope_as = new_liege } + location.duchy.holder ?= { + if = { + limit = { + this != scope:new_liege + can_set_relation_rival_trigger = { CHARACTER = root } + } + set_relation_rival = { + target = root + reason = seized_my_realm_crime + } + } + } set_variable = separatist_uprising_decision_var set_variable = became_landed_through_separatist_uprising_var location.duchy = { + save_scope_as = target add_to_list = transfer_titles # All De Jure Counties held by the liege will be moved over every_de_jure_county = { @@ -7475,11 +7546,12 @@ ep3_decisions_event.6001 = { resolve_title_and_vassal_change = scope:heir_change } } - ep3_become_landed_transfer_no_ennobled_modifier_effect = { + ep3_become_landed_transfer_effect = { TITLE_RECEIVER = root TITLE_LIST = transfer_titles TYPE = granted REASON = flag:culture_champion + ENNOBLED_ADVENTURER = flag:no } hidden_effect = { scope:old_heir ?= { @@ -7536,7 +7608,14 @@ ep3_decisions_event.6001 = { option = { # Let me think about it name = ep3_decisions_event.6001.d - + hidden_effect = { + send_interface_toast = { + title = champion_culture_costs_refunded + left_icon = root + add_prestige_no_experience = 2000 + add_short_term_gold = 500 + } + } ai_chance = { base = 0 } diff --git a/events/dlc/ep3/ep3_emperor_yearly_2.txt b/events/dlc/ep3/ep3_emperor_yearly_2.txt index c846c16c..06b1071d 100644 --- a/events/dlc/ep3/ep3_emperor_yearly_2.txt +++ b/events/dlc/ep3/ep3_emperor_yearly_2.txt @@ -2,8 +2,8 @@ ############################## # EP3 Admin (Emperor) Events # -# by Claudia Baldassi # -# 2000 - 2999 # +# by Claudia Baldassi # +# 2000 - 2999 # ############################## # Byzantine-only: you have reconquered an important city of the long-lost Empire @@ -161,13 +161,13 @@ ep3_emperor_yearly.2000 = { limit = { scope:county = title:c_tourraine } - NOT = { exists = var:ep3_reconquered_tourraine } + NOT = { exists = global_var:ep3_reconquered_tourraine } } trigger_else_if = { limit = { scope:county = title:c_chandax } - NOT = { exists = var:ep3_reconquered_chandax } + NOT = { exists = global_var:ep3_reconquered_chandax } } trigger_else_if = { limit = { @@ -176,91 +176,91 @@ ep3_emperor_yearly.2000 = { scope:county = title:c_northumberland } } - NOT = { exists = var:ep3_reconquered_hadrian } + NOT = { exists = global_var:ep3_reconquered_hadrian } } trigger_else_if = { limit = { scope:county = title:c_trier } - NOT = { exists = var:ep3_reconquered_trier } + NOT = { exists = global_var:ep3_reconquered_trier } } trigger_else_if = { limit = { scope:county = title:c_lombardia } - NOT = { exists = var:ep3_reconquered_lombardia } + NOT = { exists = global_var:ep3_reconquered_lombardia } } trigger_else_if = { limit = { scope:county = title:c_murcia } - NOT = { exists = var:ep3_reconquered_murcia } + NOT = { exists = global_var:ep3_reconquered_murcia } } trigger_else_if = { limit = { scope:county = title:c_tangiers } - NOT = { exists = var:ep3_reconquered_tangiers } + NOT = { exists = global_var:ep3_reconquered_tangiers } } trigger_else_if = { limit = { scope:county = title:c_tunis } - NOT = { exists = var:ep3_reconquered_tunis } + NOT = { exists = global_var:ep3_reconquered_tunis } } trigger_else_if = { limit = { scope:county = title:c_ravenna } - NOT = { exists = var:ep3_reconquered_ravenna } + NOT = { exists = global_var:ep3_reconquered_ravenna } } trigger_else_if = { limit = { scope:county = title:c_roma } - NOT = { exists = var:ep3_reconquered_roma } + NOT = { exists = global_var:ep3_reconquered_roma } } trigger_else_if = { limit = { scope:county = title:c_siracusa } - NOT = { exists = var:ep3_reconquered_siracusa } + NOT = { exists = global_var:ep3_reconquered_siracusa } } trigger_else_if = { limit = { scope:county = title:c_bari } - NOT = { exists = var:ep3_reconquered_bari } + NOT = { exists = global_var:ep3_reconquered_bari } } trigger_else_if = { limit = { scope:county = title:c_edessa } - NOT = { exists = var:ep3_reconquered_edessa } + NOT = { exists = global_var:ep3_reconquered_edessa } } trigger_else_if = { limit = { scope:county = title:c_abbadan } - NOT = { exists = var:ep3_reconquered_abbadan } + NOT = { exists = global_var:ep3_reconquered_abbadan } } trigger_else_if = { limit = { scope:county = title:c_alexandria } - NOT = { exists = var:ep3_reconquered_alexandria } + NOT = { exists = global_var:ep3_reconquered_alexandria } } trigger_else_if = { limit = { scope:county = title:c_jerusalem } - NOT = { exists = var:ep3_reconquered_jerusalem } + NOT = { exists = global_var:ep3_reconquered_jerusalem } } trigger_else_if = { limit = { scope:county = title:c_antiocheia } - NOT = { exists = var:ep3_reconquered_antiocheia } + NOT = { exists = global_var:ep3_reconquered_antiocheia } } trigger_else = { always = no @@ -268,6 +268,60 @@ ep3_emperor_yearly.2000 = { } immediate = { + switch = { + trigger = scope:county + title:c_antiocheia = { + set_global_variable = ep3_reconquered_antiocheia + } + title:c_jerusalem = { + set_global_variable = ep3_reconquered_jerusalem + } + title:c_alexandria = { + set_global_variable = ep3_reconquered_alexandria + } + title:c_abbadan = { + set_global_variable = ep3_reconquered_abbadan + } + title:c_edessa = { + set_global_variable = ep3_reconquered_edessa + } + title:c_bari = { + set_global_variable = ep3_reconquered_bari + } + title:c_siracusa = { + set_global_variable = ep3_reconquered_siracusa + } + title:c_roma = { + set_global_variable = ep3_reconquered_roma + } + title:c_ravenna = { + set_global_variable = ep3_reconquered_ravenna + } + title:c_tunis = { + set_global_variable = ep3_reconquered_tunis + } + title:c_tangiers = { + set_global_variable = ep3_reconquered_tangiers + } + title:c_murcia = { + set_global_variable = ep3_reconquered_murcia + } + title:c_lombardia = { + set_global_variable = ep3_reconquered_lombardia + } + title:c_trier = { + set_global_variable = ep3_reconquered_trier + } + title:c_northumberland = { + set_global_variable = ep3_reconquered_hadrian + } + title:c_chandax = { + set_global_variable = ep3_reconquered_chandax + } + title:c_tourraine = { + set_global_variable = ep3_reconquered_tourraine + } + } change_influence = massive_influence_gain add_prestige = major_prestige_gain } @@ -408,112 +462,6 @@ ep3_emperor_yearly.2000 = { } after = { - if = { - limit = { - scope:county = title:c_antiocheia - } - set_global_variable = ep3_reconquered_antiocheia - } - else_if = { - limit = { - scope:county = title:c_jerusalem - } - set_global_variable = ep3_reconquered_jerusalem - } - else_if = { - limit = { - scope:county = title:c_alexandria - } - set_global_variable = ep3_reconquered_alexandria - } - else_if = { - limit = { - scope:county = title:c_abbadan - } - set_global_variable = ep3_reconquered_abbadan - } - else_if = { - limit = { - scope:county = title:c_edessa - } - set_global_variable = ep3_reconquered_edessa - } - else_if = { - limit = { - scope:county = title:c_bari - } - set_global_variable = ep3_reconquered_bari - } - else_if = { - limit = { - scope:county = title:c_siracusa - } - set_global_variable = ep3_reconquered_siracusa - } - else_if = { - limit = { - scope:county = title:c_roma - } - set_global_variable = ep3_reconquered_roma - } - else_if = { - limit = { - scope:county = title:c_ravenna - } - set_global_variable = ep3_reconquered_ravenna - } - else_if = { - limit = { - scope:county = title:c_tunis - } - set_global_variable = ep3_reconquered_tunis - } - else_if = { - limit = { - scope:county = title:c_tangiers - } - set_global_variable = ep3_reconquered_tangiers - } - else_if = { - limit = { - scope:county = title:c_murcia - } - set_global_variable = ep3_reconquered_murcia - } - else_if = { - limit = { - scope:county = title:c_lombardia - } - set_global_variable = ep3_reconquered_lombardia - } - else_if = { - limit = { - scope:county = title:c_trier - } - set_global_variable = ep3_reconquered_trier - } - else_if = { - limit = { - OR = { - scope:county = title:c_cumberland - scope:county = title:c_northumberland - } - } - set_global_variable = ep3_reconquered_hadrian - } - else_if = { - limit = { - scope:county = title:c_chandax - } - set_global_variable = ep3_reconquered_chandax - } - else_if = { - limit = { - scope:county = title:c_tourraine - } - set_global_variable = ep3_reconquered_tourraine - } - if = { limit = { NOT = { @@ -738,7 +686,7 @@ ep3_emperor_yearly.2020 = { character = scope:patriarch animation = anger } - + trigger = { has_ep3_dlc_trigger = yes valid_for_byz_emperor_content_trigger = yes @@ -764,7 +712,7 @@ ep3_emperor_yearly.2020 = { random_character_trait = { limit = { save_temporary_scope_as = temp_trait - scoped_trait_is_criminal_in_faith_trigger = { TRAIT = scope:temp_trait FAITH = root.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = scope:temp_trait FAITH = root.faith GENDER_CHARACTER = root } } save_scope_as = target_criminal_trait } @@ -878,20 +826,20 @@ ep3_emperor_yearly.2021 = { animation = wedding_priest } lower_right_portrait = { - trigger = { - scope:patriarch = { is_alive = no } - } - character = scope:patriarch - } + trigger = { + scope:patriarch = { is_alive = no } + } + character = scope:patriarch + } - trigger = { - exists = faith.religious_head - this != faith.religious_head - has_any_criminal_trait_in_faith_trigger = { + trigger = { + exists = faith.religious_head + this != faith.religious_head + has_any_criminal_trait_in_faith_trigger = { CHARACTER = root FAITH = root.faith } - } + } immediate = { if = { @@ -1076,7 +1024,7 @@ ep3_emperor_yearly.2030 = { target = scope:new_patriarch type = favor_hook } - every_vassal = { + every_vassal = { vassal_stance = zealot limit = { this != scope:new_patriarch @@ -1088,7 +1036,7 @@ ep3_emperor_yearly.2030 = { opinion = -25 } } - every_vassal = { + every_vassal = { vassal_stance = glory_hound custom = every_glory_hound_vassal add_opinion = { @@ -1274,7 +1222,7 @@ ep3_emperor_yearly.2040 = { target = scope:new_patriarch type = favor_hook } - every_vassal = { + every_vassal = { vassal_stance = zealot limit = { this != scope:new_patriarch @@ -1286,7 +1234,7 @@ ep3_emperor_yearly.2040 = { opinion = -35 } } - every_vassal = { + every_vassal = { vassal_stance = glory_hound custom = every_glory_hound_vassal add_opinion = { @@ -1518,7 +1466,7 @@ ep3_emperor_yearly.2050 = { house = root.house this != root } - position = 1 + position = 0 save_scope_as = last_emperor } } @@ -1884,7 +1832,7 @@ ep3_emperor_yearly.2070 = { location = root.location faith = scope:giraffe_county.faith culture = scope:giraffe_county.culture - gender_female_chance = 50 + gender_female_chance = 50 save_scope_as = ambassador } court_event_character_flag_effect = yes @@ -2159,7 +2107,7 @@ ep3_emperor_yearly.2080 = { employs_court_position = high_almoner_court_position } # Court weightings. - ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } } immediate = { @@ -2321,7 +2269,7 @@ ep3_emperor_yearly.2090 = { weight_multiplier = { base = 1 # Court weightings. - ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } } immediate = { @@ -2553,8 +2501,8 @@ ep3_emperor_yearly.2100 = { } } # Court weightings. - ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } - ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } } immediate = { @@ -2577,7 +2525,7 @@ ep3_emperor_yearly.2100 = { } save_scope_as = contested_county } - save_scope_as = neighbor + save_scope_as = neighbor } random_top_realm_border_county = { limit = { @@ -2771,7 +2719,7 @@ ep3_emperor_yearly.2110 = { valid_for_byz_emperor_content_trigger = yes } # Court weightings. - ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } } immediate = { @@ -3027,7 +2975,7 @@ ep3_emperor_yearly.2120 = { weight_multiplier = { base = 1 # Court weightings. - ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } } immediate = { @@ -3212,7 +3160,7 @@ ep3_emperor_yearly.2130 = { weight_multiplier = { base = 1 # Court weightings. - ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } } immediate = { @@ -3272,7 +3220,7 @@ ep3_emperor_yearly.2130 = { option = { name = ep3_emperor_yearly.2130.b trigger = { - scope:prisoner = { + scope:prisoner = { government_allows = administrative is_vassal_or_below_of = root is_landed_or_landless_administrative = yes @@ -3302,7 +3250,7 @@ ep3_emperor_yearly.2130 = { option = { name = ep3_emperor_yearly.2130.c trigger = { - scope:prisoner = { + scope:prisoner = { NOR = { is_vassal_or_below_of = root is_landed_or_landless_administrative = yes @@ -3501,7 +3449,7 @@ ep3_emperor_yearly.2150 = { scope:saint = { has_nickname = nick_the_iron_wearer } } desc = ep3_emperor_yearly.2150.desc.iron - } + } } desc = ep3_emperor_yearly.2150.desc.end } @@ -3771,7 +3719,7 @@ ep3_emperor_yearly.2150 = { if = { limit = { can_employ_court_position_type = cave_hermit_court_position - scope:saint = { can_be_employed_as = cave_hermit_court_position } + scope:saint = { can_be_employed_as = cave_hermit_court_position } } court_position_grant_effect = { EMPLOYER = root @@ -4287,7 +4235,7 @@ ep3_emperor_yearly.2170 = { valid_for_byz_governor_content_trigger = yes has_tgp_dlc_trigger = yes } - + any_sub_realm_county = { OR = { any_county_province = { has_building = fairy_chimneys } @@ -4364,7 +4312,10 @@ ep3_emperor_yearly.2170 = { years = 50 } } - change_influence = major_influence_gain + if = { + limit = { government_has_flag = government_has_influence } + change_influence = major_influence_gain + } stress_impact = { greedy = major_stress_impact_gain paranoid = medium_stress_impact_gain @@ -4987,7 +4938,7 @@ ep3_emperor_yearly.2190 = { ep3_emperor_yearly.2200 = { type = character_event title = ep3_emperor_yearly.2200.t - + desc = { first_valid = { #You have a ceremonial monarch @@ -4997,7 +4948,7 @@ ep3_emperor_yearly.2200 = { } desc = ep3_emperor_yearly.2200.desc.c_monarch } - #Not ceremonial monarch + #Not ceremonial monarch desc = ep3_emperor_yearly.2200.desc } } @@ -5044,7 +4995,7 @@ ep3_emperor_yearly.2200 = { } top_liege.primary_title.var:administrative_ui_special_title.holder = { save_scope_as = ceremonial_monarch - } + } } } @@ -5079,7 +5030,7 @@ ep3_emperor_yearly.2200 = { } } random_scheme = { - type = depose + type = depose limit = { scheme_target_character = scope:liege } @@ -5525,7 +5476,7 @@ scripted_trigger ep3_2220_valid_county_trigger = { } } any_county_province = { - NOR = { + NOR = { has_holding_type = church_holding ep3_2220_famous_monastery_trigger = yes } @@ -5616,7 +5567,7 @@ ep3_emperor_yearly.2220 = { } random_county_province = { limit = { - NOR = { + NOR = { has_holding_type = church_holding ep3_2220_famous_monastery_trigger = yes } @@ -5809,7 +5760,7 @@ ep3_emperor_yearly.2230 = { generous = major_stress_impact_gain just = major_stress_impact_gain honest = medium_stress_impact_gain - compassionate = medium_stress_impact_gain + compassionate = medium_stress_impact_gain } ai_chance = { base = 100 @@ -5926,10 +5877,10 @@ scripted_trigger ep3_valid_greek_culture_trigger = { } scripted_trigger ep3_2240_valid_courtier_trigger = { - culture = { + culture = { OR = { has_graphical_east_asia_culture_group_trigger = yes - ep3_valid_greek_culture_trigger = yes + ep3_valid_greek_culture_trigger = yes } } @@ -5940,13 +5891,13 @@ scripted_trigger ep3_2240_valid_courtier_trigger = { has_trait = education_learning_2 has_trait = education_learning_3 } - + OR = { has_trait = arrogant has_trait = eccentric has_trait = gregarious } - is_of_major_or_minor_interest_trigger = { CHARACTER = root } + is_of_major_or_minor_interest_trigger = { CHARACTER = root } } ep3_emperor_yearly.2240 = { @@ -5956,8 +5907,8 @@ ep3_emperor_yearly.2240 = { first_valid = { triggered_desc = { trigger = { - scope:the_scholar = { - culture = { has_graphical_east_asia_culture_group_trigger = yes } + scope:the_scholar = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } } } desc = ep3_emperor_yearly.2240.desc_quote_confucius @@ -5999,11 +5950,11 @@ ep3_emperor_yearly.2240 = { OR = { has_graphical_east_asia_culture_group_trigger = yes ep3_valid_greek_culture_trigger = yes - } - } + } + } any_courtier_or_guest = { ep3_2240_valid_courtier_trigger = yes - } + } } weight_multiplier = { @@ -6035,11 +5986,11 @@ ep3_emperor_yearly.2240 = { } weight = { base = 1 - modifier = { + modifier = { add = 3 knows_language = language_latin } - modifier = { + modifier = { add = 2 is_of_major_interest_trigger = { CHARACTER = root } } @@ -6214,6 +6165,12 @@ ep3_emperor_yearly.2300 = { faith != liege.primary_title.state_faith } set_character_faith = liege.primary_title.state_faith + if = { + limit = { + liege.primary_title.state_faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } stress_impact = { zealous = major_stress_impact_gain disloyal = major_stress_impact_gain @@ -6364,6 +6321,12 @@ ep3_emperor_yearly.2310 = { faith != top_liege.primary_title.state_faith } set_character_faith = top_liege.primary_title.state_faith + if = { + limit = { + top_liege.primary_title.state_faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } change_influence = medium_influence_gain stress_impact = { zealous = major_stress_impact_gain @@ -6757,6 +6720,12 @@ ep3_emperor_yearly.2340 = { option = { name = ep3_emperor_yearly.2340.a set_character_faith = top_liege.primary_title.state_faith + if = { + limit = { + top_liege.primary_title.state_faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } if = { limit = { top_liege = this @@ -6901,7 +6870,7 @@ ep3_emperor_yearly.2401 = { animation = ecstasy } - trigger = { + trigger = { government_allows = administrative house ?= { is_powerful_family = yes @@ -6958,7 +6927,7 @@ ep3_emperor_yearly.2410 = { } send_interface_message = { title = 2410_noble_family_tt - type = msg_new_powerful_family + type = msg_new_noble_family left_icon = scope:noble_family_head right_icon = scope:new_title desc = 2410_noble_family_tt_desc @@ -7015,6 +6984,7 @@ ep3_emperor_yearly.2420 = { title = 2420_noble_family_tt type = msg_new_powerful_family left_icon = scope:noble_family_head + right_icon = scope:noble_family_head.house desc = 2420_noble_family_tt_desc } } diff --git a/events/dlc/ep3/ep3_emperor_yearly_8.txt b/events/dlc/ep3/ep3_emperor_yearly_8.txt index 7d2ab642..a9542afa 100644 --- a/events/dlc/ep3/ep3_emperor_yearly_8.txt +++ b/events/dlc/ep3/ep3_emperor_yearly_8.txt @@ -1469,6 +1469,12 @@ ep3_emperor_yearly.8040 = { name = ep3_emperor_yearly.8040.a add_piety = major_piety_gain set_character_faith_with_conversion = faith:iconoclast + if = { + limit = { + faith:iconoclast = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } add_character_modifier = { modifier = ep3_iconoclast_modifier years = 15 diff --git a/events/dlc/ep3/ep3_governor_yearly_3.txt b/events/dlc/ep3/ep3_governor_yearly_3.txt index 0d2b5207..a6f6c0c5 100644 --- a/events/dlc/ep3/ep3_governor_yearly_3.txt +++ b/events/dlc/ep3/ep3_governor_yearly_3.txt @@ -2236,8 +2236,8 @@ ep3_governor_yearly.3020 = { NOT = { root = { is_incestuous_trigger = yes } } - trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } - trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:incestuous FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:incestuous FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } } AND = { has_trait = kinslayer @@ -2250,8 +2250,8 @@ ep3_governor_yearly.3020 = { NOT = { root = { has_trait = adulterer } } - trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } - trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:adulterer FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:adulterer FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } } AND = { has_trait = fornicator @@ -2263,24 +2263,24 @@ ep3_governor_yearly.3020 = { } } } - trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } - trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:fornicator FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:fornicator FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } } AND = { has_trait = deviant NOT = { root = { is_deviant_trigger = yes } } - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:deviant FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:deviant FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } } AND = { has_trait = witch NOT = { root = { is_witch_trigger = yes } } - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } } AND = { has_trait = sodomite @@ -2292,16 +2292,16 @@ ep3_governor_yearly.3020 = { } } } - trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } - trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:sodomite FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:sodomite FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } } AND = { has_trait = cannibal NOT = { root = { is_cannibal_trigger = yes } } - trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } - trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:cannibal FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:cannibal FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } } AND = { root.culture = { @@ -2346,8 +2346,8 @@ ep3_governor_yearly.3020 = { NOT = { root = { is_incestuous_trigger = yes } } - trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } - trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = root.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:incestuous FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:incestuous FAITH = root.faith GENDER_CHARACTER = scope:emperor } } random_character_trait = { limit = { @@ -2380,8 +2380,8 @@ ep3_governor_yearly.3020 = { NOT = { root = { has_trait = adulterer } } - trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } - trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = root.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:adulterer FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:adulterer FAITH = root.faith GENDER_CHARACTER = scope:emperor } } random_character_trait = { limit = { @@ -2401,8 +2401,8 @@ ep3_governor_yearly.3020 = { } } } - trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } - trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = root.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:fornicator FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:fornicator FAITH = root.faith GENDER_CHARACTER = scope:emperor } } random_character_trait = { limit = { @@ -2417,8 +2417,8 @@ ep3_governor_yearly.3020 = { NOT = { root = { is_deviant_trigger = yes } } - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = root.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:deviant FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:deviant FAITH = root.faith GENDER_CHARACTER = scope:emperor } } random_character_trait = { limit = { @@ -2433,8 +2433,8 @@ ep3_governor_yearly.3020 = { NOT = { root = { is_witch_trigger = yes } } - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = root.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = root.faith GENDER_CHARACTER = scope:emperor } } random_character_trait = { limit = { @@ -2454,8 +2454,8 @@ ep3_governor_yearly.3020 = { } } } - trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } - trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = root.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:sodomite FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:sodomite FAITH = root.faith GENDER_CHARACTER = scope:emperor } } random_character_trait = { limit = { @@ -2470,8 +2470,8 @@ ep3_governor_yearly.3020 = { NOT = { root = { is_cannibal_trigger = yes } } - trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } - trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = root.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:cannibal FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:cannibal FAITH = root.faith GENDER_CHARACTER = scope:emperor } } random_character_trait = { limit = { @@ -5215,7 +5215,6 @@ ep3_governor_yearly.3050 = { # by Jason Cantalini # # 3060 # ##################################### - #Admin Imperial Succession event ep3_governor_yearly.3060 = { type = character_event @@ -5466,21 +5465,12 @@ ep3_governor_yearly.3060 = { camera = camera_event_right_forward } lower_right_portrait = scope:previous_holder - trigger = { - exists = scope:emperor - scope:emperor = { - is_alive = yes - } - top_liege ?= { - this = scope:emperor - } - } immediate = { play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Byzantine_Flavor/ep3_mx_sting_byzantineflavor_become_emperor" tgp_save_realm_ceremonial_liege_effect = yes if = { limit = { - scope:ceremonial_liege = scope:emperor + scope:ceremonial_liege ?= scope:emperor } clear_saved_scope = ceremonial_liege } @@ -5494,7 +5484,7 @@ ep3_governor_yearly.3060 = { is_in_army = yes } #Is not at sea - location = { + location.county = { exists = holder } } @@ -6896,7 +6886,6 @@ ep3_governor_yearly.3070 = { limit = { ep3_governor_yearly_3070_close_governor_trigger = yes save_temporary_scope_as = temp_vassal - ep3_governor_yearly_3070_close_governor_trigger = yes "scope:liege.capital_province.squared_distance(scope:temp_vassal.capital_province)" < 25000 } save_scope_as = close_governor @@ -6959,10 +6948,16 @@ ep3_governor_yearly.3070 = { trigger = { is_landed = no } - change_influence = medium_influence_gain - domicile = { - move_domicile = scope:liege.capital_province + custom_tooltip = { + text = domicile_move_to_province.tt } + change_influence = medium_influence_gain + hidden_effect = { + domicile = { + move_domicile = scope:liege.capital_province + } + } + house = { every_house_member = { custom = custom.every_house_member diff --git a/events/dlc/ep3/ep3_interactions_events.txt b/events/dlc/ep3/ep3_interactions_events.txt index 24476a30..47081a96 100644 --- a/events/dlc/ep3/ep3_interactions_events.txt +++ b/events/dlc/ep3/ep3_interactions_events.txt @@ -767,6 +767,7 @@ ep3_interactions_events.0031 = { # By Jason Cantalini has_graphical_mena_culture_group_trigger = yes has_graphical_african_culture_group_trigger = yes has_building_gfx = indian_building_gfx + has_building_gfx = tibetan_building_gfx } } NOT = { government_has_flag = government_is_tribal } @@ -782,6 +783,7 @@ ep3_interactions_events.0031 = { # By Jason Cantalini has_graphical_mena_culture_group_trigger = yes has_graphical_african_culture_group_trigger = yes has_building_gfx = indian_building_gfx + has_building_gfx = tibetan_building_gfx } } government_has_flag = government_is_tribal @@ -1549,6 +1551,13 @@ ep3_interactions_events.0111 = { scope:actor.primary_title ?= this scope:actor.capital_county.de_jure_liege ?= this } + any_de_jure_county = { + holder.top_liege = scope:actor + NOR = { + scope:actor.capital_county ?= this + scope:actor.primary_title ?= this + } + } is_noble_family_title = no is_landless_type_title = no } @@ -1562,16 +1571,26 @@ ep3_interactions_events.0111 = { scope:actor.primary_title ?= this scope:actor.capital_county.de_jure_liege ?= this } + any_de_jure_county = { + holder.top_liege = scope:actor + NOR = { + scope:actor.capital_county ?= this + scope:actor.primary_title ?= this + } + } is_noble_family_title = no is_landless_type_title = no } add_to_list = purchased_titles - if = { - limit = { tier = tier_duchy } - every_de_jure_county = { - limit = { ep3_purchase_land_valid_county_trigger = yes } - add_to_list = purchased_titles + every_de_jure_county = { + limit = { + holder.top_liege = scope:actor + NOR = { + scope:actor.capital_county ?= this + scope:actor.primary_title ?= this + } } + add_to_list = purchased_titles } } } @@ -1594,7 +1613,13 @@ ep3_interactions_events.0111 = { if = { limit = { tier = tier_duchy } every_de_jure_county = { - limit = { ep3_purchase_land_valid_county_trigger = yes } + limit = { + holder.top_liege = scope:actor + NOR = { + scope:actor.capital_county ?= this + scope:actor.primary_title ?= this + } + } add_to_list = purchased_titles } } @@ -1608,6 +1633,7 @@ ep3_interactions_events.0111 = { is_landless_type_title = no } save_scope_as = new_primary_title + save_scope_as = target } scope:actor = { @@ -1617,6 +1643,7 @@ ep3_interactions_events.0111 = { random_character_artifact = { limit = { scope:recipient = { can_equip_artifact = prev } + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:recipient } } save_scope_as = actor_artifact } @@ -1671,6 +1698,7 @@ ep3_interactions_events.0111 = { TITLE_LIST = purchased_titles TYPE = granted REASON = flag:purchased + ENNOBLED_ADVENTURER = flag:yes } } scope:actor = { @@ -2025,6 +2053,34 @@ ep3_interactions_events.0111 = { } } + #Refuse all for 5 years + option = { + name = ep3_interactions_events.0111.refuse_5_years + scope:actor = { + send_interface_toast = { + left_icon = scope:actor + right_icon = scope:recipient + title = ep3_interactions_events.0111.refuse + scope:actor = { + add_opinion = { + target = scope:recipient + modifier = rejected_hiring_as_mercenaries + } + } + } + } + custom_tooltip = ep3_interactions_events.0111.refuse_5_years.tt + + add_character_flag = { + flag = ai_hire_blocker + years = 5 + } + + ai_chance = { + base = 0 + } + } + #Refuse option = { name = ep3_interactions_events.0111.f @@ -2110,6 +2166,7 @@ ep3_interactions_events.0112 = { TITLE_LIST = purchased_titles TYPE = granted REASON = flag:purchased + ENNOBLED_ADVENTURER = flag:yes } # Extra purchase land specific scope:actor = { @@ -2179,7 +2236,10 @@ ep3_interactions_events.0112 = { add_defender = scope:recipient } scope:recipient = { - add_character_flag = joined_as_mercenary + set_variable = { + name = joined_as_mercenary + value = scope:actor + } } ai_chance = { @@ -2373,7 +2433,10 @@ ep3_interactions_events.0112 = { add_defender = scope:recipient } scope:recipient = { - add_character_flag = joined_as_mercenary + set_variable = { + name = joined_as_mercenary + value = scope:actor + } } ai_chance = { base = 1000 @@ -2436,11 +2499,11 @@ ep3_interactions_events.0121 = { limit = { is_alive = yes } - save_temporary_scope_as = laamp_temp + save_scope_as = laamp_temp scope:employer = { pay_treasury_or_gold = { target = prev - value = ep3_hire_laamp_mercs_payment_value + value = scope:laamp_temp.ep3_hire_laamp_mercs_payment_value } } if = { @@ -2475,16 +2538,16 @@ ep3_interactions_events.0121 = { limit = { is_alive = yes } - save_temporary_scope_as = laamp_temp + save_temporary_scope_as = laamp_temp_b save_scope_value_as = { name = war_contribution_value - value = "scope:war.war_contribution(scope:laamp_temp)" + value = "scope:war.war_contribution(scope:laamp_temp_b)" } scope:employer = { pay_treasury_or_gold = { target = prev value = { - add = ep3_hire_laamp_mercs_payment_value + add = scope:laamp_temp_b.ep3_hire_laamp_mercs_payment_value divide = 2 } } @@ -2625,7 +2688,7 @@ ep3_interactions_events.0122 = { scope:employer = { pay_treasury_or_gold = { target = prev - value = ep3_hire_laamp_mercs_payment_value + value = scope:laamp_temp.ep3_hire_laamp_mercs_payment_value } } } @@ -2636,7 +2699,7 @@ ep3_interactions_events.0122 = { pay_treasury_or_gold = { target = prev value = { - add = ep3_hire_laamp_mercs_payment_value + add = scope:laamp_temp.ep3_hire_laamp_mercs_payment_value divide = 2 } } @@ -2899,10 +2962,10 @@ ep3_interactions_events.0500 = { show_as_unavailable = { always = yes } custom_description_no_bullet = { text = evict_adventurer_consequences_tt - object = scope:recipient - subject = scope:actor + object = scope:actor + subject = scope:recipient } - custom_tooltip = evict_adventurer_casus_belli_tt + scope:actor = { custom_tooltip = evict_adventurer_casus_belli_tt } show_as_tooltip = { reverse_add_opinion = { target = scope:actor @@ -2918,17 +2981,20 @@ ep3_interactions_events.0500 = { } custom_description_no_bullet = { text = evict_adventurer_consequences_tt - object = scope:recipient - subject = scope:actor + object = scope:actor + subject = scope:recipient } - custom_tooltip = evict_adventurer_forced_tt - custom_tooltip = evict_adventurer_forced_tt.part_2 + scope:actor = { custom_tooltip = evict_adventurer_casus_belli_tt } show_as_tooltip = { reverse_add_opinion = { target = scope:actor modifier = eviction_ignored_opinion } } + scope:actor = { + custom_tooltip = evict_adventurer_forced_tt + custom_tooltip = evict_adventurer_forced_tt.part_2 + } } after = { trigger_event = ep3_interactions_events.0502 } @@ -3006,7 +3072,7 @@ ep3_interactions_events.0501 = { interaction = imprison_interaction actor = scope:expeller recipient = scope:adventurer - execute_threshold = decline + send_threshold = decline } } } @@ -4284,9 +4350,7 @@ ep3_interactions_events.0610 = { ordered_succession_appointment_investors = { candidate = root limit = { - NOT = { - house ?= root.house - } + NOT = { house ?= root.house } is_alive = yes is_imprisoned = no NOR = { @@ -4299,34 +4363,18 @@ ep3_interactions_events.0610 = { } if = { limit = { - NOT = { - exists = scope:new_landed_admin - } + NOT = { exists = scope:new_landed_admin } } save_scope_as = new_landed_admin } if = { - limit = { - scope:recipient = { - top_liege != this - - } - } - scope:recipient.top_liege = { - save_scope_as = emperor - } + limit = { scope:recipient.top_liege != this } + scope:recipient.top_liege = { save_scope_as = emperor } } else = { - scope:recipient = { - save_scope_as = emperor - } - } - show_as_tooltip = { - get_title = primary_title - domicile = { - add_domicile_building = estate_main_01 - } + scope:recipient = { save_scope_as = emperor } } + show_as_tooltip = { get_title = primary_title } } #I'm a new kinda landless now diff --git a/events/dlc/ep3/ep3_laamp_decision_events.txt b/events/dlc/ep3/ep3_laamp_decision_events.txt index dc18fbeb..e2c76796 100644 --- a/events/dlc/ep3/ep3_laamp_decision_events.txt +++ b/events/dlc/ep3/ep3_laamp_decision_events.txt @@ -5356,6 +5356,20 @@ scripted_effect 1025_set_contract_location_effect = { } 1025_save_random_county_province_effect = { REGION = world_africa_east } } + #Sahara + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_africa_sahara } + } + 1025_save_random_county_province_effect = { REGION = world_africa_sahara } + } + #Siberia + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_siberia } + } + 1025_save_random_county_province_effect = { REGION = world_siberia } + } #West Steppe 10 = { trigger = { @@ -5363,6 +5377,13 @@ scripted_effect 1025_set_contract_location_effect = { } 1025_save_random_county_province_effect = { REGION = world_steppe_west } } + #Central Steppe + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_steppe_central } + } + 1025_save_random_county_province_effect = { REGION = world_steppe_central } + } #East Steppe 10 = { trigger = { @@ -5370,6 +5391,76 @@ scripted_effect 1025_set_contract_location_effect = { } 1025_save_random_county_province_effect = { REGION = world_steppe_east } } + #Tarim + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_steppe_tarim } + } + 1025_save_random_county_province_effect = { REGION = world_steppe_tarim } + } + #Tibet + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_tibet } + } + 1025_save_random_county_province_effect = { REGION = world_tibet } + } + # Burma + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_burma } + } + 1025_save_random_county_province_effect = { REGION = world_burma } + } + # Mainland SE Asia + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_asia_southeast_mainland } + } + 1025_save_random_county_province_effect = { REGION = world_asia_southeast_mainland } + } + # Maritime SE Asia + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_asia_southeast_islands } + } + 1025_save_random_county_province_effect = { REGION = world_asia_southeast_islands } + } + #China + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_asia_china } + } + 1025_save_random_county_province_effect = { REGION = world_asia_china } + } + #Japan + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_asia_japan } + } + 1025_save_random_county_province_effect = { REGION = world_asia_japan } + } + #Korea + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_asia_korea } + } + 1025_save_random_county_province_effect = { REGION = world_asia_korea } + } + #Sakhalin-Hokkaido + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_asia_sakhalin_hokkaido } + } + 1025_save_random_county_province_effect = { REGION = world_asia_sakhalin_hokkaido } + } + #North East Asia + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_asia_north_east } + } + 1025_save_random_county_province_effect = { REGION = world_asia_north_east } + } } } @@ -15111,6 +15202,12 @@ ep3_laamp_decision_event.1045 = { faith != scope:visiting_location.faith } set_character_faith = scope:visiting_location.faith + if = { + limit = { + scope:visiting_location.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } stress_impact = { base = minor_stress_impact_loss zealous = major_stress_impact_gain @@ -20812,7 +20909,7 @@ ep3_laamp_decision_event.1120 = { ep3_laamp_decision_event.1130 = { #begin city construction type = character_event title = ep3_laamp_decision_event.1130.t - window = visit_settlement_window + window = big_event_window desc = ep3_laamp_decision_event.1130.desc theme = stewardship @@ -20826,6 +20923,7 @@ ep3_laamp_decision_event.1130 = { #begin city construction immediate = { location = { + set_variable = laamp_city_construction save_scope_as = city_location } } @@ -20835,10 +20933,15 @@ ep3_laamp_decision_event.1130 = { #begin city construction custom_tooltip = ep3_laamp_decision_event.1130.a.desc add_character_flag = laamp_city_builder scope:city_location = { - begin_create_holding = { - type = castle_holding + if = { + limit = { + root = { has_variable = city_construction_is_temple_citadel } + } + begin_create_holding = { type = temple_citadel_holding } + } + else = { + begin_create_holding = { type = castle_holding } } - set_variable = laamp_city_construction } trigger_event = { @@ -20868,10 +20971,19 @@ ep3_laamp_decision_event.1130 = { #begin city construction ep3_laamp_decision_event.1131 = { #city is finished, wat do type = character_event title = ep3_laamp_decision_event.1131.t + window = big_event_window desc = ep3_laamp_decision_event.1131.desc theme = stewardship + override_background = { + trigger = { + location = { + culture = { has_building_gfx = southeast_asian_building_gfx } + } + } + reference = mpo_rural_village_asian + } override_background = { reference = alley_day } left_portrait = { @@ -20881,7 +20993,10 @@ ep3_laamp_decision_event.1131 = { #city is finished, wat do trigger = { scope:city_location = { - has_holding_type = castle_holding + OR = { + has_holding_type = temple_citadel_holding + has_holding_type = castle_holding + } } } @@ -20891,30 +21006,54 @@ ep3_laamp_decision_event.1131 = { #city is finished, wat do value = current_year } - laamp_city_builder_construction_effect = { - FLAG = mill - BUILDING = watermills + if = { + limit = { + scope:city_location = { has_holding_type = temple_citadel_holding } + } + laamp_city_builder_construction_effect = { + FLAG = mill + BUILDING = watermills + } + laamp_city_builder_construction_effect = { + FLAG = temple_citadel + BUILDING = temple_citadel + } + laamp_city_builder_construction_effect = { + FLAG = manor + BUILDING = farm_estates + } + laamp_city_builder_construction_effect = { + FLAG = spice_plantation + BUILDING = spice_plantation + } + laamp_city_builder_construction_effect = { + FLAG = vihara_halls + BUILDING = vihara_halls + } } - - laamp_city_builder_construction_effect = { - FLAG = castle - BUILDING = castle - } - - laamp_city_builder_construction_effect = { - FLAG = manor - BUILDING = farm_estates - } - - laamp_city_builder_construction_effect = { - FLAG = guilds - BUILDING = guild_halls - } - - laamp_city_builder_construction_effect = { - FLAG = prayer_hall - BUILDING = monastic_schools + else = { + laamp_city_builder_construction_effect = { + FLAG = mill + BUILDING = watermills + } + laamp_city_builder_construction_effect = { + FLAG = castle + BUILDING = castle + } + laamp_city_builder_construction_effect = { + FLAG = manor + BUILDING = farm_estates + } + laamp_city_builder_construction_effect = { + FLAG = workshops + BUILDING = workshops + } + laamp_city_builder_construction_effect = { + FLAG = prayer_hall + BUILDING = monastic_schools + } } + } on_trigger_fail = { @@ -20922,9 +21061,7 @@ ep3_laamp_decision_event.1131 = { #city is finished, wat do limit = { scope:city_location = { #somehow, the city is still being built has_ongoing_construction = yes - NOT = { - has_holding = yes - } + has_holding = no } } trigger_event = { @@ -20937,8 +21074,13 @@ ep3_laamp_decision_event.1131 = { #city is finished, wat do option = { #well, actually imma get the whole county name = ep3_laamp_decision_event.1131.a + set_variable = { + name = holding_barony + value = scope:city_location.barony + } add_pressed_claim = scope:city_location.county add_pressed_claim = scope:city_location.barony + add_character_flag = temp_no_claim_war_cost start_war = { cb = claim_cb target = scope:city_location.county.holder @@ -20946,6 +21088,7 @@ ep3_laamp_decision_event.1131 = { #city is finished, wat do target_title = scope:city_location.county target_title = scope:city_location.barony } + remove_character_flag = temp_no_claim_war_cost ai_chance = { base = 0 @@ -20962,6 +21105,8 @@ ep3_laamp_decision_event.1131 = { #city is finished, wat do months = { 1 1 } } remove_character_flag = laamp_city_builder + remove_variable = city_construction_is_temple_citadel + remove_variable = city_construction_is_castle ai_chance = { base = 10 @@ -20969,20 +21114,36 @@ ep3_laamp_decision_event.1131 = { #city is finished, wat do } after = { - remove_character_flag = laamp_city_builder_guilds - remove_character_flag = laamp_city_builder_guilds_upgrade + remove_character_flag = laamp_city_builder_mill + remove_character_flag = laamp_city_builder_mill_upgrade + remove_character_flag = laamp_city_builder_temple_citadel + remove_character_flag = laamp_city_builder_temple_citadel_upgrade remove_character_flag = laamp_city_builder_castle remove_character_flag = laamp_city_builder_castle_upgrade remove_character_flag = laamp_city_builder_manor remove_character_flag = laamp_city_builder_manor_upgrade + remove_character_flag = laamp_city_builder_spice_plantation + remove_character_flag = laamp_city_builder_spice_plantation_upgrade + remove_character_flag = laamp_city_builder_workshops + remove_character_flag = laamp_city_builder_workshops_upgrade + remove_character_flag = laamp_city_builder_vihara_halls + remove_character_flag = laamp_city_builder_vihara_halls_upgrade remove_character_flag = laamp_city_builder_prayer_hall remove_character_flag = laamp_city_builder_prayer_hall_upgrade - remove_character_flag = laamp_city_builder_mill - remove_character_flag = laamp_city_builder_mill_upgrade } } +scripted_trigger 1133_holding_still_under_construction_trigger = { + scope:city_location = { + has_ongoing_construction = yes + NOR = { + has_holding_type = temple_citadel_holding + has_holding_type = castle_holding + } + } +} + ep3_laamp_decision_event.1133 = { #get a mill type = character_event title = ep3_laamp_decision_event.1133.t @@ -20999,12 +21160,7 @@ ep3_laamp_decision_event.1133 = { #get a mill } trigger = { - scope:city_location = { - has_ongoing_construction = yes - NOT = { - has_holding_type = castle_holding - } - } + 1133_holding_still_under_construction_trigger = yes OR = { stewardship >= 18 has_trait = architect @@ -21082,12 +21238,7 @@ ep3_laamp_decision_event.1134 = { #get more settlers, main building upgrade } trigger = { - scope:city_location = { - has_ongoing_construction = yes - NOT = { - has_holding_type = castle_holding - } - } + 1133_holding_still_under_construction_trigger = yes OR = { piety_level >= 3 prestige_level >= 3 @@ -21103,11 +21254,25 @@ ep3_laamp_decision_event.1134 = { #get more settlers, main building upgrade option = { #cool name = ep3_laamp_decision_event.1134.a - add_character_flag = laamp_city_builder_castle - scope:city_location = { - show_as_tooltip = { add_building = castle_02 } + if = { + limit = { has_variable = city_construction_is_temple_citadel } + add_character_flag = laamp_city_builder_temple_citadel + scope:city_location = { + show_as_tooltip = { add_building = temple_citadel_02 } + } } - remove_short_term_gold = 20 + else = { + add_character_flag = laamp_city_builder_castle + scope:city_location = { + show_as_tooltip = { add_building = castle_02 } + } + } + remove_short_term_gold = { + value = { + add = medium_gold_value + multiply = 2 + } + } if = { limit = { piety_level >= 3 @@ -21126,11 +21291,25 @@ ep3_laamp_decision_event.1134 = { #get more settlers, main building upgrade option = { #go for it! name = ep3_laamp_decision_event.1134.b - add_character_flag = laamp_city_builder_castle_upgrade - scope:city_location = { - show_as_tooltip = { add_building = castle_03 } + if = { + limit = { has_variable = city_construction_is_temple_citadel } + add_character_flag = laamp_city_builder_temple_citadel_upgrade + scope:city_location = { + show_as_tooltip = { add_building = temple_citadel_03 } + } + } + else = { + add_character_flag = laamp_city_builder_castle_upgrade + scope:city_location = { + show_as_tooltip = { add_building = castle_03 } + } + } + remove_short_term_gold = { + value = { + add = major_gold_value + multiply = 2 + } } - remove_short_term_gold = 40 if = { limit = { piety_level >= 3 @@ -21184,17 +21363,12 @@ ep3_laamp_decision_event.1135 = { #argue for more favorable land assigment from } trigger = { - scope:city_location = { - has_ongoing_construction = yes - NOT = { - has_holding_type = castle_holding - } - } + 1133_holding_still_under_construction_trigger = yes scope:city_location.county.holder = { reverse_opinion = { - target = root - value >= 40 - } + target = root + value >= 40 + } } NOR = { scope:city_location = { @@ -21252,7 +21426,7 @@ ep3_laamp_decision_event.1135 = { #argue for more favorable land assigment from } -ep3_laamp_decision_event.1136 = { #utilize connections, get guildhall +ep3_laamp_decision_event.1136 = { #utilize connections, get merchant building type = character_event title = ep3_laamp_decision_event.1136.t window = visit_settlement_window @@ -21270,12 +21444,7 @@ ep3_laamp_decision_event.1136 = { #utilize connections, get guildhall } trigger = { - scope:city_location = { - has_ongoing_construction = yes - NOT = { - has_holding_type = castle_holding - } - } + 1133_holding_still_under_construction_trigger = yes prestige_level >= 3 } @@ -21288,10 +21457,17 @@ ep3_laamp_decision_event.1136 = { #utilize connections, get guildhall option = { #cool name = ep3_laamp_decision_event.1136.a - add_character_flag = laamp_city_builder_guilds - show_as_tooltip = { + if = { + limit = { has_variable = city_construction_is_temple_citadel } + add_character_flag = laamp_city_builder_spice_plantation scope:city_location = { - add_building = guild_halls_01 + show_as_tooltip = { add_building = spice_plantation_01 } + } + } + else = { + add_character_flag = laamp_city_builder_workshops + scope:city_location = { + show_as_tooltip = { add_building = workshops_01 } } } add_prestige = -400 @@ -21305,10 +21481,17 @@ ep3_laamp_decision_event.1136 = { #utilize connections, get guildhall option = { #go for it! name = ep3_laamp_decision_event.1136.b - add_character_flag = laamp_city_builder_guilds_upgrade - show_as_tooltip = { + if = { + limit = { has_variable = city_construction_is_temple_citadel } + add_character_flag = laamp_city_builder_spice_plantation_upgrade scope:city_location = { - add_building = guild_halls_03 + show_as_tooltip = { add_building = spice_plantation_03 } + } + } + else = { + add_character_flag = laamp_city_builder_workshops_upgrade + scope:city_location = { + show_as_tooltip = { add_building = workshops_03 } } } add_prestige = -600 @@ -21352,21 +21535,23 @@ ep3_laamp_decision_event.1137 = { #utilize connections, get prayer hall } trigger = { - scope:city_location = { - has_ongoing_construction = yes - NOT = { - has_holding_type = castle_holding - } - } + 1133_holding_still_under_construction_trigger = yes piety_level >= 3 } option = { #cool name = ep3_laamp_decision_event.1137.a - add_character_flag = laamp_city_builder_prayer_hall - show_as_tooltip = { + if = { + limit = { has_variable = city_construction_is_temple_citadel } + add_character_flag = laamp_city_builder_vihara_halls scope:city_location = { - add_building = monastic_schools_01 + show_as_tooltip = { add_building = vihara_halls_01 } + } + } + else = { + add_character_flag = laamp_city_builder_prayer_hall + scope:city_location = { + show_as_tooltip = { add_building = monastic_schools_01 } } } add_piety = -400 @@ -21380,10 +21565,17 @@ ep3_laamp_decision_event.1137 = { #utilize connections, get prayer hall option = { #go for it! name = ep3_laamp_decision_event.1137.b - add_character_flag = laamp_city_builder_prayer_hall_upgrade - show_as_tooltip = { + if = { + limit = { has_variable = city_construction_is_temple_citadel } + add_character_flag = laamp_city_builder_vihara_halls_upgrade scope:city_location = { - add_building = monastic_schools_03 + show_as_tooltip = { add_building = vihara_halls_03 } + } + } + else = { + add_character_flag = laamp_city_builder_prayer_hall_upgrade + scope:city_location = { + show_as_tooltip = { add_building = monastic_schools_03 } } } add_piety = -600 diff --git a/events/dlc/ep3/ep3_laamp_events.txt b/events/dlc/ep3/ep3_laamp_events.txt index ab7471ba..cd284613 100644 --- a/events/dlc/ep3/ep3_laamp_events.txt +++ b/events/dlc/ep3/ep3_laamp_events.txt @@ -107,10 +107,12 @@ ep3_laamps.0001 = { } immediate = { + play_music_cue = adventure_begin_cue add_character_flag = { flag = become_laamp_event_cooldown days = 5 } + clear_saved_scope = lost_primary_title # Save highest lost title for loc ordered_in_list = { list = target_titles @@ -124,6 +126,7 @@ ep3_laamps.0001 = { NOT = { exists = scope:lost_primary_title } exists = scope:conquered } + clear_saved_scope = lost_primary_title scope:conquered = { save_scope_as = lost_primary_title } } # Find alternative rulers to play as @@ -221,6 +224,7 @@ ep3_laamps.0002 = { random = { chance = scope:ai_laamp_chance # Plus for our memory variable. + clear_saved_scope = lost_primary_title ordered_in_list = { list = target_titles order_by = tier @@ -278,11 +282,9 @@ ep3_laamps.0003 = { limit = { NOT = { has_relation_rival = scope:adventurer } } - scope:adventurer = { - set_relation_rival = { - target = root - reason = rival_conquered_me - } + set_relation_rival = { + target = scope:adventurer + reason = rival_conquered_me } } scope:adventurer = { create_landless_adventurer_title_tooltip_effect = yes } @@ -326,10 +328,12 @@ ep3_laamps.0004 = { } immediate = { + play_music_cue = adventure_begin_cue add_character_flag = { flag = become_laamp_event_cooldown days = 5 } + clear_saved_scope = lost_primary_title var:deposed_primary_title ?= { # Save highest lost title for loc save_scope_as = conquered @@ -430,10 +434,12 @@ ep3_laamps.0005 = { } immediate = { + play_music_cue = adventure_begin_cue add_character_flag = { flag = become_laamp_event_cooldown days = 5 } + clear_saved_scope = lost_primary_title var:deposed_primary_title ?= { # Save highest lost title for loc save_scope_as = conquered @@ -600,6 +606,7 @@ ep3_laamps.0010 = { } immediate = { + play_music_cue = adventure_begin_cue add_character_flag = { flag = become_laamp_event_cooldown days = 5 @@ -785,6 +792,7 @@ ep3_laamps.0020 = { } immediate = { + play_music_cue = adventure_begin_cue add_character_flag = { flag = become_laamp_event_cooldown days = 5 @@ -792,6 +800,7 @@ ep3_laamps.0020 = { save_scope_as = adventurer liege = { save_scope_as = liege } # Save highest lost title for loc + clear_saved_scope = lost_primary_title ordered_held_title = { order_by = tier position = 0 @@ -945,6 +954,7 @@ ep3_laamps.0021 = { immediate = { save_scope_as = adventurer liege = { save_scope_as = liege } + clear_saved_scope = lost_primary_title # Save highest lost title for loc ordered_held_title = { order_by = tier @@ -1086,6 +1096,7 @@ ep3_laamps.0030 = { trigger = { exists = scope:laamp_inheritor } immediate = { + play_music_cue = adventure_begin_cue # Save scopes for loc primary_title = { save_scope_as = old_primary_title } capital_province = { save_scope_as = old_capital_province } @@ -1340,6 +1351,7 @@ ep3_laamps.0040 = { } immediate = { + play_music_cue = adventure_begin_cue add_character_flag = { flag = become_laamp_event_cooldown days = 5 @@ -1736,7 +1748,13 @@ ep3_laamps.0100 = { type = character_event title = ep3_laamps.0100.t desc = { - desc = ep3_laamps.0100.desc + first_valid = { + triggered_desc = { + trigger = { government_has_flag = government_is_nomadic } + desc = ep3_laamps.0100.desc_nomadic + } + desc = ep3_laamps.0100.desc + } first_valid = { triggered_desc = { trigger = { scope:new_liege ?= scope:recipient } @@ -1750,13 +1768,21 @@ ep3_laamps.0100 = { } first_valid = { triggered_desc = { - trigger = { exists = scope:new_liege } + trigger = { + NOT = { government_has_flag = government_is_nomadic } + exists = scope:new_liege + } desc = ep3_laamps.0100.unpopular } - desc = ep3_laamps.0100.fallback + triggered_desc = { + trigger = { + NOT = { government_has_flag = government_is_nomadic } + } + desc = ep3_laamps.0100.fallback + } } } - theme = realm + theme = crown left_portrait = { character = root animation = war_over_tie @@ -2894,6 +2920,7 @@ ep3_laamps.0800 = { # Player adventurer has gained a landed title TITLE_LIST = landed_titles TYPE = granted REASON = flag:granted + ENNOBLED_ADVENTURER = flag:yes } if = { limit = { @@ -6411,6 +6438,7 @@ ep3_laamps.5035 = { NOT = { has_artifact_modifier = artifact_guide_map_modifier } + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:guide } } } random_character_artifact = { @@ -6418,6 +6446,7 @@ ep3_laamps.5035 = { NOT = { has_artifact_modifier = artifact_guide_map_modifier } + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:guide } } weight = { base = 1 @@ -8824,6 +8853,7 @@ ep3_laamps.7004 = { TITLE_LIST = landed_titles TYPE = granted REASON = flag:granted + ENNOBLED_ADVENTURER = flag:yes } every_in_list = { list = zichia_names diff --git a/events/dlc/ep3/ep3_laamp_events_8.txt b/events/dlc/ep3/ep3_laamp_events_8.txt index b6b34ad5..adf1b1db 100644 --- a/events/dlc/ep3/ep3_laamp_events_8.txt +++ b/events/dlc/ep3/ep3_laamp_events_8.txt @@ -822,6 +822,7 @@ ep3_laamps.8040 = { name = ep3_laamps.8040.c trigger = { domicile = { + free_external_domicile_building_slots >= 1 NOT = { has_domicile_building = baggage_train_kennel } @@ -2127,7 +2128,9 @@ ep3_laamps.8101 = { trigger = { any_claim = { count > 1 + exists = holder tier >= tier_kingdom + holder != scope:petitioned_ruler } NOT = { has_variable = legitimist_claimed_title @@ -2137,7 +2140,9 @@ ep3_laamps.8101 = { immediate = { ordered_claim = { limit = { + exists = holder tier >= tier_kingdom + holder != scope:petitioned_ruler } order_by = tier max = 4 @@ -2273,7 +2278,9 @@ ep3_laamps.8102 = { } random_claim = { limit = { + exists = holder tier >= tier_kingdom + holder != scope:petitioned_ruler } save_scope_as = claimed_title } diff --git a/events/dlc/ep3/ep3_laamp_flavor_oltner.txt b/events/dlc/ep3/ep3_laamp_flavor_oltner.txt index 0d20460c..fdc43fe5 100644 --- a/events/dlc/ep3/ep3_laamp_flavor_oltner.txt +++ b/events/dlc/ep3/ep3_laamp_flavor_oltner.txt @@ -23,6 +23,7 @@ scripted_trigger suitable_follower_marriage_character_trigger = { is_concubine = no age <= 50 health >= fine_health + is_faith_dominant_gender = no NOR = { house = root.house is_close_family_of = root diff --git a/events/dlc/ep3/ep3_laamp_flavour_ewan_events.txt b/events/dlc/ep3/ep3_laamp_flavour_ewan_events.txt index 78bafad7..30246157 100644 --- a/events/dlc/ep3/ep3_laamp_flavour_ewan_events.txt +++ b/events/dlc/ep3/ep3_laamp_flavour_ewan_events.txt @@ -954,7 +954,7 @@ ep3_laamp_flavour_ewan.0011 = { title = ep3_laamp_flavour_ewan.0011.a.tt.failure left_icon = scope:mockee scope:mockee = { - reverse_add_opinion = { + add_opinion = { target = root modifier = humiliated_opinion opinion = -30 @@ -1021,7 +1021,7 @@ ep3_laamp_flavour_ewan.0011 = { title = ep3_laamp_flavour_ewan.0011.b.tt.failure left_icon = scope:mocker scope:mocker = { - reverse_add_opinion = { + add_opinion = { target = root modifier = humiliated_opinion opinion = -30 @@ -8980,48 +8980,29 @@ ep3_laamp_flavour_ewan.2002 = { } immediate = { - while = { - count = 10 + # Sort our courtiers. + ## First, get our scope:follower_1 candidate. + random_courtier = { limit = { - NOT = { exists = scope:follower_2 } - } - # Sort our courtiers. - ## First, get our scope:follower_1 candidate. - random_courtier = { - limit = { - ep3_laamp_flavour_ewan_2001_courtier_1_trigger = yes - NOT = { is_in_list = checked_courtier_1_candidates_list } - } - save_scope_as = follower_1 - add_to_list = checked_courtier_1_candidates_list - } - ## Now, find a scope:follower_2 from their opinion of the scope:follower_1 candidates. - if = { - limit = { exists = scope:follower_1 } - ordered_courtier = { - limit = { - ep3_laamp_flavour_ewan_2001_courtier_2_trigger = { TARGET = scope:follower_1 } + ep3_laamp_flavour_ewan_2001_courtier_1_trigger = yes + save_temporary_scope_as = char_temp + root = { + any_courtier = { + ep3_laamp_flavour_ewan_2001_courtier_2_trigger = { TARGET = scope:char_temp } } - order_by = "opinion(scope:follower_1)" - save_scope_as = follower_2 - } - # And, wipe our checks so we can iterate the loop if required. - if = { - limit = { - NOT = { exists = scope:follower_2 } - } - clear_saved_scope = follower_1 } } + save_scope_as = follower_1 } - # If we've actually got our dudes, proceed to the event. - if = { + ## Now, find a scope:follower_2 from their opinion of the scope:follower_1 candidates. + ordered_courtier = { limit = { - exists = scope:follower_1 - exists = scope:follower_2 + ep3_laamp_flavour_ewan_2001_courtier_2_trigger = { TARGET = scope:follower_1 } } - trigger_event = ep3_laamp_flavour_ewan.2001 + order_by = "opinion(scope:follower_1)" + save_scope_as = follower_2 } + trigger_event = ep3_laamp_flavour_ewan.2001 } } @@ -9048,7 +9029,7 @@ scripted_trigger ep3_laamp_flavour_ewan_2011_secret_lover_would_be_affair_trigge NOT = { trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith - TRAIT = adulterer + TRAIT = trait:adulterer GENDER_CHARACTER = root } } @@ -10496,9 +10477,7 @@ scripted_trigger ep3_laamp_flavour_ewan_2021_valid_courtier_for_own_marriage_pre # Must have matching sexualities & the right legalities in place. is_attracted_to_gender_of = $TARGET$ $TARGET$ = { is_attracted_to_gender_of = prev } - allowed_to_marry_character_gender_trigger = { CHARACTER = $TARGET$ } - # Avoid pairing up people that are already somehow related to each other - NOT = { is_close_or_extended_family_of = $TARGET$ } + could_marry_character_trigger = { CHARACTER = $TARGET$ } # Ensure our ages aren't too far apart — not that this couldn't happen, but huge age gaps are a big verisimilitude problem for many players. age >= { value = $TARGET$.age @@ -10849,58 +10828,39 @@ ep3_laamp_flavour_ewan.2022 = { } immediate = { - while = { - count = 10 + # Alright, let's select our lovebirds. + ## First, pick a scope:follower_1 candidate. + random_courtier = { limit = { - NOT = { exists = scope:follower_2 } - } - # Alright, let's select our lovebirds. - ## First, pick a scope:follower_1 candidate. - random_courtier = { - limit = { - ep3_laamp_flavour_ewan_2021_valid_courtier_for_own_marriage_general_trigger = yes - NOT = { is_in_list = checked_courtier_1_candidates_list } - } - save_scope_as = follower_1 - add_to_list = checked_courtier_1_candidates_list - } - ## Now, nab a suitable pair. - if = { - limit = { exists = scope:follower_1 } - random_courtier = { - limit = { - ep3_laamp_flavour_ewan_2021_valid_courtier_for_own_marriage_precise_trigger = { TARGET = scope:follower_1 } + ep3_laamp_flavour_ewan_2021_valid_courtier_for_own_marriage_general_trigger = yes + save_temporary_scope_as = char_temp + root = { + any_courtier = { + ep3_laamp_flavour_ewan_2021_valid_courtier_for_own_marriage_precise_trigger = { TARGET = scope:char_temp } } - weight = { - opinion_modifier = { - opinion_target = scope:follower_1 - multiplier = 0.5 - } - opinion_modifier = { - who = scope:follower_1 - opinion_target = this - multiplier = 0.5 - } - } - save_scope_as = follower_2 - } - # And, wipe our checks so we can iterate the loop if required. - if = { - limit = { - NOT = { exists = scope:follower_2 } - } - clear_saved_scope = follower_1 } } + save_scope_as = follower_1 } - # If we've actually got our dudes, proceed to the event. - if = { + ## Now, nab a suitable pair. + random_courtier = { limit = { - exists = scope:follower_1 - exists = scope:follower_2 + ep3_laamp_flavour_ewan_2021_valid_courtier_for_own_marriage_precise_trigger = { TARGET = scope:follower_1 } } - trigger_event = ep3_laamp_flavour_ewan.2021 + weight = { + opinion_modifier = { + opinion_target = scope:follower_1 + multiplier = 0.5 + } + opinion_modifier = { + who = scope:follower_1 + opinion_target = this + multiplier = 0.5 + } + } + save_scope_as = follower_2 } + trigger_event = ep3_laamp_flavour_ewan.2021 } } @@ -11256,7 +11216,7 @@ scripted_trigger ep3_laamp_flavour_ewan_2041_valid_courtier_to_gain_lover_genera OR = { trait_is_criminal_in_faith_trigger = { FAITH = faith - TRAIT = adulterer + TRAIT = trait:adulterer GENDER_CHARACTER = this } AND = { @@ -11546,68 +11506,49 @@ ep3_laamp_flavour_ewan.2042 = { save_temporary_scope_as = char_temp root = { any_courtier = { - ep3_laamp_flavour_ewan_2041_valid_courtier_to_gain_lover_precise_trigger = { TARGET = scope:char_temp } + ep3_laamp_flavour_ewan_2021_valid_courtier_for_own_marriage_precise_trigger = { TARGET = scope:char_temp } } } } } immediate = { - while = { - count = 10 + # Alright, let's select our lovebirds. + ## First up, pick an appropriate character. + random_courtier = { limit = { - NOT = { exists = scope:follower_2 } - } - # Alright, let's select our lovebirds. - ## First up, pick an appropriate character. - random_courtier = { - limit = { - ep3_laamp_flavour_ewan_2041_valid_courtier_to_gain_lover_general_trigger = yes - NOT = { is_in_list = checked_courtier_1_candidates_list } - } - save_scope_as = follower_1 - add_to_list = checked_courtier_1_candidates_list - } - ## Now, nab a suitable pair. - if = { - limit = { exists = scope:follower_1 } - random_courtier = { - limit = { - ep3_laamp_flavour_ewan_2021_valid_courtier_for_own_marriage_precise_trigger = { TARGET = scope:follower_1 } + ep3_laamp_flavour_ewan_2041_valid_courtier_to_gain_lover_general_trigger = yes + save_temporary_scope_as = char_temp + root = { + any_courtier = { + ep3_laamp_flavour_ewan_2041_valid_courtier_to_gain_lover_precise_trigger = { TARGET = scope:char_temp } } - weight = { - modifier = { - add = attraction - always = yes - } - modifier = { - add = 50 - has_trait = lustful - } - modifier = { - add = -50 - has_trait = chaste - } - } - save_scope_as = follower_2 - } - # And, wipe our checks so we can iterate the loop if required. - if = { - limit = { - NOT = { exists = scope:follower_2 } - } - clear_saved_scope = follower_1 } } + save_scope_as = follower_1 + } + random_courtier = { + limit = { + ep3_laamp_flavour_ewan_2021_valid_courtier_for_own_marriage_precise_trigger = { TARGET = scope:follower_1 } + } + weight = { + modifier = { + add = attraction + always = yes + } + modifier = { + add = 50 + has_trait = lustful + } + modifier = { + add = -50 + has_trait = chaste + } + } + save_scope_as = follower_2 } # If we've actually got our dudes, proceed to the event. - if = { - limit = { - exists = scope:follower_1 - exists = scope:follower_2 - } - trigger_event = ep3_laamp_flavour_ewan.2041 - } + trigger_event = ep3_laamp_flavour_ewan.2041 } } @@ -12053,85 +11994,66 @@ ep3_laamp_flavour_ewan.2062 = { } immediate = { - while = { - count = 10 + # Find our best courtiers. + ## First, grabbing a valid annoyed char. + random_courtier = { limit = { - NOT = { exists = scope:thief } - } - # Find our best courtiers. - ## First, grabbing a valid annoyed char. - random_courtier = { - limit = { - ep3_laamp_flavour_ewan_2061_valid_angry_courtier_general_trigger = yes - NOT = { is_in_list = checked_courtier_1_candidates_list } - } - save_scope_as = victim - add_to_list = checked_courtier_1_candidates_list - } - ## Then processing out a good thief. - if = { - limit = { exists = scope:victim } - random_courtier = { - limit = { - ep3_laamp_flavour_ewan_2061_valid_angry_courtier_precise_trigger = { TARGET = scope:victim } + ep3_laamp_flavour_ewan_2061_valid_angry_courtier_general_trigger = yes + save_temporary_scope_as = char_temp + root = { + any_courtier = { + ep3_laamp_flavour_ewan_2061_valid_angry_courtier_precise_trigger = { TARGET = scope:char_temp } } - weight = { - modifier = { - add = 20 - has_trait = wrathful - } - modifier = { - add = 15 - has_trait = deceitful - } - modifier = { - add = 5 - has_trait = arrogant - } - modifier = { - add = 10 - has_trait = arbitrary - } - modifier = { - add = -20 - has_trait = just - } - modifier = { - add = 5 - has_trait = fickle - } - modifier = { - add = 15 - has_trait = vengeful - } - modifier = { - add = -15 - has_trait = forgiving - } - modifier = { - add = -15 - has_trait = honest - } - } - save_scope_as = thief - } - # And, wipe our checks so we can iterate the loop if required. - if = { - limit = { - NOT = { exists = scope:thief } - } - clear_saved_scope = victim } } + save_scope_as = victim } - # If we've actually got our dudes, proceed to the event. - if = { + ## Then processing out a good thief. + random_courtier = { limit = { - exists = scope:victim - exists = scope:thief + ep3_laamp_flavour_ewan_2061_valid_angry_courtier_precise_trigger = { TARGET = scope:victim } } - trigger_event = ep3_laamp_flavour_ewan.2061 + weight = { + modifier = { + add = 20 + has_trait = wrathful + } + modifier = { + add = 15 + has_trait = deceitful + } + modifier = { + add = 5 + has_trait = arrogant + } + modifier = { + add = 10 + has_trait = arbitrary + } + modifier = { + add = -20 + has_trait = just + } + modifier = { + add = 5 + has_trait = fickle + } + modifier = { + add = 15 + has_trait = vengeful + } + modifier = { + add = -15 + has_trait = forgiving + } + modifier = { + add = -15 + has_trait = honest + } + } + save_scope_as = thief } + trigger_event = ep3_laamp_flavour_ewan.2061 } } @@ -12709,6 +12631,7 @@ ep3_laamp_flavour_ewan.2081 = { scripted_trigger ep3_laamp_flavour_ewan_2091_valid_angry_courtier_general_trigger = { ep3_laamp_flavour_ewan_available_courtier_trigger = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } # Mustn't have a deescalatory personality. NOR = { has_trait = patient @@ -12760,12 +12683,14 @@ ep3_laamp_flavour_ewan.2091 = { left_portrait = { character = scope:attacker animation = random_weapon_aggressive + camera = camera_event_very_left } right_portrait = { character = scope:defender animation = shock } override_background = { reference = ep3_campfire } + override_effect_2d = { reference = smoke } immediate = { if = { @@ -13039,90 +12964,70 @@ ep3_laamp_flavour_ewan.2093 = { } immediate = { - while = { - count = 10 + # Find our best courtiers. + ## First, grab a suitable candidate. + random_courtier = { limit = { - NOT = { exists = scope:attacker } - } - # Find our best courtiers. - ## First, grab a suitable candidate. - random_courtier = { - limit = { - ep3_laamp_flavour_ewan_2091_valid_angry_courtier_general_trigger = yes - NOT = { is_in_list = checked_courtier_1_candidates_list } - } - save_scope_as = defender - add_to_list = checked_courtier_1_candidates_list - } - ## Then processing out a good one. - if = { - limit = { exists = scope:defender } - random_courtier = { - limit = { - ep3_laamp_flavour_ewan_2091_valid_angry_courtier_precise_trigger = { TARGET = scope:defender } + ep3_laamp_flavour_ewan_2091_valid_angry_courtier_general_trigger = yes + save_temporary_scope_as = char_temp + root = { + any_courtier = { + ep3_laamp_flavour_ewan_2091_valid_angry_courtier_precise_trigger = { TARGET = scope:char_temp } } - weight = { - modifier = { - add = 20 - has_trait = wrathful - } - modifier = { - add = 15 - has_trait = deceitful - } - modifier = { - add = 5 - has_trait = arrogant - } - modifier = { - add = 10 - has_trait = arbitrary - } - modifier = { - add = -20 - has_trait = just - } - modifier = { - add = 5 - has_trait = fickle - } - modifier = { - add = 15 - has_trait = vengeful - } - modifier = { - add = -15 - has_trait = forgiving - } - modifier = { - add = -15 - has_trait = honest - } - opinion_modifier = { - who = this - opinion_target = scope:defender - multiplier = -0.5 - } - } - save_scope_as = attacker - } - # And, wipe our checks so we can iterate the loop if required. - if = { - limit = { - NOT = { exists = scope:attacker } - } - clear_saved_scope = defender } } + save_scope_as = defender } - # If we've actually got our dudes, proceed to the event. - if = { + random_courtier = { limit = { - exists = scope:defender - exists = scope:attacker + ep3_laamp_flavour_ewan_2091_valid_angry_courtier_precise_trigger = { TARGET = scope:defender } } - trigger_event = ep3_laamp_flavour_ewan.2091 + weight = { + modifier = { + add = 20 + has_trait = wrathful + } + modifier = { + add = 15 + has_trait = deceitful + } + modifier = { + add = 5 + has_trait = arrogant + } + modifier = { + add = 10 + has_trait = arbitrary + } + modifier = { + add = -20 + has_trait = just + } + modifier = { + add = 5 + has_trait = fickle + } + modifier = { + add = 15 + has_trait = vengeful + } + modifier = { + add = -15 + has_trait = forgiving + } + modifier = { + add = -15 + has_trait = honest + } + opinion_modifier = { + who = this + opinion_target = scope:defender + multiplier = -0.5 + } + } + save_scope_as = attacker } + trigger_event = ep3_laamp_flavour_ewan.2091 } } @@ -17841,39 +17746,41 @@ ep3_laamp_flavour_ewan.4041 = { value = flag:earthquake } # If this isn't the direct holding of a player, cause some serious damage. - location.county.holder = { - if = { - limit = { - NOT = { is_ai = yes } - } - random_courtier = { - limit = { location = prev.location } - death = { death_reason = death_consumed_by_earthquake } - } - random_courtier = { - limit = { location = prev.location } - death = { death_reason = death_consumed_by_earthquake } - } - random_courtier = { - limit = { location = prev.location } - death = { death_reason = death_consumed_by_earthquake } - } - random_courtier = { - limit = { location = prev.location } - death = { death_reason = death_consumed_by_earthquake } - } - prev = { - change_development_level = { - integer_range = { - min = -35 - max = -10 - } + location.county = { + holder = { + if = { + limit = { + is_ai = yes + } + random_courtier = { + limit = { location = prev.location } + death = { death_reason = death_consumed_by_earthquake } + } + random_courtier = { + limit = { location = prev.location } + death = { death_reason = death_consumed_by_earthquake } + } + random_courtier = { + limit = { location = prev.location } + death = { death_reason = death_consumed_by_earthquake } + } + random_courtier = { + limit = { location = prev.location } + death = { death_reason = death_consumed_by_earthquake } + } + prev = { + change_development_level = { + integer_range = { + min = -35 + max = -10 + } + } + change_county_control = -100 + } + random = { + chance = 20 + death = { death_reason = death_consumed_by_earthquake } } - change_county_control = -100 - } - random = { - chance = 20 - death = { death_reason = death_consumed_by_earthquake } } } } diff --git a/events/dlc/ep3/ep3_roman_restoration_events.txt b/events/dlc/ep3/ep3_roman_restoration_events.txt index 3ea6103d..1da11a6f 100644 --- a/events/dlc/ep3/ep3_roman_restoration_events.txt +++ b/events/dlc/ep3/ep3_roman_restoration_events.txt @@ -71,7 +71,13 @@ ep3_roman_restoration.0100 = { destroy_title = prev } } - set_character_faith = faith:hellenic_pagan + set_character_faith = faith:hellenic_pagan + if = { + limit = { + faith:hellenic_pagan = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } primary_title = { set_state_faith = faith:hellenic_pagan } every_held_title = { custom = custom.every_held_county @@ -127,7 +133,13 @@ ep3_roman_restoration.0100 = { destroy_title = prev } } - set_character_faith = faith:hellenic_pagan + set_character_faith = faith:hellenic_pagan + if = { + limit = { + faith:hellenic_pagan = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } primary_title = { set_state_faith = faith:hellenic_pagan } every_held_title = { custom = custom.every_held_county diff --git a/events/dlc/ep3/ep3_story_cycle_admin_eunuch_events.txt b/events/dlc/ep3/ep3_story_cycle_admin_eunuch_events.txt index 26ce7e17..1a322ca1 100644 --- a/events/dlc/ep3/ep3_story_cycle_admin_eunuch_events.txt +++ b/events/dlc/ep3/ep3_story_cycle_admin_eunuch_events.txt @@ -3405,6 +3405,7 @@ ep3_story_cycle_admin_eunuch.2060 = { court_position_generator_effect = { VAR = target EMPLOYER = root + ONLY_EMPTY = no } } } @@ -3520,6 +3521,7 @@ ep3_story_cycle_admin_eunuch.2061 = { court_position_generator_effect = { VAR = target EMPLOYER = root + ONLY_EMPTY = no } } } diff --git a/events/dlc/ep3/ep3_story_cycle_grand_ambitions_events.txt b/events/dlc/ep3/ep3_story_cycle_grand_ambitions_events.txt index 8cc4a3b4..f122f160 100644 --- a/events/dlc/ep3/ep3_story_cycle_grand_ambitions_events.txt +++ b/events/dlc/ep3/ep3_story_cycle_grand_ambitions_events.txt @@ -526,6 +526,7 @@ grand_ambitions.0003 = { immediate = { # Create Adventurer save_scope_as = adventurer + clear_saved_scope = lost_primary_title hidden_effect = { # Plus for our memory variable. scope:story.var:target_title = { save_scope_as = lost_primary_title } diff --git a/events/dlc/ep3/ep3_story_cycle_harrying_of_the_north_events.txt b/events/dlc/ep3/ep3_story_cycle_harrying_of_the_north_events.txt index b7efe9c0..1473fd4d 100644 --- a/events/dlc/ep3/ep3_story_cycle_harrying_of_the_north_events.txt +++ b/events/dlc/ep3/ep3_story_cycle_harrying_of_the_north_events.txt @@ -944,31 +944,24 @@ ep3_story_cycle_harrying.1011 = { if = { #Ugly if/else block starts here! limit = { scope:captured = { - is_married = no + can_marry_common_trigger = yes is_betrothed = no } } if = { #Grab a courtier limit = { - AND = { - scope:captured = { is_female = yes } - any_courtier = { - is_female = no - is_married = no - is_betrothed = no - is_adult = yes - culture = culture:norman - age > scope:captured.age_plus_10 - age < scope:captured.age_minus_10 - } + any_courtier = { + can_marry_character_trigger = { CHARACTER = scope:captured } + sex_opposite_of = scope:captured + culture = culture:norman + age > scope:captured.age_plus_10 + age < scope:captured.age_minus_10 } } random_courtier = { limit = { - is_female = no - is_married = no - is_betrothed = no - is_adult = yes + sex_opposite_of = scope:captured + can_marry_character_trigger = { CHARACTER = scope:captured } culture = culture:norman age > scope:captured.age_plus_10 age < scope:captured.age_minus_10 @@ -987,45 +980,6 @@ ep3_story_cycle_harrying.1011 = { save_scope_as = spouse_courtier } } - else_if = { #Gender reverse - limit = { - AND = { - scope:captured = { is_female = no } - any_courtier = { - is_female = yes - is_married = no - is_betrothed = no - is_adult = yes - culture = culture:norman - age > scope:captured.age_plus_10 - age < scope:captured.age_minus_10 - } - } - } - random_courtier = { - limit = { - is_female = yes - is_married = no - is_betrothed = no - is_adult = yes - culture = culture:norman - age > scope:captured.age_plus_10 - age < scope:captured.age_minus_10 - } - weight = { - base = 1 - modifier = { - factor = 10 - is_lowborn = no - } - modifier = { - factor = 5 - is_close_or_extended_family_of = root - } - } - save_scope_as = spouse_courtier - } - } else = { #Just in case hidden_effect = { create_character = { @@ -1187,6 +1141,19 @@ ep3_story_cycle_harrying.1011 = { } } +scripted_trigger harrying_1015_trigger = { + culture = culture:anglo_saxon + highest_held_title_tier > tier_county + any_held_title = { + tier = tier_county + is_landless_type_title = no + any_county_province = { + has_holding = yes + num_buildings > 0 + } + } +} + # Punish a village ep3_story_cycle_harrying.1015 = { type = character_event @@ -1207,29 +1174,34 @@ ep3_story_cycle_harrying.1015 = { trigger = { any_vassal = { - culture = culture:anglo_saxon - highest_held_title_tier > tier_county - any_county = { - any_province = { - has_holding = yes - num_buildings > 0 - } - } + harrying_1015_trigger = yes } } immediate = { random_vassal = { - limit = { culture = culture:anglo_saxon } + limit = { + harrying_1015_trigger = yes + } save_scope_as = vassal - random_realm_province = { + random_held_title = { limit = { - has_holding = yes - num_buildings >= 1 + tier = tier_county + is_landless_type_title = no + any_county_province = { + has_holding = yes + num_buildings > 0 + } + } + random_county_province = { + limit = { + has_holding = yes + num_buildings > 0 + } + save_scope_as = offending_village + every_neighboring_province = { add_to_list = resettlement_villages } + hidden_effect = { destroy_random_building_variable_effect = yes } } - save_scope_as = offending_village - every_neighboring_province = { add_to_list = resettlement_villages } - hidden_effect = { destroy_random_building_variable_effect = yes } } } save_scope_as = root_scope #for tooltip @@ -1268,6 +1240,12 @@ ep3_story_cycle_harrying.1015 = { option = { #Resettle the residents name = ep3_story_cycle_harrying.1015.b + trigger = { + any_in_list = { + list = resettlement_villages + count >= 1 + } + } scope:offending_village = { add_province_modifier = { diff --git a/events/dlc/ep3/ep3_story_cycle_violet_poet_events.txt b/events/dlc/ep3/ep3_story_cycle_violet_poet_events.txt index 4c88e764..e7bb3e32 100644 --- a/events/dlc/ep3/ep3_story_cycle_violet_poet_events.txt +++ b/events/dlc/ep3/ep3_story_cycle_violet_poet_events.txt @@ -47,6 +47,10 @@ ep3_story_cycle_violet_poet.0001 = { modifier = double_moon_modifier save_scope_as = double_moon_book } + random_owned_story = { + type = story_cycle_violet_poet + set_variable = { name = artifact value = scope:double_moon_book } + } hidden_effect = { scope:double_moon_book = { set_artifact_rarity = illustrious diff --git a/events/dlc/ep3/ep3_wedding_events.txt b/events/dlc/ep3/ep3_wedding_events.txt index 4739d58f..33860489 100644 --- a/events/dlc/ep3/ep3_wedding_events.txt +++ b/events/dlc/ep3/ep3_wedding_events.txt @@ -1385,7 +1385,7 @@ ep3_wedding.0002 = { has_trait = lifestyle_reveler } add_trait_xp = { - trait = lifestyle_reveler + trait = trait:lifestyle_reveler value = 20 } } @@ -1664,7 +1664,7 @@ ep3_wedding.0003 = { is_incestuous_trigger = yes is_deviant_trigger = yes NOT = { - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = scope:other_family_spouse.faith GENDER_CHARACTER = scope:other_family_spouse } + trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = trait:incestuous FAITH = scope:other_family_spouse.faith GENDER_CHARACTER = scope:other_family_spouse } } has_trait = lustful has_trait = drunkard @@ -1690,7 +1690,7 @@ ep3_wedding.0003 = { is_incestuous_trigger = yes is_deviant_trigger = yes NOT = { - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = scope:flirting_in_law.faith GENDER_CHARACTER = scope:flirting_in_law } + trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = trait:incestuous FAITH = scope:flirting_in_law.faith GENDER_CHARACTER = scope:flirting_in_law } } has_trait = lustful has_trait = drunkard @@ -2041,7 +2041,7 @@ ep3_wedding.0003 = { has_trait = lifestyle_mystic } add_trait_xp = { - trait = lifestyle_mystic + trait = trait:lifestyle_mystic value = 25 } } @@ -2295,7 +2295,7 @@ ep3_wedding.0003 = { is_male = yes } trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = sodomite + TRAIT = trait:sodomite GENDER_CHARACTER = root FAITH = root.faith } @@ -2314,7 +2314,7 @@ ep3_wedding.0003 = { limit = { is_married = yes trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = adulterer + TRAIT = trait:adulterer GENDER_CHARACTER = root FAITH = root.faith } @@ -2326,7 +2326,7 @@ ep3_wedding.0003 = { limit = { is_married = no trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = fornicator + TRAIT = trait:fornicator GENDER_CHARACTER = root FAITH = root.faith } @@ -2340,7 +2340,7 @@ ep3_wedding.0003 = { is_married = yes } trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = adulterer + TRAIT = trait:adulterer GENDER_CHARACTER = scope:flirting_in_law FAITH = scope:flirting_in_law.faith } @@ -2356,7 +2356,7 @@ ep3_wedding.0003 = { is_married = no } trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = fornicator + TRAIT = trait:fornicator GENDER_CHARACTER = scope:flirting_in_law FAITH = scope:flirting_in_law.faith } @@ -2373,7 +2373,7 @@ ep3_wedding.0003 = { is_male = yes } trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = sodomite + TRAIT = trait:sodomite GENDER_CHARACTER = scope:flirting_in_law FAITH = scope:flirting_in_law.faith } diff --git a/events/dlc/fp1/fp1_jomsvikings_events.txt b/events/dlc/fp1/fp1_jomsvikings_events.txt index 82740096..43e85089 100644 --- a/events/dlc/fp1/fp1_jomsvikings_events.txt +++ b/events/dlc/fp1/fp1_jomsvikings_events.txt @@ -644,7 +644,7 @@ scripted_trigger fp1_jomsviking_raid_source_one_wales_trigger = { this.leader.capital_province = { squared_distance = { target = scope:target_county.title_province - value = squared_distance_small + value <= squared_distance_small } } } @@ -653,7 +653,7 @@ scripted_trigger fp1_jomsviking_raid_source_one_ireland_trigger = { this.leader.capital_province = { squared_distance = { target = scope:target_county.title_province - value = squared_distance_medium + value <= squared_distance_medium } } } @@ -662,7 +662,7 @@ scripted_trigger fp1_jomsviking_raid_source_one_france_trigger = { this.leader.capital_province = { squared_distance = { target = scope:target_county.title_province - value = squared_distance_large + value <= squared_distance_large } } } @@ -671,7 +671,7 @@ scripted_trigger fp1_jomsviking_raid_source_one_hre_trigger = { this.leader.capital_province = { squared_distance = { target = scope:target_county.title_province - value = squared_distance_huge + value <= squared_distance_huge } } } @@ -834,7 +834,7 @@ fp1_jomsvikings.0011 = { } } ## About an Ireland away. - if = { + else_if = { limit = { fp1_jomsviking_raid_source_one_ireland_trigger = yes } random_leased_title = { limit = { fp1_jomsviking_raid_source_one_ireland_trigger = yes } @@ -842,7 +842,7 @@ fp1_jomsvikings.0011 = { } } ## About a France away. - if = { + else_if = { limit = { fp1_jomsviking_raid_source_one_france_trigger = yes } random_leased_title = { limit = { fp1_jomsviking_raid_source_one_france_trigger = yes } @@ -850,7 +850,7 @@ fp1_jomsvikings.0011 = { } } ## About an HRE away. - if = { + else_if = { limit = { fp1_jomsviking_raid_source_one_hre_trigger = yes } random_leased_title = { limit = { fp1_jomsviking_raid_source_one_hre_trigger = yes } @@ -1509,7 +1509,7 @@ fp1_jomsvikings.0041 = { } trait_is_criminal_in_faith_trigger = { FAITH = faith - TRAIT = adulterer + TRAIT = trait:adulterer GENDER_CHARACTER = this } } diff --git a/events/dlc/fp1/fp1_major_decision_events.txt b/events/dlc/fp1/fp1_major_decision_events.txt index dd4873eb..6fe9489d 100644 --- a/events/dlc/fp1/fp1_major_decision_events.txt +++ b/events/dlc/fp1/fp1_major_decision_events.txt @@ -1252,6 +1252,7 @@ scripted_effect fp1_1011_gib_pretty_hair_effect = { # Tanglehair becomes Fairhair. fp1_major_decisions.1011 = { type = character_event + window = big_event_window title = fp1_major_decisions.1011.t desc = { desc = fp1_major_decisions.1011.desc.intro @@ -1275,46 +1276,65 @@ fp1_major_decisions.1011 = { } override_background = { reference = fp1_ocean_norse } - trigger = { - # This character is Harald Fairhair. - exists = character:144000 - this = character:144000 - # The title they've acquired is Norway. - scope:title = title:k_norway - # Norway has been created by them. - scope:transfer_type = flag:created - # Norway has not been created previously. - NOT = { exists = global_var:norway_created } - } - immediate = { play_music_cue = "mx_cue_succession" # Check to see if Gyda is still around and kicking, and if so, treat this as a romance. character:166044 = { - if = { - limit = { - is_alive = yes - can_marry_character_trigger = { CHARACTER = root } - has_any_bad_relationship_with_root_trigger = no - is_ai = yes + hidden_effect = { + if = { + limit = { + betrothed ?= { + NOR = { + this = character:144000 + is_ai = no + } + } + } + break_betrothal = betrothed + } + else_if = { + limit = { + is_adult = yes + is_married = yes + any_spouse = { + NOR = { + this = character:144000 + is_ai = no + } + } + } + every_spouse = { + prev = { + divorce = prev + } + } + } + else_if = { + limit = { + exists = concubinist + concubinist = { + NOR = { + this = character:144000 + is_ai = no + } + } + } + concubinist = { + remove_concubine = prev + } + } + if = { + limit = { + is_alive = yes + could_marry_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_root_trigger = no + is_ai = yes + } + save_scope_as = gyda } - save_scope_as = gyda } } } - - # My vow fulfilled! - option = { - name = fp1_major_decisions.1011.a - - # Apply standard haircut effects. - fp1_1011_gib_pretty_hair_effect = yes - - ai_chance = { - # AI should only default to this if Gyda is unavailable. - base = 0 - } - } # Gyda, my love! option = { @@ -1323,13 +1343,41 @@ fp1_major_decisions.1011 = { # Gyda must have been valid. exists = scope:gyda # And, for MP, remain valid. - can_marry_character_trigger = { CHARACTER = scope:gyda } + could_marry_character_trigger = { CHARACTER = scope:gyda } + } + + if = { + limit = { + is_married = yes + primary_spouse ?= { + NOT = { + this = character:144000 + } + } + } + divorce = primary_spouse + } + else_if = { + limit = { + betrothed ?= { + NOT = { + this = character:144000 + } + } + } + break_betrothal = betrothed } # Apply standard haircut effects. fp1_1011_gib_pretty_hair_effect = yes # Harald & Gyda are wed. if = { + limit = { + scope:gyda = { is_adult = no } + } + create_betrothal = scope:gyda + } + else_if = { limit = { has_ep2_dlc_trigger = yes } @@ -1345,19 +1393,34 @@ fp1_major_decisions.1011 = { add_opinion = { target = scope:gyda modifier = love_opinion - opinion = 50 + opinion = 150 } reverse_add_opinion = { target = scope:gyda modifier = love_opinion - opinion = 50 + opinion = 150 } + + add_stress = -200 ai_chance = { # AI should always select this option if it's present. base = 100 } } + + # My vow fulfilled! + option = { + name = fp1_major_decisions.1011.a + + # Apply standard haircut effects. + fp1_1011_gib_pretty_hair_effect = yes + + ai_chance = { + # AI should only default to this if Gyda is unavailable. + base = 0 + } + } # Leave it; it is a mark of the struggles I have been through. option = { @@ -1385,13 +1448,6 @@ fp1_major_decisions.1011 = { fp1_major_decisions.1012 = { hidden = yes - # If Norway has just been created for the first time... - trigger = { - scope:title = title:k_norway - scope:transfer_type = flag:created - NOT = { exists = global_var:norway_created } - } - # ... flag that. immediate = { set_global_variable = { diff --git a/events/dlc/fp1/fp1_other_decision_events.txt b/events/dlc/fp1/fp1_other_decision_events.txt index ecc8c398..b61eecef 100644 --- a/events/dlc/fp1/fp1_other_decision_events.txt +++ b/events/dlc/fp1/fp1_other_decision_events.txt @@ -907,6 +907,12 @@ fp1_other_decisions.0003 = { faith = { save_scope_as = old_faith } # Next, we convert your faith. set_character_faith_with_conversion = scope:gf_faith + if = { + limit = { + scope:gf_faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } scope:activity = { add_activity_log_entry = { @@ -2230,7 +2236,15 @@ fp1_other_decisions.0101 = { name = fp1_other_decisions.0101.d # Give 'em their deposit back. - add_gold = var:raise_stele_refund + if = { + limit = { + has_treasury = yes + } + add_treasury = var:raise_stele_refund + } + else = { + add_gold = var:raise_stele_refund + } # Clear the cooldown. remove_decision_cooldown = raise_stele_decision diff --git a/events/dlc/fp1/fp1_shieldmaiden_events.txt b/events/dlc/fp1/fp1_shieldmaiden_events.txt index 6855c032..95a1a987 100644 --- a/events/dlc/fp1/fp1_shieldmaiden_events.txt +++ b/events/dlc/fp1/fp1_shieldmaiden_events.txt @@ -890,7 +890,7 @@ fp1_shieldmaiden.0021 = { # Shieldmaiden saves you from murder fp1_shieldmaiden.0022 = { type = character_event - window = scheme_target_event + window = scheme_conclusion_event_no_header title = fp1_shieldmaiden.0022.t desc = { # This block is only for the setup of child_pushed. diff --git a/events/dlc/fp1/fp1_trade_events.txt b/events/dlc/fp1/fp1_trade_events.txt index e0917b00..57665dbe 100644 --- a/events/dlc/fp1/fp1_trade_events.txt +++ b/events/dlc/fp1/fp1_trade_events.txt @@ -1684,7 +1684,9 @@ fp1_trade_events.0051 = { # And again for every one that has _also_ been raided recently, since that's a good indicator of raid-density. if = { - limit = { has_county_modifier = recently_looted_modifier } + limit = { + any_county_province = { has_province_modifier = recently_looted_modifier } + } add = 1 } } @@ -2098,7 +2100,10 @@ fp1_trade_events.1131 = { custom_tooltip = fp1_trade_events.1131.c.tt remove_treasury_or_gold = monumental_treasury_or_gold_value # ... thereby winning the war. - scope:sa_war = { end_war = defender } + scope:sa_war = { + set_variable = no_gold_reparations + end_war = defender + } reverse_add_opinion = { target = scope:attacker modifier = humiliated_opinion @@ -2242,6 +2247,12 @@ scripted_effect fp1_trade_events_1171_marry_partner_child_effect = { } # Convert to scope:partner's faith. set_character_faith_with_conversion = scope:partner.faith + if = { + limit = { + scope:partner.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } # Do so in a very public and celebrated manner, gaining piety. add_piety = massive_piety_gain # Paid a dowry by scope:partner. diff --git a/events/dlc/fp1/fp1_yearly_events.txt b/events/dlc/fp1/fp1_yearly_events.txt index b727bbcd..da217373 100644 --- a/events/dlc/fp1/fp1_yearly_events.txt +++ b/events/dlc/fp1/fp1_yearly_events.txt @@ -416,7 +416,7 @@ fp1_yearly.0001 = { scripted_trigger offensive_courtier_candidate_trigger = { #Filter out the basic miscs. is_available_ai_adult = yes - #Have some commited some genuine malfeasance, or just be irritating to at least some people. + #Have committed some genuine malfeasance, or just be irritating to at least some people. OR = { #Having committed murder by poison is a solid way to become a nithing; this might be a secret, but we assume local rumours about a shady buyer of poisons abound... has_character_flag = murdered_by_poison @@ -2124,6 +2124,12 @@ fp1_yearly.0041 = { add_courtier = scope:explorer #Sort conversion. set_character_faith_with_conversion = scope:explorer.faith + if = { + limit = { + scope:explorer.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } #Get scope:sponsoring_liege as a friend, if possible. if = { limit = { @@ -14221,6 +14227,12 @@ fp1_yearly.1012 = { #Perform the conversion. set_character_faith_with_conversion = scope:ms_faith + if = { + limit = { + scope:ms_faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } #Recoup lost piety, and get paid a little extra. custom_tooltip = fp1_yearly.1012.a.recoup_lost_piety.tt @@ -14992,8 +15004,9 @@ fp1_yearly.1061 = { # Germanic faith. religion = religion:germanic_religion # Shouldn't ever happen, but just in case, exempt sky burials so that the character is never buried twice. - NOT = { + NOR = { faith = { has_doctrine_parameter = sky_burials_active } + has_dead_character_variable = body_has_been_disposed } # And we shouldn't really be erecting glorious mounds to long lives that were actually cut short too early. age >= 30 @@ -15196,6 +15209,10 @@ fp1_yearly.1062 = { is_available_even_at_war_adult = yes # Must still be the same faith as scope:ship_funeral_candidate, for ease of loc and such. faith = scope:ship_funeral_candidate.faith + # Check that they haven't been buried already (e.g. via funeral activity) + scope:ship_funeral_candidate = { + NOT = { has_dead_character_variable = body_has_been_disposed } + } } # A small stone ship. @@ -16072,6 +16089,11 @@ fp1_yearly.1063 = { is_available_even_at_war_adult = yes # Must still be the same faith as scope:ship_funeral_candidate, for ease of loc and such. faith = scope:ship_funeral_candidate.faith + + # Check that they haven't been buried already (e.g. via funeral activity) + scope:ship_funeral_candidate = { + NOT = { has_dead_character_variable = body_has_been_disposed } + } } on_trigger_fail = { @@ -16325,6 +16347,14 @@ fp1_yearly.1063 = { } after = { + scope:ship_funeral_candidate = { + set_dead_character_variable = { + name = body_has_been_disposed + value = yes + years = 5 + } + } + # Clear up remaining values on the character. fp1_funeral_longship_clear_variables_effect = yes } diff --git a/events/dlc/fp1/fp1_yearly_events_oltner.txt b/events/dlc/fp1/fp1_yearly_events_oltner.txt index c7356814..26496be8 100644 --- a/events/dlc/fp1/fp1_yearly_events_oltner.txt +++ b/events/dlc/fp1/fp1_yearly_events_oltner.txt @@ -1912,7 +1912,7 @@ scripted_trigger fp1_yearly_2500_guest_trigger = { } } save_temporary_scope_as = deviant_guest - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = scope:deviant_guest.faith GENDER_CHARACTER = scope:deviant_guest } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:deviant FAITH = scope:deviant_guest.faith GENDER_CHARACTER = scope:deviant_guest } } scripted_trigger fp1_yearly_2500_court_target_trigger = { @@ -1956,7 +1956,7 @@ fp1_yearly.2500 = { fp1_yearly_2500_guest_trigger = yes } - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = root.faith GENDER_CHARACTER = scope:deviant_guest } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:deviant FAITH = root.faith GENDER_CHARACTER = scope:deviant_guest } any_held_title = { title_tier = county diff --git a/events/dlc/fp2/fp2_lyonese_monk_events.txt b/events/dlc/fp2/fp2_lyonese_monk_events.txt index 38d68f62..9e543e9f 100644 --- a/events/dlc/fp2/fp2_lyonese_monk_events.txt +++ b/events/dlc/fp2/fp2_lyonese_monk_events.txt @@ -3087,6 +3087,12 @@ fp2_lyonese_monk.0641 = { days = 1 } set_character_faith_with_conversion = faith:adoptionist + if = { + limit = { + faith:adoptionist = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } add_heresiarch_trait_effect = yes ## The hidden character's list gets used. every_in_list = { diff --git a/events/dlc/fp2/fp2_other_decision_events.txt b/events/dlc/fp2/fp2_other_decision_events.txt index 616e994f..e29b674b 100644 --- a/events/dlc/fp2/fp2_other_decision_events.txt +++ b/events/dlc/fp2/fp2_other_decision_events.txt @@ -321,10 +321,7 @@ fp2_other_decisions.0001 = { trigger = { # can replace the court chaplain faith = { - OR = { - has_doctrine = doctrine_clerical_succession_temporal_fixed_appointment - has_doctrine = doctrine_clerical_succession_spiritual_fixed_appointment - } + has_doctrine_parameter = clerical_appointment_fixed } } diff --git a/events/dlc/fp2/fp2_struggle_events.txt b/events/dlc/fp2/fp2_struggle_events.txt index 1993a47c..f82623f6 100644 --- a/events/dlc/fp2/fp2_struggle_events.txt +++ b/events/dlc/fp2/fp2_struggle_events.txt @@ -554,7 +554,7 @@ fp2_struggle.0900 = { # Hostility immediate = { # Add all involved rulers to a list, for ping event play_music_cue = "mx_Struggle_ending_hostility" - fp2_stuggle_ending_involved_list_effect = yes + fp2_struggle_ending_involved_list_effect = yes give_nickname = nick_the_conquistador dynasty = { add_dynasty_prestige = 10000 } } @@ -838,7 +838,7 @@ fp2_struggle.0901 = { # Compromise value = yes } # Add all involved rulers to a list, for ping event - fp2_stuggle_ending_involved_list_effect = yes + fp2_struggle_ending_involved_list_effect = yes } # Ok @@ -993,7 +993,7 @@ fp2_struggle.0902 = { # Conciliation value = yes } # Add all involved rulers to a list, for ping event - fp2_stuggle_ending_involved_list_effect = yes + fp2_struggle_ending_involved_list_effect = yes # Add all involved cultures with counties to a list, for marriage and holy war checks fp2_struggle_ending_culture_list_effect = yes @@ -1763,7 +1763,7 @@ fp2_struggle.1001 = { fp2_struggle.1001_weird_option_traits = no trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith - TRAIT = adulterer + TRAIT = trait:adulterer GENDER_CHARACTER = dummy_female } } @@ -2054,6 +2054,7 @@ scripted_trigger neighboring_ruler_proper_culture_trigger = { culture = culture:baranis culture = culture:butr culture = culture:levantine + culture = culture:sephardi } } @@ -4093,7 +4094,10 @@ fp2_struggle.1020 = { every_close_or_extended_family_member = { custom = all_family_members if = { - limit = { is_ai = yes } + limit = { + is_ai = yes + this != root + } add_opinion = { target = root opinion = -20 @@ -6178,8 +6182,8 @@ fp2_struggle.2003 = { add_prestige = medium_prestige_loss - scope:fp2_2003_county_town = { - add_county_modifier = { + scope:fp2_2003_county_town.title_province = { + add_province_modifier = { modifier = recently_looted_modifier years = 5 } @@ -6312,9 +6316,11 @@ fp2_struggle.2003 = { modifier = fp2_local_garrison_slaughtered_modifier years = 5 } - add_county_modifier = { - modifier = recently_looted_modifier - years = 5 + title_province = { + add_province_modifier = { + modifier = recently_looted_modifier + years = 5 + } } } } @@ -6331,9 +6337,11 @@ fp2_struggle.2003 = { years = 5 } hidden_effect = { - add_county_modifier = { - modifier = recently_looted_modifier - years = 5 + title_province = { + add_province_modifier = { + modifier = recently_looted_modifier + years = 5 + } } } } @@ -6468,9 +6476,11 @@ fp2_struggle.2003 = { title = fp2_struggle.2003.e.notif.a scope:fp2_2003_county_town = { - add_county_modifier = { - modifier = recently_looted_modifier - years = 5 + title_province = { + add_province_modifier = { + modifier = recently_looted_modifier + years = 5 + } } } } @@ -7360,13 +7370,13 @@ fp2_struggle.2006 = { if = { limit = { trait_is_criminal_in_faith_trigger = { - TRAIT = witch + TRAIT = trait:witch GENDER_CHARACTER = scope:fp2_2006_vassal_in_crisis FAITH = scope:fp2_2006_vassal_in_crisis.faith } NOT = { trait_is_criminal_in_faith_trigger = { - TRAIT = witch + TRAIT = trait:witch GENDER_CHARACTER = scope:fp2_2006_vassal_in_crisis FAITH = scope:fp2_2006_foreign_faith } @@ -10128,12 +10138,14 @@ fp2_struggle.2014 = { any_character_artifact = { NOT = { has_variable = historical_unique_artifact } artifact_high_rarity_trigger = yes + artifact_can_be_gift_to_trigger = { RECIPIENT = root } } } random_character_artifact = { limit = { NOT = { has_variable = historical_unique_artifact } artifact_high_rarity_trigger = yes + artifact_can_be_gift_to_trigger = { RECIPIENT = root } } set_owner = root # If it breaks, use set_artifact_owner } @@ -10198,12 +10210,14 @@ fp2_struggle.2014 = { any_character_artifact = { NOT = { has_variable = historical_unique_artifact } artifact_low_rarity_trigger = yes + artifact_can_be_gift_to_trigger = { RECIPIENT = root } } } random_character_artifact = { - limit = { + limit = { NOT = { has_variable = historical_unique_artifact } artifact_low_rarity_trigger = yes + artifact_can_be_gift_to_trigger = { RECIPIENT = root } } set_owner = root } diff --git a/events/dlc/fp2/fp2_yearly_events.txt b/events/dlc/fp2/fp2_yearly_events.txt index ea1eee4d..39b63ff9 100644 --- a/events/dlc/fp2/fp2_yearly_events.txt +++ b/events/dlc/fp2/fp2_yearly_events.txt @@ -5,7 +5,7 @@ ## 1001 - 1001 Chess Two by Daniel Moore ## 1002 - 1002 Compromising Position by Daniel Moore ## 1003 - 1003 Tilting at Giants by Daniel Moore -## 1004 - 1004 The Hawk of Quarysh by Daniel Moore +## 1004 - 1004 The Hawk of Quraysh by Daniel Moore ## 1005 - 1005 Lost Viking by Daniel Moore ## 1006 - 1007 Viking Cheese by Daniel Moore ## 1008 - 1008 Consuming the Cheese by Daniel Moore @@ -364,7 +364,7 @@ fp2_yearly.1003 = { } ################################### -# The Hawk of Quarysh +# The Hawk of Quraysh # By Daniel Moore ################################### fp2_yearly.1004 = { @@ -429,7 +429,7 @@ fp2_yearly.1004 = { option = { #How he inspired soldiers name = fp2_yearly.1004.a add_character_modifier = { - modifier = fp2_hawk_of_quarysh_martial_modifier + modifier = fp2_hawk_of_quraysh_martial_modifier years = 10 } @@ -445,7 +445,7 @@ fp2_yearly.1004 = { option = { #How diplomatic he was name = fp2_yearly.1004.b add_character_modifier = { - modifier = fp2_hawk_of_quarysh_diplomacy_modifier + modifier = fp2_hawk_of_quraysh_diplomacy_modifier years = 10 } @@ -5915,6 +5915,709 @@ fp2_yearly.8006 = { # Conversos and Jewish events # By James Beaumont ################################### +scripted_trigger valid_grantable_county_barony = { + title_province = { + geographical_region = world_europe_west_iberia + } + title_province = { has_building_or_higher = common_tradeport_01 } + is_holy_site = no + county.holder = { + any_held_title = { # Make sure it isn't revoking their last title + title_tier = county + count >= 2 + } + } +} + +fp2_yearly.9000 = { + type = character_event + title = fp2_james.0001.t + desc = fp2_james.0001.desc + theme = secret + override_background = { + reference = docks + } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:fp2_james_0001_jewish_trader + animation = personality_bold + } + + trigger = { + NOT = { root.religion = religion:judaism_religion } + highest_held_title_tier >= tier_county + any_sub_realm_barony = { + valid_grantable_county_barony = yes + } + } + + immediate = { + random_sub_realm_barony = { + limit = { + valid_grantable_county_barony = yes + } + save_scope_as = fp2_james_0001_thriving_community + } + create_character = { + template = spanish_jewish_merchant_character + location = root.capital_province + save_scope_as = fp2_james_0001_jewish_trader + } + } + + option = { + name = fp2_james.0001.a + scope:fp2_james_0001_thriving_community.county = { + add_county_modifier = { + modifier = fp2_jewish_community_denied_modifier + years = 10 + } + } + scope:fp2_james_0001_jewish_trader.culture = { + change_cultural_acceptance = { + target = root.culture + value = low_negative_culture_acceptance + desc = cultural_acceptance_gain_conversos_tolerance + } + } + + stress_impact = { + callous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -0.5 + ai_greed = -0.5 + ai_zeal = 1.5 + } + } + } + + option = { + name = fp2_james.0001.b + trigger = { + NOT = { # Prevent all of Iberia from converting + any_county_in_region = { + region = world_europe_west_iberia + culture = culture:sephardi + } + } + } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:fp2_james_0001_thriving_community.county = { + change_title_holder = { + holder = scope:fp2_james_0001_jewish_trader + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + hidden_effect = { + add_opinion = { + target = scope:fp2_james_0001_jewish_trader + modifier = received_title_county + } + } + scope:fp2_james_0001_thriving_community.county = { + add_county_modifier = { + modifier = fp2_thriving_jewish_community_modifier + years = 10 + } + set_county_culture = scope:fp2_james_0001_jewish_trader.culture + set_county_faith = scope:fp2_james_0001_jewish_trader.faith + } + scope:fp2_james_0001_jewish_trader.culture = { + change_cultural_acceptance = { + target = root.culture + value = medium_positive_culture_acceptance + desc = cultural_acceptance_gain_conversos_tolerance + } + } + + stress_impact = { + compassionate = minor_stress_impact_loss + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = 1.5 + ai_greed = 1.5 + ai_zeal = -0.5 + } + } + } + + option = { + name = fp2_james.0001.c + scope:fp2_james_0001_thriving_community.county = { + add_county_modifier = { + modifier = fp2_thriving_jewish_community_modifier + years = 10 + } + } + scope:fp2_james_0001_jewish_trader.culture = { + change_cultural_acceptance = { + target = root.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_conversos_tolerance + } + } + + stress_impact = { + compassionate = minor_stress_impact_loss + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = 1.5 + ai_greed = 1.5 + ai_zeal = -0.5 + } + } + } +} + +scripted_effect fp2_polish_should_heritage_israelite_get_upset_effect = { + if = { + limit = { + scope:fp2_james_0002_conversos_character = { culture = { has_cultural_pillar = heritage_israelite } } + } + scope:fp2_james_0002_conversos_character.culture = { + change_cultural_acceptance = { + target = root.culture + value = low_negative_culture_acceptance + desc = cultural_acceptance_loss_conversos_tolerance + } + } + } +} + +# Suspect Conversos of secretly praciticing Judaism +fp2_yearly.9001 = { + type = character_event + title = fp2_james.0002.t + desc = fp2_james.0002.desc + theme = secret + override_background = { + reference = temple + } + left_portrait = { + character = root + animation = paranoia + } + right_portrait = { + character = scope:fp2_james_0002_conversos_character + animation = personality_cynical + } + + trigger = { + root.religion = religion:christianity_religion + is_landed = yes + NOT = { faith = faith:conversos } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_character_struggle = { + is_struggle_type = iberian_struggle + is_struggle_phase = struggle_iberia_phase_hostility + } + } + } + + immediate = { + every_sub_realm_county = { + limit = { + faith = faith:conversos + holder = { + liege = { # Don't convert player-Conversos territory + OR = { + is_ai = yes + NOT = { faith = faith:conversos } + } + } + } + } + add_to_list = fp2_james_0002_conversos_county + } + # Try to find a Conversos vassal if one exists + if = { + limit = { + any_vassal = { + faith = faith:conversos + is_available_ai = yes + } + } + random_vassal = { + limit = { + faith = faith:conversos + is_available_ai = yes + } + save_scope_as = fp2_james_0002_conversos_character + } + } + # Otherwise find a pool character + else_if = { + limit = { + any_pool_character = { + province = root.capital_province + faith = faith:conversos + } + } + random_pool_character = { + province = root.capital_province + limit = { + faith = faith:conversos + } + save_scope_as = fp2_james_0002_conversos_character + } + } + # Otherwise create one + else = { + create_character = { + template = spanish_conversos_character + location = root.capital_province + save_scope_as = fp2_james_0002_conversos_character + } + } + scope:fp2_james_0002_conversos_character = { + random_list = { + 50 = { + add_character_flag = is_secretly_jewish_flag + } + 50 = { + } + } + } + # Get a religion for them to potentially be secretly praciticing + religion:judaism_religion = { + random_faith = { + limit = { is_mainstream_jewish_faith = yes } + save_scope_as = fp2_james_0002_jewish_faith + } + } + } + + option = { + name = fp2_james.0002.a + custom_tooltip = fp2_james.0002.a.tt + hidden_effect = { + if = { + limit = { + scope:fp2_james_0002_conversos_character = { has_character_flag = is_secretly_jewish_flag } + } + send_interface_toast = { + type = event_toast_effect_good + title = fp2_james.0002.a.jewish_communities_thrive + every_in_list = { + list = fp2_james_0002_conversos_county + set_county_faith = scope:fp2_james_0002_jewish_faith + } + scope:fp2_james_0002_conversos_character = { + set_character_faith = scope:fp2_james_0002_jewish_faith + every_vassal = { + limit = { + faith = faith:conversos + is_available_ai = yes + } + set_character_faith = scope:fp2_james_0002_jewish_faith + } + } + } + } + else = { + send_interface_toast = { + type = event_toast_effect_good + title = fp2_james.0002.a.nothing_happened_toast + } + } + fp2_polish_should_heritage_israelite_get_upset_effect = yes + } + + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -0.5 + ai_zeal = 1.5 + } + } + } + + option = { + name = fp2_james.0002.b + duel = { + skill = intrigue + target = scope:fp2_james_0002_conversos_character + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + desc = fp2_james.0002.b.succesful_interrogation + + if = { + limit = { scope:fp2_james_0002_conversos_character = { has_character_flag = is_secretly_jewish_flag } } + + send_interface_message = { # Begrudgingly added "unecessary" polish + type = event_prison_good + title = fp2_james.0002.t + right_icon = scope:fp2_james_0002_conversos_character + + rightfully_imprison_character_effect = { + TARGET = scope:fp2_james_0002_conversos_character + IMPRISONER = root + } + fp2_polish_should_heritage_israelite_get_upset_effect = yes + } + } + else = { + send_interface_message = { + type = event_intrigue_bad + title = fp2_james.0002.a.offended_conversos + right_icon = scope:fp2_james_0002_conversos_character + + reverse_add_opinion = { + target = scope:fp2_james_0002_conversos_character + modifier = hate_opinion + opinion = -30 + } + fp2_polish_should_heritage_israelite_get_upset_effect = yes + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + desc = fp2_james.0002.b.failed_interrogation + send_interface_message = { + type = event_intrigue_bad + title = fp2_james.0002.a.offended_conversos + right_icon = scope:fp2_james_0002_conversos_character + + every_sub_realm_county = { + custom = fp2_james_0002.b.failed_interrogation.tt + limit = { + faith = { + religion = { + OR = { + this = religion:christianity_religion + this = religion:judaism_religion + } + } + } + } + add_county_modifier = { + modifier = fp2_conversos_persecution_modifier + years = 10 + } + } + reverse_add_opinion = { + target = scope:fp2_james_0002_conversos_character + modifier = hate_opinion + opinion = -30 + } + fp2_polish_should_heritage_israelite_get_upset_effect = yes + } + } + } + + stress_impact = { compassionate = medium_stress_impact_gain } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 0.5 + } + } + } + + option = { # Imprison the suspect without trial + name = fp2_james.0002.c + + send_interface_message = { + type = event_prison_neutral + title = fp2_james.0002.t + right_icon = scope:fp2_james_0002_conversos_character + + imprison_character_effect = { + TARGET = scope:fp2_james_0002_conversos_character + IMPRISONER = root + } + fp2_polish_should_heritage_israelite_get_upset_effect = yes + + stress_impact = { + compassionate = medium_stress_impact_gain + diligent = medium_stress_impact_gain + just = medium_stress_impact_gain + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + } + + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = diligent + has_trait = just + } + } + modifier = { + factor = 2 + OR = { + has_trait = callous + has_trait = sadistic + } + has_trait = zealous + } + } + } +} + +# Jewish people come fleeing persecution from a nearby realm +fp2_yearly.9002 = { + type = character_event + title = fp2_james.0003.t + desc = fp2_james.0003.desc + theme = secret + override_background = { + reference = throne_room + } + left_portrait = { + character = root + animation = paranoia + } + right_portrait = { + character = scope:fp2_james_003_jewish_refugee_leader + animation = beg + } + + trigger = { + NOT = { root.religion = religion:judaism_religion } + NOT = { faith = faith:conversos } + any_neighboring_and_across_water_top_liege_realm = { # There is someone to do persecuting + holder = { + is_ai = yes + NOT = { root.religion = religion:judaism_religion } + NOT = { faith = faith:conversos } + } + } + highest_held_title_tier >= tier_county + any_held_county = { + is_landless_type_title = no + title_province = { + geographical_region = world_europe_west_iberia + } + NOT = { # Don't give away the capital + this = this.holder.top_liege.capital_county + } + holder = { + any_held_title = { + title_tier = county + count >= 2 + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_character_struggle = { + is_struggle_type = iberian_struggle + is_struggle_phase = struggle_iberia_phase_hostility + } + } + modifier = { + factor = 0.1 + any_county_in_region = { + region = world_europe_west_iberia + culture = culture:sephardi + } + } + } + + immediate = { + # Grab the neighbour for loc purposes + random_neighboring_and_across_water_top_liege_realm = { + limit = { + holder = { + is_ai = yes + NOT = { root.religion = religion:judaism_religion } + NOT = { faith = faith:conversos } + } + } + holder = { save_scope_as = fp2_james_003_intolerant_ruler } + } + # find a pool character + if = { + limit = { + any_pool_character = { + province = root.capital_province + religion = religion:judaism_religion + } + } + random_pool_character = { + province = root.capital_province + limit = { + religion = religion:judaism_religion + } + save_scope_as = fp2_james_003_jewish_refugee_leader + } + } + # Otherwise create one + else = { + create_character = { + template = spanish_jewish_merchant_character # May as well reuse the template + location = root.capital_province + save_scope_as = fp2_james_003_jewish_refugee_leader + } + } + # Get a religion for them to potentially be secretly praciticing + religion:judaism_religion = { + random_faith = { + limit = { is_mainstream_jewish_faith = yes } + save_scope_as = fp2_james_0003_jewish_faith + } + } + random_held_county = { + limit = { + is_landless_type_title = no + title_province = { + geographical_region = world_europe_west_iberia + } + NOT = { # Don't give away the capital + this = this.holder.top_liege.capital_county + } + holder = { + any_held_title = { + title_tier = county + count >= 2 + } + } + } + weight = { + modifier = { # Low-dev counties should be more highly considered + add = 50 + development_level <= medium_development_level + } + } + save_scope_as = fp2_james_0003_province_to_convert + } + } + + option = { # Offer the community protection in your realm + name = fp2_james.0003.a + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:fp2_james_0003_province_to_convert.county = { + change_title_holder = { + holder = scope:fp2_james_003_jewish_refugee_leader + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + hidden_effect = { + add_opinion = { + target = scope:fp2_james_003_jewish_refugee_leader + modifier = received_title_county + } + } + scope:fp2_james_0003_province_to_convert.county = { + change_development_level = 1 + if = { + limit = { + root = { + is_ai = no + } + NOT = { + any_county_in_region = { + region = world_europe_west_iberia + culture = culture:sephardi + } + } + } + set_county_culture = scope:fp2_james_003_jewish_refugee_leader.culture + set_county_faith = scope:fp2_james_003_jewish_refugee_leader.faith + add_county_modifier = { + modifier = fp2_thriving_jewish_community_modifier + years = 10 + } + } + else = { + add_county_modifier = { + modifier = fp2_thriving_jewish_community_modifier + years = 10 + } + } + } + scope:fp2_james_003_jewish_refugee_leader.culture = { + change_cultural_acceptance = { + target = root.culture + value = medium_positive_culture_acceptance + desc = cultural_acceptance_gain_conversos_tolerance + } + } + + stress_impact = { + callous = minor_stress_impact_gain + greedy = minor_stress_impact_gain + compassionate = medium_stress_impact_loss + zealous = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = 1.5 + ai_zeal = -0.5 + } + } + } + + option = { + name = fp2_james.0003.b + scope:fp2_james_003_jewish_refugee_leader = { silent_disappearance_effect = yes } + + stress_impact = { + paranoid = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -0.5 + ai_zeal = 1.5 + } + } + } +} + ################################### # Toledan Nights # By James Beaumont diff --git a/events/dlc/fp3/fp3_dynasty_decision_events.txt b/events/dlc/fp3/fp3_dynasty_decision_events.txt index 7cc4e81e..670c7316 100644 --- a/events/dlc/fp3/fp3_dynasty_decision_events.txt +++ b/events/dlc/fp3/fp3_dynasty_decision_events.txt @@ -187,7 +187,7 @@ fp3_dynasty_decision.0004 = { send_interface_toast = { title = splurge_above_expectations_toast left_icon = scope:chosen_architect - dynasty = { add_dynasty_prestige = major_dynasty_prestige_value } + dynasty ?= { add_dynasty_prestige = major_dynasty_prestige_value } house = { every_house_member = { custom = every_house_member diff --git a/events/dlc/fp3/fp3_heritage_events.txt b/events/dlc/fp3/fp3_heritage_events.txt index 274172ca..8c01bb47 100644 --- a/events/dlc/fp3/fp3_heritage_events.txt +++ b/events/dlc/fp3/fp3_heritage_events.txt @@ -2455,7 +2455,7 @@ fp3_yearly.8032 = { option = { #think of my dynasty name = fp3_yearly.8032.c - dynasty = { add_dynasty_prestige = minor_dynasty_prestige_value } + dynasty ?= { add_dynasty_prestige = minor_dynasty_prestige_value } stress_impact = { arrogant = minor_stress_impact_loss diff --git a/events/dlc/fp3/fp3_misc_decision_events.txt b/events/dlc/fp3/fp3_misc_decision_events.txt index a375899d..2aa13e37 100644 --- a/events/dlc/fp3/fp3_misc_decision_events.txt +++ b/events/dlc/fp3/fp3_misc_decision_events.txt @@ -204,7 +204,7 @@ fp3_misc_decisions.0015 = { ordered_in_list = { list = realm_zoroastrian_faiths order_by = fervor - position = 1 + position = 0 save_scope_as = zoroastrian_faith_2 } } diff --git a/events/dlc/fp3/fp3_religious_decision_events.txt b/events/dlc/fp3/fp3_religious_decision_events.txt index c560a0f5..defabe17 100644 --- a/events/dlc/fp3/fp3_religious_decision_events.txt +++ b/events/dlc/fp3/fp3_religious_decision_events.txt @@ -85,7 +85,7 @@ fp3_decision.0001 = { add_piety = massive_piety_loss - dynasty = { add_dynasty_prestige = medium_dynasty_prestige_value } + dynasty ?= { add_dynasty_prestige = medium_dynasty_prestige_value } add_character_modifier = { modifier = fp3_royal_fire_modifier diff --git a/events/dlc/fp3/fp3_tax_collector_flavor_events.txt b/events/dlc/fp3/fp3_tax_collector_flavor_events.txt index 92e8990d..3d4c5a46 100644 --- a/events/dlc/fp3/fp3_tax_collector_flavor_events.txt +++ b/events/dlc/fp3/fp3_tax_collector_flavor_events.txt @@ -136,15 +136,18 @@ fp3_clan.1000 = { option = { # take this artifact name = fp3_clan.1000.b trigger = { - any_character_artifact = { } + any_character_artifact = { + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:target_tax_collector } + } } show_as_unavailable = { - any_character_artifact = { - count < 1 - } + always = yes } random_character_artifact = { + limit = { + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:target_tax_collector } + } save_scope_as = target_artifact set_owner = scope:target_tax_collector add_artifact_history = { diff --git a/events/dlc/fp3/fp3_yearly_events_eren.txt b/events/dlc/fp3/fp3_yearly_events_eren.txt index 592aec0a..2e2a1b29 100644 --- a/events/dlc/fp3/fp3_yearly_events_eren.txt +++ b/events/dlc/fp3/fp3_yearly_events_eren.txt @@ -336,6 +336,7 @@ fp3_yearly.2001 = { scripted_effect fp3_yearly_2010_create_baker_effect = { create_character = { age = { 35 50 } + dynasty = none location = root.capital_province gender_female_chance = root_faith_dominant_gender_female_chance faith = root.capital_province.faith @@ -817,6 +818,7 @@ fp3_yearly.2020 = { has_religion = religion:islam_religion employs_tax_collector = yes any_tax_collector = { + this != root any_tax_collector_vassal = { this = root } fp3_yearly_2020_is_valid_tax_collector = yes } @@ -842,6 +844,7 @@ fp3_yearly.2020 = { } random_tax_collector = { limit = { + this != root any_tax_collector_vassal = { this = root } fp3_yearly_2020_is_valid_tax_collector = yes } diff --git a/events/dlc/fp3/fp3_yearly_events_ola_batch_1.txt b/events/dlc/fp3/fp3_yearly_events_ola_batch_1.txt index 68643afb..331e3d98 100644 --- a/events/dlc/fp3/fp3_yearly_events_ola_batch_1.txt +++ b/events/dlc/fp3/fp3_yearly_events_ola_batch_1.txt @@ -949,6 +949,12 @@ fp3_yearly.8002 = { #Faith at the Frontier add_piety = medium_piety_loss set_character_faith_with_conversion = scope:regional_heresy + if = { + limit = { + scope:regional_heresy = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } scope:frontier_fort_county = { add_county_modifier = { @@ -2212,7 +2218,7 @@ fp3_yearly.8007 = { } } - root.dynasty = { add_dynasty_prestige = minor_dynasty_prestige_value } + dynasty ?= { add_dynasty_prestige = minor_dynasty_prestige_value } scope:fp3_child_to_leave = { add_character_modifier = { @@ -3898,7 +3904,8 @@ fp3_yearly.8018 = { } } - NOT = { + NOR = { + title:h_china.holder ?= root culture = culture:han } diff --git a/events/dlc/mpo/mpo_decisions_events.txt b/events/dlc/mpo/mpo_decisions_events.txt index f4919187..fda33c9d 100644 --- a/events/dlc/mpo/mpo_decisions_events.txt +++ b/events/dlc/mpo/mpo_decisions_events.txt @@ -400,14 +400,26 @@ mpo_decisions_events.0005 = { desc = mpo_decisions_events.0005.desc theme = crown override_background = { reference = courtyard } - right_portrait = { + left_portrait = { character = scope:new_king_ruler - animation = jockey_wave - camera = camera_event_horse_left + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + right_portrait = { + character = scope:vassal + animation = throne_room_kneel_1 + camera = camera_event_right_to_the_right } immediate = { - + ordered_vassal = { + order_by = "opinion(root)" + limit = { + age > 5 + basic_is_available_ai = yes + } + save_scope_as = vassal + } } option = { @@ -3087,7 +3099,6 @@ mpo_decisions_events.0023 = { } } theme = nomads - #TODO_CD_MPO how about a new positive music sting? override_background = { reference = relaxing_room } @@ -4176,13 +4187,228 @@ mpo_decisions_events.0101 = { #the merchant is back immediate = { mpo_paiza_deal_grade_effect = yes - mpo_yurts_paiza_bonuses_effect = yes + if = { + limit = { + domicile ?= { + OR = { + has_domicile_building_or_higher = fertility_trade_yurt_01 + has_domicile_building_or_higher = herd_trade_yurt_01 + has_domicile_building_or_higher = knight_trade_yurt_01 + has_domicile_building_or_higher = merchant_yurt_01 + has_domicile_building_or_higher = char_trade_yurt_01 + } + } + } + domicile ?= { + if = { + limit = { + has_domicile_building_or_higher = fertility_trade_yurt_01 + } + switch = { + trigger = has_domicile_parameter + nomad_yurt_paiza_fertility_gain_lvl_1 = { + root = { + every_held_county = { + limit = { + uses_county_fertility = yes + } + add_county_modifier = { + modifier = paiza_fertility_modifier_1 + years = 2 + } + } + } + } + nomad_yurt_paiza_fertility_gain_lvl_2 = { + root = { + every_held_county = { + limit = { + uses_county_fertility = yes + } + add_county_modifier = { + modifier = paiza_fertility_modifier_2 + years = 4 + } + } + } + } + nomad_yurt_paiza_fertility_gain_lvl_3 = { + root = { + every_held_county = { + limit = { + uses_county_fertility = yes + } + add_county_modifier = { + modifier = paiza_fertility_modifier_3 + years = 6 + } + } + } + } + } + } + if = { + limit = { + has_domicile_building_or_higher = herd_trade_yurt_01 + } + switch = { + trigger = has_domicile_parameter + nomad_yurt_paiza_herd_gain_lvl_1= { + change_herd = { + value = root.var:trade_gold_value + multiply = 0.05 + } + } + nomad_yurt_paiza_herd_gain_lvl_2 = { + change_herd = { + value = root.var:trade_gold_value + multiply = 0.05 + } + } + nomad_yurt_paiza_herd_gain_lvl_3 = { + change_herd = { + value = root.var:trade_gold_value + multiply = 0.2 + } + } + } + } + if = { + limit = { + has_domicile_building_or_higher = knight_trade_yurt_01 + } + switch = { + trigger = has_domicile_parameter + nomad_yurt_paiza_maa_gain_lvl_1 = { + root = { + spawn_army = { + name = paiza_troops + men_at_arms = { + type = accolade_maa_archers + stacks = 1 + } + location = root.location + origin = scope:merchant_origin + inheritable = yes + } + } + } + nomad_yurt_paiza_maa_gain_lvl_2 = { + root = { + spawn_army = { + name = paiza_troops + men_at_arms = { + type = accolade_maa_archers + stacks = 4 + } + location = root.location + origin = scope:merchant_origin + inheritable = yes + } + } + } + nomad_yurt_paiza_maa_gain_lvl_3 = { + root = { + spawn_army = { + name = paiza_troops + men_at_arms = { + type = accolade_maa_archers + stacks = 4 + } + men_at_arms = { + type = accolade_maa_vanguards + stacks = 4 + } + location = root.location + origin = scope:merchant_origin + inheritable = yes + } + } + } + } + } + if = { + limit = { + has_domicile_building_or_higher = char_trade_yurt_01 + } + + switch = { + trigger = has_domicile_parameter + nomad_yurt_paiza_char_gain_lvl_1 = { + root = { + hidden_effect = { + create_character = { + location = root.location + culture = scope:merchant_origin.county.culture + faith = scope:merchant_origin.county.faith + gender_female_chance = 50 + template = peasant_character + save_scope_as = yurt_merchant_char + } + scope:yurt_merchant_char = { + add_trait = lifestyle_traveler + } + add_courtier = scope:yurt_merchant_char + } + + } + } + nomad_yurt_paiza_char_gain_lvl_2 = { + root = { + hidden_effect = { + create_character = { + location = root.location + culture = scope:merchant_origin.county.culture + faith = scope:merchant_origin.county.faith + gender_female_chance = 50 + template = merchant_template + save_scope_as = yurt_merchant_char + } + scope:yurt_merchant_char = { + add_trait = lifestyle_traveler + } + add_courtier = scope:yurt_merchant_char + } + } + } + nomad_yurt_paiza_char_gain_lvl_3 = { + root = { + hidden_effect = { + create_character = { + location = root.location + culture = scope:merchant_origin.county.culture + faith = scope:merchant_origin.county.faith + gender_female_chance = 50 + template = merchant_template + save_scope_as = yurt_merchant_char + } + scope:yurt_merchant_char = { + add_random_skill_point_effect = yes + add_random_skill_point_effect = yes + add_random_skill_point_effect = yes + add_random_skill_point_effect = yes + add_random_skill_point_effect = yes + add_random_skill_point_effect = yes + random_list = { + 1 = { add_trait = avaricious } + 1 = { add_trait = diplomat } + 1 = { add_trait = overseer } + } + add_trait = lifestyle_traveler + } + add_courtier = scope:yurt_merchant_char + } + } + } + } + } + } + } } option = { #rejoice! name = mpo_decisions_events.0101.a - ai_chance = { base = 10 } @@ -4199,6 +4425,12 @@ mpo_decisions_events.0101 = { #the merchant is back } after = { + if = { + limit = { + domicile = { has_domicile_building_or_higher = char_trade_yurt_01 } + } + show_as_tooltip = { add_courtier = scope:yurt_merchant_char } + } switch = { trigger = scope:merchant_goods flag:artifact_material = { @@ -7957,7 +8189,6 @@ mpo_decisions_events.0300 = { has_domicile_parameter = nomad_yurt_improved_fertility_dance } } - custom_tooltip = mpo_decisions_events.0300.a.tt.yurt scope:fertility_county = { every_neighboring_county = { limit = { diff --git a/events/dlc/mpo/mpo_events_ariana.txt b/events/dlc/mpo/mpo_events_ariana.txt index 7d6efb84..c2391005 100644 --- a/events/dlc/mpo/mpo_events_ariana.txt +++ b/events/dlc/mpo/mpo_events_ariana.txt @@ -62,12 +62,13 @@ mpo_events_ariana.0001 = { has_eagle_trigger = yes var:eagle_personality_trait_2 ?= flag:observant } + hunt_activity_deer_game_effect = { PROVINCE = root.location } location.county = { hunt_create_sighting_effect = { TYPE = legendary - ANIMAL = flag:deer + ANIMAL = root.var:animal_type OWNER = root - } + } } } else_if = { @@ -123,7 +124,7 @@ mpo_events_ariana.0001 = { show_as_tooltip = { add_prestige = medium_prestige_gain add_trait_xp = { - trait = lifestyle_hunter + trait = trait:lifestyle_hunter track = falconer value = 10 } @@ -1247,6 +1248,12 @@ mpo_events_ariana.0010 = { } set_character_faith = scope:new_faith + if = { + limit = { + scope:new_faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } stress_impact = { zealous = major_stress_impact_gain eccentric = minor_stress_impact_loss @@ -1327,6 +1334,12 @@ mpo_events_ariana.0010 = { hidden_effect = { set_character_faith = scope:new_faith } + if = { + limit = { + scope:new_faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } show_as_tooltip = { add_secret = { type = secret_crypto_religionist @@ -2686,13 +2699,13 @@ mpo_events_ariana.0041 = { } trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith - TRAIT = adulterer + TRAIT = trait:adulterer GENDER_CHARACTER = root } } trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith - TRAIT = fornicator + TRAIT = trait:fornicator GENDER_CHARACTER = root } } @@ -2765,13 +2778,13 @@ mpo_events_ariana.0041 = { } trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith - TRAIT = adulterer + TRAIT = trait:adulterer GENDER_CHARACTER = root } } trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith - TRAIT = fornicator + TRAIT = trait:fornicator GENDER_CHARACTER = root } } @@ -2903,7 +2916,7 @@ scripted_effect mpo_events_ariana_0050_win_effect = { target = scope:criminal_family type = loyalty_hook } - dynasty = { add_dynasty_prestige = medium_dynasty_prestige_value } + dynasty ?= { add_dynasty_prestige = medium_dynasty_prestige_value } scope:criminal_family = { add_opinion = { target = root @@ -4809,4 +4822,4 @@ mpo_events_ariana.0111 = { add_learning_skill = 1 } } -} \ No newline at end of file +} diff --git a/events/dlc/mpo/mpo_flavor_events_settled.txt b/events/dlc/mpo/mpo_flavor_events_settled.txt index ce2551ef..c9135fde 100644 --- a/events/dlc/mpo/mpo_flavor_events_settled.txt +++ b/events/dlc/mpo/mpo_flavor_events_settled.txt @@ -267,7 +267,10 @@ mpo_flavor_events_settled.0010 = { trigger = { has_mpo_dlc_trigger = yes - NOT = { government_has_flag = government_is_nomadic } + NOR = { + government_has_flag = government_is_nomadic + any_primary_war_enemy = { government_has_flag = government_is_nomadic } + } any_neighboring_top_liege_realm_owner = { mpo_flavor_events_settled_0010_valid_nomad_lord_trigger = yes } diff --git a/events/dlc/mpo/mpo_jamukha_flavor_events.txt b/events/dlc/mpo/mpo_jamukha_flavor_events.txt index a38a4e50..e7216f79 100644 --- a/events/dlc/mpo/mpo_jamukha_flavor_events.txt +++ b/events/dlc/mpo/mpo_jamukha_flavor_events.txt @@ -369,7 +369,7 @@ mpo_jamukha_flavor.0020 = { outfit_tags = { nightgown } camera = camera_event_very_right } - window = scheme_successful_event_no_text + window = scheme_conclusion_event_no_header immediate = { play_music_cue = "mx_cue_murder" diff --git a/events/dlc/mpo/mpo_migration_events.txt b/events/dlc/mpo/mpo_migration_events.txt index 200dcf55..a89ad8ee 100644 --- a/events/dlc/mpo/mpo_migration_events.txt +++ b/events/dlc/mpo/mpo_migration_events.txt @@ -1611,7 +1611,6 @@ migration_events.1020 = { } is_available_allow_travelling = yes is_acclaimed = no - is_accolade_successor = no } save_scope_as = knight_1 } @@ -1628,7 +1627,6 @@ migration_events.1020 = { } is_available_allow_travelling = yes is_acclaimed = no - is_accolade_successor = no } save_scope_as = knight_2 } diff --git a/events/dlc/mpo/mpo_migration_travel_events.txt b/events/dlc/mpo/mpo_migration_travel_events.txt index 2e174e3e..772a7b82 100644 --- a/events/dlc/mpo/mpo_migration_travel_events.txt +++ b/events/dlc/mpo/mpo_migration_travel_events.txt @@ -916,6 +916,14 @@ mpo_migration_travel_events.0050 = { random_courtier = { limit = { is_eligible_courtier_0050 = yes + save_temporary_scope_as = courtier_temp_im + location = { + any_character_in_location = { + is_eligible_local_0050 = yes + can_set_relation_lover_trigger = { CHARACTER = scope:courtier_temp_im } + is_similar_age_trigger = { CHARACTER = scope:courtier_temp_im } + } + } } weight = { base = 10 diff --git a/events/dlc/mpo/mpo_nomad_events_1.txt b/events/dlc/mpo/mpo_nomad_events_1.txt index 6770b7a0..451f0d39 100644 --- a/events/dlc/mpo/mpo_nomad_events_1.txt +++ b/events/dlc/mpo/mpo_nomad_events_1.txt @@ -389,62 +389,33 @@ mpo_nomad_events.1000 = { name = mpo_nomad_events.1000.c trigger = { has_variable = beheaded_warrior_accolade - } - #Accolade gains glory if it is active - if = { - limit = { - var:beheaded_warrior_accolade = { - is_accolade_active = yes - exists = acclaimed_knight - } - } var:beheaded_warrior_accolade = { - add_glory = medium_glory_gain - acclaimed_knight = { - save_scope_as = beheaded_accolade_knight - #Give artifact to accolade knight - scope:head_artifact = { - set_owner = { - target = scope:book_recipient - history = { - location = root.capital_province - actor = root - recipient = scope:beheaded_accolade_knight - type = given - } + exists = acclaimed_knight + } + } + var:beheaded_warrior_accolade = { + add_glory = medium_glory_gain + acclaimed_knight = { + save_scope_as = beheaded_accolade_knight + #Give artifact to accolade knight + scope:head_artifact = { + set_owner = { + target = scope:book_recipient + history = { + location = root.capital_province + actor = root + recipient = scope:beheaded_accolade_knight + type = given } } - #gain opinion with accolade knight - add_opinion = { - target = root - modifier = respect_opinion - opinion = 25 - } } - } - } - #Accolade successors appear if it isn't active - else = { - save_scope_as = accolade_owner - scope:beheaded_warrior = { - save_scope_as = knight_in_need - } - var:beheaded_warrior_accolade = { - save_scope_as = accolade_in_need - } - every_knight = { - custom = custom.every_knight + #gain opinion with accolade knight add_opinion = { target = root modifier = respect_opinion - opinion = 10 + opinion = 25 } } - custom_tooltip = beheaded_accolade_successor_tt - trigger_event = { - id = accolade.0006 - } - destroy_artifact = scope:head_artifact } stress_impact = { content = minor_stress_impact_gain @@ -2696,6 +2667,7 @@ mpo_nomad_events.1020 = { if = { limit = { has_relation_soulmate = scope:rowdy_boy + is_alive = yes } add_stress = major_stress_impact_gain remove_relation_soulmate = scope:rowdy_boy @@ -2812,12 +2784,12 @@ mpo_nomad_events.1020 = { add = -100 } modifier = { - trait_is_criminal_in_faith_trigger = { FAITH = root.faith TRAIT = kinslayer_3 GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { FAITH = root.faith TRAIT = trait:kinslayer_3 GENDER_CHARACTER = root } add = -25 } modifier = { NOT = { - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = root.faith TRAIT = kinslayer_3 GENDER_CHARACTER = root } + trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = root.faith TRAIT = trait:kinslayer_3 GENDER_CHARACTER = root } } add = 50 } @@ -4610,6 +4582,13 @@ mpo_nomad_events.1040 = { type = character_event title = mpo_nomad_events.1040.t desc = { + #Duchy overrunning wars need different desc + triggered_desc = { + trigger = { + exists = scope:duchy_war + } + desc = mpo_nomad_events.1040.desc_duchy + } desc = mpo_nomad_events.1040.desc #TRIGGERED DESC FOR GOVERNMENT TYPE GAINED first_valid = { @@ -6192,7 +6171,7 @@ mpo_nomad_events.1080 = { random_list = { 1 = { trigger = { - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } } add_trait = witch } @@ -6201,49 +6180,49 @@ mpo_nomad_events.1080 = { } 1 = { trigger = { - trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:incestuous FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } } add_trait = incestuous } 1 = { trigger = { - trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_1 FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:kinslayer_1 FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } } add_trait = kinslayer_1 } 1 = { trigger = { - trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_2 FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:kinslayer_2 FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } } add_trait = kinslayer_2 } 1 = { trigger = { - trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_3 FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:kinslayer_3 FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } } add_trait = kinslayer_3 } 3 = { trigger = { - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:deviant FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } } add_trait = deviant } 3 = { trigger = { - trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:fornicator FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } } add_trait = fornicator } 3 = { trigger = { - trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:adulterer FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } } add_trait = adulterer } 3 = { trigger = { - trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:sodomite FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } } add_trait = sodomite } diff --git a/events/dlc/mpo/mpo_nomads_flavour_events.txt b/events/dlc/mpo/mpo_nomads_flavour_events.txt index d51abc96..d453428a 100644 --- a/events/dlc/mpo/mpo_nomads_flavour_events.txt +++ b/events/dlc/mpo/mpo_nomads_flavour_events.txt @@ -44,15 +44,6 @@ scripted_trigger is_valid_nomad_events_0001_councillor = { is_spouse_of = root is_child_of = root } - NAND = { # Not your Shaman unless they can be fired - has_council_position = councillor_court_chaplain - faith = { - OR = { - has_doctrine = doctrine_clerical_succession_temporal_fixed_appointment - has_doctrine = doctrine_clerical_succession_spiritual_fixed_appointment - } - } - } } scripted_trigger is_valid_nomad_events_0001_courtier = { @@ -1610,6 +1601,12 @@ nomad_events.0008 = { NOT = { faith = scope:achmach_scope.faith } } set_character_faith_with_conversion = scope:achmach_scope.faith + if = { + limit = { + scope:achmach_scope.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } add_piety = medium_piety_gain ai_chance = { base = 0 #AI should never choose this diff --git a/events/dlc/mpo/mpo_story_cycle_temujin_flavor_events.txt b/events/dlc/mpo/mpo_story_cycle_temujin_flavor_events.txt index 5b57020b..eecb3176 100644 --- a/events/dlc/mpo/mpo_story_cycle_temujin_flavor_events.txt +++ b/events/dlc/mpo/mpo_story_cycle_temujin_flavor_events.txt @@ -485,7 +485,7 @@ mpo_temujin_flavor.0020 = { animation = horse_conversing_left camera = camera_event_horse_right } - window = scheme_successful_event_no_text + window = scheme_conclusion_event_no_header trigger = { NOT = { has_variable = had_mpo_temujin_flavor_0020 } diff --git a/events/error_suppression_events.txt b/events/error_suppression_events.txt index 4b77f69d..a8085cea 100644 --- a/events/error_suppression_events.txt +++ b/events/error_suppression_events.txt @@ -58,6 +58,18 @@ error_suppression.0001 = { } exists = var:reichskrone exists = var:pope_hat + exists = var:debug_test_story_enemy + exists = var:debug_test_story_liege + exists = var:debug_test_story_counter + exists = var:debug_test_story_test_title + exists = var:debug_test_story_test_artifact + exists = var:debug_test_story_courtiers + exists = var:debug_test_story_title_list + exists = var:debug_test_story_artifact_list + exists = var:stewardship_duty_special_vassal_1 + exists = var:stewardship_duty_special_vassal_2 + exists = var:gok_final_date + has_variable = show_historical_gui has_variable = nerge_activity @@ -116,7 +128,6 @@ error_suppression.0001 = { scope:poem_tune = flag:crows_cry_at_night scope:poem_tune = flag:phoenix_perched_on_the_parasol_tree scope:poem_tune = flag:imperial_avenue_procession - scope:poem_tune = flag:rain_hits_a_bell scope:poem_tune = flag:divination_song scope:poem_tune = flag:attached_to_her_skirt scope:poem_tune = flag:partridge_sky @@ -196,3 +207,16 @@ error_suppression.0004 = { } } } + +# misc vars +error_suppression.0005 = { + hidden = yes + orphan = yes + immediate = { + set_variable = enable_raiding_without_restrictions + set_variable = can_not_marry + set_variable = block_death_event + set_variable = can_be_councillor_override + set_variable = artifact_prevent_transfer + } +} diff --git a/events/game_rule_events.txt b/events/game_rule_events.txt index 2e52513d..9dbadba6 100644 --- a/events/game_rule_events.txt +++ b/events/game_rule_events.txt @@ -106,7 +106,7 @@ game_rule.1001 = { #by Mathilda Bjarnehed hidden = yes trigger = { - is_from_ruler_designer = no # Do not modify the family of somoene from the ruler designer + is_from_ruler_designer = no # Do not modify the family of someone from the ruler designer #Is in need of family NOT = { exists = player_heir @@ -127,8 +127,10 @@ game_rule.1001 = { #by Mathilda Bjarnehed is_holy_order = no } NOR = { + government_has_flag = government_is_republic government_has_flag = government_is_theocracy has_character_flag = do_not_generate_starting_family + government_has_flag = government_is_herder } } @@ -400,7 +402,7 @@ game_rule.1012 = { AND = { top_liege != this liege = { - NOT = { culture = culture:mogyer } + culture != culture:mogyer highest_held_title_tier = tier_kingdom } } diff --git a/events/global_religion_events.txt b/events/global_religion_events.txt index 1a786bc9..72b39026 100644 --- a/events/global_religion_events.txt +++ b/events/global_religion_events.txt @@ -626,7 +626,7 @@ global_religion.1000 = { name = global_religion.1000.serenity_aspect reason = serenity_aspect trigger = { - house ?= { has_house_power_parameter = aspect_of_serenity } + house ?= { has_house_aspiration_parameter = aspect_of_serenity } } add_courtier = scope:local_character @@ -784,7 +784,7 @@ global_religion.1000 = { name = global_religion.1000.violent trigger = { NOT = { exists = scope:from_decision } - NOT = { house = { has_house_power_parameter = aspect_of_serenity } } + NOT = { house = { has_house_aspiration_parameter = aspect_of_serenity } } OR = { has_trait = callous has_trait = sadistic @@ -858,6 +858,12 @@ global_religion.1000 = { } show_as_tooltip = { set_character_faith_with_conversion = scope:target_faith + if = { + limit = { + scope:target_faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } } add_courtier = scope:local_character if = { diff --git a/events/harm_events.txt b/events/harm_events.txt index 48a06d7a..c292fc3a 100644 --- a/events/harm_events.txt +++ b/events/harm_events.txt @@ -8058,6 +8058,7 @@ harm.2001 = { cooldown = { years = 30 } trigger = { + is_commanding_army = yes # Standard checks. harm_game_rule_enablement_trigger = yes # Medicine checks. diff --git a/events/health_events.txt b/events/health_events.txt index 400a9af7..af768f9b 100644 --- a/events/health_events.txt +++ b/events/health_events.txt @@ -33,6 +33,12 @@ namespace = health # 7000 You've become infirm # 7100 You become depressed while infirm +#ELDERLY HEALTH EVENTS: by Alexander Oltner +# 7200 Your mind starts to wither +# 7300 Your eyes start to cloud +# 7400 Your heart starts faltering +# 7500 Your bones start weakening + #PULSE MANAGEMENT: # 9998-9999: Pulse management @@ -2421,6 +2427,29 @@ health.1007 = { age >= 70 factor = 2 } + modifier = { #More common if you have an elder trait + age >= 45 + any_character_trait = { + has_trait_flag = age_related_ailment + } + factor = 3 + } + modifier = { #Parent had cancer + age >= 45 + any_parent = { + even_if_dead = yes + has_trait = cancer + } + factor = 3 + } + modifier = { #Grandparent had cancer + age >= 45 + any_grandparent = { + even_if_dead = yes + has_trait = cancer + } + factor = 2 + } } immediate = { @@ -11846,9 +11875,13 @@ health.7000 = { theme = physical_health trigger = { - NOT = { has_trait = infirm } + NOR = { + has_trait = infirm + has_game_rule = off_elderly_health + has_trait_with_flag = is_immortal + } OR = { - age >= 50 + age >= 45 AND = { age >= 30 OR = { @@ -11865,12 +11898,18 @@ health.7000 = { modifier = { #Shouldn't happen randomly for healthy characters health >= good_health + age < 60 factor = 0 } modifier = { health >= fine_health + age < 60 factor = 0.8 } + modifier = { + health < fine_health + factor = 2 + } modifier = { health <= poor_health factor = 5 @@ -11905,28 +11944,43 @@ health.7000 = { } modifier = { has_trait = whole_of_body - factor = 0.5 - } - modifier = { - has_trait = physique_good_1 factor = 0.8 } modifier = { - has_trait = physique_good_2 - factor = 0.5 - } - modifier = { - has_trait = physique_good_3 - factor = 0.3 + has_trait = physique_good + factor = 0.8 } modifier = { has_trait = cancer factor = 3 } + modifier = { # More likely if you have 2+ elderly traits + any_character_trait = { + count >= 2 + has_trait_flag = age_related_ailment + } + factor = 3 + } modifier = { faith = { has_doctrine_parameter = less_likely_to_become_infirm } factor = 0.5 } + modifier = { + culture = { has_cultural_parameter = less_likely_to_gain_elder_health_traits } + factor = 0.5 + } + modifier = { # Less likely before developing another age-related trait + trigger_if = { + limit = { + has_game_rule = infirm_only_elderly_health + } + always = no + } + NOT = { + has_trait_with_flag = age_related_ailment + } + factor = 0.25 + } } option = { @@ -11964,6 +12018,7 @@ health.7100 = { OR = { has_trait = infirm has_trait = incapable + has_trait = withering_mind } NOR = { has_trait = depressed @@ -12006,3 +12061,733 @@ health.7100 = { } } +# Your mind starts to wither +health.7200 = { + type = character_event + title = health.7200.t + + desc = health.7200.desc + + left_portrait = { + character = root + animation = delirium + } + theme = mental_health + + override_background = { + trigger = { + is_imprisoned = yes + } + reference = dungeon + } + override_background = { reference = terrain } + + override_effect_2d = { reference = fog } + + widget = { gui = event_window_widget_vfx_fog container = foreground_shader_vfx_container } + + trigger = { + static_group_filter = { + group = does_not_get_withering_mind + match = 0.8 + } + is_incapable = no + NOR = { + has_trait = withering_mind + has_game_rule = off_elderly_health + has_game_rule = infirm_only_elderly_health + has_trait_with_flag = is_immortal + } + OR = { + age >= 50 + AND = { + age >= 45 + stress_level >= 1 + } + AND = { + age >= 30 + stress_level >= 2 + } + } + } + + weight_multiplier = { + base = 1 + + modifier = { #Can happen randomly for healthy characters, but very rare + health >= good_health + age < 60 + factor = 0.1 + } + modifier = { + health >= fine_health + age < 60 + factor = 0.8 + } + modifier = { + health < fine_health + factor = 2 + } + modifier = { + health <= poor_health + factor = 5 + } + modifier = { + age < 50 + factor = 0.7 + } + modifier = { + age < 40 + factor = 0.5 + } + modifier = { + age > 60 + factor = 2 + } + modifier = { + age > 70 + factor = 2 + } + modifier = { + age > 80 + factor = 3 + } + # Genetics + modifier = { + any_parent = { + even_if_dead = yes + has_trait = withering_mind + } + factor = 2 + } + modifier = { + OR = { + any_grandparent = { + even_if_dead = yes + has_trait = withering_mind + } + any_great_grandparent = { + even_if_dead = yes + has_trait = withering_mind + } + } + factor = 1.5 + } + # Social understimulation / mental stress + modifier = { + has_trait = reclusive + factor = 2 + } + modifier = { + has_trait = drunkard + factor = 2 + } + modifier = { + stress_level >= 1 + factor = 2 + } + modifier = { + stress_level >= 2 + factor = 2 + } + modifier = { + stress_level >= 3 + factor = 3 + } + modifier = { + is_imprisoned = yes + is_in_prison_type = dungeon + factor = 3 + } + # Poor diet, in either direction + modifier = { + OR = { + has_character_modifier = obese_modifier + has_character_modifier = malnourished_modifier + } + factor = 2 + } + # Social stimulation / good mental health + modifier = { + stress_level < 1 + factor = 0.5 + } + modifier = { + has_trait = family_first + factor = 0.25 + } + modifier = { + has_trait = seducer + factor = 0.25 + } + modifier = { + has_trait = lifestyle_reveler + factor = 0.75 + } + modifier = { # Out and about + is_travelling = yes + factor = 0.75 + } + modifier = { # Actively socializing + exists = involved_activity + factor = 0.75 + } + modifier = { + culture = { + has_cultural_parameter = withering_mind_less_likely + } + factor = 0.5 + } + modifier = { + culture = { has_cultural_parameter = less_likely_to_gain_elder_health_traits } + factor = 0.5 + } + modifier = { + any_relation = { type = lover } + factor = 0.75 + } + modifier = { + any_relation = { type = friend } + factor = 0.5 + } + modifier = { + num_of_relation_lover >= 3 + factor = 0.5 + } + modifier = { + num_of_relation_friend >= 3 + factor = 0.25 + } + modifier = { + current_extra_languages >= 1 + factor = { + value = 1 + subtract = { + value = 0.1 + multiply = current_extra_languages + } + } + } + modifier = { + num_of_relation_lover <= 0 + num_of_relation_friend <= 0 + factor = 1.5 + } + } + + option = { + name = health.7200.a + + add_trait = withering_mind + } +} + +# Your eyes start to cloud +health.7300 = { + type = character_event + title = health.7300.t + + desc = health.7300.desc + + left_portrait = { + character = root + animation = interested + } + theme = physical_health + + override_background = { + trigger = { + is_imprisoned = yes + } + reference = dungeon + } + override_background = { reference = garden } + + widget = { gui = event_window_widget_vfx_godray container = foreground_shader_vfx_container } + + trigger = { + static_group_filter = { + group = does_not_get_clouded_eyes + match = 0.8 + } + is_incapable = no + age >= 45 + NOR = { + has_trait = clouded_eyes + has_trait = blind + has_game_rule = off_elderly_health + has_game_rule = infirm_only_elderly_health + has_trait_with_flag = is_immortal + } + } + + weight_multiplier = { + base = 1 + + modifier = { # This _can_ happen for healthy characters, it's not that bad + health >= good_health + age < 60 + factor = 0.7 + } + modifier = { + health >= fine_health + age < 60 + factor = 0.5 + } + modifier = { + health < fine_health + factor = 2 + } + modifier = { + age > 60 + factor = 2 + } + modifier = { + age > 70 + factor = 2 + } + modifier = { + age > 80 + factor = 3 + } + # Genetics + modifier = { + any_parent = { + even_if_dead = yes + has_trait = clouded_eyes + } + factor = 1.5 + } + modifier = { + OR = { + any_grandparent = { + even_if_dead = yes + has_trait = clouded_eyes + } + any_great_grandparent = { + even_if_dead = yes + has_trait = clouded_eyes + } + } + factor = 1.25 + } + # Location + modifier = { + is_travelling = yes + factor = 1.25 + } + modifier = { + culture = { has_cultural_parameter = less_likely_to_gain_elder_health_traits } + factor = 0.5 + } + modifier = { # Glare + is_ruler = yes # For performance reasons we limit this as checking modifiers is expensive + location = { + OR = { + has_province_modifier = winter_normal_modifier + has_province_modifier = winter_harsh_modifier + } + } + factor = 1.5 + } + modifier = { # Bright sunlight + location = { + OR = { + terrain = desert + terrain = desert_mountains + } + } + factor = 1.25 + } + modifier = { # Shade + location = { + OR = { + terrain = jungle + terrain = forest + } + } + factor = 0.75 + } + # Lifestyle + modifier = { + has_trait = drunkard + factor = 2 + } + } + + option = { + name = health.7300.a + + add_trait = clouded_eyes + } +} + +# Your heart starts faltering +health.7400 = { + type = character_event + title = health.7400.t + + desc = health.7400.desc + + left_portrait = { + character = root + animation = poison + } + theme = physical_health + + override_background = { + trigger = { + is_imprisoned = yes + } + reference = dungeon + } + + trigger = { + static_group_filter = { + group = does_not_get_faltering_heart + match = 0.8 + } + is_incapable = no + NOR = { + has_trait = faltering_heart + has_game_rule = off_elderly_health + has_game_rule = infirm_only_elderly_health + has_trait_with_flag = is_immortal + } + OR = { + age >= 45 + AND = { + age >= 30 + OR = { + has_trait = physique_bad + has_trait = spindly + has_trait = weak + } + } + } + } + + weight_multiplier = { + base = 1 + + modifier = { #Shouldn't happen randomly for healthy characters + health >= good_health + age < 60 + factor = 0 + } + modifier = { + health >= fine_health + age < 60 + factor = 0.8 + } + modifier = { + health < fine_health + factor = 2 + } + modifier = { + health <= poor_health + factor = 5 + } + modifier = { + has_trait = physique_bad_2 + factor = 1.2 + } + modifier = { + has_trait = physique_bad_3 + factor = 1.5 + } + modifier = { + age < 50 + factor = 0.7 + } + modifier = { + age > 60 + factor = 2 + } + modifier = { + age > 70 + factor = 2 + } + modifier = { + age > 80 + factor = 3 + } + modifier = { + culture = { has_cultural_parameter = less_likely_to_gain_elder_health_traits } + factor = 0.5 + } + # Genetics + modifier = { + any_parent = { + even_if_dead = yes + has_trait = faltering_heart + } + factor = 2 + } + modifier = { + OR = { + any_grandparent = { + even_if_dead = yes + has_trait = faltering_heart + } + any_great_grandparent = { + even_if_dead = yes + has_trait = faltering_heart + } + } + factor = 1.5 + } + modifier = { + is_male = yes + factor = 1.5 + } + modifier = { + is_female = yes + fertility <= 0 + factor = 1.25 + } + # Lifestyle + modifier = { + has_trait = drunkard + factor = 2 + } + modifier = { + has_trait = hashishiyah + factor = 1.25 + } + modifier = { + has_trait = impatient + factor = 1.25 + } + modifier = { + has_trait = irritable + factor = 2 + } + modifier = { + has_trait = wrathful + factor = 1.5 + } + modifier = { + has_trait = stubborn + factor = 1.5 + } + modifier = { + stress_level >= 1 + factor = 1.5 + } + modifier = { + stress_level >= 2 + factor = 1.5 + } + modifier = { + stress_level >= 3 + factor = 2 + } + modifier = { + stress_level < 1 + factor = 0.5 + } + modifier = { + has_trait = athletic + factor = 0.5 + } + modifier = { + has_trait = whole_of_body + factor = 0.8 + } + modifier = { + has_trait = physique_good + factor = 0.8 + } + modifier = { + has_trait = temperate + factor = 0.5 + } + modifier = { + has_trait = calm + factor = 0.25 + } + modifier = { + has_trait = patient + factor = 0.5 + } + modifier = { + has_character_modifier = obese_modifier + factor = 2 + } + } + + option = { + name = health.7400.a + + add_trait = faltering_heart + } +} + +# Your bones start weakening +health.7500 = { + type = character_event + title = health.7500.t + + desc = health.7500.desc + + left_portrait = { + character = root + animation = pain + outfit_tags = { nightgown } + } + theme = physical_health + + override_background = { + trigger = { + is_imprisoned = yes + } + reference = dungeon + } + override_background = { reference = bedchamber } + + trigger = { + static_group_filter = { + group = does_not_get_fragile_bones + match = 0.8 + } + is_incapable = no + age >= 45 + NOR = { + has_trait = fragile_bones + has_game_rule = off_elderly_health + has_game_rule = infirm_only_elderly_health + has_trait_with_flag = is_immortal + } + } + + weight_multiplier = { + base = 1 + + modifier = { #Shouldn't happen randomly for healthy characters + health >= good_health + age < 60 + factor = 0 + } + modifier = { + health >= fine_health + age < 60 + factor = 0.8 + } + modifier = { + health < fine_health + factor = 2 + } + modifier = { + health <= poor_health + factor = 5 + } + modifier = { + has_trait = physique_bad_2 + factor = 1.2 + } + modifier = { + has_trait = physique_bad_3 + factor = 1.5 + } + modifier = { + age < 50 + factor = 0.7 + } + modifier = { + age > 60 + factor = 2 + } + modifier = { + age > 70 + factor = 2 + } + modifier = { + age > 80 + factor = 3 + } + modifier = { + culture = { has_cultural_parameter = less_likely_to_gain_elder_health_traits } + factor = 0.5 + } + # Genetics / unchangeable factors + modifier = { + any_parent = { + even_if_dead = yes + has_trait = fragile_bones + } + factor = 1.5 + } + modifier = { + any_sibling = { + even_if_dead = yes + has_trait = fragile_bones + } + factor = 1.25 + } + modifier = { + is_female = yes + factor = 1.5 + } + modifier = { + has_trait = cancer + factor = 2 + } + modifier = { + fertility <= 0 + factor = 1.5 + } + # Lifestyle + modifier = { + has_trait = drunkard + factor = 1.5 + } + modifier = { + has_trait = hashishiyah + factor = 1.25 + } + modifier = { # Weight-bearing excercise + has_trait = athletic + factor = 0.5 + } + modifier = { + has_trait = whole_of_body + factor = 0.8 + } + modifier = { + has_trait = physique_good + factor = 0.8 + } + modifier = { # Being underweight weakens bone + has_character_modifier = malnourished_modifier + factor = 3 + } + modifier = { # Assume good eating habits + has_trait = temperate + factor = 0.5 + } + modifier = { # Assume sedentary lifestyle + has_character_modifier = obese_modifier + factor = 1.5 + } + modifier = { # Assume sedentary lifestyle + has_trait = reclusive + factor = 1.25 + } + modifier = { # Assume high calcium intake + has_trait = gluttonous + factor = 0.75 + } + modifier = { # Assume high calcium intake + has_trait = comfort_eater + factor = 0.75 + } + } + + option = { + name = health.7500.a + + add_trait = fragile_bones + } +} + diff --git a/events/jester_stress_relief_events.txt b/events/jester_stress_relief_events.txt index 4033c49e..4309f474 100644 --- a/events/jester_stress_relief_events.txt +++ b/events/jester_stress_relief_events.txt @@ -459,10 +459,13 @@ jester.500 = { # Clothes Thief } trigger = { - NOT = { + NOR = { faith = { has_doctrine = tenet_natural_primitivism #Nakedness is not a notable thing } + culture = { + has_cultural_parameter = naked_culture_active + } } any_courtier_or_guest = { is_available_ai_adult = yes diff --git a/events/lifestyles/scholarship_lifestyle/learning_medicine_events.txt b/events/lifestyles/scholarship_lifestyle/learning_medicine_events.txt index 12b0f47e..5204fce8 100644 --- a/events/lifestyles/scholarship_lifestyle/learning_medicine_events.txt +++ b/events/lifestyles/scholarship_lifestyle/learning_medicine_events.txt @@ -998,6 +998,7 @@ learning_medicine.2021 = { #by Mathilda Bjarnehed sender = scope:physician immediate = { + save_scope_as = liege # for salary tooltips random_pool_character = { province = root.capital_province limit = { learning >= medium_skill_rating } @@ -1011,6 +1012,7 @@ learning_medicine.2021 = { #by Mathilda Bjarnehed } } save_scope_as = physician + save_scope_as = candidate # for aptitude tooltips } if = { limit = { NOT = { exists = scope:physician } } @@ -1020,12 +1022,16 @@ learning_medicine.2021 = { #by Mathilda Bjarnehed location = root.capital_province save_scope_as = physician } + scope:physician = { + save_scope_as = candidate # for aptitude tooltips + } } } #Yes I want your services option = { name = learning_medicine.2021.a + custom_tooltip = learning_medicine.2021.a.tt pay_treasury_or_gold = { value = high_skill_court_physician_cost target = scope:physician @@ -1034,11 +1040,22 @@ learning_medicine.2021 = { #by Mathilda Bjarnehed EMPLOYER = root PHYSICIAN = scope:physician } - custom_tooltip = learning_medicine.2021.a.tt + custom_tooltip = health.3001.a.tt + custom_tooltip = court_physician_aptitude_tooltip trigger_event = { id = learning_medicine.2022 days = { 7 10 } } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -0.5 + ai_rationality = 0.25 + } + modifier = { + add = age + } + } } #Maybe there is something else you can help me with @@ -1053,12 +1070,28 @@ learning_medicine.2021 = { #by Mathilda Bjarnehed EMPLOYER = root PHYSICIAN = scope:physician } + custom_tooltip = health.3001.a.tt + custom_tooltip = court_physician_aptitude_tooltip + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -0.25 + ai_rationality = 0.5 + } + } } #Nah thanks option = { name = learning_medicine.2021.c add_prestige = miniscule_prestige_gain + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = -0.25 + } + } } } diff --git a/events/lifestyles/warfare_lifestyle/martial_authority_events.txt b/events/lifestyles/warfare_lifestyle/martial_authority_events.txt index 50b94ea5..a8aaa5f6 100644 --- a/events/lifestyles/warfare_lifestyle/martial_authority_events.txt +++ b/events/lifestyles/warfare_lifestyle/martial_authority_events.txt @@ -94,7 +94,16 @@ martial_authority.1031 = { short_term_gold >= major_gold_value_check } } - + + remove_short_term_gold = 5 + add_character_modifier = { + modifier = generous_to_mercenaries + } + add_martial_lifestyle_xp = minor_lifestyle_xp + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { base = 50 modifier = { @@ -106,14 +115,6 @@ martial_authority.1031 = { } } } - remove_short_term_gold = major_gold_value - add_character_modifier = { - modifier = generous_to_mercenaries - } - add_martial_lifestyle_xp = minor_lifestyle_xp - stress_impact = { - greedy = minor_stress_impact_gain - } } option = { @@ -124,6 +125,12 @@ martial_authority.1031 = { years = 10 } } + + add_martial_lifestyle_xp = minor_lifestyle_xp + stress_impact = { + just = minor_stress_impact_gain + } + ai_chance = { base = 50 modifier = { @@ -134,10 +141,6 @@ martial_authority.1031 = { } } } - add_martial_lifestyle_xp = minor_lifestyle_xp - stress_impact = { - just = minor_stress_impact_gain - } } option = { name = martial_authority.1031.c @@ -171,6 +174,14 @@ martial_authority.1031 = { modifier = respected_by_mercenaries } } + + add_martial_lifestyle_xp = medium_lifestyle_xp + stress_impact = { + calm = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { base = 50 modifier = { @@ -183,12 +194,6 @@ martial_authority.1031 = { } } } - add_martial_lifestyle_xp = medium_lifestyle_xp - stress_impact = { - calm = minor_stress_impact_gain - compassionate = minor_stress_impact_gain - forgiving = minor_stress_impact_gain - } } } @@ -1329,7 +1334,7 @@ martial_authority_special.1100 = { location = root.capital_province template = soldier_friend_character save_scope_as = soldier_friend - dynasty = generate + dynasty = none } } else = { @@ -1338,7 +1343,7 @@ martial_authority_special.1100 = { location = root.location template = soldier_friend_character save_scope_as = soldier_friend - dynasty = generate + dynasty = none } } } diff --git a/events/lifestyles/warfare_lifestyle/martial_chivalry_events.txt b/events/lifestyles/warfare_lifestyle/martial_chivalry_events.txt index 6a9b71a8..f8f509d1 100644 --- a/events/lifestyles/warfare_lifestyle/martial_chivalry_events.txt +++ b/events/lifestyles/warfare_lifestyle/martial_chivalry_events.txt @@ -90,6 +90,7 @@ martial_chivalry.0001 = { faith = root.faith gender_female_chance = root_soldier_female_chance prowess = 15 + dynasty = none } } } diff --git a/events/lifestyles/warfare_lifestyle/martial_strategy_events.txt b/events/lifestyles/warfare_lifestyle/martial_strategy_events.txt index 370a3da4..980555e5 100644 --- a/events/lifestyles/warfare_lifestyle/martial_strategy_events.txt +++ b/events/lifestyles/warfare_lifestyle/martial_strategy_events.txt @@ -86,7 +86,7 @@ martial_strategy.1051 = { } } - #More available event options make a more interesting event, so we increase the chance of this occuring. + #More available event options make a more interesting event, so we increase the chance of this occurring. modifier = { has_trait = brave add = 0.2 @@ -3555,6 +3555,7 @@ martial_strategy_special.1405 = { location = scope:capital.title_province gender_female_chance = root_faith_clergy_gender_female_chance age = { 16 60 } + dynasty = none culture = root.culture faith = root.faith trait = zealous diff --git a/events/pregnancy_events.txt b/events/pregnancy_events.txt index 6b988614..b19a11ee 100644 --- a/events/pregnancy_events.txt +++ b/events/pregnancy_events.txt @@ -238,44 +238,6 @@ pregnancy.1002 = { } } -scripted_trigger former_consort_was_father = { - OR = { - any_former_spouse = { - even_if_dead = yes - this = scope:father - this = scope:real_father - trigger_if = { - limit = { - is_alive = yes - } - NOT = { any_consort = { this = root } } - } - } - any_former_concubinist = { - even_if_dead = yes - this = scope:father - this = scope:real_father - trigger_if = { - limit = { - is_alive = yes - } - NOT = { any_consort = { this = root } } - } - } - any_former_concubine = { - even_if_dead = yes - this = scope:father - this = scope:real_father - trigger_if = { - limit = { - is_alive = yes - } - NOT = { any_consort = { this = root } } - } - } - } -} - # Pregnant with late husband or ex-husband's child # by Sean Hughes pregnancy.1101 = { @@ -473,9 +435,8 @@ pregnancy.2001 = { NOR = { # If we are married or have concubines (or are a concubine) this event is not valid, as there is a (assumed) father. any_consort = { } - # Same for if a former spouse/concubine got us pregant. - former_consort_was_father = yes } + pregnancy_is_bastard = yes } immediate = { @@ -617,14 +578,8 @@ pregnancy.2002 = { any_consort = { is_male = yes } - pregnancy_real_father = { - NOT = { is_consort_of = root } - } - # OBJECTION! If a former spouse/concubine is both the real and assumed father, it's not actually a bastard! - NOT = { - former_consort_was_father = yes - } + pregnancy_is_bastard = yes } immediate = { @@ -691,6 +646,26 @@ pregnancy.2002 = { add = 100 accepts_adultery_without_penalty_trigger = yes } + modifier = { + add = 50 + accepts_adultery_without_penalty_trigger = yes + scope:father = { is_lowborn = yes } + scope:real_father = { is_lowborn = no } + } + modifier = { + accepts_adultery_without_penalty_trigger = yes + add = { + value = scope:real_father.highest_held_title_tier + multiply = 10 + } + } + modifier = { + accepts_adultery_without_penalty_trigger = yes + add = { + value = scope:father.highest_held_title_tier + multiply = -10 + } + } } } @@ -722,6 +697,9 @@ pregnancy.2002 = { days = 22 } married_mother_pregnancy_effect = yes + stress_impact = { + honest = medium_stress_impact_gain + } ai_chance = { base = 100 ai_value_modifier = { @@ -729,14 +707,28 @@ pregnancy.2002 = { ai_compassion = 1 ai_rationality = 0.5 } - modifier = { # Never hide the truth in faiths with the Polyamory tenet. - factor = 0 + modifier = { + add = 50 + scope:father = { is_lowborn = no } + scope:real_father = { is_lowborn = yes } + } + modifier = { + add = { + value = scope:real_father.highest_held_title_tier + multiply = 10 + } + } + modifier = { + add = { + value = scope:father.highest_held_title_tier + multiply = -10 + } + } + modifier = { # Less likely to hide the truth in faiths with the Polyamory tenet. + add = 100 accepts_adultery_without_penalty_trigger = yes } } - stress_impact = { - honest = medium_stress_impact_gain - } } option = { #Keep it secret! @@ -751,8 +743,25 @@ pregnancy.2002 = { ai_value_modifier = { ai_rationality = 0.5 } - modifier = { # Never hide the truth in faiths with the Polyamory tenet. - factor = 0 + modifier = { + add = 50 + scope:father = { is_lowborn = no } + scope:real_father = { is_lowborn = yes } + } + modifier = { + add = { + value = scope:father.highest_held_title_tier + multiply = 10 + } + } + modifier = { + add = { + value = scope:real_father.highest_held_title_tier + multiply = -10 + } + } + modifier = { # Less likely to hide the truth in faiths with the Polyamory tenet. + add = -100 accepts_adultery_without_penalty_trigger = yes } } @@ -898,16 +907,11 @@ pregnancy.2050 = { trigger = { # If we are married and/or have concubines, but all of them are women as well, it's a bastard! any_consort = { - NOT = { is_male = yes } - } - pregnancy_real_father = { - NOT = { is_consort_of = root } + is_female = yes + count = all } - # OBJECTION! If a former spouse/concubine is both the real and assumed father, it's not actually a bastard! - NOT = { - former_consort_was_father = yes - } + pregnancy_is_bastard = yes } immediate = { @@ -1503,7 +1507,16 @@ pregnancy.6001 = { character = scope:mother animation = personality_callous } - right_portrait = scope:real_father + right_portrait = { + character = scope:real_father + animation = war_over_win + } + lower_center_portrait = { + character = scope:father + trigger = { + NOT = { this = scope:real_father } + } + } option = { name = pregnancy.6001.a @@ -1616,7 +1629,7 @@ pregnancy.6004 = { CHARACTER = scope:real_father } } - trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = root.faith GENDER_CHARACTER = scope:mother } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:incestuous FAITH = root.faith GENDER_CHARACTER = scope:mother } } desc = pregnancy.6004.incest } diff --git a/events/religion_events/holy_order_events.txt b/events/religion_events/holy_order_events.txt index c44bbb9d..1b12d348 100644 --- a/events/religion_events/holy_order_events.txt +++ b/events/religion_events/holy_order_events.txt @@ -220,27 +220,30 @@ holy_order.0200 = { desc = holy_order.0200.desc sender = scope:recipient + immediate = { + set_variable = { + name = amount_to_loan + value = holy_order_gold_value + days = 1 + } + } + option = { name = holy_order.0200.a show_as_tooltip = { scope:recipient = { pay_treasury_or_gold = { target = root - value = root.holy_order_gold_value + value = root.var:amount_to_loan } } } + add_character_flag = borrow_from_holy_order set_up_loan_effect = { LENDER = scope:recipient AMOUNT = holy_order_gold_value } - #Set up extra variable to track time - scope:recipient = { - set_variable = { - name = years_since_loan - value = 0 - } - } + remove_variable = amount_to_loan } option = { #Your piety level is too low :( sinner! @@ -256,23 +259,16 @@ holy_order.0200 = { #by Linnéa Thimrén holy_order.0201 = { hidden = yes + orphan = yes # deprecated immediate = { remove_variable = loan_holder - scope:order ={ - leader = { - save_scope_as = new_leader - } - } + scope:order.leader = { save_scope_as = new_leader } set_variable = { name = loan_holder value = scope:new_leader } scope:new_leader = { - set_variable = { - name = loan_amount_owed - value = root.var:loan_amount_owed - } set_variable = { name = owes_me_money value = root @@ -287,14 +283,20 @@ holy_order.0206 = { hidden = yes trigger = { - exists = var:owes_me_money - exists = var:years_since_loan + any_in_list = { + variable = owes_me_money + exists = var:years_since_loan + } } immediate = { - change_variable = { - name = years_since_loan - add = 1 + every_in_list = { + variable = owes_me_money + limit = { exists = var:years_since_loan } + change_variable = { + name = years_since_loan + add = 1 + } } } } @@ -330,8 +332,7 @@ holy_order.0202 = { trigger = { has_character_flag = borrow_from_holy_order - exists = var:loan_holder - var:loan_holder = { + var:loan_holder ?= { exists = var:years_since_loan var:years_since_loan >= 10 } diff --git a/events/religion_events/local_shrine_events.txt b/events/religion_events/local_shrine_events.txt index 90b61da0..cf737581 100644 --- a/events/religion_events/local_shrine_events.txt +++ b/events/religion_events/local_shrine_events.txt @@ -104,12 +104,12 @@ local_rites.1 = { situation_current_phase = situation_dynastic_cycle_phase_stability_advancement } } - title:b_xuchang = { + title:b_qianfeng = { this != root.capital_barony holder.top_liege = root } } - title:b_xuchang = { + title:b_qianfeng = { title_province = { save_scope_as = mount_tai_location } } } @@ -313,7 +313,7 @@ local_rites.1 = { option = { trigger = { exists = scope:mount_tai_location - scope:mount_tai_location.barony = title:b_xuchang + scope:mount_tai_location.barony = title:b_qianfeng } name = local_rites.1.mount_tai local_shrine_at_location_effect = { SHRINE = mount_tai } @@ -423,7 +423,7 @@ local_rites.3 = { #Destination - Making a Sacrifice triggered_desc = { trigger = { has_title = title:h_china - var:shrine_location.barony = title:b_xuchang + var:shrine_location.barony = title:b_qianfeng } desc = local_rites.3.t.fengshan #Fang Shan } @@ -458,7 +458,7 @@ local_rites.3 = { #Destination - Making a Sacrifice triggered_desc = { trigger = { has_title = title:h_china - var:shrine_location.barony = title:b_xuchang + var:shrine_location.barony = title:b_qianfeng } desc = local_rites.3.desc_mt_tai_huangdi } @@ -520,7 +520,7 @@ local_rites.3 = { #Destination - Making a Sacrifice override_background = { #Fengshan trigger = { has_title = title:h_china - var:shrine_location.barony = title:b_xuchang + var:shrine_location.barony = title:b_qianfeng } reference = mpo_steppe_evening } @@ -652,7 +652,7 @@ local_rites.3 = { #Destination - Making a Sacrifice if = { limit = { has_title = title:h_china - var:shrine_location.barony = title:b_xuchang + var:shrine_location.barony = title:b_qianfeng } hidden_effect = { dynasty = { set_variable = fengshan_performed } @@ -664,7 +664,7 @@ local_rites.3 = { #Destination - Making a Sacrifice name = fengshan_option trigger = { has_title = title:h_china - var:shrine_location.barony = title:b_xuchang + var:shrine_location.barony = title:b_qianfeng } add_treasury = { value = major_treasury_value @@ -680,7 +680,7 @@ local_rites.3 = { #Destination - Making a Sacrifice scope:at_home = no NOR = { has_title = title:h_china - var:shrine_location.barony = title:b_xuchang + var:shrine_location.barony = title:b_qianfeng } } #Pay Gold - Get Piety @@ -714,7 +714,7 @@ local_rites.3 = { #Destination - Making a Sacrifice scope:at_home = no NOR = { has_title = title:h_china - var:shrine_location.barony = title:b_xuchang + var:shrine_location.barony = title:b_qianfeng } } #Pay Prestige - Get Piety diff --git a/events/religion_events/religious_decision_events.txt b/events/religion_events/religious_decision_events.txt index 9ebab0f0..b08628be 100644 --- a/events/religion_events/religious_decision_events.txt +++ b/events/religion_events/religious_decision_events.txt @@ -1732,17 +1732,7 @@ religious_decision.0211 = { 20 = { trigger = { scope:at_home = no - # Must have a negative trait to replace. - OR = { - has_trait = greedy - has_trait = lustful - has_trait = gluttonous - has_trait = deceitful - has_trait = ambitious - has_trait = impatient - has_trait = sadistic - has_trait = wrathful - } + num_sinful_traits > 0 } # Greater chance when meditating in one of these terrains. @@ -1991,48 +1981,7 @@ religious_decision.0211 = { } else_if = { limit = { has_character_flag = meditation_reflection } - random_list = { - 1 = { - trigger = { has_trait = gluttonous } - remove_trait = gluttonous - add_trait_force_tooltip = temperate - } - 1 = { - trigger = { has_trait = greedy } - remove_trait = greedy - add_trait_force_tooltip = generous - } - 1 = { - trigger = { has_trait = ambitious } - remove_trait = ambitious - add_trait_force_tooltip = content - } - 1 = { - trigger = { has_trait = lustful } - remove_trait = lustful - add_trait_force_tooltip = chaste - } - 1 = { - trigger = { has_trait = deceitful } - remove_trait = deceitful - add_trait_force_tooltip = honest - } - 1 = { - trigger = { has_trait = sadistic } - remove_trait = sadistic - add_trait_force_tooltip = compassionate - } - 1 = { - trigger = { has_trait = impatient } - remove_trait = impatient - add_trait_force_tooltip = patient - } - 1 = { - trigger = { has_trait = wrathful } - remove_trait = wrathful - add_trait_force_tooltip = calm - } - } + replace_sinful_trait_effect = yes improve_meditation_skill = yes } else_if = { @@ -2903,6 +2852,12 @@ religious_decision.0602 = { # Convert to scope:old_caliph's faith. set_character_faith_with_conversion = scope:old_caliph.faith + if = { + limit = { + scope:old_caliph.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } # Make a note that a major character chose to convert rather than toe the line. scope:founder = { if = { diff --git a/events/religion_events/religious_interaction_events.txt b/events/religion_events/religious_interaction_events.txt index 04af3450..93810ca7 100644 --- a/events/religion_events/religious_interaction_events.txt +++ b/events/religion_events/religious_interaction_events.txt @@ -425,6 +425,13 @@ religious_interaction.5 = { desc = religious_interaction.5.fallback } desc = religious_interaction.5.outro + first_valid = { + triggered_desc = { + trigger = { scope:actor = scope:recipient } # If the Pope grants himself a Claim + desc = religious_interaction.5.self + } + desc = religious_interaction.5.outro_different_recipient + } } sender = { character = scope:recipient @@ -801,6 +808,19 @@ religious_interaction.2002 = { else = { show_as_tooltip = { demand_conversion_vassal_ruler_interaction_effect = yes } } + if = { + limit = { + has_title = title:e_minister_of_rites + } + change_influence = { + value = minor_influence_gain + multiply = scope:recipient.primary_title.tier + } + add_piety = { + value = minor_piety_gain + multiply = scope:recipient.primary_title.tier + } + } } option = { @@ -894,7 +914,7 @@ religious_interaction.2003 = { } scope:recipient = { add_opinion = { - modifier = demanded_my_conversion_opinion + modifier = compelled_me_to_convert_opinion target = root opinion = -10 } @@ -963,6 +983,19 @@ religious_interaction.2003 = { limit = { is_landless_adventurer = no } + if = { + limit = { + has_title = title:e_minister_of_rites + top_liege.faith != scope:recipient.faith + } + top_liege = { + add_opinion = { + target = scope:recipient + modifier = illegal_resisted_conversion_opinion + years = 10 + } + } + } add_opinion = { target = scope:recipient modifier = illegal_resisted_conversion_opinion @@ -1042,7 +1075,7 @@ religious_interaction.2011 = { } scope:recipient = { add_opinion = { - modifier = demanded_my_conversion_opinion + modifier = compelled_me_to_convert_opinion target = root opinion = -10 } @@ -1052,15 +1085,32 @@ religious_interaction.2011 = { #Accept option = { name = religious_interaction.2011.a - pay_short_term_gold = { + + pay_treasury_or_gold = { target = scope:recipient - gold = demand_conversion_bribe_size + value = demand_conversion_bribe_size } demand_conversion_interaction_effect = yes + stress_impact = { greedy = medium_stress_impact_gain } + + if = { + limit = { + has_title = title:e_minister_of_rites + } + change_influence = { + value = minor_influence_gain + multiply = scope:recipient.primary_title.tier + } + add_piety = { + value = minor_piety_gain + multiply = scope:recipient.primary_title.tier + } + } + ai_chance = { base = 100 ai_value_modifier = { @@ -1072,6 +1122,7 @@ religious_interaction.2011 = { OR = { has_trait = greedy short_term_gold <= major_gold_value + short_term_treasury <= major_treasury_value has_variable = conqueror ai_should_focus_on_building_in_their_capital = yes } @@ -1089,6 +1140,19 @@ religious_interaction.2011 = { CHARACTER = scope:recipient } } + if = { + limit = { + has_title = title:e_minister_of_rites + top_liege.faith != scope:recipient.faith + } + top_liege = { + add_opinion = { + target = scope:recipient + modifier = illegal_resisted_conversion_opinion + years = 15 + } + } + } add_opinion = { target = scope:recipient modifier = illegal_resisted_conversion_opinion @@ -1109,7 +1173,10 @@ religious_interaction.2011 = { base = 10 modifier = { add = 100 - gold < demand_conversion_bribe_size + OR = { + treasury < demand_conversion_bribe_size + gold < demand_conversion_bribe_size + } } } } @@ -1157,7 +1224,7 @@ religious_interaction.2012 = { } scope:recipient = { add_opinion = { - modifier = demanded_my_conversion_opinion + modifier = compelled_me_to_convert_opinion target = root opinion = -10 } @@ -1188,6 +1255,21 @@ religious_interaction.2012 = { stress_impact = { greedy = medium_stress_impact_gain } + + if = { + limit = { + has_title = title:e_minister_of_rites + } + change_influence = { + value = minor_influence_gain + multiply = scope:recipient.primary_title.tier + } + add_piety = { + value = minor_piety_gain + multiply = scope:recipient.primary_title.tier + } + } + ai_chance = { base = 100 } @@ -1203,6 +1285,19 @@ religious_interaction.2012 = { CHARACTER = scope:recipient } } + if = { + limit = { + has_title = title:e_minister_of_rites + top_liege.faith != scope:recipient.faith + } + top_liege = { + add_opinion = { + target = scope:recipient + modifier = illegal_resisted_conversion_opinion + years = 15 + } + } + } add_opinion = { target = scope:recipient modifier = illegal_resisted_conversion_opinion diff --git a/events/scheme_events/court_scheme/court_scheme_ongoing_events.txt b/events/scheme_events/court_scheme/court_scheme_ongoing_events.txt index 25fac7cd..dd1a7c0b 100644 --- a/events/scheme_events/court_scheme/court_scheme_ongoing_events.txt +++ b/events/scheme_events/court_scheme/court_scheme_ongoing_events.txt @@ -353,9 +353,8 @@ court_ongoing.0502 = { #by Mathilda Bjarnehed } trigger = { - exists = scope:scheme - scope:scheme = { - scheme_type = courting + any_targeting_scheme = { + scope:scheme ?= this } } diff --git a/events/scheme_events/governor_contract_events.txt b/events/scheme_events/governor_contract_events.txt index 65bc4398..ceee7352 100644 --- a/events/scheme_events/governor_contract_events.txt +++ b/events/scheme_events/governor_contract_events.txt @@ -893,6 +893,75 @@ governor_contract_event.1013 = { hungry_times = { scope:contract_taker = { trigger_event = governor_contract_event.2111 } } + jail_inspection = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0001 } + } + potent_physick = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0002 } + } + irregular_accounting = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0003 } + } + salt_smugglers = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0004 } + } + hoarding_grain = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0005 } + } + hoarding_grain = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0005 } + } + doddering_magistrate = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0006 } + } + burdensome_taxes = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0007 } + } + unsafe_highways = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0008 } + } + dam_in_disrepair = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0009 } + } + lines_in_the_soil = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0010 } + } + fraud_in_broad_daylight = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0011 } + } + crumbling_bridge = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0012 } + } + confusion_of_tongues = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0013 } + } + seditious_storytelling = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0014 } + } + quaking_in_panic = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0015 } + } + monopoly_in_the_marketplace = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0033 } + } + contested_inheritance = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0035 } + } + unsanctioned_deity = { + scope:contract_taker = { trigger_event = governor_contract_events_tova.0051 } + } + escaped_justice = { + scope:contract_taker = { trigger_event = governor_contract_events_tova.0056 } + } + forced_conscription = { + scope:contract_taker = { trigger_event = governor_contract_events_tova.0061 } + } + combat_train_monks = { + scope:contract_taker = { trigger_event = governor_contract_events_tova.0066 } + } + missing_equipment = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.2001 } + } } } } diff --git a/events/single_combat_events.txt b/events/single_combat_events.txt index 8a8a9739..2a4280b7 100644 --- a/events/single_combat_events.txt +++ b/events/single_combat_events.txt @@ -2332,6 +2332,7 @@ scripted_effect finalise_combat_results_effect = { } has_dlc_feature = legends NOT = { has_game_rule = historical_legends_only } + is_ruler = yes } create_legend_seed = { type = heroic @@ -2349,7 +2350,7 @@ scripted_effect finalise_combat_results_effect = { scope:sc_victor = { if = { limit = { - accolade ?= { is_accolade_active = yes } + is_acclaimed = yes } # Glory is relative to the prowess difference between two characters. Beating someone equally matched or better is worth more. ## Massively outclassed. @@ -11429,6 +11430,16 @@ single_combat.0041 = { } } } + #Lose some stress if you kill your rival + if = { + limit = { + has_relation_rival = scope:sc_loser + } + stress_impact = { + base = major_stress_impact_loss + } + } + # Damage equipped artifacts may_damage_artifact_effect = { diff --git a/events/situation_events/mpo_the_great_steppe_events.txt b/events/situation_events/mpo_the_great_steppe_events.txt index c863a427..ae0f32f9 100644 --- a/events/situation_events/mpo_the_great_steppe_events.txt +++ b/events/situation_events/mpo_the_great_steppe_events.txt @@ -12,9 +12,8 @@ mpo_the_great_steppe.0001 = { # Fullscreen Intro Event theme = realm trigger = { # we need to prevent this from firing for all players when a new player joins in MP is_ai = no - NOT = { has_variable = mpo_the_great_steppe_events_0001_var } + NOT = { has_character_flag = mpo_the_great_steppe_events_0001_var } } - hidden = yes override_background = { reference = mpo_fullscreen_the_great_steppe } override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_animate" } @@ -30,7 +29,7 @@ mpo_the_great_steppe.0001 = { # Fullscreen Intro Event } immediate = { play_music_cue = mx_cue_conquest_of_the_golden_horde - set_variable = mpo_the_great_steppe_events_0001_var + add_character_flag = mpo_the_great_steppe_events_0001_var save_scope_value_as = { name = start value = yes @@ -46,7 +45,6 @@ mpo_the_great_steppe.0001 = { # Fullscreen Intro Event mpo_the_great_steppe.0002 = { type = character_event title = mpo_the_great_steppe.0002.t - hidden = yes desc = { first_valid = { triggered_desc = { @@ -150,6 +148,7 @@ mpo_the_great_steppe.0002 = { } } theme = nomads + cooldown = { years = 1 } override_background = { trigger = { has_zud_season_nomadic_capital_root_trigger = yes diff --git a/events/title_events.txt b/events/title_events.txt index 7c4ed637..eb91140e 100644 --- a/events/title_events.txt +++ b/events/title_events.txt @@ -21,6 +21,13 @@ title_event.9900 = { } immediate = { + if = { + limit = { exists = root.var:ascended_throne_reason } + root.var:ascended_throne_reason = { save_scope_as = real_transfer_type } + } + else = { + scope:transfer_type = { save_scope_as = real_transfer_type } + } if = { limit = { is_target_in_variable_list = { @@ -99,8 +106,90 @@ title_event.9900 = { root = { remove_variable = ascended_throne_extra } } } + #Clean up LAAMPS who get the wrong governments in claimant wars + if = { + limit = { + OR = { + AND = { + has_variable = city_construction_is_temple_citadel + any_in_list = { + variable = new_titles + this = root.var:city_construction_is_temple_citadel + } + } + AND = { + has_variable = city_construction_is_castle + any_in_list = { + variable = new_titles + this = root.var:city_construction_is_castle + } + } + } + } + #Can the LAAMP become Mandala? + if = { + limit = { has_variable = city_construction_is_temple_citadel } + if = { + limit = { + #... we're lenient + faith = { has_doctrine = doctrine_polytheist } + } + #Sort out the House shenanigans + if = { + limit = { is_house_head = no } + house = { + if = { + limit = { + house_head = { + is_landed = no + is_courtier_of = root + } + } + set_house_head = root + } + } + } + else = { + house ?= { + set_house_aspiration = { type = no_aspect } + } + } + } + #Otherwise go vanilla + else = { + if = { + limit = { ep3_is_clan_inclined_trigger = yes } + change_government = clan_government + } + else = { change_government = feudal_government } + } + } + #Otherwise we have city_construction_is_castle + else = { + #... Feudals shouldn't have temple capitals + if = { + limit = { + has_variable = holding_barony + capital_barony = { this != root.var:holding_barony } + capital_province = { has_holding_type = church_holding } + } + capital_province = { set_holding_type = castle_holding } + } + #Otherwise go vanilla + else = { + if = { + limit = { ep3_is_clan_inclined_trigger = yes } + change_government = clan_government + } + else = { change_government = feudal_government } + } + } + remove_variable = city_construction_is_temple_citadel + remove_variable = city_construction_is_castle + remove_variable = holding_barony + } clear_variable_list = new_titles - remove_variable = title_count + remove_variable = title_count } } diff --git a/events/travel_events/travel_events_james.txt b/events/travel_events/travel_events_james.txt index d419903a..928502c0 100644 --- a/events/travel_events/travel_events_james.txt +++ b/events/travel_events/travel_events_james.txt @@ -1632,6 +1632,7 @@ travel_events.4006 = { root.current_travel_plan = { random_entourage_character = { limit = { + is_adult = yes opinion = { value <= low_negative_opinion target = root @@ -2528,10 +2529,22 @@ travel_events.4013 = { limit = { exists = dynasty dynasty.dynast = root + NOT = { + culture = { + has_cultural_tradition = tradition_tgp_japanese_houses + } + } } dynasty = { add_dynasty_prestige = major_dynasty_prestige_loss } } - else = { + else_if = { + limit = { + NOT = { + culture = { + has_cultural_tradition = tradition_tgp_japanese_houses + } + } + } add_prestige = massive_prestige_loss } if = { @@ -3384,6 +3397,12 @@ travel_events.4018 = { name = travel_events.4018.b add_piety = major_piety_loss set_character_faith = scope:mystic_scope.faith + if = { + limit = { + scope:mystic_scope.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } add_courtier = scope:mystic_scope root.current_travel_plan = { add_companion = scope:mystic_scope @@ -5660,7 +5679,7 @@ travel_events.4032 = { } if = { limit = { - accolade ?= { is_accolade_active = yes } + is_acclaimed = yes } accolade = { add_glory = minor_glory_gain } } @@ -5679,7 +5698,7 @@ travel_events.4032 = { } if = { limit = { - accolade ?= { is_accolade_active = yes } + is_acclaimed = yes } accolade = { add_glory = minor_glory_gain } } diff --git a/events/witch_events.txt b/events/witch_events.txt index 89d2e57c..4f8837e0 100644 --- a/events/witch_events.txt +++ b/events/witch_events.txt @@ -208,7 +208,7 @@ witch.1002 = { #by Mathilda Bjarnehed modifier = { exists = liege - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = liege.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = liege.faith GENDER_CHARACTER = root } add = 100 } #Player children of witch covens should always be asked @@ -279,7 +279,7 @@ witch.2001 = { #by Mathilda Bjarnehed desc = witch.2001.start.desc first_valid = { triggered_desc = { - trigger = { trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = witch GENDER_CHARACTER = root } } + trigger = { trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = trait:witch GENDER_CHARACTER = root } } desc = witch.2001.secrecy.desc } desc = witch.2001.no_secrecy.desc @@ -383,20 +383,23 @@ witch.2002 = { #by Mathilda Bjarnehed limit = { exists = scope:scheme_discovered } scope:owner = { save_scope_as = left_portrait - show_as_tooltip = { - random_secret = { - type = secret_witch - limit = { - NOT = { is_known_by = root } - } - reveal_to = root + random_secret = { + type = secret_witch + limit = { + NOT = { is_known_by = root } } + reveal_to = root + save_scope_as = secret_witch_scope } } } else = { save_scope_as = left_portrait } + random_targeting_scheme = { + save_scope_as = scheme + scheme_owner = { save_scope_as = left_portrait save_scope_as = owner } + } } #Yes I want to be a witch @@ -460,8 +463,21 @@ witch.2002 = { #by Mathilda Bjarnehed modifier = hate_opinion opinion = -30 } - + scope:owner = { + if = { + limit = { + any_secret = { + type = secret_witch + } + } + show_as_tooltip = { + random_secret = { + type = secret_witch + expose_secret = scope:target + } + } + } trigger_event = witch.2005 } @@ -471,7 +487,7 @@ witch.2002 = { #by Mathilda Bjarnehed trusting = minor_stress_impact_gain } } -} +} #SUCCESS EVENTS scripted_trigger witch_2003_can_learn_owner_secret = { @@ -826,11 +842,6 @@ witch.2005 = { #by Mathilda Bjarnehed animation = anger } trigger = { - scope:target = { - exists = liege - is_ruler = no - liege = { this != scope:owner } - } exists = scope:scheme_discovered } @@ -856,13 +867,43 @@ witch.2005 = { #by Mathilda Bjarnehed immediate = { random_secret = { type = secret_witch - if = { - limit = { NOT = { is_known_by = scope:target } } - reveal_to = scope:target + save_scope_as = witch_secret_scope + } + } + + option = { + name = witch.2005.a + flavor = witch.2005.a.tt + if = { + limit = { + scope:witch_secret_scope = { + NOT = { is_known_by = scope:target } + } } - if = { - limit = { NOT = { is_known_by = scope:target.liege } } - reveal_to = scope:target.liege + scope:target = { + send_interface_toast = { + title = witch.2005.toast + left_icon = root + scope:witch_secret_scope = { + reveal_to = scope:target + } + } + } + } + if = { + limit = { + scope:witch_secret_scope = { + NOT = { is_known_by = scope:target.liege } + } + } + scope:target.liege = { + send_interface_toast = { + title = witch.2005.toast + left_icon = root + scope:witch_secret_scope = { + reveal_to = scope:target.liege + } + } } } scope:target = { @@ -876,16 +917,16 @@ witch.2005 = { #by Mathilda Bjarnehed modifier = impious_opinion opinion = -20 } - } - - option = { - name = witch.2005.a - flavor = witch.2005.a.tt - scope:scheme = { end_scheme = yes } } + + after = { + scope:witch_secret_scope = { + expose_secret = scope:target + } + } } diff --git a/events/yearly_events/bp1_yearly_james.txt b/events/yearly_events/bp1_yearly_james.txt index 379ea4fa..e317752f 100644 --- a/events/yearly_events/bp1_yearly_james.txt +++ b/events/yearly_events/bp1_yearly_james.txt @@ -1896,7 +1896,7 @@ bp1_yearly.9015 = { } is_adult = yes trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = incestuous + TRAIT = trait:incestuous GENDER_CHARACTER = scope:bp1_yearly_9007_doppelganger FAITH = root.faith } @@ -1919,7 +1919,7 @@ bp1_yearly.9015 = { } is_adult = yes trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = incestuous + TRAIT = trait:incestuous GENDER_CHARACTER = root FAITH = scope:bp1_yearly_9007_doppelganger.faith } @@ -2936,7 +2936,7 @@ scripted_trigger bp1_yearly_9019_spouse_trigger = { faith = { has_doctrine_parameter = homosexuality_accepted } NOT = { trait_is_shunned_in_faith_trigger = { - TRAIT = adulterer + TRAIT = trait:adulterer FAITH = root.faith GENDER_CHARACTER = root } @@ -3473,7 +3473,7 @@ bp1_yearly.9020 = { option = { # I would report you to the authorities for love name = bp1_yearly.9020.c trigger = { - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = deviant GENDER_CHARACTER = root } + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = trait:deviant GENDER_CHARACTER = root } exists = scope:bp1_yearly_9020_spouse_secret } scope:bp1_yearly_9020_spouse_secret = { @@ -5334,7 +5334,7 @@ bp1_yearly.9030 = { after = { add_character_flag = had_event_bp1_yearly_9030 } } -# Redemption: making ammends with rival's family +# Redemption: making amends with rival's family bp1_yearly.9031 = { type = character_event @@ -5555,7 +5555,7 @@ bp1_yearly.9031 = { after = { add_character_flag = had_event_bp1_yearly_9031 } } -# Redemption: making ammends with rival +# Redemption: making amends with rival bp1_yearly.9032 = { type = character_event @@ -7116,14 +7116,14 @@ bp1_yearly.9043 = { AND = { is_deviant_trigger = yes trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { - TRAIT = deviant + TRAIT = trait:deviant GENDER_CHARACTER = cp:councillor_court_chaplain } } AND = { is_cannibal_trigger = yes trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { - TRAIT = cannibal + TRAIT = trait:cannibal GENDER_CHARACTER = cp:councillor_court_chaplain } } @@ -7147,7 +7147,7 @@ bp1_yearly.9043 = { if = { limit = { trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { - TRAIT = cannibal + TRAIT = trait:cannibal GENDER_CHARACTER = cp:councillor_court_chaplain } } @@ -7168,7 +7168,7 @@ bp1_yearly.9043 = { if = { limit = { trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { - TRAIT = deviant + TRAIT = trait:deviant GENDER_CHARACTER = cp:councillor_court_chaplain } } @@ -7227,7 +7227,7 @@ bp1_yearly.9043 = { if = { limit = { trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { - TRAIT = cannibal + TRAIT = trait:cannibal GENDER_CHARACTER = root } } @@ -7248,7 +7248,7 @@ bp1_yearly.9043 = { if = { limit = { trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { - TRAIT = deviant + TRAIT = trait:deviant GENDER_CHARACTER = root } } diff --git a/events/yearly_events/court_yearly_events.txt b/events/yearly_events/court_yearly_events.txt index 05e6e2d5..3cfcdee8 100644 --- a/events/yearly_events/court_yearly_events.txt +++ b/events/yearly_events/court_yearly_events.txt @@ -3592,10 +3592,13 @@ court_yearly.4800 = { immediate = { if = { limit = { - employs_court_position = bodyguard_court_position + any_court_position_holder = { + type = bodyguard_court_position + is_available_ai_adult = yes + } } random_court_position_holder = { - type = akolouthos_court_position + type = bodyguard_court_position limit = { is_available_ai_adult = yes } @@ -3604,7 +3607,7 @@ court_yearly.4800 = { } else = { random_court_position_holder = { - type = bodyguard_court_position + type = akolouthos_court_position limit = { is_available_ai_adult = yes } @@ -5241,8 +5244,8 @@ court_yearly.0110 = { cp:councillor_court_chaplain ?= { is_available_adult = yes } is_available_adult = yes OR = { - trait_is_shunned_in_faith_trigger = { TRAIT = adulterer FAITH = root.faith GENDER_CHARACTER = root } #Fornicator is handled by same rules - trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = root.faith GENDER_CHARACTER = root } #Fornicator is handled by same rules + trait_is_shunned_in_faith_trigger = { TRAIT = trait:adulterer FAITH = root.faith GENDER_CHARACTER = root } #Fornicator is handled by same rules + trait_is_criminal_in_faith_trigger = { TRAIT = trait:adulterer FAITH = root.faith GENDER_CHARACTER = root } #Fornicator is handled by same rules } OR = { has_trait = deviant @@ -6161,6 +6164,12 @@ court_yearly.8120 = { CONVERTOR = scope:accuser } set_character_faith_with_conversion = scope:accuser.faith + if = { + limit = { + scope:accuser.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } } else = { reverse_add_opinion = { @@ -6178,6 +6187,12 @@ court_yearly.8120 = { CONVERTOR = scope:refuter } set_character_faith_with_conversion = scope:refuter.faith + if = { + limit = { + scope:refuter.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } } stress_impact = { zealous = massive_stress_impact_gain diff --git a/history/provinces/e_finland.txt b/history/provinces/e_finland.txt index c90def3b..ef6b8482 100644 --- a/history/provinces/e_finland.txt +++ b/history/provinces/e_finland.txt @@ -1023,12 +1023,12 @@ } ###c_skolt -8789 = { #Skolt +404 = { #Kiilt culture = NEOW_novgorodian religion = orthodox holding = tribal_holding } -404 = { #Kiilt +8789 = { #Skolt holding = none } 402 = { #b_muetkk = Mue´tkk = Motovsky diff --git a/map_data/definition.csv b/map_data/definition.csv index 857121d2..58d2cee7 100644 --- a/map_data/definition.csv +++ b/map_data/definition.csv @@ -12946,7 +12946,7 @@ 12945;234;86;120;;x 12946;140;84;84;;x 12947;107;161;159;b_qianzhou_qianhua;x -12948;255;216;0;x ;x +12948;255;216;0;x;x 12949;143;205;49;b_zhangzhou_zhangpu_southwest;x 12950;180;79;227;b_zhangzhou_zhangpu_west;x 12951;126;81;15;b_zhangzhou_longxi_west;x